/* rikAI marketing site.
   Brand: 藍 (ai, indigo) is the AI in rikAI; gold is the kintsugi seam joining
   the two languages. Tokens match the app's DesignSystem/Theme.swift exactly —
   the site and the app are one object. Gold is reserved for the Japanese
   itself (furigana, readings, the seam); labels stay indigo, chrome stays ink. */

:root {
  --ink:       #10162A;   /* page bg (kachiiro) */
  --ink-soft:  #182140;   /* cards */
  --ink-line:  #2A3560;   /* hairlines */
  --ai:        #3E6C99;   /* ai-iro indigo, primary */
  --ai-light:  #8AAFD1;   /* labels, hints */
  --paper:     #EEEAE0;   /* primary text */
  --paper-dim: #A9A6A0;   /* secondary text */
  --gold:      #C9A15A;   /* furigana, seams, accents */
  --gold-glow: rgba(201, 161, 90, 0.35);
  --shu:       #C1554A;   /* seal vermilion */

  --display: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --body: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", sans-serif;

  --radius: 14px;
  --maxw: 1080px;
}

/* ── base ─────────────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--gold-glow); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

rt { color: var(--gold); font-weight: 500; letter-spacing: 0.08em; }

.sm-only { display: none; }

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

/* ── seal + brand ─────────────────────────────────────────────────── */

.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1.5px solid var(--shu);
  border-radius: 6px;
  color: var(--shu);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 700;
  flex: none;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }

.brand-word {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-ai { color: var(--ai-light); }

/* ── nav ──────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink-line) 60%, transparent);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links { display: flex; gap: 26px; flex: 1; }

.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--paper-dim);
  transition: color 0.18s ease;
}

.nav-links a:hover { color: var(--paper); }

/* ── buttons ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  padding: 10px 22px;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.btn-primary { background: var(--ai); color: var(--paper); }

.btn-primary:hover {
  background: color-mix(in srgb, var(--ai) 84%, var(--ai-light));
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(62, 108, 153, 0.35);
}

.btn-big { font-size: 16.5px; padding: 14px 34px; }

/* ── hero ─────────────────────────────────────────────────────────── */

.hero {
  min-height: calc(88vh - 60px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px 72px;
  position: relative;
}

.hero::before {
  /* faint indigo pool behind the ask box */
  content: "";
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  width: min(900px, 92vw);
  height: 420px;
  background: radial-gradient(ellipse at center, rgba(62, 108, 153, 0.16), transparent 65%);
  pointer-events: none;
}

.hero > * { position: relative; }

.hero-eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 26px;
}

.hero-eyebrow .dot { margin: 0 10px; color: var(--ink-line); }
.hero-eyebrow em { font-style: italic; letter-spacing: 0.14em; }
.hero-eyebrow [lang="ja"] { font-family: var(--display); font-size: 14px; letter-spacing: 0.3em; }

.hero-title {
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.16;
  letter-spacing: 0.005em;
  max-width: 800px;
}

.hero-sub {
  margin-top: 22px;
  max-width: 560px;
  color: var(--paper-dim);
  font-size: 16.5px;
}

/* ── ask box ──────────────────────────────────────────────────────── */

.ask { width: min(720px, 100%); margin-top: 44px; }

.ask-box {
  position: relative;
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: 22px;
  text-align: left;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.ask-box:focus-within {
  border-color: color-mix(in srgb, var(--gold) 55%, var(--ink-line));
  box-shadow: 0 0 0 4px rgba(201, 161, 90, 0.08);
}

/* the send moment: the box seals in gold, then the App Store opens */
.ask-box.sending {
  border-color: color-mix(in srgb, var(--gold) 75%, var(--ink-line));
  box-shadow: 0 0 0 4px rgba(201, 161, 90, 0.14), 0 0 48px rgba(201, 161, 90, 0.16);
}

.ask-box.sending .ask-send {
  background: var(--gold);
  color: var(--ink);
  transform: scale(1.08);
}

#ask-input {
  display: block;
  width: 100%;
  min-height: 128px;
  padding: 20px 64px 20px 22px;
  background: transparent;
  border: 0;
  outline: none;
  resize: none;
  color: var(--paper);
  caret-color: var(--gold);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

.ask-ghost {
  position: absolute;
  inset: 0;
  padding: 20px 64px 20px 22px;
  font-size: 17px;
  line-height: 1.6;
  color: var(--paper-dim);
  pointer-events: none;
  white-space: pre-wrap;
  overflow: hidden;
  transition: opacity 0.3s ease;
}

.ask-ghost.fade { opacity: 0; }
.ask-ghost.hidden { visibility: hidden; }

.ghost-ime {
  border-bottom: 1.5px dotted var(--gold);
  color: var(--paper);
}

.ghost-conv {
  color: var(--paper);
  background: var(--gold-glow);
  border-radius: 3px;
}

.ghost-caret {
  display: inline-block;
  width: 1.5px;
  height: 1.15em;
  background: var(--gold);
  vertical-align: text-bottom;
  margin-left: 1px;
  animation: caret 1.05s steps(1) infinite;
}

@keyframes caret { 50% { opacity: 0; } }

.ask-send {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ai);
  color: var(--paper);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.ask-send:hover {
  transform: scale(1.06);
  background: color-mix(in srgb, var(--ai) 80%, var(--ai-light));
}

/* ── seam divider ─────────────────────────────────────────────────── */

.seam-divider { color: var(--gold); opacity: 0.5; }
.seam-divider svg { display: block; width: 100%; height: 20px; }

/* ── sections ─────────────────────────────────────────────────────── */

.section { padding: 110px 24px; }

.section-inner { max-width: var(--maxw); margin: 0 auto; }

.section-head { margin-bottom: 72px; }

.eyebrow {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.2;
}

/* ── feature rows ─────────────────────────────────────────────────── */

.frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  padding: 64px 0;
  border-top: 1px solid color-mix(in srgb, var(--ink-line) 55%, transparent);
}

.frow:first-of-type { border-top: 0; }

.frow.rev .frow-text { order: 2; }
.frow.rev .frow-viz { order: 1; }

.flabel {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ai-light);
  margin-bottom: 12px;
}

.frow-text h3 { font-size: clamp(23px, 2.6vw, 28px); margin-bottom: 14px; }

.frow-text p { color: var(--paper-dim); font-size: 15.5px; max-width: 46ch; }

.frow-viz {
  display: flex;
  justify-content: center;
}

/* the camera viz keeps the quiet card frame */
.viz-camera {
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: 28px 32px;
  width: min(380px, 100%);
}

/* word panel type — reused inside the sentence lab card */
.wp-surface { font-family: var(--display); font-size: 30px; line-height: 1.3; }
.wp-reading { color: var(--gold); font-size: 15px; margin-top: 2px; }
.wp-pitch { color: var(--paper-dim); font-size: 12.5px; }
.wp-gloss { color: var(--paper); font-size: 14.5px; margin-top: 10px; }
.wp-fn { color: var(--paper-dim); font-size: 12px; margin-top: 6px; letter-spacing: 0.04em; }

.gpills { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }

.gpill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(201, 161, 90, 0.4);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12.5px;
  color: var(--paper-dim);
}

.gpill b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--gold);
}

.gpill i {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: rgba(201, 161, 90, 0.14);
  color: var(--gold);
  border-radius: 5px;
  padding: 2px 6px;
}

.level-pills { display: flex; gap: 8px; margin-top: 20px; }

.level-pills span {
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--paper-dim);
}

.level-pills .on {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(201, 161, 90, 0.1);
}

/* ── sentence lab ─────────────────────────────────────────────────────
   One live sentence, five tappable words, one shared card underneath.
   The card is fixed-height so switching words never shoves the page. */

.sentence-lab {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 72px;
  align-items: start;
  padding: 64px 0;
}

.sentence-lab .sl-copy h3 { font-size: clamp(23px, 2.6vw, 28px); margin-bottom: 14px; }
.sentence-lab .sl-copy p { color: var(--paper-dim); font-size: 15.5px; max-width: 46ch; }

.sl-sentence {
  font-family: var(--display);
  font-size: clamp(27px, 3.2vw, 34px);
  line-height: 1.7;
}

.tok {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 2px 1px 4px;
  margin: 0;
  font: inherit;
  color: var(--paper);
  cursor: pointer;
  border-bottom: 2px solid color-mix(in srgb, var(--gold) 32%, transparent);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.tok:hover { color: var(--gold); border-bottom-color: var(--gold); }

.tok[aria-pressed="true"] {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: rgba(201, 161, 90, 0.09);
}

.sl-punct { color: var(--paper-dim); }

.sl-hint {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: color-mix(in srgb, var(--paper-dim) 75%, transparent);
}

.sl-card {
  margin-top: 22px;
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: 26px 28px;
  min-height: 250px;
}

.slp { display: none; }

.slp.is-on {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 28px;
  animation: slp-in 0.28s ease;
}

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

.slp-side { display: flex; flex-direction: column; gap: 16px; }

/* decorative demo of the in-app button — flips to “added” on click */
.anki-add {
  align-self: flex-start;
  appearance: none;
  background: transparent;
  border: 1px solid rgba(201, 161, 90, 0.55);
  border-radius: 999px;
  padding: 8px 18px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.anki-add:hover { background: rgba(201, 161, 90, 0.12); }

.anki-add .aa-done { display: none; }
.anki-add.added { border-color: var(--gold); background: rgba(201, 161, 90, 0.16); }
.anki-add.added .aa-idle { display: none; }
.anki-add.added .aa-done { display: inline; }

.slp-qs-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ai-light);
  margin-bottom: 8px;
}

.qchip {
  display: inline-block;
  margin: 0 6px 8px 0;
  border: 1px solid color-mix(in srgb, var(--ai-light) 40%, transparent);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 12.5px;
  color: var(--ai-light);
}

/* camera viz */
.viz-camera {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  overflow: hidden;
}

/* a clipped segment of the morning paper under the viewfinder: nameplate
   and date line over a double rule, then the story — vertical headline,
   boxed kicker, justified tategaki columns, halftone photo with caption.
   The columns crop at the left edge, the way a camera crop would. */
.news {
  background: var(--paper);
  color: var(--ink);
  border-radius: 4px;
  padding: 12px 14px 14px;
  height: 240px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.np-mast {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 5px;
  border-bottom: 3px double color-mix(in srgb, var(--ink) 60%, var(--paper));
}

.np-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3em;
  white-space: nowrap;
}

.np-meta {
  font-size: 7.5px;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--ink) 72%, var(--paper));
  white-space: nowrap;
  overflow: hidden;
}

/* row-reverse lays the story out right-to-left: headline, kicker,
   body columns, then the photo at the cropped edge */
.np-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-start;
  gap: 9px;
  padding-top: 9px;
  overflow: hidden;
}

.np-head {
  writing-mode: vertical-rl;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0.1em;
}

.np-kicker {
  writing-mode: vertical-rl;
  align-self: flex-start;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 4px 3px;
  border: 1px solid color-mix(in srgb, var(--ink) 45%, var(--paper));
  color: color-mix(in srgb, var(--ink) 85%, var(--paper));
}

.np-txt {
  writing-mode: vertical-rl;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  font-size: 9px;
  line-height: 2;
  letter-spacing: 0.04em;
  text-align: justify;
  color: color-mix(in srgb, var(--ink) 82%, var(--paper));
}

.np-txt p + p { margin-block-start: 9px; }

.np-photo {
  flex: none;
  width: 60px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* halftone dots over a grey wash — a printed photo at arm's length */
.np-img {
  display: block;
  height: 82px;
  border: 1px solid color-mix(in srgb, var(--ink) 50%, var(--paper));
  background:
    radial-gradient(circle, color-mix(in srgb, var(--ink) 40%, var(--paper)) 0.7px, transparent 0.9px) 0 0 / 2.5px 2.5px,
    linear-gradient(160deg, color-mix(in srgb, var(--ink) 16%, var(--paper)), color-mix(in srgb, var(--ink) 48%, var(--paper)));
}

.np-photo figcaption {
  font-size: 6.5px;
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--ink) 75%, var(--paper));
}

/* the headline lifts off the page after each pass of the scan line */
.news-extract {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  background: var(--ink);
  border: 1px solid rgba(201, 161, 90, 0.55);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13.5px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
  opacity: 0;
  animation: extract 6.8s ease-in-out infinite;
}

.news-extract [lang="ja"] { font-family: var(--display); color: var(--paper); }

.ne-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

@keyframes extract {
  0%, 26% { opacity: 0; transform: translateX(-50%) translateY(6px); }
  36%, 86% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(0); }
}

.cam-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--gold);
  opacity: 0.85;
}

.cam-corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.cam-corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-radius: 0 4px 0 0; }
.cam-corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-radius: 0 0 0 4px; }
.cam-corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }

.cam-scan {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.7;
  animation: scan 3.4s ease-in-out infinite;
}

@keyframes scan {
  0%, 100% { top: 18%; }
  50% { top: 82%; }
}

/* ── anki / sentence mining ───────────────────────────────────────── */

.mining { border-top: 1px solid color-mix(in srgb, var(--ink-line) 55%, transparent); }

.mining-head { margin-bottom: 56px; }
.mining-lede { margin-top: 18px; max-width: 58ch; color: var(--paper-dim); font-size: 16px; }

/* the two shots are a genuine sequence — read, then tap — so they're an
   ordered list and the captions carry the step numbers */
.shots {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
  justify-items: center;
}

.shot { counter-increment: step; max-width: 340px; }

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 42px;
  border: 1px solid var(--ink-line);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45);
}

.shot-cap {
  margin-top: 26px;
  font-size: 14.5px;
  color: var(--paper-dim);
}

.shot-cap b {
  display: block;
  margin-bottom: 6px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  color: var(--paper);
}

.shot-cap b::before {
  content: counter(step);
  margin-right: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
  vertical-align: 2px;
}

.shot-cap [lang="ja"] { font-family: var(--display); color: var(--gold); }

/* what's on the card / what you control */
.anki-detail {
  margin-top: 84px;
  padding-top: 56px;
  border-top: 1px solid color-mix(in srgb, var(--ink-line) 55%, transparent);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px;
}

.ad-col h3 {
  font-size: 20px;
  margin-bottom: 20px;
}

.ad-col ul { list-style: none; margin: 0; padding: 0; }

.ad-col li {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 11px 0;
  border-top: 1px solid color-mix(in srgb, var(--ink-line) 50%, transparent);
  font-size: 14.5px;
}

.ad-col li b {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ai-light);
}

.ad-col li span { color: var(--paper-dim); }

/* the AnkiMobile objection, answered in its own panel — a gold seam down
   the left because this is the join between the two ways of using Anki */
.noanki {
  margin-top: 52px;
  padding: 30px 34px;
  background: color-mix(in srgb, var(--ink-soft) 62%, var(--ink));
  border: 1px solid var(--ink-line);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.noanki-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ai-light);
  margin-bottom: 10px;
}

.noanki h3 { font-size: 20px; line-height: 1.32; text-wrap: balance; }

.noanki > p { color: var(--paper-dim); font-size: 14.5px; }

/* ── offline ──────────────────────────────────────────────────────── */

.offline {
  position: relative;
  overflow: hidden;
  padding: 130px 24px;
  border-top: 1px solid color-mix(in srgb, var(--ink-line) 55%, transparent);
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(62, 108, 153, 0.14), transparent 70%);
}

.sky { position: absolute; inset: 0; pointer-events: none; }

.flight {
  position: absolute;
  left: -5%;
  top: 6%;
  width: 110%;
  height: auto;
  overflow: visible;
  color: var(--gold);
  animation: flight-cycle 24s linear infinite;
}

.trail {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.1;
  stroke-linecap: round;
  opacity: 0.34;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: trail-draw 24s linear infinite;
}

.plane {
  fill: currentColor;
  opacity: 0.75;
  transform-box: view-box;
  transform-origin: 0 0;
  animation: plane-fly 24s linear infinite;
}

/* the plane rides the same quadratic the trail draws */
@keyframes plane-fly {
  0%    { transform: translate(-40px, 150px) rotate(-10deg); }
  22.5% { transform: translate(280px, 96px)  rotate(-9deg); }
  45%   { transform: translate(600px, 63px)  rotate(-6deg); }
  67.5% { transform: translate(920px, 51px)  rotate(-2deg); }
  90%, 100% { transform: translate(1240px, 60px) rotate(2deg); }
}

@keyframes trail-draw {
  0% { stroke-dashoffset: 100; }
  90%, 100% { stroke-dashoffset: 0; }
}

/* fade the whole flight in and out so the reset is never seen */
@keyframes flight-cycle {
  0%, 3%    { opacity: 0; }
  11%, 82%  { opacity: 1; }
  93%, 100% { opacity: 0; }
}

.offline-inner { position: relative; text-align: center; }

.eyebrow .dot { margin: 0 10px; color: var(--ink-line); }
.eyebrow [lang="ja"] { font-family: var(--display); letter-spacing: 0.3em; }

.offline-title {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.2;
}

.offline-sub {
  margin: 22px auto 0;
  max-width: 60ch;
  color: var(--paper-dim);
  font-size: 16px;
}

.offline-sub [lang="ja"] { font-family: var(--display); color: var(--gold); }

.offline-stats {
  list-style: none;
  margin: 52px auto 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.offline-stats li {
  flex: 1 1 190px;
  max-width: 250px;
  background: var(--ink-soft);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: 24px 20px;
}

.offline-stats b {
  display: block;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
}

.offline-stats span {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--paper-dim);
}

.offline-stats .zero {
  border-color: rgba(201, 161, 90, 0.45);
  background: linear-gradient(var(--ink-soft), var(--ink-soft)) padding-box,
              rgba(201, 161, 90, 0.06);
}

.offline-stats .zero b { color: var(--gold); }

.offline-foot {
  margin: 32px auto 0;
  max-width: 54ch;
  font-size: 13.5px;
  color: color-mix(in srgb, var(--paper-dim) 82%, var(--ink));
}

/* ── comparison ───────────────────────────────────────────────────── */

.compare { border-top: 1px solid color-mix(in srgb, var(--ink-line) 55%, transparent); }

.compare .section-head { margin-bottom: 52px; }

.compare-lede {
  margin-top: 18px;
  max-width: 52ch;
  color: var(--paper-dim);
  font-size: 16px;
}

/* the table is the one thing on the page allowed to scroll sideways;
   tabindex on the wrapper is what lets a keyboard reach that scroll */
.ctable-wrap { overflow-x: auto; }

.ctable {
  width: 100%;
  min-width: 640px;
  border-collapse: separate;
  border-spacing: 0;
}

.ctable th,
.ctable td { padding: 17px 14px; text-align: center; vertical-align: middle; }

.ctable thead th {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  padding-bottom: 20px;
  color: var(--paper);
}

.ctable tbody th[scope="row"] {
  width: 34%;
  padding-left: 0;
  text-align: left;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  color: var(--paper);
}

.ctable tbody th,
.ctable tbody td { border-top: 1px solid color-mix(in srgb, var(--ink-line) 55%, transparent); }

/* rikAI's column reads as a single panel running the height of the table */
.ctable .cme {
  background: rgba(201, 161, 90, 0.05);
  border-left: 1px solid rgba(201, 161, 90, 0.26);
  border-right: 1px solid rgba(201, 161, 90, 0.26);
}

.ctable thead .cme {
  color: var(--gold);
  border-top: 1px solid rgba(201, 161, 90, 0.26);
  border-radius: 12px 12px 0 0;
}

.ctable tbody .cme { border-top-color: rgba(201, 161, 90, 0.16); }

.ctable tbody tr:last-child .cme {
  border-bottom: 1px solid rgba(201, 161, 90, 0.26);
  border-radius: 0 0 12px 12px;
}

/* marks: filled = does it, rule = doesn't */
.mk { display: inline-block; vertical-align: middle; color: var(--ai-light); }

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

.mk.yes { width: 11px; height: 11px; border-radius: 50%; background: currentColor; }

.mk.no { width: 13px; height: 1.5px; background: var(--ink-line); }

/* ── founder note ─────────────────────────────────────────────────── */

.note { border-top: 1px solid color-mix(in srgb, var(--ink-line) 55%, transparent); }

/* narrower than the rest of the page — it's a letter, not a section */
.note-inner { max-width: 720px; }

.note-body {
  font-family: var(--display);
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.78;
}

.note-sign {
  margin-top: 28px;
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--paper-dim);
}

.note-sign b { font-weight: 700; color: var(--paper); }

/* ── waitlist ─────────────────────────────────────────────────────── */

.wait { width: min(480px, 100%); }

.wait-lede {
  font-size: 13.5px;
  color: color-mix(in srgb, var(--paper-dim) 85%, var(--ink));
}

.wait-row {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.wait-row input {
  flex: 1;
  min-width: 0;
  padding: 11px 18px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink-soft) 70%, var(--ink));
  color: var(--paper);
  caret-color: var(--gold);
  font-family: var(--body);
  font-size: 14.5px;
  outline: none;
  transition: border-color 0.2s ease;
}

.wait-row input::placeholder { color: color-mix(in srgb, var(--paper-dim) 55%, var(--ink)); }
.wait-row input:focus { border-color: color-mix(in srgb, var(--gold) 50%, var(--ink-line)); }

/* deliberately outlined, not filled — the App Store button is the loud one */
.wait-row button {
  flex: none;
  padding: 11px 22px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font-family: var(--body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.wait-row button:hover { background: var(--ink-soft); border-color: var(--ai); }

.wait.is-sending .wait-row { opacity: 0.55; pointer-events: none; }
.wait.is-done .wait-row { display: none; }

.wait-status {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ai-light);
}

.wait-status:empty { display: none; }
.wait-status.err { color: var(--shu); }
.wait.is-done .wait-status { color: var(--gold); }

.hero .wait { margin-top: 30px; }

.cta .wait {
  margin: 46px auto 0;
  padding-top: 36px;
  border-top: 1px solid color-mix(in srgb, var(--ink-line) 55%, transparent);
}

/* ── cta ──────────────────────────────────────────────────────────── */

.cta { padding: 140px 24px; }

.cta-inner { text-align: center; }

.cta .btn { margin-top: 34px; }

.cta-note {
  margin-top: 16px;
  font-size: 13px;
  color: color-mix(in srgb, var(--paper-dim) 75%, var(--ink));
}

/* ── footer ───────────────────────────────────────────────────────── */

.footer { border-top: 1px solid color-mix(in srgb, var(--ink-line) 60%, transparent); }

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--paper-dim);
}

.footer-links { display: flex; gap: 22px; flex: 1; }

.footer-links a { font-size: 13.5px; color: var(--paper-dim); transition: color 0.18s ease; }
.footer-links a:hover { color: var(--paper); }

.footer-line { font-size: 13px; color: var(--paper-dim); }
.footer-line [lang="ja"] { color: var(--gold); margin-right: 8px; }

/* ── reveal on scroll ─────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── responsive ───────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .frow { grid-template-columns: minmax(0, 1fr); gap: 34px; padding: 48px 0; }
  .frow-text, .frow-viz { min-width: 0; }
  .frow.rev .frow-text { order: 1; }
  .frow.rev .frow-viz { order: 2; }
  .sentence-lab { grid-template-columns: 1fr; gap: 34px; padding: 48px 0; }
  .shots { gap: 44px; }
  .anki-detail { grid-template-columns: 1fr; gap: 44px; margin-top: 64px; }
  .noanki { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 680px) {
  .sm-only { display: inline; }
  .sm-hidden { display: none; }
  /* all three nav items stay on phones: the CTA label shrinks to "Join"
     (via .sm-hidden) so brand, Technology, and the button fit at 320px */
  .nav-inner { justify-content: space-between; gap: 14px; padding: 12px 16px; }
  .nav-links { flex: 0 1 auto; }
  .hero { padding-top: 72px; }
  .hero-title { font-size: clamp(32px, 9vw, 40px); }
  .section { padding: 84px 20px; }
  .shots { grid-template-columns: 1fr; gap: 56px; }
  .shot { max-width: 300px; }
  .shot img { border-radius: 38px; }
  .ad-col li { grid-template-columns: 1fr; gap: 2px; }
  .noanki { padding: 24px 22px; margin-top: 44px; }
  /* the word card's two halves stack once there's no room side by side */
  .slp.is-on { grid-template-columns: 1fr; gap: 18px; }
  .sl-card { min-height: 320px; padding: 22px 20px; }
  .news { height: 210px; }
  /* an email field and a button side by side leave neither enough room */
  .wait-row { flex-direction: column; }
  .wait-row button { padding: 12px 22px; }
  .cta { padding: 100px 20px; }
  .offline { padding: 92px 20px; }
  /* keep the plane from shrinking to a speck on a narrow screen */
  .flight { left: -50%; width: 200%; top: 4%; }
  /* stacked stat cards get tall fast — lay each one out as a single line */
  .offline-stats { margin-top: 40px; gap: 10px; }
  .offline-stats li {
    flex-basis: 100%;
    max-width: none;
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 14px 20px;
    text-align: left;
  }
  .offline-stats b { font-size: 26px; min-width: 2ch; }
  .offline-stats span { margin-top: 0; }
  /* five columns can't fit — the feature names stay pinned and the
     products slide under them rather than shrinking to nothing */
  .compare .section-head { margin-bottom: 40px; }
  .ctable { min-width: 470px; }
  .ctable th,
  .ctable td { padding: 14px 8px; }
  .ctable thead th { font-size: 14.5px; padding-bottom: 16px; }
  /* the header's empty corner has to pin with the names below it, or the
     product headings drift out of line with their own columns */
  .ctable thead .cspacer,
  .ctable tbody th[scope="row"] {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 150px;
    min-width: 150px;
    padding-right: 14px;
    background: var(--ink);
  }
  .ctable tbody th[scope="row"] { font-size: 13.5px; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-links { flex: none; }
}

/* ── reduced motion ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .cam-scan { animation: none; top: 50%; }
  .news-extract { animation: none; opacity: 1; }
  .slp.is-on { animation: none; }
  .tok, .anki-add { transition: none; }
  .ghost-caret { animation: none; }
  .ask-box, .btn, .ask-send { transition: none; }
  /* the plane parks mid-flight with its contrail already drawn */
  .flight { animation: none; opacity: 1; }
  .trail { animation: none; stroke-dashoffset: 0; }
  .plane { animation: none; transform: translate(600px, 63px) rotate(-6deg); }
}
