/* Gomi Sensei landing page.
 *
 * Ported from the Claude Design prototype "Gomi Landing.dc.html", which is
 * written as one tree of inline styles. Everything here is that design, moved
 * into classes so the page can also survive a phone, a keyboard and a reader
 * who has asked their OS for less motion.
 *
 * Palette is the app's own "blue-hour" theme (see ../src/theme.ts). The page is
 * two-sided: deep navy sections with white type, and a pale blue section with
 * navy type. Card faces flip between the two, so colour tokens come in pairs.
 */

/* ── Tokens ─────────────────────────────────────────────────────────────── */

:root {
  --navy-900: #081B36;  /* deepest, the middle of the deck scene */
  --navy-800: #0B1E3C;  /* body, seen only during overscroll     */
  --navy-700: #0E2749;  /* page                                  */
  --navy-600: #12294E;  /* raised card on navy                   */
  --navy-500: #1E3E70;  /* blue card face                        */
  --blue-400: #2F5FA7;

  --paper: #F4F8FD;     /* light card face   */
  --paper-2: #E2ECF8;   /* row inside paper  */
  --page-blue: #CBDFF2; /* the light section */
  --row-blue: #D8E7F5;

  --ink: #12294E;       /* type on paper        */
  --ink-2: #1C3D6E;
  --ink-soft: #3F6494;  /* secondary on paper   */
  --ink-faint: #7C9CC4;

  --white: #FFFFFF;
  --text-soft: #C6DCF3; /* body copy on navy    */
  --text-mute: #8FB2DC; /* captions on navy     */
  --text-dim: #7FA4D2;  /* furthest back        */
  --blue-soft: #9FBEE4;

  --yellow: #F7BE31;    /* primary action */
  --gold: #FFD766;      /* type + hover   */
  --red: #C94040;
  /* The same red lifted until it reads on a blue card, as in the app. */
  --red-on-card: #FFAC88;

  --sans: 'Nunito', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --ja: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic', 'Noto Sans JP', sans-serif;

  /* Set once here so the deck scene and its spacer never disagree. */
  --deck-scroll: 520vh;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */

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

html {
  scroll-behavior: smooth;
  /* `clip`, not `hidden`: overflow:hidden here would make this a scroll
   * container, and a scroll container between the deck section and the
   * viewport is what silently kills `position: sticky`. */
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--navy-800);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 700;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--white); }

::selection { background: var(--yellow); color: var(--ink); }

:where(a, button, input):focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Gold on paper is 1.3:1, so the light surfaces get the ink ring instead. */
.card--paper :focus-visible,
.inapp :focus-visible {
  outline-color: var(--ink);
}

[lang="ja"] { font-family: var(--ja); }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 10px; left: 50%;
  transform: translate(-50%, -180%);
  z-index: 200;
  background: var(--yellow); color: var(--ink);
  font-size: 15px; font-weight: 900;
  padding: 12px 22px; border-radius: 999px;
  transition: transform .18s ease;
}
.skip-link:focus-visible { transform: translate(-50%, 0); color: var(--ink); }

/* ── Shared bits ────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  border-radius: 16px;
  font-weight: 900;
  white-space: nowrap;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn--solid {
  background: var(--yellow); color: var(--ink);
  font-size: clamp(16px, 2.6vh, 18px);
  padding: clamp(14px, 2.6vh, 19px) clamp(24px, 4vw, 34px);
  box-shadow: 0 16px 34px rgba(247, 190, 49, .26);
}
.btn--solid:hover { background: var(--gold); color: var(--ink); }
.btn--ghost {
  border: 2px solid rgba(255, 255, 255, .42);
  color: var(--white);
  font-size: clamp(16px, 2.6vh, 18px);
  padding: clamp(12px, 2.4vh, 17px) clamp(22px, 3.6vw, 30px);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--pill {
  background: var(--yellow); color: var(--ink);
  font-size: 17px;
  padding: 14px 26px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(247, 190, 49, .28);
}
.btn--pill:hover { background: var(--gold); color: var(--ink); }

.tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--red);
  color: var(--white);
  font-size: 13px; font-weight: 900; letter-spacing: .24em;
  padding: 12px 24px;
  border-radius: 999px;
}
.tag--gold {
  background: var(--yellow); color: var(--ink);
  font-size: 14px;
  letter-spacing: .2em; padding: 13px 26px;
  transform: rotate(-2deg);
}

.eyebrow { font-size: 15px; font-weight: 900; letter-spacing: .26em; }
.eyebrow--blue { color: var(--blue-400); }
.eyebrow--gold { color: var(--gold); }

.h2 {
  margin-top: 20px;
  font-size: clamp(46px, 5vw, 76px);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.025em;
  text-wrap: balance;
}

.lede {
  margin-top: 28px;
  max-width: 520px;
  font-size: 24px; font-weight: 700; line-height: 1.5;
  color: var(--ink-soft);
  text-wrap: pretty;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(18px, 4vw, 48px);
  padding-top: max(22px, env(safe-area-inset-top));
  background: linear-gradient(var(--navy-700), rgba(14, 39, 73, .7) 60%, rgba(14, 39, 73, 0));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.nav__brand { display: flex; align-items: center; gap: 16px; color: var(--white); }
.nav__brand:hover { color: var(--white); }
.nav__badge { width: 52px; height: 52px; border-radius: 13px; object-fit: contain; }
.nav__names { display: flex; flex-direction: column; gap: 3px; }
.nav__ja { font-size: 24px; font-weight: 900; line-height: 1; }
.nav__en { font-size: 12px; font-weight: 900; letter-spacing: .22em; color: var(--text-mute); }

.nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 34px); }
.nav__links > a:not(.btn) { font-size: 17px; font-weight: 800; color: var(--text-soft); }
.nav__links > a:not(.btn):hover { color: var(--white); }

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(98px, 14.5vh, 172px) 40px 0;
  overflow: hidden;
  text-align: center;
  background: var(--navy-700);
}

.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: radial-gradient(100% 78% at 50% 26%, #000 24%, transparent 76%);
  mask-image: radial-gradient(100% 78% at 50% 26%, #000 24%, transparent 76%);
}
.hero__glow { position: absolute; left: 50%; border-radius: 50%; pointer-events: none; }
.hero__glow--gold {
  top: -320px; width: 1100px; height: 1100px; margin-left: -550px;
  background: radial-gradient(circle, rgba(247, 190, 49, .13), rgba(247, 190, 49, 0) 62%);
}
.hero__glow--blue {
  bottom: -420px; width: 1300px; height: 820px; margin-left: -650px;
  background: radial-gradient(circle, rgba(47, 95, 167, .55), rgba(47, 95, 167, 0) 68%);
}

/* Everything that is not backdrop sits above the glows. `.scroll-cue` keeps its
 * own absolute positioning, so it is deliberately left out of this list. */
.hero__title, .hero__sub, .hero__actions, .hero__facts, .peek { position: relative; }

.hero .tag { margin-top: 22px; }

.hero__title {
  margin-top: clamp(18px, 3vh, 30px);
  /* NOT 15ch: `ch` is the zero advance, which differs wildly between Nunito and
   * the fallback, and the hero shifted 70px on font swap. 15ch of Nunito 900 is
   * 9em, and em is stable across both faces. */
  max-width: 9em;
  font-size: clamp(40px, min(7.2vw, 8.2vh), 124px);
  font-weight: 900;
  line-height: .94;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.hero__sub {
  margin-top: clamp(16px, 2.6vh, 26px);
  max-width: 620px;
  font-size: clamp(17px, min(1.65vw, 2.5vh), 23px);
  font-weight: 700; line-height: 1.5;
  color: var(--text-soft);
  text-wrap: pretty;
}

.hero__actions {
  margin-top: clamp(20px, 3.4vh, 34px);
  display: flex; gap: 14px;
  align-items: center; justify-content: center; flex-wrap: wrap;
}

.hero__facts {
  margin-top: clamp(16px, 2.6vh, 26px);
  display: flex; gap: 26px; justify-content: center; flex-wrap: wrap;
  font-size: 14px; font-weight: 800; letter-spacing: .04em;
  color: var(--text-mute);
}

/* The three cards peeking above the fold, plus the sensei pointing at them. */
.peek {
  width: 100%;
  flex: 1;
  min-height: 120px;
  margin-top: clamp(10px, 3vh, 42px);
  perspective: 1500px;
}
.peek__slot { position: absolute; left: 50%; top: 56px; }
.peek__slot--left { transform: translateX(calc(-50% - 250px)); }
.peek__slot--right { transform: translateX(calc(-50% + 250px)); }
.peek__slot--front { top: 0; transform: translateX(-50%); z-index: 5; }

.peek-card {
  width: 280px; height: 420px;
  background: var(--navy-600);
  border: 2px solid rgba(255, 255, 255, .14);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 30px 60px rgba(5, 17, 36, .5);
  transform: rotateZ(var(--rot, 0deg));
  will-change: transform;
}
.peek-card__meta { font-size: 12px; font-weight: 900; letter-spacing: .2em; color: var(--text-dim); }
.peek-card__kana { margin-top: 18px; font-size: 22px; font-weight: 700; color: var(--gold); }
.peek-card__word { font-size: 58px; font-weight: 900; line-height: 1.04; }
.peek-card__gloss { margin-top: 10px; font-size: 17px; font-weight: 800; color: var(--blue-soft); }

.peek-hero {
  position: relative;
  width: min(460px, 86vw); height: 560px;
  background: var(--paper); color: var(--ink);
  border-radius: 34px;
  padding: 30px 36px 36px;
  box-shadow: 0 44px 90px rgba(5, 17, 36, .6);
  text-align: left;
  transform: rotateZ(var(--rot, 0deg));
  will-change: transform;
}
.peek-hero__kana { font-size: 24px; font-weight: 700; color: var(--blue-400); }
.peek-hero__word {
  font-size: clamp(58px, 7vw, 84px); font-weight: 900;
  line-height: 1.02; letter-spacing: -.01em;
}
.peek-hero__gloss { margin-top: 14px; font-size: 23px; font-weight: 900; }
.peek-hero__note {
  margin-top: 20px; padding-top: 20px;
  border-top: 2px dashed rgba(47, 95, 167, .26);
  font-size: 17px; font-weight: 700; line-height: 1.4;
  color: var(--ink-soft);
  text-wrap: pretty;
}
.peek-hero__tag {
  position: absolute; right: 30px; bottom: 30px;
  font-size: 13px; font-weight: 900; letter-spacing: .18em;
  /* The design's #7C9CC4 reads 2.66:1 on the paper card. */
  color: var(--ink-soft);
}

.peek__mascot {
  position: absolute;
  right: max(12px, calc(50% - 620px));
  bottom: -8px;
  width: min(210px, 19vw);
  height: auto;
  z-index: 4;
  filter: drop-shadow(0 26px 44px rgba(5, 17, 36, .55));
  animation: glBob 6s ease-in-out infinite;
}

@keyframes glBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
@keyframes glDown {
  0% { transform: translateY(0); opacity: .9; }
  70% { transform: translateY(16px); opacity: .15; }
  100% { transform: translateY(16px); opacity: 0; }
}

.scroll-cue {
  position: absolute;
  /* Anchored to the left gutter, not the centre: the centre is where the hero
   * card is, and grey letter-spaced type on white card stock is unreadable. */
  left: clamp(20px, 4vw, 48px); bottom: 26px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  z-index: 10;
  font-size: 11px; font-weight: 900; letter-spacing: .3em;
  color: var(--text-dim);
}
.scroll-cue__line {
  width: 2px; height: 26px;
  background: linear-gradient(var(--gold), transparent);
  animation: glDown 1.9s ease-in-out infinite;
}

/* ── The deck ───────────────────────────────────────────────────────────── */

.deck {
  position: relative;
  height: var(--deck-scroll);
  background: linear-gradient(var(--navy-700), var(--navy-900) 30%, var(--navy-900) 70%, var(--navy-700));
}
.deck__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1600px;
}
.deck__glow {
  position: absolute; inset: 0;
  background: radial-gradient(58% 54% at 50% 50%, rgba(47, 95, 167, .32), rgba(8, 27, 54, 0) 72%);
}
.deck__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 78px 78px;
  -webkit-mask-image: radial-gradient(64% 58% at 50% 50%, #000, transparent 74%);
  mask-image: radial-gradient(64% 58% at 50% 50%, #000, transparent 74%);
}

.deck__eyebrow {
  position: absolute;
  top: clamp(76px, 12vh, 100px); left: 0; right: 0;
  z-index: 950;
  pointer-events: none;
  text-align: center;
}
.deck__eyebrow > span {
  display: inline-block;
  background: rgba(8, 27, 54, .86);
  border-radius: 999px;
  padding: 9px 22px;
  font-size: 14px; font-weight: 900; letter-spacing: .3em;
  color: var(--gold);
}

.deck__wrap {
  position: relative;
  /* `flex: none` is load-bearing. This is a flex item, so without it the 620px
   * is a maximum rather than a size, and on any phone the stage collapses to
   * the viewport width: the cards then lay out narrow and their absolutely
   * positioned footers land on top of the copy. main.js scales this box to fit;
   * it must never be allowed to reflow to fit. */
  flex: none;
  width: 620px; height: 760px;
  transform-style: preserve-3d;
  will-change: transform;
}

.card {
  position: absolute;
  inset: 0;
  border-radius: 38px;
  padding: 56px;
  box-shadow: 0 50px 110px rgba(4, 13, 28, .65);
  transform-origin: 50% 60%;
  will-change: transform, opacity;
  backface-visibility: hidden;
  /* Resting state for before main.js paints, and for when it cannot: only the
   * first card shows, rather than five opaque cards stacked into a smear. The
   * reduced-motion block overrides this back to a readable column. */
  opacity: 0;
}
.card:first-of-type { opacity: 1; }
.card--paper { background: var(--paper); color: var(--ink); }
.card--blue { background: var(--navy-500); border: 2px solid rgba(255, 255, 255, .18); }
.card--ringed { border-color: rgba(247, 190, 49, .42); }

.card__head {
  display: flex; justify-content: space-between;
  font-size: 16px; font-weight: 900; letter-spacing: .2em;
  color: var(--ink-soft);
}
.card__head--gold { color: var(--gold); }

.card__body { margin-top: 56px; }
.card__kana { font-size: 32px; font-weight: 700; color: var(--blue-400); }
.card__huge { font-size: 172px; font-weight: 900; line-height: .94; letter-spacing: -.02em; }
.card__gloss { margin-top: 22px; font-size: 34px; font-weight: 900; }

.card__title {
  margin-top: 44px;
  font-size: 66px; font-weight: 900;
  line-height: 1.02; letter-spacing: -.02em;
  text-wrap: balance;
}
.card__title--ink { margin-top: 40px; }
.card__title--tight { margin-top: 44px; }

.card__lede {
  margin-top: 36px;
  font-size: 24px; font-weight: 800; line-height: 1.4;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.card__foot {
  position: absolute;
  left: 56px; right: 56px; bottom: 56px;
  font-size: 21px; font-weight: 800;
  color: var(--blue-soft);
  text-wrap: pretty;
}
.card__foot--rule {
  padding-top: 28px;
  border-top: 3px dashed rgba(47, 95, 167, .28);
  font-size: 24px; line-height: 1.4;
  color: var(--ink-soft);
}
.card__foot--ink { font-size: 22px; color: var(--ink-soft); }
.card__foot--split {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding-top: 26px;
  border-top: 2px solid rgba(255, 255, 255, .16);
  font-size: 19px;
}
.card__foot--split a { font-weight: 900; }

.card__cta {
  position: absolute;
  left: 56px; right: 56px; bottom: 56px;
  background: var(--yellow); color: var(--ink);
  border-radius: 20px;
  padding: 24px 0;
  text-align: center;
  /* Nunito's normal leading is ~1.75, which on a 24px label is 18px of air the
   * card cannot spare: the deck cards are a fixed 760px canvas. */
  line-height: 1;
  font-size: 24px; font-weight: 900;
  transition: background-color .18s ease;
}
.card__cta:hover { background: var(--gold); color: var(--ink); }

.steps { margin-top: 44px; display: flex; flex-direction: column; gap: 22px; }
.steps > li { display: flex; gap: 20px; align-items: center; font-size: 25px; font-weight: 800; line-height: 1.3; }
.steps__n {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--yellow); color: var(--ink);
  font-size: 24px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.steps__n--red { background: var(--red); color: var(--white); }
.steps--ink { margin-top: 44px; gap: 22px; }
.steps--ink > li { align-items: flex-start; font-size: 21px; font-weight: 800; line-height: 1.4; gap: 18px; }
.steps__n--sm { width: 40px; height: 40px; border-radius: 13px; font-size: 19px; }

.bin { margin-top: 38px; display: flex; flex-direction: column; gap: 16px; }
.bin > li {
  background: var(--paper-2);
  border-radius: 20px;
  /* 18 rather than the design's 22: card 03 is the tightest of the five and
   * this keeps a fallback font's metrics from pushing the list into the
   * footer before the webfont swaps in. */
  padding: 18px 26px;
  display: flex; justify-content: space-between; align-items: center;
}
.bin__word { font-size: 38px; font-weight: 900; }
.bin__count { font-size: 19px; font-weight: 900; color: var(--red); }
.bin__count--cool { color: var(--ink-soft); }

.dots-list { margin-top: 44px; display: flex; flex-direction: column; gap: 20px; }
.dots-list > li { display: flex; gap: 18px; align-items: flex-start; font-size: 25px; font-weight: 800; line-height: 1.35; }
.dots-list__dot { flex: none; font-size: 30px; font-weight: 900; color: var(--gold); line-height: 1.1; }

.stores { margin-top: 40px; display: flex; flex-direction: column; gap: 14px; }
.stores > li {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--paper-2);
  border-radius: 20px;
  padding: 24px 28px;
}
.stores__name { font-size: 24px; font-weight: 900; }
.stores__state { font-size: 16px; font-weight: 900; letter-spacing: .18em; color: var(--ink-soft); }

.dots {
  position: absolute;
  bottom: clamp(40px, 8vh, 72px); left: 0; right: 0;
  display: flex; justify-content: center; gap: 12px;
  z-index: 60;
}
.dots > span {
  width: 46px; height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  transition: background-color .3s ease;
}

/* ── Inside the app ─────────────────────────────────────────────────────── */

.inapp {
  position: relative;
  background: var(--page-blue);
  color: var(--ink);
  padding: 150px clamp(20px, 4vw, 56px) 160px;
  overflow: hidden;
}
.inapp__slash {
  position: absolute;
  left: -60px; top: -80px;
  width: 1500px; height: 170px;
  background: var(--navy-700);
  transform: rotate(-2.4deg);
}
.inapp__inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 80px;
  align-items: center;
}

.phones {
  --phone-scale: 1;
  position: relative;
  height: calc(940px * var(--phone-scale));
  perspective: 1400px;
}
.phones__stage {
  position: absolute;
  inset: 0;
  transform: scale(var(--phone-scale));
  transform-origin: top center;
  height: 940px;
}
.phone { position: absolute; transform-style: preserve-3d; will-change: transform; }
.phone--home { right: 0; top: 0; width: 330px; }
.phone--bin { left: 0; top: 420px; width: 276px; }

.phone__shell {
  width: 100%;
  background: var(--navy-700);
  border-radius: 48px;
  padding: 13px;
  box-shadow: -30px 44px 84px rgba(12, 38, 72, .45);
}
.phone--bin .phone__shell { border-radius: 44px; padding: 12px; box-shadow: 26px 46px 84px rgba(12, 38, 72, .5); }

.phone__screen {
  background: var(--page-blue);
  border-radius: 38px;
  overflow: hidden;
  height: 660px;
  display: flex; flex-direction: column;
}
.phone__screen--bin {
  background: var(--navy-500);
  border-radius: 34px;
  height: 480px;
  padding: 22px 18px;
  /* The section around it is dark-on-light; this screen is the other way up.
   * Without this the bin words inherit the section's navy and vanish. */
  color: var(--white);
}

.ph-head { padding: 24px 22px 0; display: flex; align-items: center; justify-content: space-between; }
.ph-head__ja { font-size: 21px; font-weight: 900; color: var(--ink-2); }
.ph-head__lvl { font-size: 14px; font-weight: 900; color: var(--ink-2); }

.ph-daily {
  margin: 16px 18px 0;
  background: var(--blue-400);
  border-radius: 22px;
  padding: 26px 18px;
  text-align: center;
}
.ph-daily__romaji { font-size: 13px; font-weight: 900; letter-spacing: .14em; color: var(--gold); }
.ph-daily__word { margin-top: 10px; font-size: 44px; font-weight: 900; color: var(--white); }
.ph-daily__gloss { margin-top: 10px; font-size: 16px; font-weight: 400; color: #D9E7F9; }

.ph-actions { margin: 14px 18px 0; display: flex; gap: 10px; }
.ph-actions > span {
  flex: 1;
  border-radius: 15px;
  padding: 15px 0;
  text-align: center;
  font-size: 16px; font-weight: 900;
}
.ph-actions__go { background: var(--yellow); color: var(--ink-2); }
.ph-actions__quiz { background: var(--blue-400); color: var(--white); }

.ph-sets { margin: 14px 18px 0; display: flex; flex-direction: column; gap: 9px; }
.ph-set { background: var(--row-blue); border-radius: 15px; padding: 14px 16px; }
.ph-set__name { display: block; font-size: 15px; font-weight: 900; color: var(--ink-2); }
.ph-set__n { display: block; margin-top: 6px; font-size: 12px; font-weight: 800; color: var(--ink-soft); }

.ph-tabs {
  margin-top: auto;
  padding: 16px 20px 20px;
  display: flex; justify-content: space-between;
  background: var(--blue-400);
}
.ph-tabs > span { font-size: 20px; font-weight: 900; color: #D9E7F9; }
.ph-tabs > .is-on { color: var(--gold); }

.ph-bin-head { display: flex; justify-content: space-between; align-items: center; }
.ph-bin-head__title { font-size: 15px; font-weight: 900; color: var(--gold); }
.ph-bin-head__n { font-size: 13px; font-weight: 800; color: var(--blue-soft); }
.ph-bin-list { margin-top: 18px; display: flex; flex-direction: column; gap: 11px; }
.ph-bin-row {
  background: var(--navy-600);
  border-radius: 15px;
  padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.ph-bin-row__word { display: block; font-size: 23px; font-weight: 900; }
.ph-bin-row__gloss { display: block; font-size: 12px; font-weight: 800; color: var(--blue-soft); }
.ph-bin-row__x { font-size: 12px; font-weight: 900; color: var(--red-on-card); }
.ph-bin-row__x--gold { color: var(--gold); }
.ph-bin-cta {
  margin-top: auto;
  background: var(--yellow); color: var(--ink);
  border-radius: 15px;
  padding: 15px 0;
  text-align: center;
  font-size: 16px; font-weight: 900;
}

/* ── Levels ─────────────────────────────────────────────────────────────── */

.levels {
  position: relative;
  background: var(--navy-700);
  padding: 150px 0 160px;
  overflow: hidden;
}
.levels__head {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}
.levels__head > * { max-width: 760px; }
.h2--light { color: var(--white); }

.strip-viewport { margin-top: 64px; overflow: hidden; }
.strip {
  display: flex;
  gap: 26px;
  padding-right: clamp(20px, 4vw, 56px);
  /* Line the first card up with the heading, which sits in a 1240px centred
   * container. Below 1240px the max() collapses and this is just the gutter. */
  padding-left: calc(max(0px, (100% - 1240px) / 2) + clamp(20px, 4vw, 56px));
  width: max-content;
  will-change: transform;
}
.level {
  flex: none;
  width: clamp(250px, 24vw, 360px);
  background: var(--navy-600);
  border: 2px solid rgba(255, 255, 255, .14);
  border-radius: 30px;
  padding: 34px;
}
.level--hi { background: var(--navy-500); border-color: rgba(247, 190, 49, .42); }
.level__n { font-size: 52px; font-weight: 900; color: var(--gold); line-height: 1; }
.level__name { margin-top: 14px; font-size: 24px; font-weight: 900; }
.level__desc { margin-top: 12px; font-size: 19px; font-weight: 700; line-height: 1.4; color: var(--blue-soft); text-wrap: pretty; }
.level--hi .level__desc { color: var(--text-soft); }

/* ── Waitlist + footer ──────────────────────────────────────────────────── */

.cta {
  position: relative;
  background: var(--navy-500);
  padding: 150px clamp(20px, 4vw, 56px) 48px;
  overflow: hidden;
}
.cta__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(90% 80% at 50% 30%, #000, transparent 76%);
  mask-image: radial-gradient(90% 80% at 50% 30%, #000, transparent 76%);
}
.cta__inner { position: relative; max-width: 1100px; margin: 0 auto; text-align: center; }
.cta__title {
  margin-top: 34px;
  font-size: clamp(54px, 6vw, 92px);
  font-weight: 900; line-height: .98; letter-spacing: -.03em;
  text-wrap: balance;
}
.cta__lede {
  margin: 26px auto 0;
  max-width: 620px;
  font-size: 24px; font-weight: 700; line-height: 1.45;
  color: var(--text-soft);
  text-wrap: pretty;
}

.waitlist {
  margin: 42px auto 0;
  max-width: 600px;
  display: flex;
  gap: 14px;
}
.waitlist__input {
  flex: 1;
  min-width: 0;
  background: var(--navy-600);
  border: 2px solid rgba(255, 255, 255, .42);
  border-radius: 18px;
  padding: 22px 24px;
  font-family: var(--sans);
  font-size: 19px; font-weight: 800;
  color: var(--white);
}
.waitlist__input::placeholder { color: var(--text-mute); }
.waitlist__input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-color: var(--gold);
}
/* Red border alone left a focused invalid field looking identical to an
 * unfocused one, and the error handler focuses it. */
.waitlist__input[aria-invalid="true"] { border-color: var(--red); }
.waitlist__input[aria-invalid="true"]:focus-visible { outline-color: #FFAC88; }
.waitlist__btn {
  background: var(--yellow); color: var(--ink);
  border: 0;
  border-radius: 18px;
  padding: 23px 34px;
  font-size: 19px; font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s ease;
}
.waitlist__btn:hover { background: var(--gold); }
.waitlist__note {
  position: relative;
  margin-top: 18px;
  font-size: 15px; font-weight: 800;
  color: var(--text-mute);
  text-align: center;
}
.waitlist__note--bad { color: #FFB4A6; }
.waitlist__note--good { color: var(--gold); }

.cta__mascot {
  position: relative;
  margin-top: 70px;
  display: flex; align-items: flex-end; justify-content: center;
}
.cta__mascot img {
  width: 320px; height: auto;
  filter: drop-shadow(0 28px 46px rgba(5, 17, 36, .5));
}

/* Continues the waitlist section's surface, so moving it out of <main> for the
 * landmark changes nothing visually. */
.foot {
  background: var(--navy-500);
  padding: 0 clamp(20px, 4vw, 56px) 40px;
}
.foot__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  font-size: 15px; font-weight: 800;
  color: var(--text-mute);
}
.foot__links { display: flex; gap: 28px; flex-wrap: wrap; }

/* ── Scroll-driven state, set from main.js ──────────────────────────────── */

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1180px) {
  .inapp__inner { grid-template-columns: 1fr; gap: 56px; }
  .phones { --phone-scale: .9; margin: 0 auto; width: 620px; max-width: 100%; }
}

@media (max-width: 1240px) {
  /* Below this there is no navy gutter left of the hero card to sit in. */
  .scroll-cue { display: none; }
}

@media (max-width: 1000px) {
  .nav__links > a:not(.btn) { display: none; }
  .peek__slot--left, .peek__slot--right { display: none; }
}

@media (max-width: 860px) {
  .hero { padding-left: 20px; padding-right: 20px; }
  .inapp, .levels { padding-top: 110px; padding-bottom: 120px; }
  .cta { padding-top: 110px; }
  .phones { --phone-scale: .78; width: 100%; }
  .phone--home { right: max(0px, calc(50% - 320px)); }
  .phone--bin { left: max(0px, calc(50% - 320px)); }
  .foot__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  :root { --deck-scroll: 420vh; }
  .nav { padding: 14px 18px; }
  .nav__badge { width: 42px; height: 42px; border-radius: 11px; }
  .nav__ja { font-size: 20px; }
  .nav__en { font-size: 10px; }
  .btn--pill { font-size: 15px; padding: 12px 18px; }
  .hero { min-height: 560px; }
  .hero__facts { gap: 14px; font-size: 13px; }
  .peek__mascot { width: 132px; right: 4px; }

  /* Phones stop overlapping and simply stack. */
  .phones { --phone-scale: 1; height: auto; perspective: none; }
  .phones__stage { position: static; height: auto; transform: none; display: flex; flex-direction: column; align-items: center; gap: 40px; }
  /* will-change is dropped with the transform: a promoted layer that never
   * animates is pure compositor memory, and phones have the least of it. */
  .phone { position: static; width: min(330px, 100%); transform: none !important; will-change: auto; }
  .phone--bin { width: min(300px, 92%); }

  .strip-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .strip-viewport::-webkit-scrollbar { display: none; }
  .strip { transform: none !important; padding-right: 40px; will-change: auto; }
  .level { scroll-snap-align: center; width: min(300px, 78vw); }

  .waitlist { flex-direction: column; }
  .waitlist__btn { padding: 20px 24px; }
  .cta__mascot img { width: 220px; }
}

/* The deck's fixed 620x760 stage is scaled to fit by main.js, but the type
 * inside it is set in px and gets small on a phone. Below this width the card
 * padding tightens so the same words have more room at the smaller scale. */
@media (max-width: 460px) {
  /* The eyebrow pill is 3.5em of letter-spaced caps and runs the full width. */
  .deck__eyebrow > span { font-size: 12px; letter-spacing: .2em; padding: 9px 16px; }
}
/* Nothing here resizes the deck cards. The stage is a fixed 620x760 canvas that
 * main.js scales as a whole, so every card lays out identically at every
 * viewport, and viewport-keyed padding would only move text around inside a box
 * the visitor never sees at 1:1. */
@media (max-width: 560px) {
  .dots { bottom: 34px; }
}

/* ── Less motion ────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .peek__mascot, .scroll-cue__line { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }

  /* The deck stops being a scene and becomes five stacked cards. */
  .deck { height: auto; }
  .deck__sticky { position: static; height: auto; display: block; padding: 90px 20px 60px; perspective: none; }
  .deck__eyebrow { position: static; margin-bottom: 40px; }
  .deck__wrap {
    position: static;
    width: min(620px, 100%);
    height: auto;
    margin: 0 auto;
    transform: none !important;
    display: flex; flex-direction: column; gap: 28px;
    transform-style: flat;
  }
  .card {
    position: relative;
    inset: auto;
    min-height: 760px;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    will-change: auto;
  }
  .dots { display: none; }
  .phone { transform: none !important; }
  .strip { transform: none !important; }
  .strip-viewport { overflow-x: auto; }
}
