/* GreateWay landing page.
   Color system, ninth round — back to two hues: a teal, the native app's actual brand color,
   returns as --primary for buttons and everything else that isn't the red kept from round 8.
   --accent-3/--accent-4 both alias --primary now (no more blue, no more purple) — the 4-slot
   rotation classes (.c2/.c3/.c4) still exist structurally but three of the four slots are the
   same teal, only .c1/default (red) stands apart.
   First pass used Spring Teal (#00FFCD), a neon decorative accent, not the app's real color —
   too bright. Second pass (#5B8F85) undershot the other way, more of a muted sage than the
   app's actual teal. #158078 is the exact native hex: dark/saturated enough that raw --primary
   clears ~4.8:1 on white by itself, so --primary-text only needs a light 10% black nudge for
   extra margin, and white text now reads better than dark text on a --primary fill (unlike the
   two lighter attempts before it, which both needed dark text on the button itself).
   As before, "-soft"/"-text" are color-mix() derivations of the raw hue, never separately
   chosen hex values. */

:root {
  --bg: #FFFFFF;
  --surface: #FBFBFD;
  --text: #121316;
  --text-secondary: #6B6E8D;
  --text-tertiary: #A6A5C2;
  --border: #E3E3E8;
  --border-hover: #B5B3C4;
  --primary: #158078;
  --primary-soft: color-mix(in srgb, var(--primary) 10%, var(--bg));
  --primary-text: color-mix(in oklch, var(--primary) 90%, black);
  --accent: var(--primary);
  --accent-contrast: #FFFFFF;
  /* White text now reads better than dark on --primary fills (4.78:1 vs 4.39:1) — the opposite
     of the two lighter teals this palette went through before landing on the real native hex —
     so --primary-contrast aliases --accent-contrast instead of --text. Kept as its own token
     (not a straight swap to --accent-contrast everywhere) in case a future hue needs it again. */
  --primary-contrast: var(--accent-contrast);
  --accent-2: #E5473E;
  --accent-2-soft: color-mix(in srgb, var(--accent-2) 12%, var(--bg));
  /* Darkening red 60% toward black (the old formula every other accent still uses) came out
     looking terracotta/brick rather than a deeper red — dark, low-saturation red reads as brown
     to the eye almost no matter the mixing method, so the real fix isn't a better mixing
     algorithm, it's mixing in far less black (12%, not 60%) so the result stays close to the
     vivid brand red instead of sliding into brick territory. Still ~5.4:1 on white. */
  --accent-2-text: color-mix(in oklch, var(--accent-2) 88%, black);
  --accent-3: var(--primary);
  --accent-3-soft: color-mix(in srgb, var(--accent-3) 12%, var(--bg));
  --accent-3-text: var(--primary-text);
  --accent-4: var(--primary);
  --accent-4-soft: color-mix(in srgb, var(--accent-4) 12%, var(--bg));
  --accent-4-text: var(--primary-text);
  --shadow: 0 2px 6px rgba(16, 17, 22, 0.05), 0 16px 32px rgba(16, 17, 22, 0.09);
  --radius-card: 18px;
  --radius-frame: 40px;
  --radius-pill: 980px;
  --radius-chip: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0B10;
    --surface: #17171D;
    --text: #F5F5F7;
    --text-secondary: #98979F;
    --text-tertiary: #6E6D78;
    --border: #2A2A32;
    --border-hover: #3E3D48;
    /* Same shifted hues as light mode — only the neutral they mix against changes. Bright
       colors are already legible as text on a dark surface, so "-text" just reuses the raw
       value instead of darkening it toward black. */
    --primary-soft: color-mix(in srgb, var(--primary) 20%, var(--bg));
    --primary-text: var(--primary);
    --accent-2-soft: color-mix(in srgb, var(--accent-2) 20%, var(--bg));
    --accent-2-text: color-mix(in oklch, var(--accent-2) 55%, white);
    --accent-3-soft: color-mix(in srgb, var(--accent-3) 20%, var(--bg));
    --accent-3-text: var(--primary-text);
    --accent-4-soft: color-mix(in srgb, var(--accent-4) 20%, var(--bg));
    --accent-4-text: var(--primary-text);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.narrow { max-width: 680px; }
.center { text-align: center; }

h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; margin: 0 0 12px; }
h1 { font-size: clamp(40px, 6.4vw, 68px); line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.025em; }
h3 { font-size: 19px; margin-bottom: 6px; letter-spacing: -0.01em; }
p { margin: 0 0 12px; color: var(--text-secondary); }
a { color: inherit; }

/* ---------- Announcement bar ---------- */
/* Sits above the sticky nav, not itself sticky — scrolls away normally, then the nav takes over
   the top:0 spot once it's scrolled past, same as most "beta / big update coming" banners. */
.announce-bar {
  background: var(--primary-soft);
  border-bottom: 1px solid var(--border);
}
.announce-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 24px;
  text-align: center;
}
.announce-badge {
  flex-shrink: 0;
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  background: var(--accent-2);
  color: var(--accent-contrast);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.announce-text { font-size: 13px; color: var(--primary-text); }
@media (max-width: 640px) {
  .announce-inner { flex-direction: column; gap: 4px; padding: 10px 20px; }
}

/* ---------- Nav ---------- */
/* No visible border line — separation from the page comes from the blur alone, the way
   apple.com's nav does; a hairline here would read as a leftover box, not a deliberate edge. */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(20px) saturate(1.6);
}
/* Every gap in the row equal — brand↔link, link↔link, and the last link↔button — stretched
   across the full row width, not clustered on the left with the button pushed off on its own.
   That needs every word to be a direct flex child of the same row: .nav-links stays a <nav>
   landmark for a11y, but `display: contents` removes it from the box tree so its five <a> tags
   become direct siblings of .brand/.btn here instead of one lump `justify-content: space-between`
   only sees as a single item. */
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}
.brand {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}
.nav-links { display: contents; }
.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14.5px;
  letter-spacing: -0.005em;
}
.nav-links a:hover { color: var(--text); }

/* Hamburger toggle — only ever shown below the 820px breakpoint where .nav-links collapses
   into a dropdown (see the responsive block); on desktop it stays out of the layout entirely
   rather than just visually hidden, so it never steals a flex slot from the space-between row. */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-burger.nav-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-burger.nav-open span:nth-child(2) { opacity: 0; }
.nav-burger.nav-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* CTA button + language switcher sit together as one flex child in .nav-inner, tight against
   each other via their own small gap — this group is what actually sits at the space-between
   row's right edge, rather than the switcher being its own evenly-spaced item in that row. */
.nav-cta { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

/* Language switcher — native <details>/<summary>, same zero-JS pattern as the FAQ accordion.
   Plain text, no border/pill/background — a bare `details {...}` rule elsewhere (for the FAQ
   accordion) puts a border+background+padding on every <details> by default, so those all need
   an explicit reset here or this ends up with an ugly double frame (outer FAQ box, inner pill). */
.lang-switch {
  position: relative;
  flex-shrink: 0;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
}
.lang-switch summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.6;
  margin-top: 1px;
}
.lang-switch summary:hover { color: var(--text); }
.lang-switch[open] summary { color: var(--text); }
/* Beats the FAQ's generic `details[open] summary::after { content: "–" }` on a same-specificity
   tie (both end up (0,1,2)) — that rule comes later in the file so it would otherwise win the
   tiebreak and replace this triangle with a literal minus sign while open. */
.lang-switch[open] summary::after { content: ""; }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 30;
}
.lang-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-chip);
  font-size: 13.5px;
  text-decoration: none;
  color: var(--text-secondary);
}
.lang-menu a:hover { background: var(--bg); color: var(--text); }
.lang-menu a[aria-current="page"] { color: var(--primary-text); font-weight: 600; background: var(--primary-soft); }

/* ---------- Buttons ---------- */
/* .btn-primary is the filled pill (buttons are the one place --primary/teal appears as a raw
   fill, paired with --primary-contrast text — currently white, see the --primary-contrast note
   in :root); .btn-ghost is the paired white-with-visible-border pill used everywhere a button
   sits next to it — the hero's secondary action and the free pricing tier's CTA both use it. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--accent); color: var(--primary-contrast); }
.btn-primary:hover { opacity: 0.86; }
.btn-ghost { background: var(--bg); color: var(--text); border: 1px solid var(--text); }
.btn-ghost:hover { background: var(--surface); }
.btn-small { padding: 8px 18px; font-size: 13px; }
.btn-large { padding: 16px 32px; font-size: 17px; }
.btn-block { width: 100%; }

/* ---------- Language row (inside the hero frame) ---------- */
.hero-langs {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.meta-label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }

/* A grid, not a wrapped flex row — even columns keep every pill the same width regardless of
   label length, so the row reads as one deliberate block instead of a ragged, drifting line. */
.lang-pills {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}
.lang-pills span {
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--text);
}

/* ---------- "Also coming soon" platform note (final CTA) ---------- */
.platforms-note {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.platform-badges { display: flex; gap: 6px; }
.platform-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: var(--surface);
  cursor: default;
}

/* ---------- Hero ---------- */
.hero { padding: 96px 0 56px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
/* Red, not teal — teal is reserved for buttons and everything else, so the eyebrow (and every
   other non-button "look here" accent) runs on --accent-2 instead. Each showcase section can
   override this to its own accent (see .showcase-grammar below) when red is already spoken for
   elsewhere on that card. */
.eyebrow {
  color: var(--accent-2-text);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 14px;
}
/* Grammar showcase only — red is already marking the mistake inside its own card (.gc-c2),
   so its eyebrow borrows the section's teal instead of competing with itself. */
.eyebrow-teal { color: var(--accent-4-text); }
/* A quiet "not built yet" flag next to a section's own eyebrow — deliberately muted (border +
   secondary text, not one of the brand accents) so it reads as a status note, not another
   colored highlight competing with the eyebrow it sits next to. */
.soon-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  vertical-align: middle;
}
.lede { font-size: 19px; max-width: 480px; color: var(--text-secondary); }
.hero-cta { display: flex; align-items: center; gap: 20px; margin: 28px 0 14px; flex-wrap: wrap; }
.hero-note { font-size: 12px; color: var(--text-tertiary); }

.hero-visual { position: relative; min-height: 320px; }
.mock-page {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mock-line {
  height: 10px;
  border-radius: 5px;
  background: var(--border);
  opacity: 0.7;
}
.mock-line.w-90 { width: 90%; } .mock-line.w-100 { width: 100%; }
.mock-line.w-70 { width: 70%; } .mock-line.w-95 { width: 95%; }
.mock-line.w-60 { width: 60%; } .mock-line.w-85 { width: 85%; }
.mock-line.w-95 {
  height: auto;
  background: none;
  font-size: 13px;
  color: var(--text-secondary);
  opacity: 1;
}
.mock-underline {
  text-decoration: underline;
  text-decoration-color: var(--accent-2-text);
  text-underline-offset: 3px;
}

.hover-card {
  position: absolute;
  right: -8px;
  bottom: -28px;
  width: 240px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(20px);
  border: 0.5px solid rgba(255,255,255,0.4);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 14px;
}
.hc-row { display: flex; align-items: baseline; justify-content: space-between; }
.hc-word { font-weight: 600; font-size: 15px; }
.hc-speaker { font-size: 10px; color: var(--text-secondary); }
.hc-phonetic {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}
.hc-chip {
  display: inline-block;
  margin-top: 10px;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--accent-2);
  color: var(--accent-contrast);
  font-size: 12px;
  font-weight: 600;
}
.hc-divider { height: 1px; background: var(--border); margin: 10px 0; }
.hc-etym-row { display: flex; gap: 8px; align-items: center; }
.hc-swatch { width: 30px; height: 22px; border-radius: 8px; background: var(--primary-soft); flex-shrink: 0; }
.hc-etym-text { font-size: 10px; color: var(--text-secondary); line-height: 1.4; }
.hc-anki {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-contrast);
  background: var(--primary);
  border-radius: 7px;
  padding: 6px;
  text-align: center;
}

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section-lede { font-size: 17px; max-width: 560px; margin-left: auto; margin-right: auto; }
.section-lede.left { margin-left: 0; max-width: 440px; }

/* Apple modules read as separated by a shift to a barely-off-white fill, not by a drawn box —
   the border is nearly invisible (a hairline a touch darker than the fill, not a hard edge)
   and the radius is large enough that the block feels like a slab, not a bordered card. */
.frame {
  border: 1px solid var(--border);
  border-radius: var(--radius-frame);
  padding: 72px 64px;
  background: var(--surface);
}
@media (max-width: 640px) {
  .frame { padding: 32px 20px; }
  .hero { padding: 56px 0 31px; }
  .hero-langs { margin-top: 24px; padding-top: 16px; }
  .section { padding: 64px 0; }
  /* Matches the gap below the switch-card (grid gap + centering slack) — this section's own
     top padding would otherwise stack on top of the hero's bottom padding and the frame's,
     making the first mobile gap read much taller than every gap after it. */
  .what-section { padding-top: 0; }
  .how-section { padding: 64px 0; }
  .how-list { margin-top: 40px; }
  .feature-grid { margin-top: 32px; }
  .anki-flow { margin-top: 28px; }
  .pricing-grid { margin-top: 28px; }
  .faq-list { margin-top: 24px; }
  .cta-section { padding: 56px 0; margin-top: 40px; }
}

/* ---------- What is it (copy left, animated switching mockup right) ---------- */
.what-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.switch-demo {
  position: relative;
  height: 340px;
}
.switch-card {
  position: absolute;
  inset: 0;
  width: 100%;
  max-width: 380px;
  height: fit-content;
  margin: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 30px;
  opacity: 0;
  animation: switch-cycle 6s infinite;
}
.switch-card .dc-word { font-size: 26px; }
.switch-card .dc-phonetic { font-size: 13px; margin-top: 4px; }
.switch-card .dc-chip { margin-top: 16px; font-size: 15px; padding: 6px 14px; }
.switch-card .dc-divider { margin: 18px 0; }
.switch-card .dc-sentence { font-size: 14px; }
.switch-card .dc-sentence-tr { font-size: 13px; }
.switch-2 { animation-delay: 2s; }
.switch-3 { animation-delay: 4s; }
/* No dead gap between cards — the outgoing card is still fading out while the next one is
   already fading in (overlap around the 33%/38% mark), so there's always something on screen. */
@keyframes switch-cycle {
  0% { opacity: 0; transform: translateY(8px) scale(0.98); }
  6%, 40% { opacity: 1; transform: translateY(0) scale(1); }
  46%, 100% { opacity: 0; transform: translateY(-8px) scale(0.98); }
}
@media (prefers-reduced-motion: reduce) {
  .switch-card { animation: none; opacity: 1; position: relative; margin-bottom: 12px; }
}

/* ---------- How it works: light editorial list (full-bleed, edge to edge) ---------- */
/* Three rounds tried a boxed dark carousel (flat black, then a gray glow, then a colorful
   aurora) and the card/slideshow feel never sat right — this drops the dark background, the
   slide-card chrome and the little boxed UI-demo pill entirely for a plain numbered list, the
   way apple.com or a Stripe/Linear feature page just scrolls through steps as typography. The
   only "background treatment" left is a very soft tint of the same three brand colors, low
   enough opacity that it reads as texture, not as a colored block. */
/* Two blobs now, not three — --accent-4 is the same teal as --primary since round 9, so a third
   stop in that hue would just sit on top of the first instead of adding variety. */
.how-section {
  width: 100%;
  background:
    radial-gradient(ellipse 800px 500px at 8% 0%, color-mix(in srgb, var(--primary) 8%, transparent) 0%, transparent 60%),
    radial-gradient(ellipse 900px 600px at 50% 100%, color-mix(in srgb, var(--accent-2) 6%, transparent) 0%, transparent 62%),
    var(--bg);
  padding: 120px 0;
}
.how-title { text-align: center; font-size: clamp(32px, 4.4vw, 48px); margin-bottom: 0; }

.how-list { margin-top: 72px; }
.how-item {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 32px;
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.how-item:first-child { border-top: none; padding-top: 0; }
.how-item:last-child { padding-bottom: 0; }

/* No icon-in-a-box — a big, low-opacity numeral is the only "graphic" per step, not a
   filled shape or a line icon riding along with it. Every numeral shares the same diagonal
   teal→red gradient as the final CTA band (var(--primary-text) to var(--accent-2-text)),
   painted onto the glyph itself via background-clip:text, instead of alternating between two
   flat tints per item — one consistent gradient treatment rather than a red/teal/teal/teal/red
   pattern that read as arbitrary. */
.how-num {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary-text) 0%, var(--accent-2-text) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  opacity: 0.4;
}

.how-body h3 { font-size: clamp(22px, 2.6vw, 28px); }
.how-body p { font-size: 16px; max-width: 520px; line-height: 1.55; }
.how-demo {
  margin: 4px 0 0;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  color: var(--text);
}
.how-demo strong { color: var(--accent-2-text); font-weight: 600; }

/* A small looping "hover and reveal" scene, the same beat as the app's real interaction — a
   cursor glyph swoops onto the key word, holds, and the translation/result fades in a moment
   later, then both clear out for the loop to restart. .how-target hosts the absolutely-
   positioned cursor (so it always lands on that specific word regardless of surrounding text
   length); .how-reveal is the payoff that appears after the "hover". Step 4 has nothing to
   reveal (there's no translation, just a rating being picked), so it pulses the target word
   itself instead via .how-target-pulse. */
.how-target { position: relative; display: inline-block; }
.how-cursor {
  position: absolute;
  top: -3px;
  right: -15px;
  width: 14px;
  height: 14px;
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  animation: how-cursor-move 3.6s ease-in-out infinite;
}
.how-reveal {
  display: inline-block;
  opacity: 0;
  animation: how-reveal-fade 3.6s ease-in-out infinite;
}
.how-target-pulse strong {
  display: inline-block;
  animation: how-target-pulse 3.6s ease-in-out infinite;
}
@keyframes how-cursor-move {
  0%, 100% { opacity: 0; transform: translate(9px, -9px) scale(0.7); }
  18%, 68% { opacity: 1; transform: translate(2px, -2px) scale(1); }
  86% { opacity: 0; transform: translate(9px, -9px) scale(0.7); }
}
@keyframes how-reveal-fade {
  0%, 24% { opacity: 0; transform: translateX(-3px); }
  38%, 78% { opacity: 1; transform: translateX(0); }
  94%, 100% { opacity: 0; transform: translateX(-3px); }
}
@keyframes how-target-pulse {
  0%, 22% { transform: scale(1); }
  34%, 62% { transform: scale(1.14); }
  78%, 100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .how-cursor, .how-reveal, .how-target-pulse strong { animation: none; }
  .how-cursor { display: none; }
  .how-reveal { opacity: 1; }
}

@media (max-width: 640px) {
  .how-item { grid-template-columns: 1fr; gap: 12px; }
  .how-num { font-size: 32px; }
}

/* ---------- Showcase (alternating feature deep-dives) ---------- */
.showcase { padding: 56px 0; }
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.showcase-grid.reverse > .showcase-visual { order: 2; }
.showcase-grid.reverse > .showcase-copy { order: 1; }
.showcase-copy h2 { margin-bottom: 14px; }
.showcase-visual { display: flex; justify-content: center; }

/* ---------- Showcase 1: capture card ---------- */
.detail-card {
  width: 100%;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 20px;
}
.dc-row.dc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dc-word { font-weight: 700; font-size: 18px; }
.dc-speaker {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  color: var(--text-secondary);
}
.dc-phonetic {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  color: var(--text-secondary);
}
.dc-chip {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--accent-2);
  color: var(--accent-contrast);
  font-size: 13px;
  font-weight: 600;
}
.dc-divider { height: 1px; background: var(--border); margin: 14px 0; }
.dc-sentence { font-size: 13px; }
.dc-mark { color: var(--accent-2-text); font-weight: 600; }
.dc-sentence-tr { font-size: 12.5px; color: var(--text-secondary); margin-top: 4px; }
.dc-etym-row { display: flex; gap: 10px; align-items: center; }
.dc-swatch { width: 34px; height: 24px; border-radius: 8px; background: var(--primary-soft); flex-shrink: 0; }
.dc-etym-text { font-size: 11.5px; color: var(--text-secondary); line-height: 1.4; }
.dc-anki {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-contrast);
  background: var(--primary);
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

/* ---------- Showcase 2: grammar analysis card ---------- */
.grammar-card {
  width: 100%;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 20px;
}
.gc-head { font-weight: 700; font-size: 14px; margin-bottom: 12px; }
.gc-sentence { font-size: 14px; font-weight: 500; }
.gc-sentence-tr { font-size: 12.5px; color: var(--text-secondary); margin-top: 4px; }
.gc-part { font-weight: 700; border-radius: 5px; padding: 0 2px; }
/* Red is already doing double duty marking the mistake itself (the "don't" that should be
   "doesn't"), so the subject gets the section's own teal rather than a third unrelated hue,
   and the base verb — the part that isn't wrong or specially named — just stays plain text. */
.gc-c1 { color: var(--accent-4-text); }
.gc-c2 { color: var(--accent-2-text); }
.gc-c3 { color: var(--text); }
.gc-fix { font-size: 11.5px; color: var(--text-secondary); margin-top: 8px; }
.gc-fix strong { color: var(--accent-2-text); font-weight: 600; }
.gc-divider { height: 1px; background: var(--border); margin: 14px 0; }
.gc-badge {
  display: inline-block;
  background: var(--accent-2-text);
  color: var(--accent-contrast);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}
.gc-formula {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  background: color-mix(in srgb, var(--text) 5%, transparent);
  border-radius: var(--radius-chip);
  padding: 10px;
}
.gc-explain { font-size: 12.5px; margin: 12px 0 0; line-height: 1.5; }

/* ---------- Showcase 3: exercises card ---------- */
.exercise-card {
  width: 100%;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 20px;
}
.ex-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}
.ex-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-4-text);
  background: var(--accent-4-soft);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
}
.ex-bar { height: 4px; border-radius: 2px; background: var(--border); margin: 12px 0 18px; overflow: hidden; }
.ex-bar-fill { width: 35%; height: 100%; background: var(--primary); border-radius: inherit; }
.ex-prompt { font-size: 11.5px; color: var(--text-secondary); margin-bottom: 8px; }
.ex-sentence { font-size: 14px; font-weight: 500; margin-bottom: 16px; }
.ex-blank {
  display: inline-block;
  min-width: 20px;
  text-align: center;
  border-bottom: 2px solid var(--accent-2-text);
  color: var(--accent-2-text);
  font-weight: 700;
}
.ex-options { display: flex; flex-direction: column; gap: 8px; }
.ex-option {
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  padding: 9px 12px;
}
/* The right answer is the only one that gets highlighted — this is a static illustration of
   a finished exercise, not a live quiz, so the other options just stay neutral. */
.ex-option-right {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-text);
}

/* ---------- Showcase 4: levels & achievements card ---------- */
.levels-card {
  width: 100%;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 20px;
}
.lv-group + .lv-group { margin-top: 12px; }
.lv-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}
.lv-check { color: var(--accent-2-text); font-weight: 600; font-size: 12px; }
.lv-count { margin-left: auto; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; }
.lv-count.muted { color: var(--text-secondary); }
/* Each CEFR level gets its own color from the triad — a meaningful use of three colors
   (which level is which), not just decoration. */
.lv-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.lv-dot-1 { background: var(--accent-2); }
.lv-dot-2 { background: var(--accent-3); }
.lv-dot-3 { background: var(--accent-4); }
.lv-divider { height: 1px; background: var(--border); margin: 16px 0; }
.lv-achievements { display: flex; flex-direction: column; gap: 8px; }
.lv-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--primary-soft);
  color: var(--accent-2-text);
  border-radius: var(--radius-chip);
  padding: 8px 10px;
}
.lv-badge.c2 { background: var(--accent-3-soft); color: var(--accent-3-text); }
.lv-badge-icon { font-size: 14px; }

/* ---------- Feature grid ---------- */
/* No cards — same move as "Как это работает": a plain grid of icon + heading + text separated
   by whitespace instead of a border/background/shadow box, the way apple.com's own feature
   grids (e.g. "All the features" pages) read as one continuous sheet, not eight tiles. */
.feature-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 48px 32px;
}
.feature-icon { display: block; margin-bottom: 18px; }
/* The wrapping div's own size doesn't matter — the glyph is the inner <svg class="icon">, which
   everywhere else on the page stays at the shared 18px default, so it needs its own override
   here to actually render bigger instead of floating small inside an oversized invisible box.
   The gradient stroke itself is set per-icon directly in the markup (`stroke="url(#grad-red)"`,
   defined once in the sprite's <defs> in index.html) rather than here —
   `<use>` referencing a `<symbol>` with a gradient stroke silently fails to paint anything in
   this rendering engine (tested: works fine on a plain inline `<path>`, renders blank through a
   symbol+use), so the feature icons inline their path data directly instead of using the shared
   sprite, and a CSS rule here would just override whichever gradient each one sets inline. */
.feature-icon .icon { width: 36px; height: 36px; }
.icon { width: 18px; height: 18px; }
.feature p { font-size: 14px; margin: 0; max-width: 320px; }

/* ---------- Anki section: intro copy, then a capture→Anki "flow" row ---------- */
.anki-intro { text-align: center; max-width: 620px; margin: 0 auto; }
.anki-intro .section-lede { max-width: none; }

.anki-flow {
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.flow-card {
  width: 100%;
  max-width: 260px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px;
}
.flow-arrow {
  flex-shrink: 0;
  color: var(--accent-2-text);
  opacity: 0.7;
}
.flow-target {
  position: relative;
  border-color: var(--accent-2-text);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flow-target-badge {
  position: absolute;
  top: -11px;
  left: 18px;
  background: var(--accent-2-text);
  color: var(--accent-contrast);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.anki-card-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.anki-card-row:last-child { border-bottom: none; padding-bottom: 0; }
.anki-card-row span:first-child { color: var(--text-secondary); }
.muted { color: var(--text-secondary); font-weight: 400; }

@media (max-width: 640px) {
  .flow-arrow { transform: rotate(90deg); }
}

/* ---------- Pricing ---------- */
.pricing-grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  align-items: stretch;
}
.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
}
.plan-name { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.plan-price { font-size: 32px; font-weight: 700; margin-bottom: 16px; }
.plan-period { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.plan-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}
.plan-features li {
  font-size: 13.5px;
  color: var(--text-secondary);
  padding-left: 20px;
  position: relative;
}
.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-4-text);
  font-weight: 700;
}
.plan.locked {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: repeating-linear-gradient(
    135deg, var(--bg), var(--bg) 10px, var(--surface) 10px, var(--surface) 20px
  );
  border-style: dashed;
}
.plan-lock { font-size: 22px; margin-bottom: 8px; opacity: 0.6; }
.plan.locked .plan-name { color: var(--text-secondary); }
.plan-teaser { font-size: 13px; margin: 0; max-width: 220px; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 32px; display: flex; flex-direction: column; gap: 10px; }
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--text-secondary); font-weight: 700; }
details[open] summary::after { content: "–"; }
details p { margin: 12px 0 0; font-size: 14px; }

/* ---------- Final CTA ---------- */
/* The closing "buy" band — apple.com and figma.com both end on a full-bleed, saturated moment
   instead of fading out on plain white, so this is the one place the site's two accents show
   up together at their deepest rather than as a light tint or a background texture.
   Built from the darkened -text variants, not the raw hues — raw teal is still light enough
   that white text sitting over that end of the gradient would be harder to read; the darkened
   jade version stays clearly teal while keeping the whole band dark enough for white text
   throughout. */
.cta-section {
  text-align: center;
  padding: 88px 0;
  margin-top: 64px;
  background: linear-gradient(135deg, var(--primary-text) 0%, var(--accent-2-text) 100%);
  color: #FFFFFF;
}
.cta-section h2 { color: #FFFFFF; }
.cta-section .section-lede { color: color-mix(in srgb, #FFFFFF 82%, transparent); }
.cta-section .btn { margin-top: 20px; }
.download-note {
  margin-top: 10px;
  font-size: 12px;
  color: color-mix(in srgb, #FFFFFF 70%, transparent);
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}
/* A white pill reads as the one high-contrast control against the gradient — a teal/red
   fill here would just blend into the background it's sitting on. */
.btn-cta { background: #FFFFFF; color: var(--text); }
.btn-cta:hover { opacity: 0.92; }
.cta-section .meta-label { color: color-mix(in srgb, #FFFFFF 75%, transparent); }
.cta-section .platform-badge {
  border-color: color-mix(in srgb, #FFFFFF 35%, transparent);
  color: #FFFFFF;
  background: color-mix(in srgb, #FFFFFF 12%, transparent);
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 260px; margin-top: 24px; }
  .anki-grid { grid-template-columns: 1fr; }
  /* With nav-links no longer a flex participant here, .nav-inner's space-between would otherwise
     center the burger between brand and CTA — margin-right: auto claims the leftover space
     instead, so the burger hugs the brand and only the CTA gets pushed to the far edge. */
  .nav-burger { display: flex; margin-left: 10px; margin-right: auto; }
  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav-links.nav-open { display: flex; }
  .nav-links a {
    padding: 12px 10px;
    border-radius: var(--radius-chip);
    color: var(--text);
  }
  .nav-links a:hover { background: var(--bg); }
  /* CTA text shrinks a bit on narrow screens so .nav-cta (button + switcher) doesn't overflow
     next to the brand/burger. */
  .nav-cta { gap: 10px; }
  .btn-small { padding: 8px 14px; }
  .showcase-grid { grid-template-columns: 1fr; }
  .showcase-copy { order: -1; }
  .showcase-visual { margin-top: 24px; }
  .section-lede.left { max-width: none; }
  .what-grid { grid-template-columns: 1fr; }
  .switch-demo { order: -1; margin-bottom: 8px; height: 320px; }
  .meta-strip { gap: 20px; }
}
