/* DM Sans - pragmatic geometric sans
   Variable font: 100-1000 weight range */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../assets/fonts/dm-sans-latin.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../assets/fonts/dm-sans-italic-latin.woff2") format("woff2");
}

@font-face {
  font-family: "DM Sans Fallback";
  font-style: normal;
  src: local("Arial");
  size-adjust: 106.85%;
  ascent-override: 92.84%;
  descent-override: 29.01%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "DM Sans Fallback";
  font-style: italic;
  src: local("Arial Italic"), local("Arial");
  size-adjust: 106.85%;
  ascent-override: 92.84%;
  descent-override: 29.01%;
  line-gap-override: 0%;
}

/* ═══════════════════════════════════════════
   BASE - Design tokens, reset, utilities
   Ink and Ember dark landing system
   ═══════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  interpolate-size: allow-keywords;
  /* Surfaces */
  --bg:          #0a0908;
  --bg-deep:     #0a0908;
  --bg-base:     #0f0e0c;
  --bg-elevated: #171512;
  --bg-raised:   #1e1b17;
  --bg-hover:    #252219;
  /* Borders */
  --border:      rgba(255 255 255 / .06);
  --border-lit:  rgba(255 255 255 / .10);
  /* Text */
  --fg:          #ede8df;
  --fg-muted:    #9a9288;
  --fg-dim:      #8a8174;
  /* Accent - ember (primary) */
  --accent:      #c9a96e;
  --accent-hover: #d4b67a;
  --accent-glow: rgba(201 169 110 / .15);
  --accent-fg:   #0a0908;
  /* Accent - sage (growth, life) */
  --sage:        #7db8a0;
  --sage-glow:   rgba(125 184 160 / .08);
  /* Accent - sakura (warmth) */
  --sakura:      #d4a0a0;
  --sakura-glow: rgba(212 160 160 / .06);
  /* Accent - warm coral (energy) */
  --warm:        #e8a87c;
  --warm-glow:   rgba(232 168 124 / .08);
  /* Accent - red (pitch) */
  --red:         #d32f2f;
  /* Glass */
  --glass-blur:   16px;
  --glass-bg:     rgba(15 13 10 / .55);
  --glass-border: rgba(201 169 110 / .08);
  --glass-shadow: 0 8px 40px rgba(0 0 0 / .4);
  --glass-glow:   0 0 60px rgba(201 169 110 / .03);
  /* Radii */
  --r-sm:  6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 120px;
  --space-2xl: 120px;
  /* Easing */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-out: cubic-bezier(.33, 1, .68, 1);
  /* Typography */
  --font-serif: "DM Sans", "DM Sans Fallback", system-ui, -apple-system, sans-serif;
  --font-sans:  "DM Sans", "DM Sans Fallback", system-ui, -apple-system, sans-serif;
  --font-jp-serif: "Yu Mincho", "Hiragino Mincho ProN", "BIZ UDPMincho", "MS PMincho", serif;
  /* Container */
  --contain: 1120px;
  --contain-narrow: 800px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 220;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(12 11 9 / .96);
  color: var(--fg);
  border: 1px solid var(--border-lit);
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

body {
  position: relative;
  font-family: var(--font-sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body.public-page {
  display: flex;
  flex-direction: column;
}

body.public-page > main {
  flex: 1 0 auto;
  min-height: 100svh;
}

body.public-page .s-footer {
  margin-top: 0;
}

body.nav-open > main {
  margin-top: var(--mobile-nav-offset, 0px);
}

/* Lift all page content above fixed canvas layers */
main, .s-footer, footer {
  position: relative;
  z-index: 5;
}

#kanji-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

section[id],
[data-section],
.faq-section,
.gal-section {
  scroll-margin-top: 112px;
}

/* ── Typography ── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.8rem, 8vw, 5.5rem); }
h2 { font-size: clamp(2rem, 5.5vw, 3.5rem); }
h3 { font-size: clamp(1.1rem, 2.2vw, 1.4rem); }
.serif { font-family: var(--font-serif); font-weight: 700; letter-spacing: 0; }

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nowrap { white-space: nowrap; }

.icon {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

.icon-mask {
  background-color: currentColor;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  mask-size: contain;
  -webkit-mask-size: contain;
}

.icon-menu { mask-image: url("../assets/icons/menu.svg"); -webkit-mask-image: url("../assets/icons/menu.svg"); }
.icon-x { mask-image: url("../assets/icons/x.svg"); -webkit-mask-image: url("../assets/icons/x.svg"); }
.icon-file-input { mask-image: url("../assets/icons/file-input.svg"); -webkit-mask-image: url("../assets/icons/file-input.svg"); }
.icon-scan-text { mask-image: url("../assets/icons/scan-text.svg"); -webkit-mask-image: url("../assets/icons/scan-text.svg"); }
.icon-repeat-2 { mask-image: url("../assets/icons/repeat-2.svg"); -webkit-mask-image: url("../assets/icons/repeat-2.svg"); }
.icon-book-open-text { mask-image: url("../assets/icons/book-open-text.svg"); -webkit-mask-image: url("../assets/icons/book-open-text.svg"); }
.icon-audio-lines { mask-image: url("../assets/icons/audio-lines.svg"); -webkit-mask-image: url("../assets/icons/audio-lines.svg"); }
.icon-captions { mask-image: url("../assets/icons/captions.svg"); -webkit-mask-image: url("../assets/icons/captions.svg"); }
.icon-video { mask-image: url("../assets/icons/video.svg"); -webkit-mask-image: url("../assets/icons/video.svg"); }
.icon-library-big { mask-image: url("../assets/icons/library-big.svg"); -webkit-mask-image: url("../assets/icons/library-big.svg"); }
.icon-download { mask-image: url("../assets/icons/download.svg"); -webkit-mask-image: url("../assets/icons/download.svg"); }
.icon-circle-play { mask-image: url("../assets/icons/circle-play.svg"); -webkit-mask-image: url("../assets/icons/circle-play.svg"); }
.icon-mail { mask-image: url("../assets/icons/mail.svg"); -webkit-mask-image: url("../assets/icons/mail.svg"); }
.icon-bug { mask-image: url("../assets/icons/bug.svg"); -webkit-mask-image: url("../assets/icons/bug.svg"); }
.icon-message-circle-heart { mask-image: url("../assets/icons/message-circle-heart.svg"); -webkit-mask-image: url("../assets/icons/message-circle-heart.svg"); }
.icon-receipt-text { mask-image: url("../assets/icons/receipt-text.svg"); -webkit-mask-image: url("../assets/icons/receipt-text.svg"); }
.icon-shield-check { mask-image: url("../assets/icons/shield-check.svg"); -webkit-mask-image: url("../assets/icons/shield-check.svg"); }
.icon-image { mask-image: url("../assets/icons/image.svg"); -webkit-mask-image: url("../assets/icons/image.svg"); }
.icon-files { mask-image: url("../assets/icons/files.svg"); -webkit-mask-image: url("../assets/icons/files.svg"); }
.icon-brand-x { mask-image: url("../assets/icons/brand-x.svg"); -webkit-mask-image: url("../assets/icons/brand-x.svg"); }

.icon--sm {
  width: 0.875rem;
  height: 0.875rem;
}

.icon--lg {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--fg);
  border: 1px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}

.footer-social .icon {
  width: 14px;
  height: 14px;
}

.footer-social-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.footer-social:hover {
  color: var(--fg);
  border-color: rgba(255 255 255 / .06);
  background: rgba(255 255 255 / .03);
}

/* ── Container ── */
.contain { max-width: var(--contain); margin: 0 auto; padding: 0 24px; }

/* ── Eyebrow ── */
.eyebrow {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .25em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}


/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--r-md);
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  border: none;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease), opacity .25s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-fg);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 30px rgba(201 169 110 / .2);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-lit);
  color: var(--fg);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Grain overlay ── */
.grain {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.18;
  transition: opacity .16s linear;
}
html.is-scrolling .grain {
  opacity: 0;
}
html.is-scrolling .video-controls,
html.is-scrolling .how-step,
html.is-scrolling .faq-item {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ── Topbar ── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 14px 24px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.topbar.scrolled {
  background: rgba(10, 9, 8, .96);
  border-bottom-color: transparent;
  box-shadow: 0 4px 30px rgba(0 0 0 / .5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--fg);
  flex-shrink: 0;
  transition: opacity .25s var(--ease);
}
.brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  transition: filter .25s var(--ease);
}
.brand:hover img {
  filter: drop-shadow(0 0 10px rgba(201 169 110 / .18));
}

.topnav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  margin-right: auto;
  min-width: 0;
}
.topnav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .85rem;
  font-weight: 600;
  color: var(--fg-muted);
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.topnav a:hover {
  color: var(--fg);
  background: rgba(255 255 255 / .03);
  border-color: rgba(255 255 255 / .06);
}
.topnav a.active {
  color: var(--fg);
  background: transparent;
  border-color: transparent;
}

.s-footer {
  margin-top: clamp(36px, 5vw, 72px);
  padding: 32px 0 38px;
  border-top: 1px solid rgba(255 255 255 / .08);
  background:
    linear-gradient(180deg, rgba(10 9 8 / .14) 0%, rgba(10 9 8 / .56) 28%, rgba(10 9 8 / .9) 100%),
    radial-gradient(ellipse 70% 120% at 50% 0%, rgba(201 169 110 / .06), transparent 65%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.footer-brand {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.footer-copy {
  color: var(--fg-muted);
  font-size: .85rem;
}

.footer-note {
  color: rgba(239 233 224 / .56);
  font-size: .75rem;
  margin-top: 4px;
}

.footer-meta {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  order: 1;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  order: 2;
}

.footer-links a {
  color: var(--fg-muted);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .01em;
  transition: color .2s var(--ease);
}

.footer-links a:hover {
  color: var(--accent);
}

.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: color .2s var(--ease), opacity .2s var(--ease);
}

.mobile-nav-toggle:hover {
  color: var(--accent);
}

.mobile-nav-toggle.is-open {
  color: var(--fg);
  box-shadow: none;
}

.mobile-nav {
  position: fixed;
  top: 62px;
  left: 0;
  right: 0;
  bottom: auto;
  z-index: 130;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 10px 16px 14px;
  border-top: 1px solid rgba(255 255 255 / .04);
  border-bottom: 1px solid rgba(255 255 255 / .04);
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  background: rgba(10 9 8 / .92);
  box-shadow: none;
  transform: translateY(-8px);
  opacity: 0;
  transition: transform .24s var(--ease), opacity .24s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.mobile-nav.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.mobile-nav-links a {
  padding: 14px 0;
  border-radius: 0;
  border: 0;
  border-bottom: 0;
  background: transparent;
  color: var(--fg-muted);
  font-size: .95rem;
  font-weight: 600;
  transition: color .2s var(--ease), opacity .2s var(--ease);
}

.mobile-nav-links a.active,
.mobile-nav-links a:hover {
  color: var(--fg);
  background: transparent;
  transform: none;
}

.mobile-nav-links a.active {
  color: var(--fg);
}

.mail-compose-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(0 0 0 / .58);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
}

.mail-compose-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mail-compose {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 150;
  width: min(560px, calc(100vw - 32px));
  padding: 24px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border-lit);
  background: rgba(10 9 8 / .96);
  box-shadow: 0 24px 70px rgba(0 0 0 / .52);
  transform: translate(-50%, calc(-50% + 12px));
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}

.mail-compose.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.mail-compose-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.mail-compose-title {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.mail-compose-email {
  color: var(--accent);
  font-size: .9rem;
}

.mail-compose-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  flex-shrink: 0;
}

.mail-compose-fields {
  display: grid;
  gap: 12px;
}

.mail-compose-field {
  display: grid;
  gap: 8px;
}

.mail-compose-label {
  color: var(--fg-muted);
  font-size: .82rem;
  font-weight: 600;
}

.mail-compose-input,
.mail-compose-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: rgba(255 255 255 / .03);
  color: var(--fg);
  font: inherit;
  padding: 14px 16px;
}

.mail-compose-input::placeholder,
.mail-compose-textarea::placeholder {
  color: var(--fg-dim);
}

.mail-compose-textarea {
  min-height: 180px;
  resize: vertical;
}

.mail-compose-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

body.mail-compose-open {
  overflow: hidden;
}

body.nav-open {
  overflow: visible;
}

/* ── Focus states (accessibility) ── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .mobile-nav,
  .mail-compose,
  .mail-compose-backdrop {
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════
   SECTIONS - Ink & Ember - Unified surface
   v6: volumetric tree background, fixed depth layer
   ═══════════════════════════════════════════ */
/* ── Tree Background ──
   Fixed 9:16 tree art. The kanji river moves; the tree does not.
   ──────────────────────────────────────────── */
.tree-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  bottom: auto;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  min-height: 100vh;
  min-height: 100lvh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: paint;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.tree-bg picture {
  display: block;
  width: 100%;
  height: 100%;
}

.tree-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
  opacity: 0.28;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* ── Section ambient glow system ──
   Each section gets a subtle warm radial gradient
   to create progressive color chapters as you scroll.
   ──────────────────────────────────────────── */
.s-features::after,
.s-app::after,
.s-card::after,
.s-how::after,
.s-final::after,
.s-faq::after {
  content: '';
  position: absolute;
  top: 10%;
  left: 0;
  right: 0;
  height: 80%;
  pointer-events: none;
  z-index: 0;
}

/* Each section's unique warm tint */
.s-features::after {
  background: radial-gradient(ellipse 50% 50% at 30% 40%, var(--sage-glow), transparent 70%);
}
.s-app::after {
  background: radial-gradient(ellipse 40% 55% at 70% 50%, var(--warm-glow), transparent 70%);
}
.s-card::after {
  background: radial-gradient(ellipse 50% 50% at 50% 30%, var(--sakura-glow), transparent 70%);
}
.s-how::after {
  background: radial-gradient(ellipse 45% 50% at 50% 50%, var(--sage-glow), transparent 70%);
}
.s-final::after {
  background: radial-gradient(ellipse 50% 50% at 60% 50%, var(--warm-glow), transparent 70%);
}
.s-faq::after {
  background: radial-gradient(ellipse 45% 50% at 50% 50%, var(--sakura-glow), transparent 70%);
}


/* ────────────────────────────────────────────
   HERO
   ──────────────────────────────────────────── */
.s-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 1;
}

.s-hero::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 50%;
  background: radial-gradient(ellipse 40% 50% at center, rgba(201 169 110 / .04), transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.hero-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(350px, 45vw, 600px);
  opacity: .025;
  filter: invert(1);
  pointer-events: none;
  user-select: none;
  z-index: 1;
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-xl) 0;
  max-width: 1080px;
  margin: 0 auto;
  transform: translateY(clamp(24px, 5vh, 52px));
}

.s-hero h1 {
  max-width: min(100%, 23ch);
  margin: 0 auto;
  font-size: clamp(2.9rem, 5.7vw, 4.35rem);
  line-height: 1.01;
  text-wrap: pretty;
}

.hero-sub {
  color: var(--fg-muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin-top: var(--space-sm);
  max-width: 34ch;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-md);
}

.accent { color: var(--accent); }

/* ────────────────────────────────────────────
   FEATURES - alternating side-by-side
   Art bleeds wide, text sits alongside
   ──────────────────────────────────────────── */
.s-features {
  position: relative;
  z-index: 1;
  padding: clamp(42px, 5vw, 68px) 0 clamp(52px, 6vw, 82px);
  overflow-x: hidden;
}

.feat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: var(--contain);
  margin: 0 auto;
  padding: clamp(42px, 5.6vw, 72px) var(--space-md);
  position: relative;
}

/* Art side */
.feat-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(16px, 2.5vw, 28px);
  border-radius: var(--r-lg);
  overflow: visible;
  perspective: 900px;
  transform-style: preserve-3d;
}
.feat-frame {
  --line-tilt: 0deg;
  position: relative;
  display: inline-flex;
  width: min(100%, 320px);
  border-radius: 8px;
  transform-style: preserve-3d;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.feat-frame::before,
.feat-frame-media::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% - 2px);
  width: 1px;
  height: 44px;
  background: linear-gradient(to top, rgba(201 169 110 / .42), transparent);
  opacity: 0;
  transform: translateX(-50%) rotate(var(--line-tilt));
  transform-origin: bottom;
  transition: opacity .25s var(--ease), transform .35s var(--ease);
  pointer-events: none;
}
.feat-frame-media {
  position: relative;
  display: block;
  width: 100%;
  border-radius: inherit;
  transform: translate3d(0, 0, 0) rotateX(0) rotateY(0) scale(1);
  transform-origin: center;
  transition: transform .45s var(--ease), filter .35s var(--ease);
}
@media (hover: hover) {
  .feat-frame:hover .feat-frame-media { will-change: transform, filter; }
}
.feat-frame picture {
  display: block;
  width: 100%;
}
.feat-frame-media::before {
  inset: 10px 10px auto auto;
  left: auto;
  bottom: auto;
  width: 46px;
  height: 46px;
  background:
    linear-gradient(90deg, rgba(201 169 110 / .16), rgba(201 169 110 / .16)) top right / 46px 1px no-repeat,
    linear-gradient(180deg, rgba(201 169 110 / .16), rgba(201 169 110 / .16)) top right / 1px 46px no-repeat;
  border-radius: 0 7px 0 0;
  opacity: .2;
  transform: translate3d(0, 0, 16px);
  animation: featCueBreathe 6.4s var(--ease) infinite;
}
.feat-frame-media::after {
  content: '';
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 19px;
  height: 19px;
  background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27%23ede8df%27%20stroke-width%3D%272.35%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M7%2017%2017%207%27/%3E%3Cpath%20d%3D%27M8%207h9v9%27/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .62;
  filter: drop-shadow(0 2px 10px rgba(0 0 0 / .72));
  transform: translate3d(0, 0, 22px);
  transition: opacity .35s var(--ease), transform .45s var(--ease), filter .35s var(--ease);
  animation: featCueArrow 6.4s var(--ease) infinite;
  pointer-events: none;
}
.feat-frame img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: inherit;
  filter: drop-shadow(0 8px 32px rgba(0 0 0 / .3));
}
.feat-frame:hover::before {
  opacity: .46;
}
.feat-frame:hover .feat-frame-media::before,
.feat-frame:focus-visible .feat-frame-media::before {
  animation: none;
  border-color: rgba(201 169 110 / .58);
  opacity: .72;
  transform: translate3d(0, 0, 28px);
}
.feat-frame:hover .feat-frame-media::after,
.feat-frame:focus-visible .feat-frame-media::after {
  animation: none;
  opacity: .92;
  filter: drop-shadow(0 2px 12px rgba(0 0 0 / .72)) drop-shadow(0 0 10px rgba(201 169 110 / .28));
  transform: translate3d(4px, -4px, 30px);
}
.feat-frame:hover img {
  filter: drop-shadow(0 12px 40px rgba(0 0 0 / .38)) drop-shadow(0 0 20px rgba(201 169 110 / .06));
}
.feat-frame:focus-visible {
  outline: 2px solid rgba(201 169 110 / .68);
  outline-offset: 6px;
}
.feat--right .feat-frame:hover .feat-frame-media {
  transform: translate3d(0, -10px, 26px) rotateX(3deg) rotateY(-4deg) rotateZ(-.6deg) scale(1.025);
}
.feat--left .feat-frame:hover .feat-frame-media {
  transform: translate3d(0, -10px, 26px) rotateX(3deg) rotateY(4deg) rotateZ(.6deg) scale(1.025);
}

/* Text side */
.feat-text {
  padding: clamp(18px, 2.8vw, 34px) clamp(18px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feat-text h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--fg);
}
.feat-text p {
  color: rgba(239 233 224 / .86);
  font-size: clamp(1.16rem, 1.04rem + .44vw, 1.38rem);
  line-height: 1.78;
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  text-wrap: pretty;
}
.feat-text p strong {
  color: var(--accent);
  font-weight: 600;
}

/* Right variant: art left, text right */
.feat--right .feat-art { order: 1; }
.feat--right .feat-text {
  order: 2;
  justify-content: center;
  text-align: center;
}

/* Left variant: text left, art right */
.feat--left .feat-art { order: 2; justify-content: center; }
.feat--left .feat-text {
  order: 1;
  justify-content: center;
  text-align: center;
}
.feat--left .feat-text p {
  margin-left: auto;
  margin-right: auto;
}

/* Alternating ambient glows */
.feat:nth-child(1)::after { content: ''; position: absolute; left: 20%; top: 30%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(201 169 110 / .03), transparent 70%); pointer-events: none; }
.feat:nth-child(2)::after { content: ''; position: absolute; right: 20%; top: 30%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(201 169 110 / .025), transparent 70%); pointer-events: none; }
.feat:nth-child(3)::after { content: ''; position: absolute; left: 15%; top: 40%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(201 169 110 / .03), transparent 70%); pointer-events: none; }
.feat:nth-child(4)::after { content: ''; position: absolute; right: 15%; top: 40%; width: 400px; height: 400px; background: radial-gradient(circle, rgba(201 169 110 / .025), transparent 70%); pointer-events: none; }

@keyframes featCueBreathe {
  0%, 100% {
    opacity: .14;
    transform: translate3d(0, 0, 16px);
  }
  50% {
    opacity: .36;
    transform: translate3d(0, 0, 22px);
  }
}

@keyframes featCueArrow {
  0%, 100% {
    opacity: .54;
    transform: translate3d(0, 0, 22px);
  }
  50% {
    opacity: .82;
    transform: translate3d(2px, -2px, 26px);
  }
}

.features-tail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: clamp(30px, 4vw, 56px);
  padding-top: 0;
  position: relative;
  text-align: center;
}
.features-tail .btn {
  padding: 12px 24px;
  border-color: rgba(201 169 110 / .24);
  background:
    linear-gradient(180deg, rgba(237 232 223 / .035), rgba(201 169 110 / .055)),
    rgba(12 10 8 / .34);
  color: rgba(239 233 224 / .9);
  box-shadow:
    0 14px 36px rgba(0 0 0 / .24),
    inset 0 1px 0 rgba(255 255 255 / .035);
}
.features-tail .btn:hover {
  border-color: rgba(201 169 110 / .44);
  background:
    linear-gradient(180deg, rgba(237 232 223 / .052), rgba(201 169 110 / .088)),
    rgba(16 13 10 / .44);
  color: var(--fg);
  box-shadow:
    0 18px 42px rgba(0 0 0 / .28),
    0 0 34px rgba(201 169 110 / .07),
    inset 0 1px 0 rgba(255 255 255 / .05);
}

/* ────────────────────────────────────────────
   THE APP
   ──────────────────────────────────────────── */
.s-app {
  position: relative;
  z-index: 1;
  padding: clamp(50px, 6vw, 82px) 0 clamp(58px, 7vw, 88px);
  overflow-x: hidden;
}
.s-app-header {
  text-align: center;
  max-width: 1080px;
  margin: 0 auto clamp(20px, 3vw, 34px);
}

.s-app-header h2 {
  max-width: 14ch;
  margin: 0 auto;
  text-wrap: balance;
}

.app-layout {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 3vw, 28px);
  position: relative;
}
.app-layout::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: min(900px, 86vw);
  height: 280px;
  transform: translateX(-50%);
  background: radial-gradient(circle at center, rgba(201 169 110 / .09), rgba(201 169 110 / .04) 36%, transparent 72%);
  filter: blur(34px);
  pointer-events: none;
  z-index: 0;
}

/* ── Video showcase ── */
.video-showcase {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255 255 255 / .08);
  box-shadow:
    0 0 0 1px rgba(255 255 255 / .03) inset,
    0 40px 100px rgba(0 0 0 / .6),
    0 0 80px rgba(201 169 110 / .05);
  transition: box-shadow .5s var(--ease), border-color .5s var(--ease);
  z-index: 1;
}
.video-showcase:hover {
  border-color: rgba(201 169 110 / .2);
  box-shadow:
    0 0 0 1px rgba(255 255 255 / .05) inset,
    0 50px 120px rgba(0 0 0 / .7),
    0 0 100px rgba(201 169 110 / .08);
}
.video-showcase video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  cursor: pointer;
  background: rgba(10 9 8 / .74);
}
.video-controls {
  position: absolute;
  left: clamp(8px, 1.25vw, 14px);
  right: clamp(8px, 1.25vw, 14px);
  bottom: clamp(6px, .9vw, 10px);
  display: grid;
  grid-template-columns: 36px minmax(64px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid rgba(237 232 223 / .09);
  border-radius: 10px;
  background: rgba(12 10 8 / .72);
  box-shadow: 0 18px 46px rgba(0 0 0 / .34), inset 0 1px 0 rgba(255 255 255 / .04);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.video-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 34px;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(201 169 110 / .22);
  border-radius: 8px;
  background: rgba(237 232 223 / .06);
  color: rgba(239 233 224 / .9);
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .01em;
  cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.video-toggle:hover,
.video-toggle:focus-visible {
  border-color: rgba(201 169 110 / .48);
  background: rgba(201 169 110 / .12);
  color: var(--fg);
}
.video-toggle-icon {
  position: relative;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}
.video-toggle-icon::before {
  content: '';
  position: absolute;
  inset: 2px 1px 2px 4px;
  border-left: 8px solid currentColor;
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
}
.video-showcase.is-playing .video-toggle-icon::before,
.video-showcase.is-playing .video-toggle-icon::after {
  content: '';
  position: absolute;
  top: 2px;
  width: 3px;
  height: 10px;
  border: 0;
  background: currentColor;
}
.video-showcase.is-playing .video-toggle-icon::before { left: 3px; }
.video-showcase.is-playing .video-toggle-icon::after { right: 3px; }
.video-progress {
  --video-progress: 0%;
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  touch-action: pan-y;
}
.video-progress:focus-visible {
  outline: 1px solid rgba(201 169 110 / .72);
  outline-offset: 5px;
}
.video-progress::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(201 169 110 / .82) var(--video-progress), rgba(237 232 223 / .16) var(--video-progress));
}
.video-progress::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 1px solid rgba(10 9 8 / .62);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(201 169 110 / .16), 0 4px 12px rgba(0 0 0 / .34);
  appearance: none;
  -webkit-appearance: none;
}
.video-progress::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(237 232 223 / .16);
}
.video-progress::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: rgba(201 169 110 / .82);
}
.video-progress::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(10 9 8 / .62);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(201 169 110 / .16), 0 4px 12px rgba(0 0 0 / .34);
}
.video-time {
  min-width: 36px;
  color: rgba(239 233 224 / .66);
  font-size: .76rem;
  font-weight: 600;
  text-align: right;
}

.how-grid-merged {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* ────────────────────────────────────────────
   THE CARD
   ──────────────────────────────────────────── */
.s-card {
  position: relative;
  z-index: 1;
  padding: clamp(50px, 6vw, 78px) 0;
  overflow-x: clip;
  overflow-y: visible;
}
.s-card-header {
  text-align: center;
  margin-bottom: clamp(20px, 3vw, 30px);
}

.card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .44fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}

.card-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.anki-card-mock {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
}

.s-card .card-flipper,
.s-card .anki-card-mock {
  width: 100%;
  max-width: 700px;
}

.card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card-copy-body {
  color: rgba(239 233 224 / .84);
  font-size: clamp(1.04rem, 1vw, 1.12rem);
  line-height: 1.68;
  max-width: 33ch;
  margin: 0;
}
.card-copy-body strong {
  color: var(--accent);
  font-weight: 800;
  text-shadow: 0 0 18px rgba(201 169 110 / .16);
}

.card-gallery-link {
  text-align: center;
  margin-top: 24px;
}
.card-gallery-link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 20px;
  border: 1px solid rgba(201 169 110 / .24);
  border-radius: var(--r-md);
  background:
    linear-gradient(180deg, rgba(237 232 223 / .035), rgba(201 169 110 / .055)),
    rgba(12 10 8 / .34);
  color: rgba(239 233 224 / .9);
  box-shadow:
    0 14px 36px rgba(0 0 0 / .22),
    inset 0 1px 0 rgba(255 255 255 / .035);
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: border-color .25s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease);
}
.card-gallery-link a:hover {
  border-color: rgba(201 169 110 / .44);
  background:
    linear-gradient(180deg, rgba(237 232 223 / .052), rgba(201 169 110 / .088)),
    rgba(16 13 10 / .44);
  color: var(--fg);
  box-shadow:
    0 18px 42px rgba(0 0 0 / .26),
    0 0 34px rgba(201 169 110 / .07),
    inset 0 1px 0 rgba(255 255 255 / .05);
}

/* ────────────────────────────────────────────
   HOW IT WORKS
   ──────────────────────────────────────────── */
.s-how {
  position: relative;
  z-index: 1;
  padding: var(--space-2xl) 0;
}
.s-how .contain { text-align: center; }
.s-how h2 { margin-bottom: var(--space-lg); }

.s-how-merged {
  padding-top: clamp(40px, 5vw, 64px);
}

.s-how-merged .eyebrow {
  margin-bottom: var(--space-md);
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}
.how-grid.how-grid-merged {
  max-width: 1120px;
}
.how-step {
  --line-tilt: 0deg;
  position: relative;
  display: grid;
  grid-template-columns: clamp(28px, 3vw, 36px) minmax(0, 1fr);
  column-gap: clamp(4px, .7vw, 7px);
  row-gap: 8px;
  align-content: start;
  padding: clamp(22px, 2.25vw, 28px) clamp(18px, 2vw, 24px);
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  background: rgba(19 17 14 / .76);
  box-shadow: 0 24px 64px rgba(0 0 0 / .26), 0 0 60px rgba(201 169 110 / .04), inset 0 1px 0 rgba(255 255 255 / .03);
  overflow: visible;
  transition: transform .45s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.how-step::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% - 1px);
  width: 1px;
  height: 36px;
  background: linear-gradient(to top, rgba(201 169 110 / .34), transparent);
  opacity: 0;
  transform: translateX(-50%) rotate(var(--line-tilt));
  transform-origin: bottom;
  transition: opacity .25s var(--ease), transform .35s var(--ease);
  pointer-events: none;
}
.how-step:hover {
  transform: translateY(-5px);
  border-color: var(--border-lit);
  background: rgba(22 20 16 / .82);
  box-shadow: 0 28px 70px rgba(0 0 0 / .3), 0 0 72px rgba(201 169 110 / .06), inset 0 1px 0 rgba(255 255 255 / .04);
}
.how-step:hover::before {
  opacity: .4;
}
.how-num {
  font-family: var(--font-serif);
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
  min-width: .82em;
  font-size: clamp(2.38rem, 3.4vw, 2.9rem);
  color: rgba(201 169 110 / .54);
  line-height: .9;
  margin: 0 0 0 -5px;
  text-align: left;
  text-shadow:
    0 1px 0 rgba(255 244 214 / .08),
    0 -1px 0 rgba(0 0 0 / .78),
    0 14px 34px rgba(0 0 0 / .34);
}
.how-step h3 {
  grid-column: 2;
  margin: 0;
  align-self: center;
  font-size: clamp(1.34rem, 1.74vw, 1.56rem);
  line-height: 1.04;
  letter-spacing: 0;
  white-space: nowrap;
}
.how-step p {
  grid-column: 2;
  color: rgba(239 233 224 / .72);
  font-size: .95rem;
  line-height: 1.54;
  margin: 0;
  max-width: none;
  text-wrap: pretty;
}
.how-step code { font-size: .85rem; color: var(--accent); background: var(--accent-glow); padding: 2px 6px; border-radius: 4px; }

/* ────────────────────────────────────────────
   FINAL FAQ + CTA
   ──────────────────────────────────────────── */
.s-faq,
.s-final {
  position: relative;
  z-index: 1;
}

.s-final {
  padding: clamp(48px, 6vw, 76px) 0 clamp(36px, 5vw, 58px);
}

.s-final .contain {
  max-width: 1120px;
}

.final-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(340px, 1fr);
  gap: clamp(42px, 5vw, 68px);
  align-items: center;
}

.faq-panel,
.final-cta {
  min-width: 0;
}

.faq-panel {
  align-self: center;
  display: block;
}

.faq-panel h3 {
  text-align: left;
  margin: 0 0 clamp(16px, 2vw, 22px);
  color: var(--fg);
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  line-height: 1;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.faq-item {
  border-radius: var(--r-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(15 13 10 / .4);
  border: 1px solid rgba(255 255 255 / .04);
  overflow: hidden;
  contain: layout;
  transition: border-color .35s var(--ease), background .35s var(--ease), box-shadow .35s var(--ease);
}
.faq-item:hover {
  border-color: var(--border-lit);
  background: rgba(18 16 12 / .58);
  box-shadow: 0 16px 38px rgba(0 0 0 / .18);
}
.faq-item summary {
  padding: 15px var(--space-md);
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  color: var(--fg);
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.faq-item summary::before {
  content: '+';
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--fg-dim);
  transition: transform .32s var(--ease), color .32s var(--ease);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.faq-item[open] summary::before { content: '−'; color: var(--accent); transform: scale(1.12); }
.faq-item summary::-webkit-details-marker { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .faq-item::details-content {
    block-size: 0;
    overflow: clip;
    opacity: 0;
    transition: block-size .42s var(--ease), opacity .34s var(--ease) .04s, content-visibility .42s var(--ease);
    transition-behavior: allow-discrete;
  }
  .faq-item[open]::details-content {
    block-size: auto;
    opacity: 1;
  }
}
.faq-item p {
  padding: 0 var(--space-md) var(--space-sm) calc(var(--space-md) + 20px + var(--space-sm));
  color: var(--fg-muted);
  font-size: .86rem;
  line-height: 1.6;
}
@media (prefers-reduced-motion: no-preference) {
  .faq-item p {
    transform: translateY(-5px);
    transition: transform .42s var(--ease);
  }
  .faq-item[open] p { transform: translateY(0); }
}

.faq-more {
  text-align: left;
  margin-top: clamp(12px, 1.5vw, 18px);
}
.faq-more a {
  color: var(--accent);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .02em;
  transition: color .2s var(--ease);
}
.faq-more a:hover { color: var(--accent-hover); }

.final-cta {
  position: relative;
  align-self: center;
  display: block;
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.final-cta-title {
  margin: 0;
  color: var(--fg);
  font-size: clamp(2.5rem, 3.8vw, 3.5rem);
  line-height: 1;
  max-width: none;
  white-space: nowrap;
}
.final-cta-body {
  margin: clamp(10px, 1.4vw, 14px) 0 0;
  color: rgba(239 233 224 / .72);
  font-size: clamp(.95rem, 1.05vw, 1.05rem);
  line-height: 1.5;
  max-width: none;
}
.final-cta .btn {
  width: 100%;
  min-width: 0;
  margin-top: clamp(18px, 2vw, 24px);
}

.pricing-teaser-copy {
  max-width: none;
  text-align: left;
}

/* ── Glass fallback for older browsers ── */
@supports not (backdrop-filter: blur(1px)) {
  .how-step { background: var(--bg-elevated); }
  .faq-item { background: var(--bg-elevated); }
}

@media (prefers-reduced-motion: reduce) {
  .tree-bg-img { transition: none; object-position: center 50% !important; }
  .feat-frame-media,
  .feat-frame-media::before,
  .feat-frame-media::after {
    animation: none;
    transition: none;
    transform: none;
  }
  .feat-frame:hover .feat-frame-media,
  .feat-frame:focus-visible .feat-frame-media,
  .feat-frame:hover .feat-frame-media::before,
  .feat-frame:focus-visible .feat-frame-media::before,
  .feat-frame:hover .feat-frame-media::after,
  .feat-frame:focus-visible .feat-frame-media::after {
    transform: none;
  }
}

/* ═══════════════════════════════════════════
CARD MOCK - Authentic Anki card preview
Mirrors vintage_scholar.css exactly.
═══════════════════════════════════════════ */

/* ── Wrapper: landing-page chrome around the authentic card ── */
.anki-card-mock {
  width: 100%;
  max-width: 960px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0 0 0 / .6), 0 0 40px rgba(201 169 110 / .04);
  background: #D9D4C0;
}

/* ── The card itself: EXACT vintage_scholar match ── */
.anki-card-mock .card {
  font-family: var(--font-jp-serif);
  background: #D9D4C0;
  color: #000000;
  padding: clamp(32px, 4vw, 50px) clamp(20px, 3vw, 30px);
  line-height: 1.5;
  border: none;
  border-radius: 0;
  box-shadow: none;
  position: relative;
  width: 100%;
  min-height: clamp(420px, 52vw, 610px);
  overflow-x: hidden;
  overflow-y: hidden;
  scrollbar-width: none;
}
.anki-card-mock .card::-webkit-scrollbar { display: none; }

/* Canvas grain texture overlay - vintage_scholar signature */
.anki-card-mock .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.15'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
}

/* All content above grain */
.anki-card-mock .word,
.anki-card-mock .word-and-pitch-container,
.anki-card-mock .meanings,
.anki-card-mock .kanji,
.anki-card-mock .jp-definitions-container,
.anki-card-mock .enhanced-context,
.anki-card-mock .video,
.anki-card-mock .video-placeholder,
.anki-card-mock .card-front-prompt {
  position: relative;
  z-index: 5;
}

.anki-card-mock .card--front {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.anki-card-mock .card--front .word {
  text-align: center;
  margin: 0;
  font-size: clamp(3rem, 4.8vw, 4rem);
  font-weight: 900;
  color: #000000;
  line-height: 1;
}

.anki-card-mock .card--front .enhanced-context {
  margin: 0 auto;
  max-width: 760px;
  padding: 0;
}

.anki-card-mock .card--front .context-japanese {
  font-size: clamp(1.4rem, 2.2vw, 2rem);
}

/* ── Word + Pitch header ── */
.word-and-pitch-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(28px, 5vw, 80px);
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 3px solid #000000;
}

.word-left {
  font-size: clamp(2.3rem, 3.5vw, 3rem);
  font-weight: 900;
  line-height: 1;
  color: #000000;
  flex-shrink: 0;
}

.pitch-right {
  flex: 1;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}
.pitch-display { display: flex; align-items: flex-end; }
.pitch-reading-group { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pitch-reading-group.pitch-width-88 { min-width: 88px; }
.pitch-reading-group.pitch-width-105 { min-width: 105px; }
.pitch-patterns-stack { display: flex; flex-direction: column; align-items: center; min-height: 32px; }
.pitch-accent-svg { display: block; }

.pitch-reading-label {
  width: max-content;
  min-width: 100%;
  font-size: clamp(1.2rem, 2.4vw, 2rem);
  color: #000000;
  font-weight: 500;
  font-family: var(--font-jp-serif);
  line-height: 1;
  display: flex;
  justify-content: space-around;
  gap: .08em;
}
.pitch-reading-label span {
  flex: 0 0 auto;
  min-width: .9em;
  text-align: center;
  white-space: nowrap;
}

/* ── English / Kanji blocks ── */
.card-columns {
  margin-bottom: 0;
  font-size: 0;
}

.meanings,
.kanji {
  display: inline-block;
  width: 48%;
  vertical-align: top;
  padding: 10px 0;
  border-bottom: 3px solid #000000;
  background: transparent;
  border-radius: 0;
}

.meanings {
  margin-right: 4%;
}

.meanings .label,
.kanji .label {
  font-size: clamp(1rem, 1.7vw, 1.5rem);
  color: #000000;
  font-weight: 700;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meanings .content {
  font-size: clamp(.98rem, 1.55vw, 1.375rem);
  color: #000000;
  line-height: 1.8;
  font-weight: 500;
  padding-left: 1.5em;
}

.kanji .content {
  padding-left: 0;
  font-size: clamp(.9rem, 1.3vw, 1.0625rem);
  line-height: 1.2;
}

/* ── Kanji entries ── */
.ka-entry { margin-bottom: 6px; padding: 4px 0; }
.ka-entry:last-child { margin-bottom: 0; }
.ka-top { display: flex; align-items: baseline; gap: 8px; }
.ka-char { font-size: clamp(1.4rem, 2.1vw, 1.875rem); font-weight: 900; color: #000000; line-height: 1; }
.ka-on { color: #000000; font-size: clamp(.88rem, 1.3vw, 1.0625rem); font-weight: 700; }
.ka-sep { color: #444; font-size: .875rem; font-weight: 300; }
.ka-kun { color: #000000; font-size: clamp(.88rem, 1.3vw, 1.0625rem); font-weight: 500; }
.ka-bot { display: flex; align-items: baseline; gap: 8px; margin-top: 1px; padding-left: 2.5em; }
.ka-en { font-size: clamp(.84rem, 1.22vw, 1rem); color: #000000; font-weight: 500; }

/* ── JP Definitions ── */
.jp-definitions-container {
  padding: 10px 0;
  margin-bottom: 0;
  border-bottom: 3px solid #000000;
  color: #000000;
  clear: both;
}
.primary-definition { margin-bottom: 10px; }

.dict-source {
  font-size: clamp(1rem, 1.8vw, 1.625rem);
  font-weight: 700;
  color: #000000;
  margin-bottom: 14px;
}

.definition-text {
  font-size: clamp(.98rem, 1.55vw, 1.375rem);
  color: #000000;
  line-height: 1.6;
  font-weight: 500;
  white-space: pre-line;
  padding-left: 1.5em;
}
.nk-title, .kj-title { font-weight: 600; color: #000000; display: block; }
.nk-major, .kj-major { color: #000000; display: block; margin-left: 1.5em; margin-top: 0.5em; }

.additional-definitions { margin-top: 8px; }
.additional-definitions summary {
  font-size: clamp(.95rem, 1.35vw, 1.125rem);
  color: #000000;
  cursor: pointer;
  padding: 4px 0;
  font-weight: 500;
  list-style: none;
}
.additional-definitions summary::-webkit-details-marker { display: none; }
.additional-definitions summary::before { content: '▸ '; }
.additional-definitions[open] summary::before { content: '▾ '; }
.additional-definition {
  padding: 8px 0;
  border-top: 1px solid rgba(0 0 0 / .08);
}

/* ── Context sentence ── */
.enhanced-context {
  background: transparent;
  padding: 16px 0 8px;
  border-radius: 0;
  color: #000000;
  text-align: center;
  font-weight: 400;
}

.context-japanese {
  font-size: clamp(1.1rem, 2vw, 2rem);
  color: #000000;
  line-height: 1.7;
  margin-bottom: 0;
  font-weight: 400;
  text-align: center;
}

/* Real: #000, weight 900, text-shadow faux-bold */
.target-word {
  color: #000000 !important;
  font-weight: 900 !important;
  text-shadow: 0.5px 0 0 currentColor, -0.5px 0 0 currentColor, 0 0.5px 0 currentColor, 0 -0.5px 0 currentColor !important;
  background: none !important;
  display: inline !important;
}

/* ═══════════════════════════════════════════
   CARD FLIP - 3D faces
   Front (question) <-> Back (answer)
   ═══════════════════════════════════════════ */
.card-flip-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-size: .82rem;
  color: rgba(239 233 224 / .62);
  margin-bottom: var(--space-sm);
  letter-spacing: .03em;
  transition: opacity .3s var(--ease);
}
.card-flip-toggle {
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.card-flip-toggle:hover {
  color: var(--fg-muted);
}
.flip-icon {
  display: inline-block;
  font-size: 1rem;
  animation: none;
}


/* ── Card flip scene: CSS Grid stacking ── */
.card-flipper {
  display: grid;
  perspective: 1000px;
  cursor: pointer;
  width: 100%;
  max-width: 960px;
  position: relative;
}
.card-flipper:focus,
.card-flipper:focus-visible {
  outline: none;
}
.card-flipper .anki-card-mock::after {
  display: none;
}

/* Both faces stack in the same grid cell */
.card-flipper .card-face {
  grid-area: 1 / 1;
  display: flex;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transition: transform .7s cubic-bezier(.4, 0, .2, 1);
}

.card-flipper .card-face .anki-card-mock {
  display: flex;
  flex: 1 1 auto;
}
.card-flipper .card-face .anki-card-mock .card {
  flex: 1 1 auto;
}

/* Front: visible by default */
.card-front {
  transform: rotateY(0deg);
  z-index: 2;
}

/* Back: pre-rotated, hidden behind front */
.card-back {
  transform: rotateY(180deg);
  z-index: 1;
}

/* Flipped state */
.card-flipper.flipped .card-front {
  transform: rotateY(-180deg);
  z-index: 1;
}
.card-flipper.flipped .card-back {
  transform: rotateY(0deg);
  z-index: 2;
}

/* Front card prompt - stays in landing page style (it's the CTA) */
.card-front-prompt {
  text-align: center;
  padding: var(--space-xl) 0 var(--space-lg);
  font-size: 1.2rem;
  font-style: italic;
  color: #666;
  font-family: var(--font-jp-serif);
  letter-spacing: .02em;
}
.card-front-prompt::before {
  content: '\2193';
  display: block;
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  opacity: 0.4;
  animation: none;
}


/* ── Video clip placeholder ── */
.video-placeholder {
  border-radius: 4px;
  background: rgba(0 0 0 / .06);
  border: 1px solid rgba(0 0 0 / .1);
  margin: 10px 0;
  overflow: hidden;
}
.video-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 16px;
  color: rgba(201 169 110 / .7);
  font-size: .75rem;
  letter-spacing: .03em;
}
.video-placeholder-inner svg { opacity: 0.55; }

.anki-card-mock .video {
  margin-top: 2px;
  margin-bottom: 0;
  padding: 0;
  text-align: center;
}

.anki-card-mock .card--back .video {
  display: flex;
  justify-content: center;
  margin: 8px auto 0;
}

.anki-card-mock .video img,
.anki-card-mock .video video {
  display: block;
  max-width: 100%;
  height: auto;
}

.anki-card-mock .video img { margin-inline: auto; }

.anki-card-mock .video video {
  width: auto;
  max-width: 100%;
  max-height: 400px;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0 0 0 / .15);
  object-fit: contain;
}

.anki-card-mock .card--back .video video {
  max-width: 520px;
  max-height: 250px;
}

@media (prefers-reduced-motion: reduce) {
  .flip-icon,
  .card-front-prompt::before {
    animation: none !important;
  }

  .card-flipper .card-face {
    transition: none !important;
  }
}

@media (max-width: 768px) {
  .anki-card-mock .card {
    min-height: clamp(320px, 78vw, 460px);
    padding: clamp(18px, 4.4vw, 24px) clamp(12px, 3.8vw, 18px);
  }

  .card-columns {
    display: block;
    font-size: 0;
  }

  .meanings,
  .kanji {
    display: inline-block;
    width: 48%;
    vertical-align: top;
    padding: 7px 0;
  }

  .meanings {
    margin-right: 4%;
    margin-bottom: 0;
  }

  .word-and-pitch-container {
    flex-direction: row;
    align-items: flex-end;
    gap: clamp(14px, 6vw, 34px);
    margin-bottom: 14px;
    padding-bottom: 14px;
  }

  .word-left {
    font-size: clamp(1.75rem, 8.2vw, 2.35rem);
  }

  .pitch-right {
    flex: 1 1 auto;
    min-width: 92px;
    justify-content: center;
  }

  .pitch-accent-svg {
    width: min(82px, 22vw);
    height: auto;
  }

  .pitch-reading-label {
    font-size: clamp(.95rem, 4.1vw, 1.25rem);
  }

  .meanings .label,
  .kanji .label {
    font-size: clamp(.78rem, 3.1vw, 1rem);
    margin-bottom: 8px;
  }

  .meanings .content {
    font-size: clamp(.72rem, 2.75vw, .92rem);
    line-height: 1.55;
    padding-left: .8em;
  }

  .kanji .content {
    font-size: clamp(.7rem, 2.6vw, .88rem);
  }

  .ka-entry {
    margin-bottom: 4px;
    padding: 2px 0;
  }

  .ka-top {
    gap: 5px;
  }

  .ka-char {
    font-size: clamp(1.05rem, 4.3vw, 1.45rem);
  }

  .ka-on,
  .ka-kun {
    font-size: clamp(.65rem, 2.55vw, .82rem);
  }

  .ka-sep {
    font-size: .68rem;
  }

  .ka-bot {
    padding-left: 1.7em;
  }

  .ka-en {
    font-size: clamp(.62rem, 2.35vw, .78rem);
  }

  .jp-definitions-container {
    padding: 8px 0;
  }

  .dict-source {
    font-size: clamp(.82rem, 3.2vw, 1.02rem);
    margin-bottom: 9px;
  }

  .definition-text {
    font-size: clamp(.76rem, 2.85vw, .96rem);
    line-height: 1.5;
    padding-left: .9em;
  }

  .nk-major,
  .kj-major {
    margin-left: 1em;
    margin-top: .35em;
  }

  .enhanced-context {
    padding: 10px 0 4px;
  }

  .context-japanese {
    font-size: clamp(.94rem, 3.5vw, 1.18rem);
    line-height: 1.45;
  }
}

@media (max-width: 420px) {
  .anki-card-mock .card {
    min-height: clamp(300px, 82vw, 390px);
    padding: 16px 10px;
  }

  .word-and-pitch-container {
    gap: 12px;
  }

  .pitch-right {
    min-width: 82px;
  }
}

/* ═══════════════════════════════════════════
   ANIMATIONS - Ink & Ember
   Char reveals, scroll text, spotlight borders,
   3D tilt, ink flow, shimmer
   ═══════════════════════════════════════════ */

/* ── Registered CSS Properties ── */
@property --progress {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}
@property --spot-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 135deg;
}
@property --spot-dist {
  syntax: "<number>";
  inherits: true;
  initial-value: 800;
}

/* ═══════════════════════════════════════════
   BASE REVEAL STATES
   ═══════════════════════════════════════════ */
html.reveal-ready .reveal,
html.reveal-ready .reveal-left,
html.reveal-ready .reveal-right,
html.reveal-ready .reveal-up,
html.reveal-ready .reveal-scale {
  opacity: 0;
  will-change: opacity, transform;
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}

html.reveal-ready .reveal       { transform: translateY(20px); }
html.reveal-ready .reveal-left  { transform: translateX(-32px); }
html.reveal-ready .reveal-right { transform: translateX(32px); }
html.reveal-ready .reveal-up    { transform: translateY(44px); }
html.reveal-ready .reveal-scale { transform: scale(.96); }

html.reveal-ready .reveal.visible,
html.reveal-ready .reveal-left.visible,
html.reveal-ready .reveal-right.visible,
html.reveal-ready .reveal-up.visible,
html.reveal-ready .reveal-scale.visible {
  opacity: 1;
  transform: translate(0) scale(1);
}

@media (max-width: 1200px) {
  html.reveal-ready .reveal-left,
  html.reveal-ready .reveal-right {
    transform: translateY(20px);
  }
}

@media (prefers-reduced-motion: reduce), (scripting: none) {
  html.reveal-ready .reveal,
  html.reveal-ready .reveal-left,
  html.reveal-ready .reveal-right,
  html.reveal-ready .reveal-up,
  html.reveal-ready .reveal-scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

[data-delay="1"] { transition-delay: .12s; }
[data-delay="2"] { transition-delay: .24s; }
[data-delay="3"] { transition-delay: .36s; }
[data-delay="4"] { transition-delay: .50s; }

@media (prefers-reduced-motion: no-preference) {
  .s-hero h1,
  .s-hero .hero-sub,
  .s-hero .hero-cta { animation: hero-in .7s var(--ease) both; }
  .s-hero h1 { animation-delay: .04s; }
  .s-hero .hero-sub { animation-delay: .16s; }
  .s-hero .hero-cta { animation-delay: .28s; }
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ═══════════════════════════════════════════
   SCROLL-DRIVEN CHARACTER REVEALS
   Per-char opacity/position driven by heading --progress.
   StringTune --progress-slice technique.
   ═══════════════════════════════════════════ */
.scroll-char {
  display: inline-block;
  --local-progress: calc(
    (var(--progress, 1) * 3.0 - var(--sci) / var(--sc-total) * 0.6) / 0.5
  );
  --wave: clamp(0, var(--local-progress), 1);
  opacity: 1;
  transform: translateY(calc((1 - var(--wave)) * 2px));
  transition: transform .15s linear;
}

/* Section progress bars removed */

/* ═══════════════════════════════════════════
   HEADING TEXT - color only, no clip tricks
   ═══════════════════════════════════════════ */
.serif.reveal.visible {
  color: var(--fg);
}

.serif em {
  color: var(--accent);
  font-style: normal;
}

/* ═══════════════════════════════════════════
   CURSOR-AWARE SPOTLIGHT BORDERS
   Glassmorphic gradient border follows cursor.
   Applied to cards, CTA, feature images, steps.
   ═══════════════════════════════════════════ */
.anki-card-mock,
.pricing-card,
.how-step {
  --spot-angle: 135deg;
  --spot-dist: 800;
}

.anki-card-mock::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    var(--spot-angle),
    rgba(201 169 110 / calc(0.35 - var(--spot-dist) / 2800)) 0%,
    transparent 40%,
    transparent 60%,
    rgba(201 169 110 / calc(0.35 - var(--spot-dist) / 2800)) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 10;
  transition: opacity .3s var(--ease);
}

.pricing-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    var(--spot-angle),
    rgba(201 169 110 / calc(0.2 - var(--spot-dist) / 3500)) 0%,
    transparent 40%,
    transparent 60%,
    rgba(201 169 110 / calc(0.2 - var(--spot-dist) / 3500)) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 10;
}

/* Spotlight on how-steps */
.how-step::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  padding: 1px;
  background: linear-gradient(
    var(--spot-angle),
    rgba(201 169 110 / calc(0.12 - var(--spot-dist) / 5000)) 0%,
    transparent 35%,
    transparent 65%,
    rgba(201 169 110 / calc(0.12 - var(--spot-dist) / 5000)) 100%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 2;
}

/* ═══════════════════════════════════════════
   SCROLL-DRIVEN FEATURE TRANSFORMS
   ═══════════════════════════════════════════ */
.s-features { --progress: 0; }

.feat-frame-media {
  transition: transform .45s var(--ease), filter .35s var(--ease);
}

.feat-frame:hover img {
  filter: brightness(1.05) drop-shadow(0 12px 40px rgba(0 0 0 / .38)) drop-shadow(0 0 22px rgba(201 169 110 / .08));
}

.feat-text p {
  transform: none;
  opacity: 1;
  transition: color .25s var(--ease);
}

/* ═══════════════════════════════════════════
   HOW IT WORKS - progress-aware
   ═══════════════════════════════════════════ */
.s-how { --progress: 0; }
.how-num {
  transform: none;
  opacity: 1;
  transition: color .25s var(--ease);
}

.how-step {
  position: relative;
}

.s-final { --progress: 0; perspective: 1200px; }

/* Hero heading text glow */
.s-hero h1 {
  text-shadow: 0 0 80px rgba(201 169 110 / .15);
}

/* Topbar scroll state handled in base.css */

/* ═══════════════════════════════════════════
   HERO BREATHING VIGNETTE
   Radial pulse on ::before (::after is bottom fade in sections.css)
   ═══════════════════════════════════════════ */
.s-hero .hero-inner::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(201 169 110 / 0.015) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

/* ═══════════════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .scroll-char { opacity: 1 !important; filter: none !important; transform: none !important; }
  .serif.reveal.visible { animation: none; -webkit-text-fill-color: var(--fg); }
  .feat-art img, .feat-text p, .how-num, .pricing-card, .card-flipper { transform: none !important; opacity: 1 !important; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE - 375 / 768 / 1024 / 1440
   v3: unified flow, no dividers
   ═══════════════════════════════════════════ */

@media (max-width: 1024px) {
  .how-step h3 {
    white-space: normal;
    text-wrap: balance;
  }
  .app-pair { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .feat { grid-template-columns: 1fr; text-align: center; }
  .feat--right .feat-art,
  .feat--left .feat-art { order: 1; justify-content: center; }
  .feat--right .feat-text,
  .feat--left .feat-text { order: 2; text-align: center; }
  .feat--left .feat-text p { margin-left: auto; margin-right: auto; }
  .feat-text p { margin: 0 auto; }
  .feat::before { display: none; }

  .final-grid { grid-template-columns: 1fr; max-width: 760px; align-items: stretch; }
  .final-cta {
    align-self: stretch;
    text-align: center;
    min-height: 0;
    padding-bottom: clamp(28px, 7vw, 38px);
  }
  .final-cta-title {
    max-width: none;
    font-size: clamp(2.35rem, 9vw, 3.4rem);
    line-height: .96;
    white-space: normal;
  }
  .final-cta-body { max-width: none; }
  .final-cta .btn {
    width: 100%;
    margin-top: clamp(14px, 4vw, 20px);
  }
  .faq-list {
    gap: 2px;
    margin-top: clamp(16px, 4vw, 22px);
  }
  .faq-panel h3,
  .faq-more,
  .final-cta { text-align: center; }
  .faq-more { margin-top: clamp(12px, 2vw, 18px); }
}

@media (max-width: 920px) {
  .card-layout { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }
  .card-copy { align-items: center; text-align: center; }
  .card-copy-body { margin-left: auto; margin-right: auto; }
  .card-gallery-link { align-self: center; text-align: center; }
}

@media (max-width: 768px) {
  html.mobile-nav-ready .topnav { display: none; }
  .mobile-nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }
  .topbar {
    padding: 12px var(--space-sm);
    flex-wrap: nowrap;
    align-items: center;
  }
  .topnav { scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
}

@media (max-width: 640px) {
  .topbar {
    padding: 10px 16px;
    gap: 12px;
  }

  .brand {
    gap: 8px;
    font-size: 1.05rem;
  }

  .topnav {
    gap: 4px;
    margin-left: 0;
  }

  .topnav a {
    padding: 8px 10px;
    font-size: .78rem;
  }

  .video-showcase {
    width: 100%;
    max-width: 540px;
  }

  .how-grid,
  .how-grid.how-grid-merged {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 540px;
    gap: 16px;
  }

  .how-step {
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 6px;
    padding: 18px 16px;
    border-radius: 14px;
  }

  .how-num {
    grid-column: 1;
    grid-row: 1 / span 2;
    font-size: clamp(2rem, 9vw, 2.35rem);
    margin-left: -3px;
  }

  .how-step h3,
  .how-step p {
    grid-column: 2;
  }

  .how-step h3 {
    font-size: clamp(1.18rem, 5.5vw, 1.36rem);
    line-height: 1.06;
  }

  .how-step p {
    font-size: .92rem;
    line-height: 1.5;
  }
}

@media (max-width: 600px) {
  :root {
    --space-xl: 80px;
    --space-2xl: 88px;
  }

  .mail-compose {
    width: calc(100vw - 20px);
    padding: 18px;
  }
  .mail-compose-actions {
    justify-content: stretch;
  }
  .mail-compose-actions .btn {
    width: 100%;
  }

  .tree-bg-img { opacity: 0.22 !important; }
  .grain { display: none; opacity: 0; transition: none; }

  h1 { font-size: clamp(2rem, 7.5vw, 3rem); }
  h2 { font-size: clamp(1.5rem, 5vw, 2.2rem); }

  .hero-inner {
    padding: 88px 18px 56px;
    transform: translateY(clamp(10px, 3vh, 24px));
  }
  .hero-watermark { width: 260px; }
  .s-hero h1 {
    max-width: 11.5ch;
    font-size: clamp(2.3rem, 8.4vw, 3.55rem);
    line-height: 1.02;
  }
  .hero-sub {
    max-width: 30ch;
    font-size: .98rem;
  }
  .feat {
    gap: clamp(12px, 4vw, 22px);
    padding: clamp(34px, 8vw, 48px) 20px;
  }
  .feat-art {
    padding: clamp(8px, 2.8vw, 14px);
  }
  .feat-frame { width: min(100%, 292px); }
  .feat-text {
    padding: 10px 10px 0;
  }
  .feat-text p {
    max-width: 31ch;
    font-size: clamp(1rem, 4.15vw, 1.12rem);
    line-height: 1.6;
  }
  .s-app-header h2 { max-width: 14ch; }
  .s-app-header h2 { text-align: center; }
  .app-layout {
    align-items: center;
    padding-left: 20px;
    padding-right: 20px;
    gap: 16px;
  }
  .video-showcase {
    width: 100%;
    max-width: 540px;
    border-radius: 12px;
  }
  .video-controls {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    left: 8px;
    right: 8px;
    bottom: 7px;
  }
  .video-toggle {
    width: 38px;
    height: 36px;
  }
  .how-grid,
  .how-grid.how-grid-merged {
    width: 100%;
    max-width: 540px;
    gap: 16px;
  }
  .how-step {
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 6px;
    padding: 18px 16px;
    border-radius: 14px;
  }
  .how-num {
    grid-column: 1;
    grid-row: 1 / span 2;
    font-size: clamp(2rem, 9vw, 2.35rem);
    margin-left: -3px;
  }
  .how-step h3 {
    grid-column: 2;
    font-size: clamp(1.18rem, 5.5vw, 1.36rem);
    line-height: 1.06;
  }
  .how-step p {
    grid-column: 2;
    font-size: .92rem;
    line-height: 1.5;
  }
  .card-copy { text-align: center; }
  .card-copy-body { margin-left: auto; margin-right: auto; }
  .card-copy,
  .card-gallery-link { align-items: center; text-align: center; }

  /* Disable scroll-char animations on mobile for perf */
  .scroll-char {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }


  /* Disable feat-art/how-step/proof/faq spotlight on touch */
  .feat-art::after,
  .how-step::after,
  .faq-item::after { display: none; }

  .feat-frame::before,
  .how-step::before,
  .card-flipper::before,
  .pricing-card::before,
  .gallery-page .anki-card-mock::before { display: none; }

  /* Card mock: full width */
  .s-card .card-flipper,
  .s-card .anki-card-mock {
    max-width: min(520px, calc(100vw - 52px));
  }
  .anki-card-mock { max-width: min(520px, calc(100vw - 52px)); }
  .anki-card-mock .card { padding: 20px 14px; }

}

@media (max-width: 540px) {
  .video-showcase,
  .how-grid,
  .how-grid.how-grid-merged {
    width: min(100%, 340px);
    max-width: 340px;
  }

  .how-grid,
  .how-grid.how-grid-merged {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .how-step {
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 6px;
    padding: 18px 16px;
  }

  .how-num {
    grid-column: 1;
    grid-row: 1 / span 2;
    font-size: clamp(2rem, 9vw, 2.35rem);
    margin-left: -3px;
  }

  .how-step h3,
  .how-step p {
    grid-column: 2;
  }

  .how-step h3 {
    font-size: clamp(1.18rem, 5.5vw, 1.36rem);
  }

  .how-step p {
    font-size: .92rem;
    line-height: 1.5;
  }
}

@media (max-width: 600px) {
  html.reveal-ready .reveal,
  html.reveal-ready .reveal-left,
  html.reveal-ready .reveal-right,
  html.reveal-ready .reveal-up,
  html.reveal-ready .reveal-scale {
    transform: translateY(10px);
    transition-duration: .45s;
    will-change: auto;
  }

  html.reveal-ready .reveal.visible,
  html.reveal-ready .reveal-left.visible,
  html.reveal-ready .reveal-right.visible,
  html.reveal-ready .reveal-up.visible,
  html.reveal-ready .reveal-scale.visible {
    transform: translateY(0);
  }

  [data-delay="1"],
  [data-delay="2"],
  [data-delay="3"],
  [data-delay="4"] {
    transition-delay: .06s;
  }
}

@media (hover: none), (pointer: coarse) {
  .feat-frame,
  .card-flipper,
  .video-showcase video,
  .video-progress,
  .how-step {
    cursor: default;
  }

  .feat-frame-media {
    will-change: auto;
  }

  .feat-frame:hover img,
  .video-showcase:hover,
  .how-step:hover,
  .card-flipper:hover {
    transform: none;
  }

  .feat--right .feat-frame:hover .feat-frame-media,
  .feat--left .feat-frame:hover .feat-frame-media,
  .feat-frame:hover .feat-frame-media::before,
  .feat-frame:focus-visible .feat-frame-media::before,
  .feat-frame:hover .feat-frame-media::after,
  .feat-frame:focus-visible .feat-frame-media::after {
    transform: none;
  }
}

@media (max-width: 560px) {
  .footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 20px;
  }
  .footer-meta { align-items: center; width: auto; gap: 14px; }
  .footer-socials { justify-content: flex-end; }
  .footer-links { justify-content: flex-end; gap: 16px; }
}

@media (max-width: 375px) {
  :root {
    --space-md: 20px;
    --space-lg: 48px;
    --space-xl: 64px;
    --space-2xl: 72px;
  }
  .word-left { font-size: 1.8rem; }
  .plan-price { font-size: 2.2rem; }
  .feat-frame { width: min(100%, 280px); }
  .video-showcase,
  .how-grid,
  .how-grid.how-grid-merged {
    width: min(100%, 322px);
    max-width: 322px;
  }

  .anki-card-mock .card { padding: 16px 12px; }
  .pitch-reading-label { font-size: .9rem; }

  .footer-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-meta {
    align-items: flex-start;
    width: 100%;
  }

  .footer-socials,
  .footer-links {
    justify-content: flex-start;
  }
}

@media (min-width: 1440px) {
  :root { --contain: 1200px; }
}

/* Dark-scheme and forced-dark compatibility
   The landing is already a dark UI. These rules keep browser/extension
   dark-mode tooling from double-processing fragile surfaces. */

:root {
  color-scheme: dark;
}

html,
body {
  background-color: var(--bg);
}

html,
body,
input,
textarea,
select,
button {
  color-scheme: dark;
}

::selection {
  background: rgba(201 169 110 / .32);
  color: var(--fg);
}

.tree-bg-img,
.hero-watermark,
#kanji-canvas {
  forced-color-adjust: none;
}

@media (forced-colors: active) {
  .grain,
  .tree-bg,
  .hero-watermark,
  #kanji-canvas {
    display: none !important;
  }

  .topbar,
  .mobile-nav,
  .mobile-nav-meta,
  .s-footer,
  .feat-body,
  .feat-icon,
  .feat-formats span,
  .examples-note,
  .how-step,
  .faq-item,
  .faq-page .faq-item,
  .video-showcase,
  .source-badge,
  .contact-card,
  .footer-social {
    forced-color-adjust: none;
    background: Canvas !important;
    color: CanvasText !important;
    border-color: GrayText !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .topnav a,
  .footer-links a,
  .card-gallery-link a,
  .faq-more a {
    color: LinkText !important;
  }

  .btn-primary,
  .plan-badge {
    forced-color-adjust: none;
    background: Highlight !important;
    color: HighlightText !important;
    border-color: Highlight !important;
    box-shadow: none !important;
  }

  .btn-ghost {
    forced-color-adjust: none;
    background: Canvas !important;
    color: CanvasText !important;
    border-color: GrayText !important;
  }

  .anki-card-mock .card,
  .anki-card-mock .card * {
    forced-color-adjust: none;
  }
}
