/* SpellGamez / Spell Pong landing page. Same palette as the game
   (lib/theme/paper_ink.dart): ink on paper, colour only for right/wrong. */
:root {
  --paper: #f3f0e8;
  --paper-2: #ebe7dc;
  --ball: #fbfaf6;
  --margin: #e6e2d8;
  --ink: #1b1b1b;
  --ink-soft: #55524c;
  --ink-faint: #9a968e;
  --rule: #d6d1c4;
  --grid: rgba(27, 27, 27, 0.055);
  --right: #2f6b4a;
  --right-soft: #dfe9e1;
  --wrong: #a2382b;
  --blue: #2e4d7b;
  --shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 10px 30px -12px rgba(0, 0, 0, .28);
  --sans: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --wrap: 1160px;
  --gutter: 24px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--ink);
  font: 300 17px/1.6 var(--sans);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }

/* visually hidden, still read by screen readers */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }

.caps-sm {
  font: 500 11.5px/1.2 var(--sans);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  border-radius: 999px; border: 1.5px solid var(--ink);
  font: 500 13px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 11.5px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 13.5px; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { box-shadow: 0 6px 18px -6px rgba(0,0,0,.45); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.btn-green { background: var(--right); border-color: var(--right); color: #fff; }
.btn-green:hover { box-shadow: 0 6px 18px -6px rgba(47,107,74,.6); }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-ghost { background: transparent; color: var(--paper); border-color: rgba(243,240,232,.5); }
.btn-ghost:hover { border-color: var(--paper); }
.btn-icon { width: 44px; padding: 0; }
.link-btn {
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  font: 500 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243, 240, 232, .88);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 3px double var(--ink);
}
.nav-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.wordmark-text { font: 500 14px/1 var(--sans); letter-spacing: .38em; }
.mini-ball {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--ball); border: 2px solid var(--ink);
  font: 700 13px/1 var(--sans); letter-spacing: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  font: 500 11.5px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-soft);
}
.nav-links a:hover { color: var(--ink); }
.nav-end { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.lang button {
  background: none; border: 0; padding: 7px 10px; cursor: pointer;
  font: 500 11px/1 var(--sans); letter-spacing: .12em;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- hero ---------- */
.hero { padding: 56px 0 40px; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px; align-items: center;
}
.eyebrow {
  margin: 0 0 22px;
  font: 500 11.5px/1.6 var(--sans); letter-spacing: .3em; color: var(--right);
}
.headline {
  margin: 0 0 22px;
  font: italic 300 clamp(40px, 5.6vw, 76px)/1.06 var(--serif);
  letter-spacing: -.015em;
  text-wrap: balance;
}
/* the Spanish and Portuguese sentences are longer: a little smaller */
html[lang="es"] .headline, html[lang="pt"] .headline { font-size: clamp(36px, 4.7vw, 64px); }
.headline .catch {
  display: inline-flex; gap: .1em; vertical-align: -.14em; white-space: nowrap; margin-left: .05em;
  font-style: normal;
}
.headline .catch b {
  display: inline-grid; place-items: center;
  width: 1.02em; height: 1.02em; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #ece9e0 75%); border: .035em solid var(--ink);
  font: 500 .52em/1 var(--sans); letter-spacing: 0;
  box-shadow: 0 .06em .14em rgba(0,0,0,.22);
  animation: drop .9s cubic-bezier(.3, 1.6, .5, 1) both;
  animation-delay: calc(var(--i) * 90ms + 300ms);
}
.headline .catch b:first-child { border-color: var(--right); border-width: .06em; }
.headline .catch b { font-size: .52em; width: 1.96em; height: 1.96em; }
@keyframes drop {
  0% { transform: translateY(-1.4em) rotate(-25deg); opacity: 0; }
  60% { opacity: 1; }
  100% { transform: translateY(0) rotate(var(--r, 0deg)); opacity: 1; }
}
.headline .catch .dot { font-style: italic; align-self: flex-end; line-height: 1; margin-left: -.06em; }
.lede { font-size: 19px; color: var(--ink-soft); max-width: 34em; margin: 0 0 26px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.fineprint { margin: 16px 0 0; font: 400 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }

.challenge {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 0 22px; padding: 12px 16px;
  background: var(--right-soft); border: 1.5px solid var(--right); border-radius: 14px;
  font-size: 16px; color: var(--ink);
}
.challenge[hidden] { display: none; }
.challenge-badge {
  font: 700 10.5px/1 var(--sans); letter-spacing: .26em; color: #fff;
  background: var(--right); padding: 6px 9px; border-radius: 999px;
}

/* ---------- the device / game ---------- */
.hero-game { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.learn-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: center; }
.chips { display: flex; gap: 8px; }
.chip {
  border: 1.5px solid var(--ink); background: transparent; border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
  font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.device {
  position: relative;
  width: min(100%, 410px);
  background: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  border: 1.5px solid var(--ink);
  border-radius: 34px;
  padding: 18px 16px 16px;
  box-shadow: 0 30px 60px -28px rgba(0,0,0,.45), 0 0 0 8px var(--paper-2), 0 0 0 9.5px var(--ink);
  outline: none;
}
.hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 0 4px 10px; }
.hud .caps-sm { font-size: 10px; letter-spacing: .26em; color: var(--ink); }
.hud-title { font: 500 12px/1 var(--sans); letter-spacing: .34em; }
.hud-right { justify-self: end; display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.mute {
  background: none; border: 0; padding: 4px; margin: -4px; cursor: pointer; color: var(--ink);
  display: inline-grid; place-items: center; border-radius: 6px;
}
.mute[aria-pressed="true"] .wave { opacity: .15; }
.rule-double { border-top: 3px double var(--ink); margin: 0 0 8px; }
.clue-row { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; min-height: 64px; }
.clue-lang { font-size: 10px; color: var(--ink-soft); }
.clue-count { font-size: 10px; text-align: right; color: var(--ink-soft); }
.clue {
  text-align: center; font: italic 400 clamp(34px, 9vw, 44px)/1.1 var(--serif);
  overflow-wrap: anywhere;
}
.slots { display: flex; justify-content: center; gap: 10px; min-height: 34px; align-items: flex-end; }
.slot {
  width: 22px; text-align: center;
  font: 500 20px/1 var(--sans); padding-bottom: 6px; position: relative; color: var(--ink);
}
.slot::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 5px; height: 5px; margin-left: -2.5px;
  border-radius: 50%; background: var(--ink-faint);
}
.slot.next::after { width: 22px; height: 2px; margin-left: -11px; border-radius: 1px; background: var(--ink); }
.slot.filled::after { width: 22px; height: 2px; margin-left: -11px; background: var(--right); }
.slot.filled { color: var(--right); animation: pop .35s ease-out; }
.slot.bad::after { background: var(--wrong); }
.slot.shake { animation: shake .35s ease-in-out; }
@keyframes pop { 0% { transform: scale(1.6); } 100% { transform: scale(1); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.hint { margin: 6px 0 10px; text-align: center; font: italic 300 14px/1.3 var(--serif); color: var(--ink-soft); }

.field-wrap { position: relative; border-radius: 0 0 20px 20px; overflow: hidden; }
#field {
  display: block; width: 100%; height: 440px;
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none;
}
#field:active { cursor: grabbing; }

/* overlays inside the field */
.overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; text-align: center;
  background: rgba(243, 240, 232, .8);
  backdrop-filter: blur(1.5px); -webkit-backdrop-filter: blur(1.5px);
  animation: fade .25s ease-out;
}
.overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.ov-title { margin: 0; font: italic 400 34px/1.1 var(--serif); }
.ov-sub { margin: 0 0 8px; color: var(--ink-soft); font-size: 15px; max-width: 22em; }
.ov-help { margin: 8px 0 0; font-size: 13px; color: var(--ink-faint); max-width: 24em; line-height: 1.5; }
.ov-played { margin-top: 6px; }
.ov-played p { margin: 0 0 10px; font-size: 15px; }
.ov-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

.overlay-card { background: rgba(243, 240, 232, .72); }
.word-card {
  width: min(100%, 300px); padding: 20px 22px 18px;
  background: var(--ball); border: 1.5px solid var(--ink); border-radius: 16px;
  box-shadow: var(--shadow); text-align: left;
  animation: cardIn .35s cubic-bezier(.2, 1.4, .4, 1);
}
@keyframes cardIn { from { transform: translateY(16px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.card-head { margin: 0 0 8px; color: var(--right); font-size: 10px; }
.card-word { margin: 0; font: 500 30px/1.1 var(--sans); letter-spacing: .16em; }
.card-clue { margin: 2px 0 10px; font: italic 400 20px/1.3 var(--serif); color: var(--ink-soft); }
.card-ex { margin: 0; padding-top: 10px; border-top: 1px solid var(--rule); font-size: 14.5px; line-height: 1.45; }
.card-exclue { margin: 2px 0 0; font: italic 300 13.5px/1.45 var(--serif); color: var(--ink-faint); }
.card-ex:empty, .card-exclue:empty { display: none; }

.overlay-result { justify-content: center; gap: 8px; }
.res-time { margin: 0; font: 300 64px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.res-grid { display: flex; flex-direction: column; gap: 5px; align-items: center; margin: 4px 0; }
.res-grid div { display: flex; gap: 5px; }
.res-grid i {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--right); box-shadow: inset 0 -2px 0 rgba(0,0,0,.15);
  animation: pop .3s ease-out both; animation-delay: calc(var(--i) * 40ms);
}
.res-grid i.bad { background: var(--wrong); }
.res-stats { margin: 0; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.res-vs { margin: 2px 0 4px; font: italic 400 18px/1.3 var(--serif); }
.res-vs.win { color: var(--right); }
.share-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }
.res-more { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; margin-top: 6px; color: var(--ink-faint); }

.toast {
  position: absolute; left: 50%; bottom: 16px; transform: translate(-50%, 20px);
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px;
  font: 500 12px/1.2 var(--sans); letter-spacing: .1em;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- ticker ---------- */
.ticker {
  border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  background: var(--ink); color: var(--paper);
  overflow: hidden; white-space: nowrap; padding: 14px 0;
  transform: rotate(-1.2deg) scale(1.03); margin: 36px 0 20px;
}
.ticker-track { display: inline-flex; gap: 0; animation: tick 80s linear infinite; will-change: transform; }
.ticker-track span { font: italic 300 22px/1 var(--serif); padding: 0 6px; }
.ticker-track span.en { font: 500 15px/22px var(--sans); letter-spacing: .24em; font-style: normal; }
.ticker-track span.sep { color: var(--right-soft); opacity: .5; padding: 0 18px; font-style: normal; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section-title { margin: 0 0 40px; display: flex; flex-direction: column; gap: 12px; }
.section-title .caps-sm { color: var(--right); }
.section-h { font: italic 300 clamp(32px, 4.2vw, 52px)/1.1 var(--serif); letter-spacing: -.01em; }

/* dictionary entry */
.entry-section { padding-top: 56px; }
.entry {
  background: var(--ball); border: 1.5px solid var(--ink); border-radius: 4px;
  padding: 40px 44px; box-shadow: 10px 10px 0 var(--ink);
  position: relative;
}
.entry::before {
  content: "S"; position: absolute; top: -22px; right: 28px;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ball); border: 2.5px solid var(--right); font: 700 20px/1 var(--sans);
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.entry-head { margin: 0 0 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.entry-word { font: 700 clamp(34px, 5vw, 52px)/1 var(--serif); font-style: normal; letter-spacing: -.01em; }
.entry-ipa { font: 300 20px/1 var(--sans); color: var(--ink-soft); }
.entry-pos { font: italic 400 20px/1 var(--serif); color: var(--right); }
.entry-defs { margin: 0; padding-left: 1.6em; font: 400 clamp(18px, 2.2vw, 22px)/1.55 var(--serif); }
.entry-defs li { padding-left: 6px; margin: 0 0 8px; }
.entry-defs li::marker { font: 700 .85em var(--sans); }
.entry-tag { font-style: italic; color: var(--ink-soft); }
.entry-tag::before { content: "("; } .entry-tag::after { content: ")"; }
.entry-see { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); font: italic 400 17px/1.4 var(--serif); color: var(--ink-soft); }
.entry-see .caps-sm { font-style: normal; margin-right: 10px; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.step h3 { margin: 4px 0 6px; font: 500 15px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.step p { margin: 0; color: var(--ink-soft); }
.step-n { font: italic 400 30px/1 var(--serif) !important; color: var(--right) !important; margin: 22px 0 6px !important; }
.shot {
  aspect-ratio: 9 / 13; border: 1.5px solid var(--ink); border-radius: 22px; overflow: hidden;
  background: var(--paper); box-shadow: var(--shadow); position: relative;
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.shot-balls {
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 20px 20px;
}
.demo-goal {
  position: absolute; left: 0; right: 0; top: 14%; height: 12%;
  border-top: 3px double var(--ink); border-bottom: 3px double var(--ink);
  background: linear-gradient(90deg, var(--margin) 28%, transparent 28%, transparent 72%, var(--margin) 72%);
  display: grid; place-items: center;
}
.demo-goal span { font: 500 12px/1 var(--sans); letter-spacing: .5em; color: var(--ink-soft); }
.shot-balls .b {
  position: absolute; width: 17%; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; background: var(--ball); border: 1.5px solid var(--ink);
  font: 500 clamp(16px, 2vw, 22px)/1 var(--sans); box-shadow: 0 4px 10px rgba(0,0,0,.18);
}
.shot-balls .b1 { left: 14%; top: 64%; animation: float1 6s ease-in-out infinite; }
.shot-balls .b2 { left: 42%; top: 34%; border-color: var(--right); border-width: 3px; animation: up 3.2s ease-in-out infinite; }
.shot-balls .b3 { left: 70%; top: 52%; animation: float2 7s ease-in-out infinite; }
.shot-balls .b4 { left: 58%; top: 72%; animation: float1 5s ease-in-out infinite reverse; }
.demo-paddle {
  position: absolute; left: 34%; width: 32%; height: 4.4%; bottom: 8%;
  background: var(--ink); border-radius: 999px; box-shadow: 0 4px 10px rgba(0,0,0,.25);
  animation: paddle 3.2s ease-in-out infinite;
}
@keyframes up { 0%, 100% { transform: translateY(80%); } 50% { transform: translateY(-120%); } }
@keyframes paddle { 0%, 100% { transform: translateX(-12%); } 50% { transform: translateX(14%); } }
@keyframes float1 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(40%, -30%); } }
@keyframes float2 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-50%, 25%); } }
@media (prefers-reduced-motion: reduce) { .shot-balls .b, .demo-paddle { animation: none; } }

/* index */
.index-section { padding-top: 40px; }
.index { margin: 0; columns: 2; column-gap: 56px; }
.index div { display: flex; align-items: baseline; gap: 10px; break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.index dt { font: 500 14px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.index dd { margin: 0 0 0 auto; text-align: right; font: italic 400 16px/1.4 var(--serif); color: var(--ink-soft); }
.index div::after { content: none; }

/* join the beta: a tester pass with a perforated tear line */
.beta-section { padding-top: 24px; }
.pass {
  position: relative; background: var(--ball);
  border: 1.5px solid var(--ink); border-radius: 22px;
  box-shadow: 10px 10px 0 var(--right);
  padding: 40px 44px 30px;
}
.pass-head { max-width: 640px; }
.pass-head .caps-sm { color: var(--right); }
.pass-head .section-h { display: block; margin: 10px 0 12px; }
.pass-text { margin: 0; font-size: 18px; color: var(--ink-soft); }
.pass-steps {
  list-style: none; margin: 32px -44px 0; padding: 32px 44px 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  border-top: 2px dashed var(--rule); position: relative;
}
.pass-steps::before, .pass-steps::after {
  content: ""; position: absolute; top: -15px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--ink);
}
.pass-steps::before { left: -15px; clip-path: inset(0 0 0 50%); }
.pass-steps::after { right: -15px; clip-path: inset(0 50% 0 0); }
.pass-steps li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.pass-steps h3 { margin: 6px 0 0; font: 500 14px/1.3 var(--sans); letter-spacing: .2em; text-transform: uppercase; }
.pass-steps p { margin: 0 0 6px; color: var(--ink-soft); font-size: 15.5px; flex: 1; }
.pass-steps .btn { white-space: normal; text-align: center; }
.step-ball {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ball); border: 2px solid var(--ink); font: 700 18px/1 var(--sans);
  box-shadow: 0 4px 8px rgba(0,0,0,.16);
}
.pass-steps li:first-child .step-ball { border-color: var(--right); border-width: 3px; }
.pass-note {
  margin: 28px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--right-soft);
  font: italic 400 15.5px/1.45 var(--serif); color: var(--ink);
}
.pass-ios { margin: 14px 0 0; font-size: 15px; color: var(--ink-soft); }
.pass-ios a { color: var(--ink); text-underline-offset: 3px; }

/* teachers */
.teachers {
  background: var(--ink); color: var(--paper);
  padding: 96px 0;
  background-image:
    linear-gradient(rgba(243,240,232,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243,240,232,.05) 1px, transparent 1px);
  background-size: 28px 28px;
}
.teach-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.on-ink { color: #b9d4c2; }
.teach-h { margin: 14px 0 18px; font: italic 300 clamp(34px, 4.4vw, 56px)/1.08 var(--serif); }
.teach-copy > p { color: rgba(243,240,232,.78); font-size: 18px; max-width: 32em; }
.teach-for { font: italic 400 16px/1.4 var(--serif) !important; color: rgba(243,240,232,.6) !important; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 28px 0 30px; }
.plan { border: 1px solid rgba(243,240,232,.25); border-radius: 16px; padding: 18px 20px; }
.plan-pro { border-color: #b9d4c2; background: rgba(47,107,74,.22); }
.plan ul { margin: 10px 0 0; padding: 0; list-style: none; font-size: 15px; }
.plan li { padding: 5px 0 5px 22px; position: relative; color: rgba(243,240,232,.88); }
.plan li::before {
  content: ""; position: absolute; left: 0; top: .78em; width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid #b9d4c2;
}
.plan-pro li::before { background: #b9d4c2; }
.plan-note { margin: 10px 0 0; font: italic 400 15px/1.3 var(--serif); color: #b9d4c2; }

.teach-visual { display: grid; gap: 18px; color: var(--ink); }
.code-card, .insight-card {
  background: var(--paper); border-radius: 18px; padding: 22px 24px; box-shadow: 0 30px 50px -30px rgba(0,0,0,.8);
}
.code-card { transform: rotate(-2deg); }
.insight-card { transform: rotate(1.2deg); margin-left: 24px; }
.code-balls { display: flex; align-items: center; gap: 6px; margin: 12px 0 10px; }
.code-balls span {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ball); border: 2px solid var(--ink); font: 700 20px/1 var(--sans);
  box-shadow: 0 4px 8px rgba(0,0,0,.18);
}
.code-balls i { font-style: normal; font: 500 20px/1 var(--sans); color: var(--ink-faint); padding: 0 2px; }
.code-sub { margin: 0; font: italic 400 15px/1.3 var(--serif); color: var(--ink-soft); }
.bars { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 10px; }
.bar-w { font: 500 12px/1 var(--sans); letter-spacing: .12em; }
.bar { height: 10px; background: var(--margin); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--wrong); border-radius: 999px; transform-origin: left; }
.reveal.in .bar i { animation: grow 1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bar-n { font: 400 13px/1 var(--sans); text-align: right; font-variant-numeric: tabular-nums; }
.insight-foot { margin: 6px 0 0; font: italic 300 13.5px/1.3 var(--serif); color: var(--ink-faint); }

/* next game */
.next { text-align: center; display: flex; flex-direction: column; align-items: center; }
.next-balls { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; justify-content: center; }
.next-balls span {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ball); border: 2px solid var(--ink); font: 700 22px/1 var(--sans); box-shadow: 0 4px 10px rgba(0,0,0,.16);
}
.next-balls .blank { border-style: dashed; border-color: var(--ink-faint); background: transparent; box-shadow: none; }
.next-balls .q { background: var(--ink); color: var(--paper); animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .next-balls .q { animation: none; } }
.next-h { margin: 0 0 12px; font: italic 300 clamp(32px, 4.2vw, 50px)/1.1 var(--serif); }
.next p { color: var(--ink-soft); font-size: 18px; max-width: 30em; margin: 0 0 26px; }

/* footer */
.foot { border-top: 3px double var(--ink); padding: 32px 0 44px; }
.foot-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; }
.foot-links a { font-size: 14px; color: var(--ink-soft); text-decoration: none; }
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.foot-note { margin: 0; width: 100%; font-size: 13px; color: var(--ink-faint); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal, .reduce .reveal { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-copy { text-align: left; }
  .teach-grid { grid-template-columns: 1fr; gap: 48px; }
  .steps { grid-template-columns: 1fr; gap: 48px; max-width: 420px; margin: 0 auto; }
  .nav-links { display: none; }
  .nav-end { margin-left: auto; }
  .pass-steps { grid-template-columns: 1fr; max-width: 560px; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .nav-row { height: 58px; gap: 12px; }
  .wordmark-text { font-size: 12px; letter-spacing: .3em; }
  .nav .play-link { display: none; }
  .hero { padding: 32px 0 24px; }
  .lede { font-size: 17px; }
  .cta-row .btn-lg { flex: 1 1 100%; }
  .device { border-radius: 26px; padding: 14px 12px 12px; box-shadow: 0 24px 40px -24px rgba(0,0,0,.45), 0 0 0 6px var(--paper-2), 0 0 0 7.5px var(--ink); }
  #field { height: min(58vh, 430px); height: min(58svh, 430px); }
  .section { padding: 56px 0; }
  .entry { padding: 28px 22px; box-shadow: 6px 6px 0 var(--ink); }
  .index { columns: 1; }
  .plans { grid-template-columns: 1fr; }
  .pass { padding: 28px 22px 22px; box-shadow: 6px 6px 0 var(--right); }
  .pass-steps { grid-template-columns: 1fr; margin: 26px -22px 0; padding: 26px 22px 0; gap: 26px; }
  .pass-steps .btn { width: 100%; }
  .insight-card { margin-left: 0; }
  .bars li { grid-template-columns: 92px 1fr 40px; }
  .code-balls span { width: 38px; height: 38px; font-size: 17px; }
  .next-balls { gap: 6px; flex-wrap: nowrap; }
  .next-balls span { width: 36px; height: 36px; font-size: 16px; }
  .ticker-track span { font-size: 18px; }
  .overlay { padding: 18px 14px; }
  .res-time { font-size: 54px; }
  .share-row { flex-wrap: nowrap; gap: 6px; }
  .share-row .btn-green { padding: 0 14px; letter-spacing: .1em; font-size: 12px; }
  .res-more { flex-direction: column; gap: 0; }
  .res-more > span { display: none; }
  .foot-links { margin-left: 0; }
}
@media (max-width: 340px) {
  .wordmark-text { display: none; }
}
