/* ============================================================
   物归其位 · 官网主页样式
   设计令牌与小程序的 app.wxss 保持一致（px = rpx / 2）：
   主色 #07C160 / 浅绿 #E8F7EF / 蓝 #1989FA / 红 #FA5151 / 橙 #E6A23C
   卡片 #FFFFFF · 圆角 12px · 阴影 0 2px 8px rgba(0,0,0,.04)
   ============================================================ */

:root {
  --primary: #07C160;
  --primary-dark: #06AD56;
  --primary-light: #E8F7EF;
  --secondary: #1989FA;
  --secondary-light: rgba(25, 137, 250, 0.1);
  --expired: #FA5151;
  --soon: #E6A23C;
  --soon-light: rgba(230, 162, 60, 0.12);
  --bg: #F7F8FA;
  --card-bg: #FFFFFF;
  --text: #323233;
  --text-secondary: #969799;
  --border: #EBEDF0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============ 顶部导航 ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  flex-shrink: 0;
}

.brand-name {
  font-size: 17px;
  font-weight: 600;
  white-space: nowrap;
}

.brand-tag {
  font-size: 11px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

.nav-links { display: flex; align-items: center; gap: 26px; }

.nav-links a {
  font-size: 14px;
  color: var(--text);
  transition: color 0.15s ease;
}

.nav-links a:hover { color: var(--primary); }

/* ============ 首屏 ============ */
.hero {
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg) 100%);
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 68px 24px 60px;
  display: flex;
  align-items: center;
  gap: 48px;
}

.hero-text { flex: 1; min-width: 0; }

.hero-title {
  font-size: 40px;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.hero-title .hl { color: var(--primary); }

.hero-sub {
  margin-top: 18px;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.85;
  color: var(--text-secondary);
}

.hero-chips {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  font-size: 13px;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: 8px;
  white-space: nowrap;
}

.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* 按钮（对齐小程序 .btn-primary：44px 高 / 22px 圆角 / 绿色） */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 30px;
  border: none;
  border-radius: 22px;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  background: var(--primary-light);
  color: var(--primary);
}

.btn-ghost:hover { background: #DCF1E6; }
.btn-ghost:active { transform: scale(0.98); }

.btn-sm {
  height: 36px;
  padding: 0 20px;
  font-size: 14px;
  border-radius: 18px;
}

.hero-logo { flex-shrink: 0; }

.hero-logo-halo {
  width: 236px;
  height: 236px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #FFFFFF 0%, var(--primary-light) 72%);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-halo img {
  width: 132px;
  height: 132px;
  border-radius: 28px;
}

/* ============ 区块通用 ============ */
.sec { padding: 64px 24px; }
.sec-alt { background: var(--card-bg); }

.sec-head {
  max-width: 1120px;
  margin: 0 auto 36px;
  text-align: center;
}

.sec-title {
  font-size: 28px;
  font-weight: 600;
}

.sec-title::after {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--primary);
  margin: 12px auto 0;
}

.sec-sub {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-secondary);
}

/* 卡片（对齐小程序 .card） */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ============ 系统公告 ============ */
.notice-list {
  max-width: 1120px;
  margin: 0 auto;
  overflow: hidden;
}

.notice-item {
  display: flex;
  gap: 20px;
  padding: 26px 30px;
  border-bottom: 1px solid var(--border);
}

.notice-item:last-child { border-bottom: none; }

.notice-date {
  width: 62px;
  flex-shrink: 0;
  align-self: flex-start;
  background: var(--primary-light);
  border-radius: 10px;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.3;
}

.notice-day {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}

.notice-year {
  font-size: 11px;
  color: var(--text-secondary);
}

.notice-body { flex: 1; min-width: 0; }

.notice-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.notice-title-row h3 {
  font-size: 16px;
  font-weight: 600;
}

.tag {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  line-height: 1.5;
}

.tag-new { color: var(--primary); background: var(--primary-light); }
.tag-opt { color: var(--secondary); background: var(--secondary-light); }
.tag-act { color: var(--soon); background: var(--soon-light); }

.notice-body > p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* ============ 功能介绍 ============ */
.feature-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.feature-card {
  padding: 26px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.feature-card h3 {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 600;
}

.feature-card p {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-secondary);
}

/* ============ 痛点解决 ============ */
.pain-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.pain-card {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pain-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.pain-topic {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pain-emoji { font-size: 21px; line-height: 1; }

.pain-topic h3 {
  font-size: 16px;
  font-weight: 600;
}

.pain-desc {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.pain-solve {
  margin-top: 14px;
  background: var(--primary-light);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  gap: 8px;
}

.solve-check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pain-solve p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--primary-dark);
}

/* ============ 活动介绍 ============ */
.act-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.act-card {
  padding: 26px 24px 20px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.act-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.act-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.act-head h3 {
  font-size: 17px;
  font-weight: 600;
}

/* 角标（对齐小程序活动列表：Hot 红底 / New 绿底 白字小胶囊） */
.badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  padding: 3px 9px;
  border-radius: 8px;
  line-height: 1.5;
}

.badge-hot { background: var(--expired); }
.badge-new { background: var(--primary); }

.act-desc {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.act-points { margin-top: 14px; }

.act-points li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
}

.act-points li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.act-points li + li { margin-top: 8px; }

.act-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.act-desc + .act-points { margin-top: 14px; }
.act-points + .act-foot { margin-top: 18px; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* ============ 页脚 ============ */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  width: 52px;
  height: 52px;
  border-radius: 13px;
}

.footer-name {
  font-size: 17px;
  font-weight: 600;
}

.footer-slogan {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-cta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-cta p {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-meta {
  border-top: 1px solid var(--border);
  padding: 18px 24px 26px;
  text-align: center;
}

.footer-meta p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--text-secondary);
}

/* ============ 宣传片（iframe 隔离嵌入 /promo） ============ */
/* promo-wrap 控制宽度，promo-frame 用 padding-top 百分比撑比例：
   百分比按包含块（= promo-wrap）宽度计算，避免 max-width 与比例互相干扰 */
.promo-wrap {
  max-width: 960px;
  margin: 0 auto;
}

.promo-frame {
  position: relative;
  padding-top: 56.25%;
  border-radius: 16px;
  overflow: hidden;
  background: #0C1110;
  box-shadow: 0 16px 44px rgba(8, 24, 16, 0.16);
}

/* 纯净模式无播放控件，禁掉指针事件，避免 iframe 吃掉页面滚动（移动端尤甚） */
.promo-iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

.promo-note {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.promo-dot { margin: 0 6px; color: var(--border); }

.promo-link { color: var(--primary); }
.promo-link:hover { text-decoration: underline; }

/* ============ toast 提示 ============ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 48px;
  transform: translate(-50%, 0);
  max-width: calc(100vw - 48px);
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 300;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-show {
  opacity: 1;
  transform: translate(-50%, -6px);
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .pain-grid { grid-template-columns: repeat(2, 1fr); }
  .act-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .nav-inner { padding: 0 16px; }
  .brand-tag { display: none; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }

  .hero-inner {
    flex-direction: column;
    padding: 44px 20px 40px;
    gap: 32px;
    text-align: center;
  }

  .hero-title { font-size: 28px; }
  .hero-sub { font-size: 14.5px; margin-top: 14px; }
  .hero-chips { justify-content: center; }
  .hero-actions { justify-content: center; }

  .hero-logo-halo { width: 176px; height: 176px; }
  .hero-logo-halo img { width: 104px; height: 104px; border-radius: 22px; }

  .sec { padding: 44px 16px; }
  .sec-title { font-size: 22px; }
  .sec-sub { font-size: 13.5px; }

  .feature-grid,
  .pain-grid,
  .act-grid { grid-template-columns: 1fr; }

  .notice-item { padding: 20px 18px; gap: 14px; }
  .notice-date { width: 54px; }
  .notice-day { font-size: 14px; }

  .footer-inner {
    justify-content: center;
    text-align: center;
    padding: 28px 20px 22px;
  }

  .footer-brand { justify-content: center; }
  .footer-cta { justify-content: center; }

  /* 宣传片：竖屏 9:16 画幅，与 iframe 内 ratio 参数同步 */
  .promo-wrap { max-width: 360px; }

  .promo-frame {
    padding-top: 177.78%;
    border-radius: 14px;
  }

  .promo-note { font-size: 12px; }
}
