/* 安期管家 · 产品官网 */
:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --ink: #141a17;
  --muted: #5c6b63;
  --line: #dce5df;
  --primary: #1b7a4a;
  --primary-dark: #145c38;
  --primary-soft: #e8f5ee;
  --primary-glow: rgba(27, 122, 74, 0.18);
  --warn-y: #d9a116;
  --warn-o: #e06a1a;
  --warn-r: #c93a32;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 12px 40px rgba(20, 26, 23, 0.08);
  --shadow-sm: 0 4px 16px rgba(20, 26, 23, 0.06);
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --nav-h: 72px;
  --max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }

.container {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

/* —— Nav —— */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.site-nav.is-scrolled {
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}

.site-nav__inner {
  height: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  justify-self: start;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.nav-links a:hover { color: var(--primary); }

.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 10px;
  flex-shrink: 0;
}

/* 移动端抽屉：桌面端默认隐藏 */
.nav-drawer {
  display: none;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.brand__img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  object-fit: contain;
}

.site-footer .brand__img {
  width: 48px;
  height: 48px;
}

.brand__name {
  letter-spacing: -0.02em;
}

.brand__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.brand__icon svg { width: 20px; height: 20px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn--primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 22px var(--primary-glow);
}

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn--lg { padding: 14px 28px; font-size: 15px; }

/* —— Hero —— */
.hero {
  padding: calc(var(--nav-h) + 56px) 0 80px;
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 70% -10%, rgba(27, 122, 74, 0.12), transparent),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(217, 161, 22, 0.08), transparent);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.hero__title em {
  font-style: normal;
  color: var(--primary);
}

.hero__desc {
  font-size: 17px;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 480px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.hero__platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.platform-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid rgba(27, 122, 74, 0.2);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
}

.stat__value {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

.stat__label {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}

/* Hero visual */
.hero-visual {
  position: relative;
}

.hero-visual__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: #f8faf9;
  border-bottom: 1px solid var(--line);
}

.hero-visual__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
}

.hero-visual__dot:nth-child(1) { background: #ff5f57; }
.hero-visual__dot:nth-child(2) { background: #febc2e; }
.hero-visual__dot:nth-child(3) { background: #28c840; }

.hero-visual__body { padding: 20px; }

.alert-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.alert-pill {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
}

.alert-pill strong {
  display: block;
  font-size: 22px;
  margin-bottom: 2px;
}

.alert-pill--green { background: #e8f5ee; color: var(--primary); }
.alert-pill--yellow { background: #fff7e0; color: #9a6b00; }
.alert-pill--orange { background: #fff0e6; color: #b04a12; }
.alert-pill--red { background: #fdeceb; color: var(--warn-r); }

.batch-list {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.batch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}

.batch-row:last-child { border-bottom: none; }

.batch-row__tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

.tag--warn { background: #fff0e6; color: #b04a12; }
.tag--ok { background: var(--primary-soft); color: var(--primary); }

.hero-phone {
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 140px;
  background: var(--ink);
  border-radius: 24px;
  padding: 8px;
  box-shadow: var(--shadow);
  transform: rotate(4deg);
}

.hero-phone__screen {
  background: var(--surface);
  border-radius: 18px;
  padding: 14px 10px;
  font-size: 10px;
}

.hero-phone__title {
  font-weight: 700;
  font-size: 11px;
  margin-bottom: 8px;
  color: var(--primary);
}

.hero-phone__item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

/* —— Sections —— */
.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section__tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.section__desc {
  color: var(--muted);
  margin: 0;
  font-size: 16px;
}

/* Pain cards */
.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pain-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 12px;
}

.pain-card:hover {
  border-color: rgba(27, 122, 74, 0.35);
  box-shadow: var(--shadow-sm);
}

.pain-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  font-size: 20px;
  margin-bottom: 0;
  grid-row: 1;
  grid-column: 1;
  align-self: center;
}

.pain-card h3 {
  margin: 0;
  font-size: 16px;
  grid-row: 1;
  grid-column: 2;
  align-self: center;
}

.pain-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  grid-row: 2;
  grid-column: 1 / -1;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.feature-card__num {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 17px;
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

.feature-card ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--muted);
}

.feature-card li {
  padding: 4px 0;
  padding-left: 18px;
  position: relative;
}

.feature-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* Alert legend */
.alert-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  padding: 8px 14px;
  background: var(--bg);
  border-radius: 999px;
  border: 1px solid var(--line);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Product cards（四端） */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  row-gap: 12px;
}

.product-card__icon {
  width: 52px;
  height: 52px;
  margin-bottom: 0;
  border-radius: 14px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  font-size: 24px;
  grid-row: 1;
  grid-column: 1;
  align-self: center;
}

.product-card h3 {
  margin: 0;
  font-size: 16px;
  grid-row: 1;
  grid-column: 2;
  align-self: center;
}

.product-card p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  grid-row: 2;
  grid-column: 1 / -1;
}

.product-card .app-badges {
  grid-row: 3;
  grid-column: 1 / -1;
}

.product-card .btn {
  width: 100%;
  grid-column: 1 / -1;
}

.product-card p + .btn {
  grid-row: 3;
}

.product-card .app-badges + .btn {
  grid-row: 4;
}

.app-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.app-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
}

.product-note {
  margin: 28px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.product-note code {
  font-family: var(--mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
}

/* 兼容旧类名 */
.trio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.trio-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}

.trio-card__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 16px;
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  font-size: 26px;
}

.trio-card h3 { margin: 0 0 8px; font-size: 17px; }
.trio-card p { margin: 0; font-size: 14px; color: var(--muted); }
.trio-card .btn { margin-top: 16px; width: 100%; }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.price-card--featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow);
}

.price-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 999px;
}

.price-card h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.price-card__price {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.price-card__price small {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.price-card__desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.price-card ul {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  flex: 1;
  font-size: 14px;
}

.price-card li {
  padding: 7px 0;
  padding-left: 22px;
  position: relative;
  color: var(--muted);
}

.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* Compliance */
.compliance-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-radius: var(--radius-lg);
  padding: 48px;
  color: #fff;
}

.compliance-box h2 {
  margin: 0 0 16px;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.compliance-box p {
  margin: 0 0 12px;
  opacity: 0.9;
  font-size: 15px;
  line-height: 1.7;
}

.compliance-list {
  display: grid;
  gap: 12px;
}

.compliance-item {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 14px;
}

.compliance-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
}

/* CTA */
.cta-box {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  box-shadow: var(--shadow-sm);
}

.cta-box h2 {
  margin: 0 0 12px;
  font-size: 1.8rem;
}

.cta-box p {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 520px;
  margin-inline: auto;
}

.cta-box__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Footer */
.site-footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 280px;
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--ink);
  padding: 5px 0;
}

.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Mobile nav drawer */
@media (max-width: 900px) {
  .site-nav__inner {
    grid-template-columns: 1fr auto;
  }

  .nav-links,
  .nav-actions .btn--ghost,
  .nav-actions .btn--primary { display: none; }

  .nav-toggle { display: flex; }

  .nav-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: var(--nav-h) 0 auto;
    z-index: 99;
    background: var(--surface);
    padding: 24px;
    gap: 8px;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav-drawer.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-drawer a {
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 15px;
    color: var(--ink);
  }

  .nav-drawer a:hover { background: var(--primary-soft); color: var(--primary); }

  .nav-drawer .btn { margin-top: 8px; width: 100%; }

  .hero__grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 480px; margin: 0 auto; }
  .hero-phone { right: 0; bottom: -20px; width: 120px; }

  .pain-grid,
  .feature-grid,
  .product-grid,
  .trio-grid,
  .pricing-grid { grid-template-columns: 1fr; }

  .compliance-box { grid-template-columns: 1fr; padding: 32px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero__stats { gap: 20px; }
  .alert-grid { grid-template-columns: 1fr; }
}
