/* SeePlate / ChefBear — Static Site Stylesheet
   Design tokens aligned with the Flutter app's classical palette.
   Fonts: Noto Serif (display, italic accents) + Plus Jakarta Sans (body).
*/

/* ── Google Fonts ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  /* palette – light */
  --primary:            #3a2d2d;
  --secondary:          #7c5730;
  --tertiary:           #544436;
  --ink-green:          #465A52;
  --ink-green-tint:     #E8F0EC;

  --text-primary:       #1b1c19;
  --text-secondary:     #504441;
  --text-tertiary:      #8a7e79;

  --bg-page:            #fbf9f4;
  --bg-card:            #ffffff;
  --bg-components:      #f0eee9;
  --bg-hero:            #f5f3ee;

  --border-color:       #d4c3be;
  --divider:            #E4E2DD;

  --success:            #4CAF50;
  --warning:            #FF9800;
  --error:              #E53935;

  /* radii */
  --radius-card:        28px;
  --radius-inner:       16px;
  --radius-pill:        999px;

  /* shadows */
  --shadow-card:        0 4px 20px rgba(0,0,0,.08);
  --shadow-float:       0 8px 40px rgba(0,0,0,.12);

  /* fonts */
  --font-display:       'Noto Serif', 'Songti SC', 'STSong', Georgia, serif;
  --font-body:          'Plus Jakarta Sans', 'PingFang SC', 'Heiti SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* spacing */
  --page-pad:           24px;
  --section-gap:        48px;
}

/* ── Dark mode — system preference ──────────────────────── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary:          #d6c2c1;
    --secondary:        #eebd8e;
    --tertiary:         #d9c2b0;

    --text-primary:     #f2f1ec;
    --text-secondary:   #a89e99;
    --text-tertiary:    #787069;

    --bg-page:          #1b1c19;
    --bg-card:          #30312e;
    --bg-components:    #2d2b28;
    --bg-hero:          #252422;

    --border-color:     #4a4340;
    --divider:          #3a3835;

    --shadow-card:      0 4px 20px rgba(0,0,0,.25);
    --shadow-float:     0 8px 40px rgba(0,0,0,.35);
  }
}

/* ── Dark mode — manual toggle ─────────────────────────── */
:root[data-theme="dark"] {
  --primary:          #d6c2c1;
  --secondary:        #eebd8e;
  --tertiary:         #d9c2b0;

  --text-primary:     #f2f1ec;
  --text-secondary:   #a89e99;
  --text-tertiary:    #787069;

  --bg-page:          #1b1c19;
  --bg-card:          #30312e;
  --bg-components:    #2d2b28;
  --bg-hero:          #252422;

  --border-color:     #4a4340;
  --divider:          #3a3835;

  --shadow-card:      0 4px 20px rgba(0,0,0,.25);
  --shadow-float:     0 8px 40px rgba(0,0,0,.35);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.7;
}

a { color: var(--secondary); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .75; }

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

/* ── Typography ──────────────────────────────────────────── */
/* Force Noto Serif on all headings — no CJK fallback so Chinese systems
   don't substitute Songti SC / STSong */
h1, h2, h3, h4 { font-family: 'Noto Serif', Georgia, serif; font-weight: 700; line-height: 1.25; }

/* Brand name always renders in Latin serif, regardless of language */
.cb { font-family: 'Noto Serif', Georgia, serif; font-style: italic; font-weight: 700; }

/* ── Hero shimmer ─────────────────────────────────────────── */
@keyframes cb-shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}
.hero-shimmer {
  display: inline-block;
  background: linear-gradient(
    90deg,
    var(--secondary) 0%,
    #c49a6c 25%,
    #f0d49e 50%,
    #c49a6c 75%,
    var(--secondary) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: cb-shimmer 20s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hero-shimmer { animation: none; -webkit-text-fill-color: var(--secondary); }
}

h1 { font-size: 2.4rem; font-style: italic; letter-spacing: -.02em; }
h2 { font-size: 1.6rem; margin-top: var(--section-gap); margin-bottom: 16px; color: var(--primary); }
h3 { font-size: 1.15rem; margin-top: 28px; margin-bottom: 10px; color: var(--tertiary); }
h4 { font-size: 1rem; margin-top: 20px; margin-bottom: 8px; }

p, li { margin-bottom: .6em; color: var(--text-secondary); }

ul, ol { padding-left: 1.4em; }

strong { color: var(--text-primary); font-weight: 600; }

/* Signature gradient underline — fly.io-style: left-solid → fade, 6×3 pin */
.cb-rule-wrap { position: relative; padding-bottom: 14px; }
.cb-title-rule {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    var(--secondary) 0%,
    rgba(124,87,48,.4) 12%,
    rgba(124,87,48,0) 100%
  );
}
.cb-title-rule::before {
  content: "";
  position: absolute; left: 0; top: -1px;
  width: 6px; height: 3px;
  background: var(--secondary);
  border-radius: 2px 0 0 2px;
}
[data-theme="dark"] .cb-title-rule {
  background: linear-gradient(to right, var(--secondary) 0%, rgba(238,189,142,.4) 12%, transparent 100%);
}
[data-theme="dark"] .cb-title-rule::before { background: var(--secondary); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cb-title-rule {
    background: linear-gradient(to right, var(--secondary) 0%, rgba(238,189,142,.4) 12%, transparent 100%);
  }
  :root:not([data-theme="light"]) .cb-title-rule::before { background: var(--secondary); }
}

/* section label — small caps above headings */
.section-label {
  font-family: var(--font-body);
  font-size: .625rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--secondary);
  display: block;
  margin-bottom: 6px;
}

/* italic serif accent */
.serif-accent {
  font-family: 'Noto Serif', Georgia, serif;
  font-style: italic;
  font-weight: 600;
}

/* ── Layout ──────────────────────────────────────────────── */
.container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

.container-wide {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

/* ── Navbar ──────────────────────────────────────────────── */
/* Fixed to the top of the viewport so the ChefBear brand stays docked
   above all page content. The navbar itself carries the gradient mask
   (opaque bg-hero at the very top, fading to fully transparent at the
   bottom edge) so there's no separate overlay needed. */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: none;
  padding: 14px 0 48px;
  background: linear-gradient(180deg, var(--bg-hero) 0%, rgba(245,243,238,0) 100%);
  pointer-events: none;
}
.navbar > * { pointer-events: auto; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .navbar {
    background: linear-gradient(180deg, var(--bg-hero) 0%, rgba(37,36,34,0) 100%);
  }
}
[data-theme="dark"] .navbar {
  background: linear-gradient(180deg, var(--bg-hero) 0%, rgba(37,36,34,0) 100%);
}

.navbar .container-wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-family: 'Noto Serif', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
}

.navbar-links { display: flex; gap: 24px; align-items: center; }
.navbar-links a {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.navbar-links a:hover { color: var(--primary); opacity: 1; }

/* mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--text-primary); margin: 5px 0;
  transition: .3s;
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .navbar-links {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--divider);
    box-shadow: var(--shadow-card);
  }
  .navbar-links.open { display: flex; }
  .navbar-links a { padding: 14px var(--page-pad); border-bottom: 1px solid var(--divider); width: 100%; }
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 80px var(--page-pad) 64px;
  background: var(--bg-hero);
  border-bottom: 1px solid var(--divider);
}
.hero h1 { margin-bottom: 16px; }
.hero p {
  font-size: 1.05rem;
  color: var(--text-tertiary);
  max-width: 520px;
  margin: 0 auto;
}

/* ── Legal page header ───────────────────────────────────── */
.legal-header {
  padding: 56px var(--page-pad) 40px;
  background: var(--bg-hero);
  border-bottom: 1px solid var(--divider);
}
.legal-header h1 { margin-bottom: 8px; font-size: 2rem; }
.legal-header .meta {
  font-size: .85rem;
  color: var(--text-tertiary);
}

/* ── Card ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  padding: 32px;
  margin-bottom: 24px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(124,87,48,.35);
  box-shadow: 0 16px 48px rgba(58,45,45,.13), 0 0 0 2px rgba(124,87,48,.12);
}
[data-theme="dark"] .card:hover {
  border-color: rgba(238,189,142,.3);
  box-shadow: 0 16px 48px rgba(0,0,0,.35), 0 0 0 2px rgba(238,189,142,.15);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

/* ── Region selector ─────────────────────────────────────── */
.region-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 32px 0;
}
.region-selector a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: .85rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: all .2s;
}
.region-selector a:hover,
.region-selector a.active {
  background: var(--primary);
  color: var(--bg-page);
  border-color: var(--primary);
  opacity: 1;
}

/* ── Legal body ──────────────────────────────────────────── */
.legal-body {
  padding: 40px 0 80px;
}
.legal-body h2:first-child { margin-top: 0; }

.legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: .9rem;
}
.legal-body th, .legal-body td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--divider);
}
.legal-body th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-components);
}

.highlight-box {
  background: var(--bg-components);
  border-left: 3px solid var(--secondary);
  padding: 16px 20px;
  border-radius: 0 var(--radius-inner) var(--radius-inner) 0;
  margin: 20px 0;
}
.highlight-box p { margin-bottom: 0; }

/* ── Support page ────────────────────────────────────────── */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.support-card {
  text-align: center;
  padding: 40px 24px;
}
.support-card .icon {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px;
  background: var(--ink-green-tint);
  color: var(--ink-green);
  font-size: 1.5rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .support-card .icon { background: rgba(143,163,150,.15); color: var(--secondary); }
}
:root[data-theme="dark"] .support-card .icon { background: rgba(143,163,150,.15); color: var(--secondary); }
.support-card h3 { margin-top: 0; color: var(--text-primary); font-size: 1.1rem; }
.support-card p { font-size: .9rem; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: transparent;
  border-top: none;
  padding: 32px 0 40px;
  text-align: center;
  font-size: .8rem;
  color: var(--text-tertiary);
}
.footer a { color: var(--text-tertiary); }
.footer-links { display: flex; gap: 20px; justify-content: center; margin-bottom: 12px; flex-wrap: wrap; }

/* ── Utility ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── App Store Button ────────────────────────────────────── */
.hero-cta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.app-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff !important;
  font-size: .95rem;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(58,45,45,.25);
  position: relative;
}
/* Multi-color shimmer fill on dark button (matches hero title shimmer) */
.app-store-btn:not(.app-store-btn--light) {
  background: linear-gradient(
    100deg,
    var(--secondary) 0%,
    #c49a6c 25%,
    #f0d49e 50%,
    #c49a6c 75%,
    var(--secondary) 100%
  );
  background-size: 220% auto;
  animation: cb-shimmer 20s linear infinite;
}
.app-store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(58,45,45,.35);
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .app-store-btn:not(.app-store-btn--light) { animation: none; }
}
.app-store-btn .apple-logo { flex-shrink: 0; }
.app-store-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}
.app-store-text small {
  font-size: .65rem;
  font-weight: 400;
  letter-spacing: .3px;
  color: #fff;
  margin-bottom: 0;
}
.app-store-text strong {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.hero-tagline {
  font-size: .85rem;
  color: var(--text-tertiary);
  font-style: italic;
  font-family: var(--font-display);
  margin: 0;
}

/* ── Download Banner ─────────────────────────────────────── */
.download-banner {
  background: var(--primary);
  padding: 48px var(--page-pad);
}
.download-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.download-banner-text h2 {
  color: #fff;
  font-style: italic;
}
.download-banner-text p {
  color: rgba(255,255,255,.8);
  margin-bottom: 0;
}
.app-store-btn--light {
  background: linear-gradient(
    100deg,
    var(--secondary) 0%,
    #c49a6c 25%,
    #f0d49e 50%,
    #c49a6c 75%,
    var(--secondary) 100%
  );
  background-size: 220% auto;
  animation: cb-shimmer 20s linear infinite;
  color: var(--primary) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.app-store-btn--light .apple-logo { color: var(--primary); }
.app-store-btn--light .app-store-text small { color: var(--primary); }
.app-store-btn--light .app-store-text strong { color: var(--primary); }
.app-store-btn--light:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,.2);
}
@media (prefers-reduced-motion: reduce) {
  .app-store-btn--light { animation: none; }
}

/* ── Pulse ring animation (hero button only) ── */
@keyframes cb-pulse-ring {
  0%   { box-shadow: 0 0 0 0   rgba(196,154,108,.55); }
  70%  { box-shadow: 0 0 0 14px rgba(196,154,108,0);  }
  100% { box-shadow: 0 0 0 0   rgba(196,154,108,0);   }
}
.app-store-btn:not(.app-store-btn--light)::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: cb-pulse-ring 2.4s ease-out infinite;
  pointer-events: none;
}
.app-store-btn:not(.app-store-btn--light):hover::before {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .app-store-btn::before { animation: none; }
}

@media (max-width: 640px) {
  .download-banner-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* ── Language Grid ───────────────────────────────────────── */
.lang-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
}
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: transform .15s, box-shadow .15s;
}
.lang-pill:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink-green);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .5px;
  flex-shrink: 0;
}


/* ══════════════════════════════════════════════════════════
   HOMEPAGE ONLY — fly.io-inspired hero + layout.
   Scoped via body.home so other pages remain untouched.
   ══════════════════════════════════════════════════════════ */

/* hide the original full-width hero on the homepage */
body.home .hero { display: none; }

/* Unified homepage base — every section either inherits this color or
   fades its illustrated bg into it, so there are no hard color steps. */
body.home { background: var(--bg-hero); }

/* ── Homepage Hero ───────────────────────────────────────── */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: 72px var(--page-pad) 120px; /* extra bottom pad so aurora fades out */
  background: var(--bg-hero);
  isolation: isolate;
}

/* Fullscreen video-background variant.
   Extends UP behind the sticky nav to the viewport top (nav is transparent,
   so the video flows all the way to the edge of the screen). */
.home-hero--video {
  --nav-h: 58px;
  margin-top: calc(-1 * var(--nav-h));
  min-height: calc(100vh + var(--nav-h));
  min-height: calc(100svh + var(--nav-h));
  display: flex;
  align-items: center;
  padding: calc(96px + var(--nav-h)) var(--page-pad) 120px;
  background: var(--bg-hero);
}
.home-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Anchor subject near screen's far-left (1% from left, 75% from top).
     Because the element is mirrored via scaleX(-1), the source X value is
     inverted: screen 1% ↔ source 99%. */
  object-position: 99% 75%;
  transform: scaleX(-1); /* horizontal mirror */
  z-index: -3;
  pointer-events: none;
  /* Soft-fade the video pixels themselves on all four edges so the
     --bg-hero page color shows through cleanly. Applied directly to
     the video instead of via an overlay to avoid stacking-context
     quirks. 300px top/bottom, 140px left/right. */
  -webkit-mask-image:
    linear-gradient(180deg, transparent 0, #000 300px, #000 calc(100% - 300px), transparent 100%),
    linear-gradient(90deg,  transparent 0, #000 140px, #000 calc(100% - 140px), transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image:
    linear-gradient(180deg, transparent 0, #000 300px, #000 calc(100% - 300px), transparent 100%),
    linear-gradient(90deg,  transparent 0, #000 140px, #000 calc(100% - 140px), transparent 100%);
          mask-composite: intersect;
}
/* Portrait orientation: the source video is landscape-composed, so on tall
   screens (iPhone etc.) `object-fit: cover` crops the sides hard and the
   original 300px top/bottom fade nearly consumes the whole viewport.
   Center the subject and shrink the fade so the video actually shows. */
@media (orientation: portrait) {
  .home-hero__video {
    object-position: 50% 50%;
    -webkit-mask-image:
      linear-gradient(180deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%),
      linear-gradient(90deg,  transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
            mask-image:
      linear-gradient(180deg, transparent 0, #000 80px, #000 calc(100% - 80px), transparent 100%),
      linear-gradient(90deg,  transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  }
}
/* Portrait PHONES only (≤600px rules out iPad mini at 744px+):
   resize the <video> element itself to match the loop's intrinsic aspect
   ratio (width:100%, height:auto, vertically centered). That way the
   element box equals the visible video rectangle — `object-fit: contain`
   style letterbox, but the mask-image fade now lands on the REAL video
   edges instead of empty letterbox area, so the top/bottom blend softly
   into the --bg-hero color bands above/below. */
@media (orientation: portrait) and (max-width: 600px) {
  .home-hero__video {
    top: 50%;
    bottom: auto;
    height: auto;
    object-fit: fill;
    /* keep mirror; translateY centers vertically */
    transform: translateY(-50%) scaleX(-1);
    -webkit-mask-image:
      linear-gradient(180deg, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%),
      linear-gradient(90deg,  transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
            mask-image:
      linear-gradient(180deg, transparent 0, #000 36px, #000 calc(100% - 36px), transparent 100%),
      linear-gradient(90deg,  transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  }
}
/* Hero copy follows the global palette (matches the features section):
   section-label → secondary caramel · title → text-primary · em.cb-hl →
   shimmer · title-muted → text-tertiary · lede → text-secondary.
   No forced-white overrides — let the brand palette carry the color story. */
/* Subtle halo in the page's solid bg color so copy stays legible against
   the looping video frames (invisible in dark mode — video is hidden). */
.home-hero--video .section-label,
.home-hero--video .home-hero__title,
.home-hero--video .home-hero__title-muted,
.home-hero--video .home-hero__lede {
  text-shadow:
    0 0 10px var(--bg-hero),
    0 0 22px var(--bg-hero);
}
/* Let the shimmer-clipped highlights render cleanly — no bg-colored halo
   wrapping the gradient glyphs */
.home-hero--video .home-hero__title em.cb-hl {
  text-shadow: none;
}
/* Lift aurora/grain so they sit on top of the video but below content */
.home-hero--video .home-hero__aurora { z-index: -1; mix-blend-mode: screen; opacity: .55; }
.home-hero--video .home-hero__grain  { z-index: -1; opacity: .18; }
/* Extended edge fades (bottom + left + right) so the video blends
   smoothly into bg-hero on every side. Top edge is handled separately
   by ::before (pinned to viewport). */
/* Extended edge fades (bottom + left + right) so the video blends
   smoothly into bg-hero on every side. Top edge is handled separately
   by ::before (pinned to viewport). */
.home-hero--video::after {
  display: block;
  top: 0;
  bottom: 0;
  height: auto;
  background:
    linear-gradient(90deg,  var(--bg-hero) 0%, rgba(245,243,238,0) 140px),
    linear-gradient(270deg, var(--bg-hero) 0%, rgba(245,243,238,0) 140px),
    linear-gradient(0deg,   var(--bg-hero) 0%, rgba(245,243,238,0) 300px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-hero--video::after {
    background:
      linear-gradient(90deg,  var(--bg-hero) 0%, rgba(37,36,34,0) 140px),
      linear-gradient(270deg, var(--bg-hero) 0%, rgba(37,36,34,0) 140px),
      linear-gradient(0deg,   var(--bg-hero) 0%, rgba(37,36,34,0) 300px);
  }
}
[data-theme="dark"] .home-hero--video::after {
  background:
    linear-gradient(90deg,  var(--bg-hero) 0%, rgba(37,36,34,0) 140px),
    linear-gradient(270deg, var(--bg-hero) 0%, rgba(37,36,34,0) 140px),
    linear-gradient(0deg,   var(--bg-hero) 0%, rgba(37,36,34,0) 300px);
}
/* Top fade sits between the video (z:-3) and hero copy (z:1) so it
   masks the video edge without covering the text. The navbar has its
   own gradient, so this fade no longer needs to reach under the nav. */
.home-hero--video::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 300px;
  background: linear-gradient(180deg, var(--bg-hero) 0%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}
.home-hero--video .home-hero__inner {
  z-index: 1;              /* keep copy above fade */
  transform: translateY(-50%); /* lift content a full body above flex center */
}
/* Soften hero bottom edge into the next section instead of a hard cut */
.home-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 140px;
  background: linear-gradient(180deg, rgba(245,243,238,0) 0%, var(--bg-hero) 100%);
  pointer-events: none;
  z-index: -1;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-hero::after {
    background: linear-gradient(180deg, rgba(37,36,34,0) 0%, var(--bg-hero) 100%);
  }
}
[data-theme="dark"] .home-hero::after {
  background: linear-gradient(180deg, rgba(37,36,34,0) 0%, var(--bg-hero) 100%);
}

/* Aurora gradient wash (fly.io-style radial lights) */
.home-hero__aurora {
  position: absolute;
  inset: -20% -10% -10% -10%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(42% 55% at 18% 22%, rgba(183,158,220,.45) 0%, rgba(183,158,220,0) 60%),
    radial-gradient(38% 48% at 78% 30%, rgba(255,193,182,.50) 0%, rgba(255,193,182,0) 62%),
    radial-gradient(50% 60% at 62% 85%, rgba(167,215,197,.40) 0%, rgba(167,215,197,0) 65%),
    radial-gradient(34% 44% at 8% 78%, rgba(245,214,164,.45) 0%, rgba(245,214,164,0) 62%);
  filter: blur(6px);
  animation: cb-aurora 22s ease-in-out infinite alternate;
}

@keyframes cb-aurora {
  0%   { transform: translate3d(0,0,0) scale(1);    }
  50%  { transform: translate3d(-2%,1.5%,0) scale(1.05); }
  100% { transform: translate3d(1.5%,-1%,0) scale(1.02); }
}

/* Subtle grain / noise overlay */
.home-hero__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.34  0 0 0 0 0.28  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-hero__aurora {
    background:
      radial-gradient(42% 55% at 18% 22%, rgba(140,110,190,.30) 0%, transparent 60%),
      radial-gradient(38% 48% at 78% 30%, rgba(220,140,120,.32) 0%, transparent 62%),
      radial-gradient(50% 60% at 62% 85%, rgba(100,160,140,.26) 0%, transparent 65%),
      radial-gradient(34% 44% at 8% 78%, rgba(200,160,110,.28) 0%, transparent 62%);
  }
  :root:not([data-theme="light"]) .home-hero__grain { opacity: .18; }
}
:root[data-theme="dark"] .home-hero__aurora {
  background:
    radial-gradient(42% 55% at 18% 22%, rgba(140,110,190,.30) 0%, transparent 60%),
    radial-gradient(38% 48% at 78% 30%, rgba(220,140,120,.32) 0%, transparent 62%),
    radial-gradient(50% 60% at 62% 85%, rgba(100,160,140,.26) 0%, transparent 65%),
    radial-gradient(34% 44% at 8% 78%, rgba(200,160,110,.28) 0%, transparent 62%);
}
:root[data-theme="dark"] .home-hero__grain { opacity: .18; }

.home-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
/* Video hero: single column, content overlays the video */
.home-hero--video .home-hero__inner {
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
}
.home-hero--video .home-hero__copy { max-width: 720px; }

.home-hero__copy { max-width: 620px; }

.home-hero__title {
  font-family: 'Noto Serif', Georgia, serif;
  font-weight: 700;
  font-style: italic;
  font-size: clamp(2.4rem, 5.5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -.025em;
  color: var(--text-primary);
  margin: 14px 0 22px;
}
.home-hero__title em.cb-hl {
  font-style: italic;
  background: linear-gradient(
    100deg,
    var(--secondary) 0%,
    #c49a6c 28%,
    #d9a3c7 55%,
    var(--secondary) 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: cb-shimmer 20s linear infinite;
}
.home-hero__title-muted {
  /* Unified with the rest of the hero title — inherits Noto Serif italic
     700. Only color and size are overridden so it still reads as a
     secondary, quieter tail. */
  color: var(--text-tertiary);
  font-size: .78em;
}

.home-hero__lede {
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 0 28px;
}

.home-hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

/* Hero illustration (the bear chef) */
.home-hero__art {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 640px;
}
.home-hero__art::after {
  /* soft vignette to blend into the cream background */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    70% 70% at 50% 50%,
    transparent 55%,
    var(--bg-hero) 100%
  );
  pointer-events: none;
  mix-blend-mode: normal;
}
.home-hero__art img {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  filter: saturate(1.02);
}
[data-theme="dark"] .home-hero__art img,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-hero__art img { mix-blend-mode: screen; filter: brightness(1.05) saturate(.9); }
}
[data-theme="dark"] .home-hero__art img { mix-blend-mode: screen; filter: brightness(1.05) saturate(.9); }

/* Ghost button (fly.io-style secondary CTA) */
.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-color);
  transition: background .2s, border-color .2s, transform .2s;
}
.ghost-btn:hover {
  background: var(--bg-card);
  border-color: var(--secondary);
  transform: translateY(-2px);
  opacity: 1;
}

/* ── Homepage Section Frame ──────────────────────────────── */
.home-section {
  padding: 96px var(--page-pad);
  position: relative;
  background: transparent; /* body.home supplies the unified bg-hero base */
}
/* No borders between homepage sections — all share the same base color
   and illustrated sections fade their art into that base. */

.home-section__head {
  max-width: 720px;
  margin: 0 0 56px;
}
.home-section__head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.home-section__title {
  font-family: 'Noto Serif', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.8rem, 3.6vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--text-primary);
  margin: 10px 0 18px;
}
.home-section__title em.cb-hl {
  font-style: italic;
  background: linear-gradient(
    100deg,
    var(--secondary) 0%,
    #c49a6c 28%,
    #d9a3c7 55%,
    var(--secondary) 100%
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: cb-shimmer 20s linear infinite;
}
/* Legal section: "Terms" / 条款 renders as solid text-primary, no shimmer */
#legal .home-section__title em.cb-hl {
  background: none;
  -webkit-text-fill-color: currentColor;
  animation: none;
  color: var(--text-primary);
}
.home-section__lede {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 28px;
}
.home-section__head:not(.home-section__head--center) .home-section__lede { margin-left: 0; }

.home-section__foot {
  margin-top: 48px;
  text-align: center;
}

/* ── Numbered feature grid ───────────────────────────────── */
.home-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px 48px;
  counter-reset: feature;
}
.home-feature {
  padding: 8px 0 0;
  border-top: 1px solid var(--divider);
  position: relative;
}
.home-feature__num {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: 2px;
  color: var(--secondary);
  margin: 14px 0 8px;
}
.home-feature h3 {
  font-family: 'Noto Serif', Georgia, serif;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--text-primary);
  margin: 4px 0 10px;
  line-height: 1.25;
}
.home-feature p {
  font-size: .96rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Full-viewport illustrated background section ───────── */
.home-section--bg {
  position: relative;
  min-height: 100vh;
  padding: clamp(96px, 14vh, 180px) var(--page-pad);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  /* NO borders — adjacent sections share the same base bg-hero color
     and every illustrated section fades top/bottom into that color,
     so transitions are seamless. */
}
.home-section__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("../images/website_background-1800.jpg");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  transform: scale(1.06);
  will-change: transform;
  animation: cb-bg-drift 32s ease-in-out infinite alternate;
}
/* Large screens: swap to the original hi-res (6MB) for crisp art */
@media (min-width: 1800px) {
  .home-section--bg:not(.home-section--bg-alt) .home-section__bg {
    background-image: url("../images/website_background.jpg");
  }
  .home-section--bg-alt .home-section__bg {
    background-image: url("../images/background_2.jpg");
  }
}
/* Mobile: use the small variant to save bandwidth */
@media (max-width: 900px) {
  .home-section--bg:not(.home-section--bg-alt) .home-section__bg {
    background-image: url("../images/website_background-900.jpg");
  }
  .home-section--bg-alt .home-section__bg {
    background-image: url("../images/background_2-900.jpg");
  }
}
/* Alt variant: second illustrated background (magic cauldron + whisk) */
.home-section--bg-alt .home-section__bg {
  background-image: url("../images/background_2-1800.jpg");
  background-position: center bottom;
}

@keyframes cb-bg-drift {
  0%   { transform: scale(1.06) translate3d(-1%, 0, 0); }
  100% { transform: scale(1.08) translate3d(1%, -1%, 0); }
}
/* Alt section: horizontally mirror the background_2 image and reverse the
   drift so it doesn't feel like a duplicate of the first illustrated section */
@keyframes cb-bg-drift-flip {
  0%   { transform: scale(1.06) scaleX(-1) translate3d(-1%, 0, 0); }
  100% { transform: scale(1.08) scaleX(-1) translate3d(1%, -1%, 0); }
}
.home-section--bg-alt .home-section__bg {
  animation-name: cb-bg-drift-flip;
  animation-direction: alternate-reverse;
  animation-duration: 38s;
}

/* Fade top/bottom edges into the unified bg-hero base — generous 26%
   fade zones so adjacent sections blend with no visible seam. */
.home-section__bg-fade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg,  var(--bg-hero) 0%, rgba(245,243,238,0) 140px),
    linear-gradient(270deg, var(--bg-hero) 0%, rgba(245,243,238,0) 140px),
    linear-gradient(
      180deg,
      var(--bg-hero) 0%,
      rgba(245,243,238,0) 26%,
      rgba(245,243,238,0) 74%,
      var(--bg-hero) 100%
    );
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-section__bg-fade {
    background:
      linear-gradient(90deg,  var(--bg-hero) 0%, rgba(37,36,34,0) 140px),
      linear-gradient(270deg, var(--bg-hero) 0%, rgba(37,36,34,0) 140px),
      linear-gradient(
        180deg,
        var(--bg-hero) 0%,
        rgba(37,36,34,0) 26%,
        rgba(37,36,34,0) 74%,
        var(--bg-hero) 100%
      );
  }
  :root:not([data-theme="light"]) .home-section__bg {
    filter: brightness(.55) saturate(.7);
  }
}
[data-theme="dark"] .home-section__bg-fade {
  background:
    linear-gradient(90deg,  var(--bg-hero) 0%, rgba(37,36,34,0) 140px),
    linear-gradient(270deg, var(--bg-hero) 0%, rgba(37,36,34,0) 140px),
    linear-gradient(
      180deg,
      var(--bg-hero) 0%,
      rgba(37,36,34,0) 26%,
      rgba(37,36,34,0) 74%,
      var(--bg-hero) 100%
    );
}
[data-theme="dark"] .home-section__bg { filter: brightness(.55) saturate(.7); }

.home-section--bg__inner {
  position: relative;
  width: 100%;
}

/* ── Section bridge: smooth cream → dark transition ─────── */
.section-bridge {
  position: relative;
  width: 100%;
  pointer-events: none;
}
.section-bridge--to-dark {
  height: 140px;
  margin-bottom: -1px; /* hairline seam guard against sub-pixel rendering */
  background: linear-gradient(
    180deg,
    var(--bg-hero) 0%,
    color-mix(in srgb, var(--bg-hero) 70%, var(--primary)) 55%,
    var(--primary) 100%
  );
}
/* Fallback for browsers without color-mix */
@supports not (background: color-mix(in srgb, red, blue)) {
  .section-bridge--to-dark {
    background: linear-gradient(180deg, var(--bg-hero) 0%, var(--primary) 100%);
  }
}
/* Give feature cards a translucent scrim so text stays legible on the bg */
.home-section--bg .home-feature {
  padding: 20px 22px;
  border-top: 1px solid rgba(124, 87, 48, .18);
  background: linear-gradient(
    180deg,
    rgba(251,249,244,.55) 0%,
    rgba(251,249,244,.35) 100%
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--radius-inner);
}
[data-theme="dark"] .home-section--bg .home-feature,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-section--bg .home-feature {
    background: linear-gradient(180deg, rgba(27,28,25,.55) 0%, rgba(27,28,25,.35) 100%);
    border-top-color: rgba(238,189,142,.22);
  }
}
[data-theme="dark"] .home-section--bg .home-feature {
  background: linear-gradient(180deg, rgba(27,28,25,.55) 0%, rgba(27,28,25,.35) 100%);
  border-top-color: rgba(238,189,142,.22);
}

/* ── Dark mode: solid dark-gray bg, hide video + illustrated images ─ */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .home-hero__video,
  :root:not([data-theme="light"]) .home-section__bg,
  :root:not([data-theme="light"]) .home-section__bg-fade {
    display: none;
  }
  :root:not([data-theme="light"]) .home-hero--video {
    background: var(--bg-hero);
  }
}
:root[data-theme="dark"] .home-hero__video,
:root[data-theme="dark"] .home-section__bg,
:root[data-theme="dark"] .home-section__bg-fade {
  display: none;
}
:root[data-theme="dark"] .home-hero--video {
  background: var(--bg-hero);
}

/* ── Scroll-reveal animation ─────────────────────────────── */
/* Base — applies to all variants. Each variant overrides the from-state
   transform/filter so every element has its own entrance. */
.reveal {
  opacity: 0;
  transform: translate3d(0, 32px, 0);
  transition:
    opacity .85s cubic-bezier(.2,.7,.2,1),
    transform .95s cubic-bezier(.2,.7,.2,1),
    filter .85s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}

/* Variants: distinct entrance motions */
.reveal[data-reveal="up"]    { transform: translate3d(0, 32px, 0); }
.reveal[data-reveal="down"]  { transform: translate3d(0, -32px, 0); }
.reveal[data-reveal="left"]  { transform: translate3d(-48px, 0, 0); }
.reveal[data-reveal="right"] { transform: translate3d(48px, 0, 0); }
.reveal[data-reveal="fade"]  { transform: none; }

.reveal[data-reveal="scale"] { transform: scale(.92) translate3d(0, 14px, 0); }

.reveal[data-reveal="pop"] {
  transform: scale(.7);
  transition:
    opacity .55s ease-out,
    transform .75s cubic-bezier(.34, 1.56, .64, 1); /* overshoot */
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal[data-reveal="blur"] {
  transform: translate3d(0, 20px, 0);
  filter: blur(14px);
}

.reveal[data-reveal="tilt"] {
  transform: rotate(-4deg) translate3d(20px, 32px, 0);
  transform-origin: left center;
}

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

/* Stagger children inside a .reveal--stagger container.
   Child animation follows the parent's data-reveal variant. */
.reveal--stagger .reveal-child {
  opacity: 0;
  transition:
    opacity .55s cubic-bezier(.2,.7,.2,1),
    transform .7s cubic-bezier(.2,.7,.2,1),
    filter .55s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--reveal-child-delay, 0ms);
}
.reveal--stagger[data-reveal="up"]    .reveal-child { transform: translate3d(0, 22px, 0); }
.reveal--stagger[data-reveal="left"]  .reveal-child { transform: translate3d(-24px, 0, 0); }
.reveal--stagger[data-reveal="right"] .reveal-child { transform: translate3d(24px, 0, 0); }
.reveal--stagger[data-reveal="pop"]   .reveal-child {
  transform: scale(.6);
  transition:
    opacity .45s ease-out,
    transform .65s cubic-bezier(.34, 1.56, .64, 1);
  transition-delay: var(--reveal-child-delay, 0ms);
}
.reveal--stagger[data-reveal="blur"]  .reveal-child { filter: blur(8px); transform: translate3d(0, 14px, 0); }

/* When parent becomes visible, reset children — parent's own transform
   stays neutral so only children animate. */
.reveal--stagger.is-visible { opacity: 1; transform: none; filter: none; }
.reveal--stagger.is-visible .reveal-child {
  opacity: 1;
  transform: none;
  filter: none;
}

/* ── Hero on-load animation sequence ──────────────────────
   Plays once when the page loads (not tied to scroll). Each element
   gets its own keyframes + delay so they cascade in. */
.load-in {
  opacity: 0;
  animation-duration: .9s;
  animation-timing-function: cubic-bezier(.2,.7,.2,1);
  animation-fill-mode: both;
  animation-delay: var(--load-delay, 0ms);
}
.load-in--slide {
  animation-name: cb-load-slide;
  animation-duration: .7s;
}
.load-in--title {
  animation-name: cb-load-title;
  animation-duration: 1s;
}
.load-in--rise {
  animation-name: cb-load-rise;
}
.load-in--pop {
  animation-name: cb-load-pop;
  animation-duration: .75s;
  animation-timing-function: cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes cb-load-slide {
  from { opacity: 0; transform: translate3d(-18px, 0, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes cb-load-title {
  from { opacity: 0; transform: translate3d(-24px, 8px, 0); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes cb-load-rise {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes cb-load-pop {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: none; }
}

/* Feature number (01/02..) — a subtle secondary pop once card is revealed */
.reveal.is-visible .home-feature__num {
  animation: cb-num-pop .7s cubic-bezier(.34, 1.56, .64, 1) .25s both;
}
@keyframes cb-num-pop {
  0%   { transform: scale(.6); letter-spacing: 6px; opacity: 0; }
  100% { transform: none; letter-spacing: 2px; opacity: 1; }
}

/* Hero illustration: gentle float on load (runs once, not tied to scroll) */
.home-hero__art {
  animation: cb-float-in 1.1s cubic-bezier(.2,.7,.2,1) both,
             cb-float 9s ease-in-out 1.2s infinite alternate;
}
@keyframes cb-float-in {
  0%   { opacity: 0; transform: translate3d(12px, 18px, 0) scale(.985); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes cb-float {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(0, -10px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal[data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
  .reveal--stagger .reveal-child { opacity: 1 !important; transform: none !important; filter: none !important; }
  .load-in { opacity: 1 !important; animation: none !important; }
  .home-section__bg, .home-hero__art { animation: none !important; }
  .reveal.is-visible .home-feature__num { animation: none !important; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .home-hero { padding: 56px var(--page-pad) 24px; }
  .home-hero--video { padding: calc(88px + var(--nav-h)) var(--page-pad) 48px; }
  .home-hero__inner {
    grid-template-columns: 1fr;
    gap: 8px;
    text-align: left;
  }
  .home-hero__art {
    order: -1;
    justify-self: center;
    max-width: 560px;
    margin-bottom: 8px;
  }
  .home-hero__title { font-size: clamp(2.1rem, 8vw, 3rem); }
  .home-section { padding: 64px var(--page-pad); }
  .home-section__head { margin-bottom: 40px; }
  .home-features { gap: 20px 28px; }
}

@media (max-width: 520px) {
  .home-hero__cta { gap: 12px; }
  .ghost-btn { padding: 10px 18px; }
}

/* ══════════════════════════════════════════════════════════ */

/* ── Chinese mode: disable italic everywhere ─────────────── */
/* Chinese typography reads better upright; English layouts keep their
   existing Noto Serif italic accents. data-lang="zh" is set on <html>
   by js/global-nav.js when the user selects Chinese. */
[data-lang="zh"],
[data-lang="zh"] * {
  font-style: normal !important;
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
  .navbar, .footer, .region-selector { display: none; }
  body { background: #fff; color: #000; }
  .legal-header { background: none; border: none; padding-top: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
