/* ========================================================================
   Reset + base typography
   ======================================================================== */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
}

::selection { background: rgba(184, 148, 92, 0.28); color: var(--ink-strong); }

img, svg, video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--forest-700);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
a:hover { color: var(--gold-700); }

button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.014em;
  color: var(--ink-strong);
  margin: 0 0 0.4em;
  text-wrap: balance;
  font-feature-settings: "kern" 1, "liga" 1, "dlig" 1;
  font-variant-numeric: lining-nums;   /* even-height digits, not Cormorant's old-style figures */
}

/* Serif NUMBER displays (facts grids, stats, calculator results, tables).
   Force lining figures so digits share one cap height instead of the
   uneven old-style figures Cormorant uses by default. */
.launch-facts__value, .launch-window__when, .stat strong, .numbers__num,
.numbers__val, .hero__cred strong, .calc-result__big, .absd-calc__price-value,
.absd-calc__output dd, .unit-mix td, .awards__list li b {
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1, "kern" 1;
}

h1 { font-size: clamp(42px, 6.6vw, 80px); font-weight: 400; letter-spacing: -0.025em; line-height: 1.02; }
h2 { font-size: clamp(31px, 4.3vw, 50px); font-weight: 400; letter-spacing: -0.02em; }
h3 { font-size: clamp(22px, 2.6vw, 28px); }
h4 { font-size: clamp(18px, 1.8vw, 21px); }

p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}
.container--narrow { max-width: var(--container-narrow); }

@media (max-width: 600px) {
  .container { padding: 0 18px; }
}

/* ── Utility ──
   Eyebrow: a quiet small label above a heading. No leading dash/rule
   (that dash-line + uppercase kicker is the banned AI-slop pattern). The
   headline below it always carries the visual weight. */
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-700);
}

.lede {
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 56ch;
}

.zh { font-family: "Noto Serif SC", "Cormorant Garamond", serif; }
.zh-sans { font-family: "Noto Sans SC", "Inter", sans-serif; }

/* ── Language toggle: data-lang show/hide ──
   <html data-lang="en"> hides [data-lang="zh"], and vice versa.
   Default (no attribute) shows English.                          */
html:not([data-lang="zh"]) [data-lang="zh"] { display: none !important; }
html[data-lang="zh"] [data-lang="en"] { display: none !important; }
/* When ZH is active, body inherits the Chinese serif/sans fallback */
html[data-lang="zh"] body { font-family: "Noto Sans SC", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
html[data-lang="zh"] h1, html[data-lang="zh"] h2, html[data-lang="zh"] h3, html[data-lang="zh"] h4, html[data-lang="zh"] h5, html[data-lang="zh"] h6,
html[data-lang="zh"] blockquote { font-family: "Noto Serif SC", "Cormorant Garamond", Georgia, serif; }
/* Active state for the language pill */
.lang-switch button.is-active { background: var(--forest-700); color: var(--sand-50); }

/* ── Sections ── */
.section {
  padding: clamp(40px, 4.5vw, 64px) 0;
}
.section--tight { padding: clamp(26px, 3vw, 40px) 0; }
.section--dark { background: var(--forest-700); color: var(--sand-100); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--sand-50); }
.section--dark p, .section--dark li { line-height: 1.72; }
.section--sand { background: var(--sand-200); }
/* Drenched immersive section: near-black forest for editorial light/dark rhythm */
.section--feature {
  background:
    radial-gradient(ellipse at 70% 0%, var(--forest-800) 0%, transparent 60%),
    var(--forest-950);
  color: var(--sand-200);
}
.section--feature h1, .section--feature h2, .section--feature h3 { color: var(--sand-50); }
.section--feature p, .section--feature li { line-height: 1.72; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--forest-700);
  color: var(--sand-50);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background 0.3s var(--ease-out-quart), color 0.3s var(--ease-out-quart),
              transform 0.3s var(--ease-out-quart), box-shadow 0.3s var(--ease-out-quart);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--forest-800); color: var(--sand-50); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }

/* Visible focus ring for keyboard users (and a touch of polish) */
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--gold-600);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.btn--ghost {
  background: transparent;
  color: var(--forest-700);
  border-color: var(--forest-700);
}
.btn--ghost:hover { background: var(--forest-700); color: var(--sand-50); }

.btn--gold { background: var(--gold-600); color: var(--ink-strong); }
.btn--gold:hover { background: var(--gold-700); color: var(--sand-50); }

/* WhatsApp action - brand forest with a small WA-green dot for affordance */
.btn--whatsapp {
  background: var(--forest-700);
  color: var(--sand-50);
  position: relative;
  padding-left: 24px;
}
.btn--whatsapp:hover { background: var(--forest-800); color: var(--sand-50); }
.btn--whatsapp::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  background: #25d366;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.16);
}
.btn--whatsapp.btn--lg { padding-left: 30px; }
.btn--whatsapp.btn--lg::before { left: 18px; width: 9px; height: 9px; }
.btn--whatsapp.btn--sm { padding-left: 20px; }
.btn--whatsapp.btn--sm::before { left: 11px; width: 6px; height: 6px; box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.18); }

/* When the button already shows the WhatsApp glyph, drop the redundant
   status dot and restore symmetric padding - one clear mark, not two. */
.btn--whatsapp:has(svg)::before { display: none; }
.btn--whatsapp:has(svg) { padding-left: 26px; }
.btn--whatsapp.btn--lg:has(svg) { padding-left: 32px; }
.btn--whatsapp.btn--sm:has(svg) { padding-left: 18px; }
.btn--whatsapp svg { flex: 0 0 auto; }

.btn--lg { padding: 17px 32px; font-size: 15.5px; }
.btn--sm { padding: 9px 18px; font-size: 13px; }

/* ── Forms ── */
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
/* iOS Safari auto-zooms form fields when font-size < 16px on focus. Force 16px on mobile. */
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px; }
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--forest-700);
  box-shadow: 0 0 0 3px rgba(45, 74, 62, 0.12);
}
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

/* ── Accessibility: honour reduced-motion ─────────────────────
   Users who ask for reduced motion get an instant, motion-free UI:
   transitions, scroll reveals, entrances and looping pulses all
   collapse to a single static state. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
}
