/* WawaBuddy 产品官网
   颜色沿用 frontend/web/app/globals.css 的品牌变量；字体自托管，不引任何 CDN。
   字号落在 Tailwind 默认刻度上；中文标题行高按中文阅读习惯略放宽，
   否则 48px 配 1 倍行高会让三行字贴在一起。 */

@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --brand: #0070e0;
  --brand-dark: #0059b3;
  --brand-soft: #e8f1fd;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --line: #e4e7ec;
  --bg: #f6f8fb;
  --white: #fff;
  --green: #067647;

  --s-25: 2px;
  --s-50: 4px;
  --s-75: 8px;
  --s-100: 12px;
  --s-200: 16px;
  --s-300: 24px;
  --s-400: 32px;
  --s-500: 40px;
  --s-600: 48px;
  --s-700: 64px;
  --s-800: 80px;
  --s-900: 96px;

  --r-lg: 8px;
  --r-xl: 12px;
  --r-2xl: 16px;
  --r-full: 9999px;

  --curve: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-padding-top: var(--s-900); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }

h1, h2, h3 { color: var(--ink); text-wrap: balance; margin: 0; }
p { text-wrap: pretty; margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: var(--s-25);
  border-radius: var(--r-lg);
}

.wrap {
  width: min(1120px, calc(100% - var(--s-600)));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: var(--s-75);
  left: var(--s-200);
  z-index: 60;
  padding: var(--s-75) var(--s-200);
  background: var(--white);
  border: 1px solid var(--brand);
  border-radius: var(--r-lg);
  color: var(--brand-dark);
  font-size: 14px;
  line-height: 20px;
  transform: translateY(-200%);
  transition: transform 500ms var(--curve);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- 浮动导航 ---------- */
.topbar {
  position: fixed;
  z-index: 50;
  top: var(--s-200);
  left: 50%;
  transform: translateX(-50%);
  width: min(1120px, calc(100% - var(--s-400)));
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--s-300);
  padding: var(--s-100) var(--s-300);
}
.brand { flex: 0 0 auto; display: block; }
.brand img { width: 150px; height: 31px; }
.nav-desktop { display: flex; align-items: center; gap: var(--s-300); margin-left: auto; }
.nav-desktop a {
  position: relative;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-2);
  padding: var(--s-75) 0;
  transition: color 300ms var(--curve);
}
.nav-desktop a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--s-25);
  height: 2px;
  background: var(--brand);
  opacity: 0;
  transform: scaleX(0.4);
  transition: opacity 300ms var(--curve), transform 500ms var(--curve);
}
.nav-desktop a:hover { color: var(--brand-dark); }
.nav-desktop a.is-active { color: var(--brand-dark); font-weight: 600; }
.nav-desktop a.is-active::after { opacity: 1; transform: scaleX(1); }
.topbar-cta { flex: 0 0 auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-75);
  padding: var(--s-75) var(--s-300);
  border: 1px solid transparent;
  border-radius: var(--r-xl);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background-color 300ms var(--curve), color 300ms var(--curve),
              transform 500ms var(--curve), box-shadow 300ms var(--curve);
}
.btn-sm { font-size: 14px; line-height: 20px; }
.btn-primary { background: var(--brand); color: var(--white); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 112, 224, 0.18); }
.btn-primary:active { transform: scale(0.98); }

.nav-toggle {
  display: none;
  flex: 0 0 auto;
  margin-left: auto;
  width: 40px;
  height: 40px;
  padding: var(--s-75);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--white);
  cursor: pointer;
  transition: background-color 300ms var(--curve), transform 500ms var(--curve);
}
.nav-toggle:hover { background: var(--brand-soft); }
.nav-toggle:active { transform: scale(0.98); }
.nav-toggle-lines { display: block; position: relative; width: 20px; height: 20px; }
.nav-toggle-lines i {
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: var(--r-full);
  transition: transform 500ms var(--curve), opacity 300ms var(--curve);
}
.nav-toggle-lines i:first-child { top: 6px; }
.nav-toggle-lines i:last-child { top: 12px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-lines i:first-child { transform: translateY(3px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-lines i:last-child { transform: translateY(-3px) rotate(-45deg); }

.mobile-panel {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  padding: var(--s-900) var(--s-400) var(--s-600);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 500ms var(--curve), visibility 500ms var(--curve);
}
.mobile-panel.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.mobile-nav { display: flex; flex-direction: column; gap: var(--s-300); max-width: 480px; margin-inline: auto; }
.mobile-nav a:not(.btn) {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--s-200);
}
.mobile-nav .btn { width: 100%; margin-top: var(--s-200); }
.js .mobile-panel a {
  opacity: 0;
  transform: translateY(var(--s-300));
  transition: opacity 500ms var(--curve), transform 500ms var(--curve);
}
.js .mobile-panel.is-open a { opacity: 1; transform: translateY(0); }
.mobile-panel.is-open a:nth-child(1) { transition-delay: 0ms; }
.mobile-panel.is-open a:nth-child(2) { transition-delay: 60ms; }
.mobile-panel.is-open a:nth-child(3) { transition-delay: 120ms; }
.mobile-panel.is-open a:nth-child(4) { transition-delay: 180ms; }
.mobile-panel.is-open a:nth-child(5) { transition-delay: 240ms; }

/* ---------- Hero ---------- */
.hero { padding: calc(var(--s-900) + var(--s-800)) 0 var(--s-800); background: var(--white); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-700);
  align-items: center;
}
.eyebrow {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--brand-dark);
  margin-bottom: var(--s-200);
  letter-spacing: 0;
}
.hero h1 {
  max-width: 680px;
  font-size: 48px;
  line-height: 1.16;
  font-weight: 700;
  background: linear-gradient(90deg, #101828 0%, #667085 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { max-width: 680px; margin-top: var(--s-300); font-size: 18px; line-height: 28px; color: var(--ink-2); }
.hero-actions { margin-top: var(--s-400); display: flex; flex-wrap: wrap; gap: var(--s-200); }
.proof-line { max-width: 680px; margin-top: var(--s-200); font-size: 14px; line-height: 20px; color: var(--muted); }

.hero-visual { position: relative; min-width: 0; }
.panel-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: 0 24px 48px rgba(16, 24, 40, 0.10);
  padding: var(--s-300);
}
.panel-head { display: flex; align-items: center; gap: var(--s-100); font-size: 14px; line-height: 20px; color: var(--ink); font-weight: 600; }
.panel-dot { width: var(--s-75); height: var(--s-75); border-radius: var(--r-full); background: var(--brand); }
.panel-tag { margin-left: auto; padding: var(--s-25) var(--s-100); border-radius: var(--r-full); background: #ecfdf3; color: var(--green); font-size: 12px; line-height: 16px; }
.panel-query {
  margin-top: var(--s-300);
  padding: var(--s-200);
  background: var(--bg);
  border-radius: var(--r-lg);
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-2);
}
.panel-rows { margin-top: var(--s-200); }
.panel-rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: var(--s-100);
  align-items: center;
  padding: var(--s-200) 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 20px;
}
.panel-rows li:last-child { border-bottom: 0; }
.cell-name { font-weight: 600; color: var(--ink); }
.cell-meta { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip { padding: var(--s-25) var(--s-100); border-radius: var(--r-full); background: var(--bg); color: var(--muted); font-size: 12px; line-height: 16px; white-space: nowrap; }
.chip-on { background: var(--brand-soft); color: var(--brand-dark); }
.panel-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-200);
  margin-top: var(--s-200);
  padding-top: var(--s-200);
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
}
.float-note {
  display: flex;
  flex-direction: column;
  gap: var(--s-50);
  margin-top: var(--s-200);
  padding: var(--s-200);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--brand-soft);
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-2);
}
.float-note strong { color: var(--brand-dark); font-size: 14px; line-height: 20px; }

/* ---------- 主张逐词点亮 ---------- */
.tagline-section { padding: var(--s-800) 0; background: var(--white); border-top: 1px solid var(--line); }
.tagline {
  max-width: 900px;
  font-size: 36px;
  line-height: 1.28;
  font-weight: 600;
  color: var(--ink);
  text-wrap: balance;
}
.js .tagline .word { color: rgba(16, 24, 40, 0.28); transition: color 500ms var(--curve); }
.js .tagline .word.is-lit { color: var(--ink); }

/* ---------- 通用区块 ---------- */
.section { padding: var(--s-800) 0; background: var(--white); }
.section-soft { background: var(--bg); }
.section h2, .final-cta h2 { font-size: 30px; line-height: 36px; font-weight: 700; }
.section h3 { font-size: 20px; line-height: 28px; font-weight: 600; }
.section-note { margin-top: var(--s-400); font-size: 14px; line-height: 20px; color: var(--muted); }
.js .reveal { opacity: 0; transform: translateY(var(--s-400)); }
.js .reveal { transition: opacity 700ms var(--curve), transform 700ms var(--curve); }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }

.problem-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-300); margin-top: var(--s-400); }
.problem-card {
  padding: var(--s-300);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
}
.problem-num { display: block; font-size: 14px; line-height: 20px; font-weight: 700; color: var(--brand); margin-bottom: var(--s-200); }
.problem-card h3 { margin-bottom: var(--s-100); }
.problem-card p { font-size: 14px; line-height: 20px; color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s-300); margin-top: var(--s-400); }
.feature-card {
  display: flex;
  flex-direction: column;
  gap: var(--s-100);
  padding: var(--s-300);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  transition: transform 500ms var(--curve), box-shadow 300ms var(--curve), border-color 300ms var(--curve);
}
.feature-card:hover { transform: translateY(-4px); border-color: #c9d8ee; box-shadow: 0 16px 32px rgba(16, 24, 40, 0.08); }
.feature-mark { align-self: flex-start; padding: var(--s-25) var(--s-100); border-radius: var(--r-full); background: var(--brand-soft); color: var(--brand-dark); font-size: 12px; line-height: 16px; font-weight: 700; }
.feature-card p { font-size: 14px; line-height: 20px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-400); margin-top: var(--s-500); counter-reset: step; }
.step { position: relative; padding: var(--s-300); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-2xl); }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--s-500);
  height: var(--s-500);
  margin-bottom: var(--s-200);
  border-radius: var(--r-full);
  background: var(--brand);
  color: var(--white);
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
}
.step h3 { margin-bottom: var(--s-100); }
.step p { font-size: 14px; line-height: 20px; color: var(--muted); }

.billing-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-600); align-items: center; margin-top: var(--s-400); }
.billing-copy { display: flex; flex-direction: column; gap: var(--s-200); font-size: 16px; line-height: 24px; }
.ledger { border: 1px solid var(--line); border-radius: var(--r-2xl); overflow: hidden; background: var(--white); }
.ledger li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  gap: var(--s-100);
  align-items: center;
  padding: var(--s-200) var(--s-300);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 20px;
}
.ledger li:last-child { border-bottom: 0; }
.ledger li span:first-child { color: var(--ink); font-weight: 600; }
.ledger li span:nth-child(2) { color: var(--muted); }
.ledger-state { color: var(--brand-dark); white-space: nowrap; }

.audience-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-300); margin-top: var(--s-400); }
.audience-item { padding: var(--s-300); border: 1px solid var(--line); border-radius: var(--r-2xl); background: var(--white); }
.audience-item h3 { margin-bottom: var(--s-100); }
.audience-item p { font-size: 14px; line-height: 20px; color: var(--muted); }

.faq-list { margin-top: var(--s-400); border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  position: relative;
  display: flex;
  align-items: center;
  padding: var(--s-300) var(--s-500) var(--s-300) 0;
  font-size: 18px;
  line-height: 28px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  transition: color 300ms var(--curve);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: var(--s-75);
  top: 50%;
  width: var(--s-100);
  height: var(--s-100);
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 500ms var(--curve);
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-item summary:hover { color: var(--brand-dark); }
.faq-item p { padding: 0 var(--s-500) var(--s-300) 0; font-size: 16px; line-height: 24px; color: var(--muted); }

.final-cta { padding: var(--s-800) 0; background: var(--brand-soft); text-align: center; }
.final-cta .wrap { display: flex; flex-direction: column; align-items: center; gap: var(--s-300); }
.final-cta p { max-width: 680px; font-size: 16px; line-height: 24px; color: var(--ink-2); }

/* ---------- 页脚 ---------- */
.footer { padding: var(--s-700) 0 var(--s-500); background: var(--ink); color: #d0d5dd; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-400); }
.footer-brand img { width: 160px; height: 33px; }
.footer-brand p { margin-top: var(--s-100); font-size: 14px; line-height: 20px; color: #98a2b3; }
.footer-nav, .footer-meta { display: flex; flex-direction: column; gap: var(--s-100); font-size: 14px; line-height: 20px; }
.footer a { color: #d0d5dd; transition: color 300ms var(--curve); }
.footer a:hover { color: var(--white); }
.footer-meta p { margin-top: var(--s-100); color: #98a2b3; }

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .nav-desktop, .topbar-cta { display: none; }
  .nav-toggle { display: block; }
  .mobile-panel { display: block; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-500); }
  .hero { padding-top: calc(var(--s-900) + var(--s-600)); }
  .billing-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-300); }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - var(--s-400)); }
  .topbar { width: calc(100% - var(--s-200)); }
  .hero h1 { font-size: 36px; line-height: 40px; }
  .hero-sub { font-size: 16px; line-height: 24px; }
  .tagline { font-size: 24px; line-height: 32px; }
  .section h2, .final-cta h2 { font-size: 24px; line-height: 32px; }
  .section, .final-cta, .tagline-section { padding-top: var(--s-600); padding-bottom: var(--s-600); }
  /* 浮动导航在窄屏高 58px + 上边距 16px，hero 至少要留 96px 才不会被压住 */
  .hero { padding-top: var(--s-900); padding-bottom: var(--s-600); }
  .panel-rows li { grid-template-columns: minmax(0, 1fr) auto; }
  .cell-meta { grid-column: 1 / -1; grid-row: 2; }
  .panel-foot { gap: var(--s-100); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar-inner { padding: var(--s-75) var(--s-200); }
  .faq-item summary { font-size: 16px; line-height: 24px; }
  .faq-item p { font-size: 14px; line-height: 20px; }
}

/* 打印不会滚动页面，靠滚动才点亮的区块会整片留白，这里强制全部显示 */
@media print {
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .js .tagline .word { color: var(--ink) !important; }
  .topbar, .nav-toggle, .mobile-panel { display: none !important; }
  body { background: var(--white); }
  .section, .final-cta, .hero, .tagline-section { padding-top: var(--s-400); padding-bottom: var(--s-400); }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .mobile-panel a { transform: none; }
  .js .reveal { opacity: 1; }
  .btn-primary:hover, .feature-card:hover { transform: none; }
  .skip-link, .nav-toggle-lines i, .faq-item summary::after { transition-duration: 0ms; }
  .js .tagline .word { transition: color 200ms var(--curve); }
}
