/* ============================================================
   喂伴 Weiban — 官方网站样式
   品牌 token 取自 App DesignSystem/Theme.swift，
   保持官网与 App 视觉一致。
   ============================================================ */

:root {
  /* Brand palette (from Theme.swift) */
  --brand: #ce7046;
  --brand-hover: #b85e36;
  --brand-soft: rgba(206, 112, 70, 0.12);
  --cream: #faf5ee;
  --surface: #f3ece1;
  --surface-2: #ede4d5;
  --charcoal: #2e2721;
  --text-secondary: #766b61;
  --text-tertiary: #93877a;
  --hairline: #e9dfcf;
  --green: #9cae8e;
  --rose: #d59c8b;

  /* Semantic */
  --bg: var(--cream);
  --card: #fffdf9;
  --text: var(--charcoal);

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;

  /* Spacing scale (density: spacious) */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 96px;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;

  --shadow-soft: 0 2px 6px rgba(46, 39, 33, 0.04),
    0 16px 40px rgba(46, 39, 33, 0.07);
  --shadow-lift: 0 4px 10px rgba(46, 39, 33, 0.06),
    0 24px 60px rgba(46, 39, 33, 0.12);

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

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
a:hover {
  color: var(--brand-hover);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: min(1120px, 100% - 48px);
  margin-inline: auto;
}

.section {
  padding-block: var(--space-xl);
}

.section-head {
  max-width: 640px;
  margin: 0 auto var(--space-lg);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: var(--space-sm);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.section-head h2 {
  font-size: clamp(26px, 4vw, 36px);
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 17px;
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 245, 238, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--text);
}

.nav-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
}
.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff8f1 !important;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 999px;
  transition: transform 0.18s var(--ease-out),
    background 0.18s var(--ease-out);
}
.nav-cta:hover {
  background: var(--brand-hover);
  transform: scale(1.03);
}

/* Language switch */
.nav-lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 3px;
  background: var(--card);
}
.nav-lang a {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--text-tertiary);
  min-height: 28px;
  display: inline-flex;
  align-items: center;
}
.nav-lang a[aria-current="true"] {
  background: var(--brand-soft);
  color: var(--brand);
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 10px;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.2s var(--ease-out), opacity 0.2s var(--ease-out),
    top 0.2s var(--ease-out);
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out),
    background 0.18s var(--ease-out), opacity 0.18s var(--ease-out);
}

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

.btn-primary {
  background: var(--brand);
  color: #fff8f1;
}
.btn-primary:hover {
  background: var(--brand-hover);
  color: #fff8f1;
  transform: scale(1.02);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--hairline);
}
.btn-ghost:hover {
  background: var(--surface);
  color: var(--text);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ---------- Hero ---------- */
.hero {
  padding: calc(var(--space-lg) + 16px) 0 var(--space-xl);
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-lg);
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 5.2vw, 52px);
  margin: 18px 0 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--brand);
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 460px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.hero-note {
  font-size: 13.5px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-note svg {
  width: 16px;
  height: 16px;
  color: var(--green);
  flex: none;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 6% -8% auto;
  aspect-ratio: 1;
  background: radial-gradient(
    circle at 50% 40%,
    var(--brand-soft),
    transparent 65%
  );
  z-index: 0;
}

.phone {
  position: relative;
  z-index: 1;
  width: min(320px, 78vw);
  border-radius: 44px;
  padding: 10px;
  background: var(--charcoal);
  box-shadow: var(--shadow-lift);
}

.phone img {
  border-radius: 36px;
  width: 100%;
}

.phone--small {
  position: absolute;
  z-index: 2;
  right: -4%;
  bottom: -6%;
  width: min(190px, 46vw);
  transform: rotate(4deg);
}

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

.feature-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  background: var(--brand-soft);
  color: var(--brand);
}
.feature-icon.green {
  background: rgba(156, 174, 142, 0.18);
  color: #7c8f6f;
}
.feature-icon.rose {
  background: rgba(213, 156, 139, 0.2);
  color: #b67a68;
}
.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ---------- Screenshots ---------- */
.screenshots {
  background: var(--surface);
  border-block: 1px solid var(--hairline);
}

.shot-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 4px 28px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--hairline) transparent;
}

.shot {
  flex: 0 0 min(250px, 68vw);
  scroll-snap-align: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--hairline);
  background: var(--card);
}

.shot img {
  width: 100%;
  aspect-ratio: 1320 / 2868;
  object-fit: cover;
}

.shot-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

/* ---------- Privacy highlights ---------- */
.privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 880px;
  margin-inline: auto;
}

.privacy-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 24px;
}

.privacy-item svg {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--brand);
  margin-top: 2px;
}

.privacy-item h3 {
  font-size: 17px;
  margin-bottom: 4px;
}
.privacy-item p {
  font-size: 14.5px;
  color: var(--text-secondary);
}

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  background: linear-gradient(
    160deg,
    var(--brand) 0%,
    #c05f38 100%
  );
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-md);
  color: #fff8f1;
  position: relative;
  overflow: hidden;
}

.cta-band::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: rgba(255, 248, 241, 0.08);
}

.cta-band h2 {
  font-size: clamp(26px, 4vw, 34px);
  margin-bottom: 12px;
}

.cta-band p {
  opacity: 0.9;
  margin-bottom: 28px;
  max-width: 520px;
  margin-inline: auto;
}

.cta-band .btn {
  background: #fff8f1;
  color: var(--brand);
  position: relative;
  z-index: 1;
}
.cta-band .btn:hover {
  background: #fff;
  transform: scale(1.03);
  color: var(--brand-hover);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-xl);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-lg);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 17px;
}
.footer-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
.footer-brand p {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--text-tertiary);
  margin-top: 6px;
  max-width: 280px;
}

.footer-links {
  display: flex;
  gap: 56px;
}
.footer-links h4 {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 12px;
  font-weight: 700;
}
.footer-links ul {
  list-style: none;
  display: grid;
  gap: 10px;
}
.footer-links a {
  font-size: 14.5px;
  color: var(--text-secondary);
}
.footer-links a:hover {
  color: var(--brand);
}

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

/* ---------- Legal / content pages ---------- */
.page-head {
  padding: var(--space-lg) 0 var(--space-md);
  max-width: 760px;
}
.page-head h1 {
  font-size: clamp(30px, 4.5vw, 40px);
  margin-bottom: 10px;
}
.page-head .updated {
  font-size: 14px;
  color: var(--text-tertiary);
}

.prose {
  max-width: 760px;
  padding-bottom: var(--space-xl);
}

.prose h2 {
  font-size: 22px;
  margin: 40px 0 14px;
  padding-top: 8px;
}
.prose h3 {
  font-size: 17px;
  margin: 24px 0 8px;
}
.prose p {
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.prose ul,
.prose ol {
  color: var(--text-secondary);
  padding-left: 22px;
  margin-bottom: 14px;
  display: grid;
  gap: 6px;
}
.prose strong {
  color: var(--text);
}

.callout {
  background: var(--brand-soft);
  border: 1px solid rgba(206, 112, 70, 0.25);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-size: 15px;
  color: var(--text);
  margin: 20px 0;
}

/* ---------- FAQ (support page) ---------- */
.faq {
  max-width: 760px;
  display: grid;
  gap: 12px;
  padding-bottom: var(--space-xl);
}

.faq details {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 4px 22px;
  transition: box-shadow 0.2s var(--ease-out);
}
.faq details[open] {
  box-shadow: var(--shadow-soft);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
  font-size: 16px;
  padding: 18px 0;
  min-height: 44px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  border-right: 2px solid var(--text-tertiary);
  border-bottom: 2px solid var(--text-tertiary);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease-out);
}
.faq details[open] summary::after {
  transform: rotate(-135deg);
}

.faq .faq-body {
  color: var(--text-secondary);
  font-size: 15px;
  padding-bottom: 20px;
}
.faq .faq-body p + p {
  margin-top: 8px;
}
.faq .faq-body ol,
.faq .faq-body ul {
  padding-left: 20px;
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.support-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 760px;
  margin-bottom: var(--space-lg);
}

.support-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.support-card svg {
  width: 26px;
  height: 26px;
  color: var(--brand);
}
.support-card h3 {
  font-size: 17px;
}
.support-card p {
  font-size: 14.5px;
  color: var(--text-secondary);
}
.support-card a {
  font-weight: 700;
  font-size: 14.5px;
  margin-top: 4px;
  word-break: break-all;
}

/* ---------- PRO / Pricing ---------- */
.pro .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.pro-points {
  list-style: none;
  display: grid;
  gap: 14px;
  margin-top: var(--space-md);
}

.pro-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15.5px;
  color: var(--text-secondary);
}

.pro-points svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--brand);
  margin-top: 1px;
}

.pro-points strong {
  color: var(--text);
  display: block;
  font-size: 16px;
}

.pro .section-head {
  text-align: left;
  margin: 0;
}

.price-stack {
  display: grid;
  gap: 14px;
}

.price-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--card);
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  transition: transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}

.price-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.price-card.recommended {
  border-color: var(--brand);
  box-shadow: var(--shadow-soft);
}

.price-badge {
  position: absolute;
  top: -11px;
  left: 22px;
  background: var(--brand);
  color: #fff8f1;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 12px;
  border-radius: 999px;
}

.price-name {
  font-weight: 800;
  font-size: 17px;
}

.price-desc {
  font-size: 13.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.price-amount {
  text-align: right;
  font-family: var(--font-display);
  font-size: 26px;
  white-space: nowrap;
}

.price-amount small {
  display: block;
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--text-tertiary);
  font-weight: 400;
  margin-top: 2px;
}

.price-note {
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
  margin-top: 4px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--ease-out),
    transform 0.5s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container,
  .pro .container {
    grid-template-columns: 1fr;
  }
  .hero .container {
    text-align: center;
  }
  .pro .section-head {
    text-align: center;
    margin-inline: auto;
  }
  .hero-sub {
    margin-inline: auto;
  }
  .hero-actions,
  .hero-note {
    justify-content: center;
  }
  .hero-visual {
    margin-top: 24px;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --space-xl: 64px;
    --space-lg: 40px;
  }
  .site-nav .container {
    position: relative;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--hairline);
    box-shadow: var(--shadow-soft);
    padding: 8px 0;
  }
  .nav-links.is-open {
    display: flex;
  }
  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 24px;
    font-size: 16px;
  }
  .nav-toggle {
    display: block;
  }
  .nav-cta {
    display: none;
  }
  .nav-links .nav-cta-mobile {
    margin: 8px 24px 12px;
    justify-content: center;
    display: inline-flex;
  }
  .features-grid,
  .privacy-grid,
  .support-cards {
    grid-template-columns: 1fr;
  }
  .phone--small {
    right: -2%;
  }
  .footer-links {
    gap: 40px;
  }
}

/* Show mobile-only CTA inside the dropdown on larger screens: never */
.nav-links .nav-cta-mobile {
  display: none;
}
@media (max-width: 640px) {
  .nav-links .nav-cta-mobile {
    display: inline-flex;
  }
}
