/* Typing Meadow landing (2026-10-14). Values are the game's neon tokens (../../DESIGN.md), same names, so a change there
   can be copied here by name. Finger enamels and brass keep their meanings: orange is the pointer fingers, brass is
   "press me". */
@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --sky-top: #0d0722; --sky-mid: #1c0d3d; --horizon: #3a1460;
  --tin: #1d1238; --tin-2: #2a1a4f; --line: #3b2a66;
  --pewter: #dfe3df; --pewter-2: #c3b8dc; --pewter-3: #8f82ad;
  --brass-hi: #e2bd52; --brass-deep: #9c7d26; --btn-face-hover: #ecc962;
  --glow: #ff5fc8; --glow-2: #4ff0ff;
  --li: #ec8f51; --th: #d6d1cd; --wrong: #e5484d;
  --text: var(--pewter); --text-soft: var(--pewter-2); --text-muted: var(--pewter-3); --text-on-key: #10141f; --text-on-brass: #1a1408;
  --display: "Fredoka", system-ui, sans-serif; --body: "Inter", system-ui, sans-serif;
  --radius-panel: 16px; --radius-button: 14px; --radius-tile: 12px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1); --dur-press: .1s; --dur-hover: .15s; --dur-arrive: .7s;
  --shadow-panel: 0 18px 40px -12px rgba(4, 2, 12, .7), 0 0 0 1px color-mix(in srgb, var(--glow) 28%, transparent), 0 0 42px -10px color-mix(in srgb, var(--glow) 45%, transparent);
  --title-glow: 0 0 18px color-mix(in srgb, var(--glow) 55%, transparent);
  --wrap: 1120px;
}

* { box-sizing: border-box; }
html { background: var(--sky-top); color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100dvh; color: var(--text); font: 500 17px/1.55 var(--body);
  background:
    radial-gradient(1px 1px at 12% 18%, #fff8 50%, transparent), radial-gradient(1px 1px at 33% 8%, #fff6 50%, transparent),
    radial-gradient(1.5px 1.5px at 58% 22%, #fff7 50%, transparent), radial-gradient(1px 1px at 81% 12%, #fff8 50%, transparent),
    radial-gradient(1px 1px at 92% 30%, #fff5 50%, transparent), radial-gradient(1.5px 1.5px at 6% 40%, #fff5 50%, transparent),
    radial-gradient(120% 60% at 50% 46%, color-mix(in srgb, var(--glow) 22%, transparent), transparent 60%) 0 0 / 100% 900px no-repeat,
    linear-gradient(var(--sky-top), var(--sky-mid) 520px, var(--horizon) 880px, var(--sky-top) 1500px) 0 0 / 100% 1500px no-repeat,
    var(--sky-top);
}
::selection { background: var(--pewter); color: var(--sky-top); }
a { color: var(--brass-hi); text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
a:hover { color: var(--btn-face-hover); }
:focus-visible { outline: 3px solid var(--brass-hi); outline-offset: 3px; border-radius: 6px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; text-wrap: balance; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); text-shadow: var(--title-glow); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); font-weight: 600; }
p { margin: 0 0 1em; max-width: 65ch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; padding: 8px 14px; background: var(--brass-hi); color: var(--text-on-brass); border-radius: 10px; z-index: 5; }
.skip:focus { top: 12px; }

/* buttons: brass with an edge that sinks on press, the game's .btn */
.btn {
  display: inline-block; font: 700 1.1rem/1 var(--display); color: var(--text-on-brass); text-decoration: none;
  background: var(--brass-hi); border-radius: var(--radius-button); padding: 14px 22px;
  box-shadow: 0 4px 0 var(--brass-deep), 0 0 26px -6px color-mix(in srgb, var(--brass-hi) 70%, transparent);
  transition: transform var(--dur-press) var(--ease), box-shadow var(--dur-press) var(--ease), background var(--dur-hover);
}
.btn:hover { background: var(--btn-face-hover); color: var(--text-on-brass); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--brass-deep), 0 0 26px -6px color-mix(in srgb, var(--brass-hi) 70%, transparent); }
.btn-big { font-size: clamp(1.2rem, 2.2vw, 1.45rem); padding: 18px 30px; }
.btn-small { font-size: 1rem; padding: 10px 16px; box-shadow: 0 3px 0 var(--brass-deep); }

.top { max-width: var(--wrap); margin: 0 auto; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1.35rem/1 var(--display); }
.brand img { border-radius: 10px; }
.brand:hover { color: #fff; }

main > section { max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 8vw, 96px) 20px 0; }

.hero { text-align: center; padding-top: clamp(28px, 5vw, 56px) !important; }
.hero-text { max-width: 820px; margin: 0 auto; }
.hero .lead { font-size: clamp(1.08rem, 1.8vw, 1.28rem); color: var(--text-soft); margin: 0 auto 1.6em; }
.cta { margin: 0 0 .6em; max-width: none; }
.small { font-size: .95rem; color: var(--text-muted); margin: 0 auto; }
.hero .hero-shot { margin: clamp(36px, 5vw, 60px) auto 0; max-width: 1040px; }

.shot { margin: 0; border-radius: var(--radius-panel); overflow: hidden; box-shadow: var(--shadow-panel); background: var(--sky-top); }

/* the one authored moment: the hero picture rises out of the horizon glow once, from a visible start */
@media (prefers-reduced-motion: no-preference) {
  .hero-shot { animation: rise var(--dur-arrive) var(--ease) .15s both; }
  @keyframes rise { from { opacity: .35; transform: translateY(26px) scale(.985); } }
}

/* the try-it strip: the game's letter strip and keycaps, F and J in pointer orange */
.try { text-align: center; }
.try p { margin-left: auto; margin-right: auto; color: var(--text-soft); }
.strip { list-style: none; padding: 0; margin: 28px auto 26px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 10px; font: 500 clamp(1.9rem, 4vw, 2.6rem)/1 var(--display); }
.strip li { min-width: 1ch; color: color-mix(in srgb, var(--pewter-2) 50%, transparent); position: relative; padding-bottom: 10px; transition: color var(--dur-hover), transform var(--dur-hover) var(--ease); }
.strip li.done { color: var(--brass-hi); }
.strip li.next { color: #fff; transform: translateY(-4px); text-shadow: 0 0 14px var(--glow-2); }
.strip li.next::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; border-radius: 2px; background: var(--li); }
.strip li.miss { animation: shake .28s var(--ease); }
.pads { display: flex; justify-content: center; gap: clamp(18px, 6vw, 56px); }
.pad {
  --k: clamp(78px, 16vw, 104px);
  width: var(--k); height: var(--k); border: 0; border-radius: calc(var(--k) * .18); cursor: pointer; position: relative;
  font: 600 calc(var(--k) * .4)/1 var(--display); color: var(--text-on-key);
  background: linear-gradient(color-mix(in srgb, var(--li) 88%, #fff), var(--li));
  box-shadow: 0 5px 0 color-mix(in srgb, var(--li) 55%, #000), 0 0 30px -6px var(--li);
  transition: transform var(--dur-press) var(--ease), box-shadow var(--dur-press) var(--ease);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.pad i { position: absolute; left: 50%; bottom: 16%; width: 24%; height: 5px; margin-left: -12%; border-radius: 3px; background: color-mix(in srgb, var(--text-on-key) 55%, transparent); }
.pad.next { outline: 3px solid #fff; outline-offset: 4px; }
.pad:focus-visible { outline: 3px solid var(--brass-hi); outline-offset: 4px; }
.pad.down, .pad:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--li) 55%, #000), 0 0 40px -4px var(--li); }
.pad.miss { animation: shake .28s var(--ease); }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.said { margin-top: 26px !important; min-height: 3.2em; color: var(--text-soft); font-variant-numeric: tabular-nums; }
.said b { color: var(--brass-hi); font-weight: 600; }
.again { font: 600 1rem/1 var(--body); color: var(--text); background: none; border: 2px solid var(--line); border-radius: var(--radius-tile); padding: 10px 16px; margin-left: 8px; cursor: pointer; transition: border-color var(--dur-hover); }
.again:hover { border-color: var(--text-muted); }

.how { display: grid; gap: clamp(48px, 7vw, 88px); }
.row { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.row.flip > figure { order: 2; }
.row p { color: var(--text-soft); }

.teach > p { color: var(--text-soft); }
.worlds { list-style: none; counter-reset: w; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.worlds li { counter-increment: w; display: grid; grid-template-columns: 1.6em 1fr; column-gap: 6px; row-gap: 2px; align-items: baseline; padding: 14px 16px; border-radius: var(--radius-tile); background: linear-gradient(var(--tin-2), var(--tin)); border: 1px solid var(--line); }
.worlds li::before { content: counter(w); grid-row: span 2; font: 700 1.05rem/1.2 var(--display); color: var(--brass-hi); }
.worlds b { font: 600 1.08rem/1.2 var(--display); }
.worlds span { color: var(--text-muted); font-size: .9rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

.tunes { display: grid; grid-template-columns: 1fr 250px; gap: clamp(28px, 5vw, 64px); align-items: center; }
.tunes p { color: var(--text-soft); }
.phone { margin: 0; border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-panel); border: 6px solid #120b26; }

.grownups ul { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 40px; }
.grownups li { color: var(--text-soft); padding-left: 22px; position: relative; max-width: 52ch; }
.grownups li::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 9px; border-radius: 50%; background: var(--brass-hi); box-shadow: 0 0 10px var(--brass-hi); }
.grownups li b { color: var(--text); font-weight: 600; display: block; }

.faq details { border-bottom: 1px solid var(--line); max-width: 780px; }
.faq summary { cursor: pointer; padding: 18px 32px 18px 0; font: 600 1.15rem/1.3 var(--display); list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.5rem; color: var(--brass-hi); transition: transform var(--dur-hover) var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: #fff; }
.faq details p { color: var(--text-soft); }

.foot { max-width: var(--wrap); margin: clamp(64px, 9vw, 112px) auto 0; padding: 28px 20px 40px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: .95rem; }
.foot p { margin: 0 0 .4em; }

.lost { text-align: center; min-height: 70dvh; display: grid; place-content: center; }

@media (max-width: 860px) {
  .row, .tunes { grid-template-columns: 1fr; }
  .row.flip > figure { order: 0; }
  .tunes .phone { max-width: 260px; margin: 0 auto; }
  .grownups ul { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .top .btn-small { padding: 9px 12px; }
  .brand { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
