/* Brain Stretch marketing site. Tactile Flat: solid fills, soft shadows, pieces you could pick up.
   The base rules are the complete static page. Anything that moves sits behind html.motion. */

@font-face { font-family: "GT Maru"; src: url("../fonts/GTMaruRegular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "GT Maru"; src: url("../fonts/GTMaruMedium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "GT Maru"; src: url("../fonts/GTMaruBold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #0F1014; --cream: #FFF8EC; --white: #FFFFFF;
  --blue: #0072B2; --blue-lip: #00527F; --sky: #56B4E9; --amber: #E69F00; --plum: #5B2A4E; --plum-deep: #40203A;
  --deep-1: #18618C; --deep-2: #0E4C73; --deep-3: #0A3754;
  --sunken: #F5EBDA; --border: #E6DCCB; --text-2: #4A4B55; --muted: #62636E; --link: #0068A2;
  --d-surface: #1A1B21; --d-raised: #24262E; --d-border: #2E3039; --d-text-2: #C9C2B6; --d-muted: #A39D93;
  --garden-wall: #FDF1DC; --sage: #98AC87; --sage-deep: #55705A; --sage-ink: #33493A; --sage-light: #C2CDA3; --sage-pale: #E4E9CC;
  --green: #009E73; --green-lip: #007555;
  --font: "GT Maru", ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --spring: cubic-bezier(.3, 1.55, .5, 1);
  --out: cubic-bezier(.2, .8, .2, 1);
  --gutter: clamp(20px, 5vw, 72px);
  --wrap: 1440px;
  --edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  --pegs: radial-gradient(circle at 1.5px 1.5px, rgb(255 255 255 / .13) 1.6px, transparent 2px);
  --dock: 82px; /* the bottom bar and its gap: sticky stages keep their content clear of it */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
html.motion { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-weight: 400; font-size: clamp(1.0625rem, .98rem + .3vw, 1.25rem);
  line-height: 1.45; color: var(--ink); background: var(--ink); overflow-x: clip;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, video, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
kbd { font: inherit; }
:focus-visible { outline: 3px solid var(--focus, var(--blue)); outline-offset: 3px; border-radius: 8px; }

.sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--cream); font-weight: 700; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* Outlined Black headlines: one SVG per word, so they wrap like text and never wait on a font. */
.hl { display: flex; flex-wrap: wrap; gap: 0 .23em; }
.br { flex: 0 0 100%; height: 0; }
.wm { display: block; overflow: hidden; }
.wi { display: block; }
.w { display: block; width: calc(var(--w) * 1em); height: 1.1em; fill: currentColor; overflow: visible; }
.accent { color: var(--accent, currentColor); }

.motion .reveal .wi { transform: translateY(112%) rotate(6deg); transform-origin: 0 100%; }
.motion .reveal.is-in .wi { transform: none; transition: transform .9s var(--spring); transition-delay: calc(var(--i) * 55ms); }

.eyebrow { font-weight: 700; font-size: clamp(.8125rem, .78rem + .15vw, .9375rem); letter-spacing: .1em; text-transform: uppercase; color: var(--eyebrow, var(--blue)); margin-bottom: .9em; }
.h2 { font-size: clamp(2.5rem, 1.4rem + 4.1vw, 5.25rem); letter-spacing: 0; line-height: 1; font-weight: 400; }
.h2--xl { font-size: clamp(3rem, 1.5rem + 5.6vw, 6.75rem); }
.h3 { font-size: clamp(1.9rem, 1.3rem + 1.9vw, 3.1rem); font-weight: 400; }
.lede { font-size: clamp(1.0625rem, 1rem + .42vw, 1.375rem); line-height: 1.42; color: var(--lede, var(--text-2)); margin-top: 1.05em; max-width: 34em; }

/* Buttons feel like pieces: a lip below, a squash on press. */
.btn { -webkit-tap-highlight-color: transparent; touch-action: manipulation; cursor: pointer; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 56px; padding: .7em 1.35em;
  border: 0; border-radius: 18px; font-weight: 700; font-size: 1.0625rem; text-decoration: none; line-height: 1.1;
  transition: transform .22s var(--spring), box-shadow .18s ease, background-color .2s ease;
}
.btn svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--spring); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.96) translateY(3px); }
.btn--ghost { color: var(--cream); background: rgb(255 248 236 / .1); box-shadow: inset 0 0 0 2px rgb(255 248 236 / .55); }
.btn--ghost:hover { background: rgb(255 248 236 / .18); }
.btn--blue { color: var(--white); background: var(--blue); box-shadow: 0 5px 0 var(--blue-lip), 0 16px 26px -10px rgb(0 82 127 / .7); }
.btn--blue:active { box-shadow: 0 2px 0 var(--blue-lip), 0 8px 14px -8px rgb(0 82 127 / .7); }
.btn--line { color: var(--cream); background: transparent; box-shadow: inset 0 0 0 2px rgb(255 248 236 / .6); }
.btn--sage { color: var(--cream); background: var(--sage-deep); box-shadow: 0 5px 0 var(--sage-ink), 0 16px 24px -12px rgb(51 73 58 / .7); }
.btn--sage:active { box-shadow: 0 2px 0 var(--sage-ink); }

/* Store badges: official art, so no hover, tilt or animation. The gap and the bar's padding keep the clear space both stores ask for, a quarter of the badge height. */
.badges { --badge: 56px; display: flex; flex-wrap: wrap; align-items: center; gap: calc(var(--badge) * .25); }
.badge { display: block; flex: none; border-radius: 7px; -webkit-tap-highlight-color: transparent; }
.badge img { width: auto; max-width: none; height: var(--badge); }
/* Google's file carries 41 px of clear space around a 168 px badge. The file stays untouched: these numbers size the visible badge to match Apple's. */
.badge--google img { height: calc(var(--badge) * 250 / 168); margin: calc(var(--badge) * -41 / 168); }
[data-os="ios"] .badge--google, [data-os="android"] .badge--apple { display: none; }

/* The iPhone test signup popup. Tally's form sits on the cream through a transparent frame. */
.testform { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: var(--cream); box-shadow: 0 8px 0 #D9CBB2, 0 30px 70px -20px rgb(4 22 36 / .7); overflow: hidden; }
.testform[open] { display: flex; flex-direction: column; }
.testform::backdrop { background: rgb(4 22 36 / .62); }
.motion .testform[open] { animation: testform-in .34s var(--spring) both; }
@keyframes testform-in { from { opacity: 0; transform: translateY(26px) scale(.97); } }
html:has(.testform[open]) { overflow: hidden; }
.testform:focus { outline: 0; }
/* 32 px lines the title up with the fields, which sit inside Tally's own padding. */
.testform__head { position: relative; flex: none; padding: 26px 62px 0 32px; }
.testform__title { font-size: 1.75rem; line-height: 1.05; }
.testform__sub { margin-top: .45em; font-size: 1rem; line-height: 1.32; color: var(--text-2); }
.testform__close { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; color: var(--ink); background: transparent; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.testform__close:hover { background: rgb(15 16 20 / .07); }
.testform__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
.testform__frame { position: relative; flex: 1 1 auto; min-height: 0; height: 484px; }
.testform__frame iframe { display: block; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity .2s ease; }
.testform__frame.is-ready iframe { opacity: 1; }
.testform__wait { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--text-2); font-size: 1rem; }
.is-ready .testform__wait { display: none; }
/* Tally's own thanks page advertises Tally, so a sent form swaps to this. */
.testform__done { display: none; flex-direction: column; align-items: flex-start; padding: 32px; }
.testform.is-done .testform__head, .testform.is-done .testform__frame { display: none; }
.testform.is-done .testform__done { display: flex; }
.testform__back { margin-top: 22px; }

/* Marks: a category colour, always with its shape. */
.mark { display: inline-flex; align-items: center; justify-content: center; width: 2.4em; height: 2.4em; border-radius: .72em; background: var(--c); color: var(--on); flex: none; box-shadow: inset 0 -.14em 0 rgb(15 16 20 / .16), inset 0 .1em 0 rgb(255 255 255 / .22); }
.mark svg { width: 56%; height: 56%; fill: currentColor; overflow: visible; }

/* Nav pill */
.nav {
  position: fixed; z-index: 50; top: 14px; left: 50%; display: flex; align-items: center; gap: clamp(10px, 2vw, 26px);
  width: min(calc(100vw - 24px), 900px); padding: 8px 8px 8px 20px; border-radius: 999px;
  background: var(--nav-bg); color: var(--nav-fg); box-shadow: 0 10px 30px -10px rgb(15 16 20 / .4), 0 1px 0 rgb(255 255 255 / .08) inset;
  transform: translate(-50%, 0); transition: transform .5s var(--spring), opacity .3s ease, background-color .4s ease, color .4s ease;
  --nav-bg: var(--white); --nav-fg: var(--ink); --nav-cta: var(--ink); --nav-cta-fg: var(--cream);
}
.js .nav:not(.on), .in-round .nav { transform: translate(-50%, -160%); opacity: 0; visibility: hidden; }
.nav[data-tone="ink"], .nav[data-tone="plum"] { --nav-bg: var(--d-raised); --nav-fg: var(--cream); --nav-cta: var(--cream); --nav-cta-fg: var(--ink); --focus: var(--sky); }
.nav[data-tone="plum"] { --nav-bg: var(--plum-deep); }
.nav[data-tone="hero"] { --nav-bg: var(--deep-3); --nav-fg: var(--cream); --nav-cta: var(--amber); --nav-cta-fg: var(--ink); --focus: var(--sky); }
.nav[data-tone="sky"] { --nav-bg: var(--cream); }
.nav[data-tone="garden"] { --nav-bg: var(--white); --nav-cta: var(--sage-deep); }
.nav__brand { flex: none; color: inherit; }
.wordmark { width: 148px; height: 17px; fill: currentColor; }
.nav__links { display: flex; gap: clamp(4px, 1.2vw, 16px); margin-inline: auto; }
.nav__links a { display: block; padding: .5em .7em; font-weight: 500; font-size: .95rem; text-decoration: none; border-radius: 10px; transition: background-color .2s ease; }
.nav__links a:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.nav__cta { flex: none; padding: .72em 1.2em; border-radius: 999px; background: var(--nav-cta); color: var(--nav-cta-fg); font-weight: 700; font-size: .95rem; text-decoration: none; transition: transform .22s var(--spring), background-color .4s ease, color .4s ease; }
.nav__cta:hover { transform: scale(1.05); }
.nav__cta:active { transform: scale(.95); }

/* Waves */
.wave { position: absolute; z-index: 3; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(58px, 9.6vw, 150px); pointer-events: none; }
.wave__b { fill: var(--wave-back); }
.wave__f { fill: var(--wave-to); }

/* Pieces: the category shapes, thick enough to pick up */
.piece { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); color: var(--c); }
.piece svg { width: 100%; height: 100%; overflow: visible; transform: rotate(var(--r)); filter: drop-shadow(0 12px 10px rgb(4 22 36 / .34)); }
.piece use { fill: var(--c); }
.piece .lip { fill: var(--l); }

/* 1. Hero */
.hero {
  --wave-to: var(--cream); --wave-back: rgb(86 180 233 / .5); --focus: var(--sky); --accent: var(--amber);
  position: relative; isolation: isolate; min-height: 100dvh; display: flex; flex-direction: column; overflow: clip; color: var(--cream);
  background: var(--pegs) 0 0 / 34px 34px, linear-gradient(112deg, var(--deep-1) 0%, var(--deep-2) 44%, var(--deep-3) 100%);
}
.hero__pegs { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero__pieces { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero__pieces .piece { pointer-events: auto; cursor: grab; touch-action: pan-y; }
.hero__pieces .piece:active { cursor: grabbing; }
.hero__top { position: relative; z-index: 4; padding-top: clamp(16px, 2.6vw, 30px); }
.hero__brand { display: inline-flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; }
.hero__brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 6px 14px -4px rgb(4 22 36 / .6); }
.hero__brand .wordmark { width: 176px; height: 20px; }
.hero__grid {
  position: relative; z-index: 2; flex: 1; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  align-items: center; gap: clamp(16px, 3vw, 48px); padding-bottom: clamp(70px, 11vw, 150px);
}
.hero__grid.wrap, .hero__top.wrap { max-width: 1640px; }
.hero__title { font-size: min(clamp(3.1rem, .9rem + 6.5vw, 8.6rem), 13dvh); font-weight: 400; line-height: .98; }
.hero__sub { margin-top: 1em; max-width: 25em; font-size: clamp(1.125rem, 1rem + .6vw, 1.5rem); line-height: 1.34; color: #E3EDF3; font-weight: 500; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: clamp(22px, 2.6vw, 34px); }
.hero__mascot { position: relative; justify-self: center; width: min(100%, 620px, 62dvh); }
.spark { position: relative; aspect-ratio: 520 / 560; }
.spark-svg { width: 100%; height: 100%; overflow: visible; }
.spark--hero { cursor: pointer; filter: drop-shadow(0 26px 22px rgb(4 22 36 / .35)); margin-top: 8%; }
.bubble {
  position: absolute; z-index: 3; top: 3%; right: -2%; max-width: 15em; padding: .75em 1.05em; border-radius: 22px 22px 22px 6px;
  background: var(--cream); color: var(--ink); font-weight: 500; font-size: clamp(.95rem, .85rem + .4vw, 1.15rem); line-height: 1.22;
  box-shadow: 0 5px 0 #E1D3B8, 0 18px 26px -12px rgb(4 22 36 / .55);
  transition: transform .35s var(--spring), opacity .2s ease;
}
.bubble.is-out { transform: scale(.8) translateY(8px); opacity: 0; }
.motion .hero__sub, .motion .hero__cta { animation: rise .9s var(--out) both; }
.motion .hero__sub { animation-name: rise-sub; animation-delay: .55s; }
.motion .hero__cta { animation-delay: .68s; }
.motion .hero__mascot { animation: drop 1.15s var(--spring) .2s both; }
.motion .hero__pieces .piece svg { animation: popin .8s var(--spring) both; animation-delay: calc(.55s + var(--n, 0) * 70ms); }
.motion .bubble { animation: popin .6s var(--spring) 1.3s backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
/* Starts at .01, not 0: it looks the same, and browsers can then count this line as the first large paint. */
@keyframes rise-sub { from { opacity: .01; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes drop { from { opacity: 0; translate: 0 -46px; scale: .9; } to { opacity: 1; translate: 0 0; scale: 1; } }
@keyframes popin { from { opacity: 0; scale: .3; } to { opacity: 1; scale: 1; } }

/* Phones */
.phone {
  --w: 300px; position: relative; flex: none; width: var(--w); aspect-ratio: .505; padding: calc(var(--w) * .026);
  border-radius: calc(var(--w) * .142); background: #111217;
  box-shadow: inset 0 0 0 1.5px #2F313A, 0 34px 60px -24px rgb(15 16 20 / .55), 0 10px 22px -8px rgb(15 16 20 / .28);
}
.phone__btn { position: absolute; right: -2px; top: 24%; width: 3px; height: 11%; border-radius: 0 3px 3px 0; background: #2A2C34; }
/* Isolated, so layers inside a phone can never stack above things placed in front of the phone, like Spark.
   The backing stops 1px short of the rounded edge: at the edge itself it bled through as a thin light line.
   Safari clips each painted layer on its own, so nothing inside a rounded clip may carry a colour under a
   full-size layer of its own. Chromium hides this, so check rounded corners in Safari. */
.phone__screen { position: relative; isolation: isolate; width: 100%; height: 100%; padding: 1px; overflow: hidden; border-radius: calc(var(--w) * .118); background: var(--cream) content-box; container-type: inline-size; }
.phone__island { position: absolute; z-index: 20; top: 2.6cqw; left: 50%; width: 25cqw; height: 6.4cqw; margin-left: -12.5cqw; border-radius: 99px; background: #0B0C10; }
.phone__video { width: 100%; height: 100%; object-fit: cover; background: var(--cream); }
/* The clip has no status bar, so it sits below the island. #100F14 is the clip's own edge colour, which hides the join. */
.phone--clip .phone__screen { padding: calc(var(--w) * .095) 0 calc(var(--w) * .012); background: #100F14 border-box; }
.phone--clip .phone__video { background: #100F14; object-fit: contain; }

/* 2. Ritual */
.ritual { --wave-to: var(--ink); --wave-back: #3A3B42; position: relative; background: var(--cream); padding-bottom: clamp(90px, 13vw, 180px); }
.ritual__stage { padding-block: clamp(70px, 9vw, 120px) 40px; }
.ritual__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(28px, 6vw, 100px); }
.motion .ritual__track { height: 420vh; }
.motion .ritual__stage { position: sticky; top: 0; height: 100dvh; display: flex; align-items: center; padding-block: 86px calc(var(--dock) + 6px); overflow: clip; }
.ritual .h2 { font-size: clamp(2.5rem, 1.5rem + 3vw, 4.25rem); }
.ritual .lede { margin-top: .8em; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); }
.steps { display: grid; gap: 6px; margin-top: clamp(14px, 2vh, 26px); font-size: 1rem; }
.step { display: flex; align-items: center; gap: 14px; padding: 7px 12px 7px 8px; border-radius: 16px; transition: background-color .3s ease, transform .4s var(--spring); }
.step .mark { font-size: 1.05rem; }
.step__text { display: grid; line-height: 1.16; }
.step__text strong { font-weight: 700; }
.step__text span { color: var(--muted); font-size: .9em; }
.step__tick { width: 26px; height: 26px; margin-left: auto; fill: none; stroke: var(--green); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.motion .step__tick { opacity: 0; transform: scale(.4); transition: opacity .2s, transform .4s var(--spring); }
.motion .step .mark { filter: saturate(.55); opacity: .75; transition: filter .3s, opacity .3s; }
.motion .step.lit .step__tick { opacity: 1; transform: none; }
.motion .step.lit .mark { filter: none; opacity: 1; }
.motion .step.now { background: var(--white); box-shadow: 0 10px 22px -14px rgb(15 16 20 / .35); transform: translateX(6px); }
.ritual__done { margin-top: 14px; font-weight: 700; color: var(--green-lip); }
.motion .ritual__done { opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .4s var(--spring); }
.motion .ritual__done.on { opacity: 1; transform: none; }

.ritual__phone { position: relative; }
.phone--today { --w: min(calc((100dvh - 86px - var(--dock) - 6px) * .505), 366px); }
.today { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 720 / 1380; }
.today__shot { width: 100%; height: 100%; }
.today__cover { position: absolute; left: 0; right: 0; top: 11.2%; height: 45.9%; background: var(--cream); }
.today__wheel { position: absolute; left: 50%; top: 34.03%; width: 92.3%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.wheel { width: 100%; height: 100%; overflow: visible; }
.wedge { transition: transform .5s var(--spring), filter .4s ease; filter: drop-shadow(0 3px 6px rgb(15 16 20 / .22)); }
.wedge__shade { opacity: 0; transition: opacity .5s ease; }
.wedge__rim { fill: none; stroke: var(--rim); stroke-width: 3.4; transition: stroke-width .3s; }
.wedge__badge { fill: var(--c); stroke: var(--cream); stroke-width: 2.6; transition: fill .3s; }
.wedge__glyph { fill: var(--on); stroke: none; transition: fill .3s, stroke .3s; }
.motion .wedge:not(.lit) .wedge__shade { opacity: .38; }
.motion .wedge:not(.lit) .wedge__badge { fill: var(--cream); stroke: var(--rim); }
.motion .wedge:not(.lit) .wedge__glyph { fill: none; stroke: var(--rim); stroke-width: 2.4; }
.motion .wedge.pulse { transform: scale(1.06); filter: drop-shadow(0 6px 14px var(--c)); }
.today__hub { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; }
.today__title { font-size: 9.6cqw; line-height: .92; display: grid; justify-items: center; }
.today__title .w { height: 1.04em; }
.today__hub p { margin-top: .2em; font-size: 4.9cqw; font-weight: 700; color: var(--text-2); line-height: 1; }

.float {
  position: absolute; z-index: 4; display: flex; align-items: center; gap: .6em; padding: .55em .95em .55em .6em; border-radius: 18px;
  background: var(--white); font-weight: 700; font-size: .98rem; white-space: nowrap; box-shadow: 0 16px 28px -14px rgb(15 16 20 / .4), 0 2px 0 rgb(15 16 20 / .04);
}
.float .mark { font-size: .95rem; }
.float--a { left: -36%; top: 16%; }
.float--b { right: -25%; bottom: 25%; }
.float--b svg { width: 26px; height: 26px; fill: var(--amber); }
.float.is-pop { animation: floatpop .55s var(--spring); }
@keyframes floatpop { from { transform: scale(.72) rotate(-4deg); } to { transform: none; } }
.spark--peek { position: absolute; z-index: 5; right: -21%; bottom: -3%; width: 37%; }

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); margin-top: clamp(30px, 5vw, 70px); }
.tile { --bg: var(--blue); --lip: var(--blue-lip); --fg: var(--white); display: grid; align-content: start; padding: clamp(22px, 3vw, 40px); border-radius: 34px; background: var(--bg); color: var(--fg); box-shadow: 0 8px 0 var(--lip), 0 30px 40px -24px rgb(15 16 20 / .5); container-type: inline-size; }
.tile--amber { --bg: var(--amber); --lip: #B47C00; --fg: var(--ink); }
.tile--plum { --bg: var(--plum); --lip: var(--plum-deep); --fg: var(--cream); }
/* 36cqw is the widest "100+" (2.73em) can go inside a tile; all three numbers share it so they stay one size. */
.tile__n { display: flex; min-height: 1.1em; font-size: min(clamp(5rem, 1.2rem + 8vw, 8.4rem), 36cqw); line-height: 1; }
.tile__u { margin-top: -.1em; font-weight: 700; line-height: 1.1; font-size: clamp(1.5rem, 1.1rem + 1vw, 2.25rem); }
.tile__l { margin-top: .3em; font-weight: 500; line-height: 1.25; font-size: clamp(1rem, .95rem + .25vw, 1.2rem); }
.motion .reveal-tile { opacity: 0; transform: translateY(40px) rotate(-3deg) scale(.92); }
.motion .reveal-tile.is-in { opacity: 1; transform: none; transition: transform .9s var(--spring), opacity .3s ease; transition-delay: calc(var(--n, 0) * 90ms); }

/* 3. Play */
.play { --wave-to: var(--plum); --wave-back: #36193096; --focus: var(--sky); --eyebrow: var(--sky); --lede: var(--d-text-2); --accent: var(--amber); position: relative; overflow: clip; isolation: isolate; color: var(--cream); background: var(--ink); padding-block: clamp(70px, 8vw, 110px) clamp(120px, 15vw, 210px); }
.play__beam { position: absolute; z-index: -1; left: 72%; top: 48%; width: 170vmax; height: 170vmax; margin: -85vmax 0 0 -85vmax; background: conic-gradient(from 0deg, transparent 0 14deg, #181A20 14deg 40deg, transparent 40deg 192deg, #181A20 192deg 218deg, transparent 218deg); border-radius: 50%; }
.motion .play__beam { animation: beam 46s linear infinite; }
@keyframes beam { to { transform: rotate(360deg); } }
.play__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(30px, 6vw, 100px); }
.play .lede { max-width: 27em; }
.play__notes { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 1.3em; font-size: .98rem; color: var(--d-muted); font-weight: 500; }
.play__notes li { display: flex; align-items: center; gap: 5px; }
.play__notes kbd { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--d-raised); color: var(--cream); font-weight: 700; font-size: .84rem; box-shadow: 0 2px 0 #000; }
.only-keys { display: none !important; }
@media (hover: hover) and (pointer: fine) { .only-keys { display: flex !important; } }
.play__stage { position: relative; }
.phone--game { --w: min(calc(92dvh * .505), 372px); background: #15161C; box-shadow: inset 0 0 0 1.5px #3A3C46, 0 40px 80px -30px #000; }
/* In front of the phone, but taps pass through him: his box overlaps the first colour tile. */
.spark--game { position: absolute; z-index: 3; left: -33%; bottom: 3%; width: 46%; pointer-events: none; filter: drop-shadow(0 18px 14px rgb(0 0 0 / .4)); }

/* Colour Clash, sized in cqw so it scales with the phone */
/* No double-tap zoom anywhere in the game or during a round: fast tapping zoomed Safari mid-round once. Pinch and scroll still work. */
.in-round { touch-action: manipulation; }
.cc { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 11.4cqw 3.8cqw 4.4cqw; color: var(--ink); --focus: var(--blue); -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.cc__hud { display: flex; align-items: center; gap: 3.4cqw; height: 9cqw; padding-inline: 1cqw; flex: none; }
.cc__time { flex: 1; display: flex; align-items: center; gap: 2.6cqw; }
.cc__timebar { flex: 1; height: 2.8cqw; border-radius: 99px; background: var(--sunken); overflow: hidden; }
.cc__timebar i { display: block; height: 100%; border-radius: 99px; background: var(--green); transform-origin: 0 50%; }
.cc__secs { width: 6cqw; font-weight: 700; font-size: 4.2cqw; color: var(--text-2); font-feature-settings: "tnum"; text-align: right; }
.cc__score { display: flex; align-items: center; gap: 1.6cqw; min-width: 13cqw; justify-content: flex-end; font-weight: 700; font-size: 6.6cqw; line-height: 1; font-feature-settings: "tnum"; }
.cc__score svg { width: 3.4cqw; height: 3.4cqw; fill: var(--green); }
.cc__score .is-pop { display: inline-block; animation: pop .3s var(--spring); }
.cc__panel { position: relative; flex: 1; min-height: 0; margin-top: 1.6cqw; border-radius: 5.6cqw; background: #0D1C27; overflow: hidden; }
.cc__scene { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; }
.cc__chip { position: absolute; top: 3cqw; left: 3cqw; padding: 1.4cqw 3cqw 1.6cqw; border-radius: 3.4cqw; background: var(--cream); line-height: 1.12; }
.cc__chip b { display: block; font-size: 5.2cqw; font-weight: 700; }
.cc__chip span { font-size: 3.3cqw; font-weight: 500; }
.cc__stim { position: absolute; left: 0; right: 0; top: 41%; display: grid; justify-items: center; gap: 1cqw; transform: translateY(-20%); }
.cc__stim.is-pop { animation: stim .24s var(--out); }
/* The countdown fades in the dark panel, exactly where the word is about to land. The word stays hidden until the clock starts. */
.cc__count { position: absolute; left: 0; right: 0; top: 41%; display: grid; justify-items: center; transform: translateY(-20%); color: var(--cream); font-size: 26cqw; font-weight: 700; line-height: 1.1; font-feature-settings: "tnum"; }
.cc__count[hidden] { display: none; }
.motion .cc__count.is-on { animation: count var(--tick, 700ms) ease-in-out both; }
@keyframes count { 0% { opacity: 0; } 24% { opacity: 1; } 76% { opacity: 1; } 100% { opacity: 0; } }
.cc[data-phase="count"] .cc__stim { visibility: hidden; }
@keyframes stim { from { opacity: .2; scale: .94; } to { opacity: 1; scale: 1; } }
.cc__word { font-size: 15.5cqw; height: 1.1em; width: calc(var(--w, 1.9) * 1em); fill: currentColor; overflow: visible; }
.cc__pips { display: flex; gap: 3cqw; }
.cc__pips svg { width: 4.2cqw; height: 4.2cqw; fill: currentColor; overflow: visible; }
.cc__why { position: absolute; left: 4cqw; right: 4cqw; bottom: 6cqw; min-height: 2.4em; color: var(--cream); font-size: 3.5cqw; font-weight: 500; line-height: 1.2; text-align: center; }
.cc__window { position: absolute; left: 4cqw; right: 4cqw; bottom: 2.6cqw; height: 1.4cqw; border-radius: 99px; background: #2C2C2E; overflow: hidden; }
.cc__window i { display: block; height: 100%; background: #A6D8C2; border-radius: 99px; transform-origin: 0 50%; }
.cc__hint { flex: none; padding: 1.8cqw 1cqw 1.8cqw; font-size: 3cqw; line-height: 1.2; text-align: center; color: var(--text-2); font-weight: 500; }
.cc__tiles { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.8cqw; }
.tilebtn {
  position: relative; display: grid; justify-items: center; align-content: center; gap: 1cqw; height: 23cqw; padding: 0; border: .7cqw solid var(--green); border-radius: 4.4cqw;
  background: var(--white); color: var(--text-2); font-size: 3.3cqw; font-weight: 500; line-height: 1; box-shadow: 0 1.1cqw 0 var(--green-lip), 0 2.6cqw 3.4cqw -2cqw rgb(15 16 20 / .35);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: transform .14s var(--out), background-color .12s ease, box-shadow .12s ease;
}
.tilebtn:active { transform: scale(.96) translateY(.6cqw); box-shadow: 0 .4cqw 0 var(--green-lip); }
.tilebtn__g { width: 9.6cqw; height: 9.6cqw; fill: currentColor; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; overflow: visible; }
.tilebtn__key { display: none; position: absolute; top: .8cqw; left: 1.2cqw; font-size: 2.6cqw; font-weight: 700; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .tilebtn__key { display: block; } }
.tilebtn.is-right { background: var(--green); color: var(--ink); animation: pop .3s var(--spring); }
.tilebtn.is-wrong { background: #F7DCCB; }
.tilebtn.is-answer { background: #BFE8D9; box-shadow: 0 0 0 .7cqw var(--green), 0 1.1cqw 0 var(--green-lip); }
.motion .tilebtn.is-wrong { animation: shake .36s ease; }
.cc[data-feedback="miss"] .cc__panel { box-shadow: inset 0 0 0 .8cqw #D55E00; }
.motion .cc[data-feedback="miss"] .cc__stim { animation: shake .3s ease; }
@keyframes pop { 0% { scale: .9; } 55% { scale: 1.06; } 100% { scale: 1; } }
@keyframes shake { 20% { translate: -1.6cqw 0; } 45% { translate: 1.4cqw 0; } 70% { translate: -.9cqw 0; } 100% { translate: 0 0; } }

.cc__over[hidden] { display: none; }
.motion .cc__over.is-leaving { opacity: 0; transition: opacity .24s ease; }
.cc__over { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12cqw 7cqw 8cqw; }
.motion .cc__end:not(.is-leaving) { animation: fadein .32s ease both; }
@keyframes fadein { from { opacity: 0; } }
.cc__start { background: linear-gradient(rgb(255 248 236 / 0) 36%, var(--cream) 57%), url("../img/world/lighthouse.webp") center top / 112% auto no-repeat, linear-gradient(var(--cream), var(--cream)) center bottom / 100% 70% no-repeat; justify-content: flex-end; } /* Cream hides the game below; it stops short of the top corners, where it would leak as a line. */
.cc__mark { font-size: 5.6cqw; }
.cc__kicker { margin-top: 2cqw; font-size: 3.6cqw; font-weight: 700; color: var(--text-2); }
.cc__title { font-size: 12.8cqw; font-weight: 400; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .2em; line-height: .98; }
.cc__rule { margin-top: 2cqw; max-width: 22em; font-size: 4.3cqw; line-height: 1.24; color: var(--text-2); font-weight: 500; }
.cc__go { --focus: var(--blue); width: 100%; margin-top: 5cqw; min-height: 15cqw; font-size: 5.6cqw; border-radius: 5cqw; }
.cc__len { margin-top: 3cqw; font-size: 3.5cqw; font-weight: 500; color: var(--muted); }
.cc__end { --focus: var(--sky); color: var(--cream); background: var(--pegs) 0 0 / 7cqw 7cqw, linear-gradient(160deg, var(--deep-1), var(--deep-3)); }
.cc__burst { position: absolute; inset: 0; pointer-events: none; }
.cc__burst .piece svg { filter: drop-shadow(0 1.6cqw 1.2cqw rgb(4 22 36 / .35)); }
.motion .cc__burst .piece svg { animation: popin .7s var(--spring) both; animation-delay: calc(.15s + var(--n) * 70ms); }
.cc__end > *:not(.cc__burst) { position: relative; }
.cc__got { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 .22em; font-size: 16cqw; line-height: 1; }
.cc__num { display: flex; color: var(--amber); }
.cc__beat { margin-top: 3cqw; font-size: 6.4cqw; font-weight: 700; line-height: 1.16; }
.cc__best { min-height: 1.3em; margin-top: 2cqw; font-size: 3.7cqw; color: #D6E3EC; font-weight: 500; }
.badges--game { --badge: max(40px, 11.4cqw); justify-content: center; margin-top: 3cqw; }
.cc__again { width: 100%; margin-top: 3.6cqw; min-height: 13cqw; }

/* 4. Friends */
.friends { --wave-to: var(--cream); --wave-back: #A5688A; --focus: var(--sky); --eyebrow: #F1C8DD; --lede: #EBDCE5; position: relative; color: var(--cream); background: var(--plum); padding-bottom: clamp(90px, 13vw, 180px); }
.friends__stage { padding-top: clamp(70px, 9vw, 120px); }
.friends__head .h2 { font-size: clamp(2.5rem, 1.5rem + 3.7vw, 4.9rem); max-width: 11.5em; }
.dashes { display: none; gap: 10px; margin-top: clamp(20px, 2.6vw, 34px); }
.dashes i { position: relative; display: block; width: 56px; height: 6px; border-radius: 99px; background: rgb(255 248 236 / .22); overflow: hidden; }
.dashes i::after { content: ""; position: absolute; inset: 0; border-radius: 99px; background: var(--sky); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }
.fph { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(30px, 6vw, 100px); max-width: var(--wrap); margin: clamp(30px, 5vw, 60px) auto 0; padding-inline: var(--gutter); }
.fph__title { font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2.25rem); font-weight: 700; line-height: 1.1; }
.fph__text p { margin-top: .5em; max-width: 26em; font-size: clamp(1.0625rem, 1rem + .4vw, 1.3125rem); line-height: 1.4; color: var(--lede); }
.phone--dark { --w: min(calc(70dvh * .505), 320px); background: #0B0C10; box-shadow: inset 0 0 0 1.5px #493349, 0 40px 80px -30px rgb(20 6 16 / .9); }

.motion .friends__track { height: 460vh; }
.motion .friends__stage { position: sticky; top: 0; height: 100dvh; overflow: clip; padding-top: 0; }
.motion .friends__head { position: absolute; z-index: 3; top: clamp(84px, 13vh, 150px); left: var(--edge); width: min(52vw, 660px); max-width: none; padding: 0; }
.motion .dashes { display: flex; }
.motion .friends__phases { position: absolute; inset: 0; }
.motion .fph { position: absolute; inset: 0; display: block; max-width: none; margin: 0; padding: 0; visibility: hidden; }
.motion .fph.on, .motion .fph.prev { visibility: visible; }
.motion .fph__text { position: absolute; left: var(--edge); bottom: clamp(calc(var(--dock) + 14px), 17vh, 170px); width: min(46vw, 560px); opacity: 0; transform: translateY(20px); transition: opacity .3s ease, transform .5s var(--spring); }
.motion .fph.on .fph__text { opacity: 1; transform: none; }
.motion .fph__phone { position: absolute; right: var(--edge); top: 50%; transform: translateY(-50%); opacity: 0; transition: opacity .35s ease; }
.motion .fph.on .fph__phone, .motion .fph.prev .fph__phone { opacity: 1; }
.motion .fph.on { z-index: 2; }
.motion .phone--dark { --w: min(calc((100dvh - 180px) * .505), 372px); }

.fs { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 13cqw 6cqw 6cqw; background: var(--ink); color: var(--cream); --mark-size: 4.6cqw; }
.fs .mark { font-size: var(--mark-size); }
.fs__kick { font-size: 3.7cqw; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--sky); }
.fs__big { margin-top: 1cqw; font-size: 7.2cqw; font-weight: 700; line-height: 1.1; }
.fs__game { display: flex; align-items: center; gap: 3cqw; margin-top: 4cqw; padding: 3cqw; border-radius: 4.4cqw; background: var(--d-surface); }
.fs__game div { display: grid; line-height: 1.2; }
.fs__game b { font-size: 4.7cqw; font-weight: 700; }
.fs__game span { font-size: 3.5cqw; color: var(--d-text-2); }
.lane { margin-top: 4cqw; }
.ladder { display: grid; justify-items: center; gap: 1cqw; margin-top: 4cqw; padding: 3cqw 0; border-radius: 4.4cqw; background: var(--d-surface); }
.ladder span { font-size: 4.4cqw; font-weight: 700; letter-spacing: .34em; padding-left: .34em; line-height: 1.16; color: var(--d-text-2); transition: color .25s; }
.motion .ladder span { color: #8E8F97; }
.motion .ladder span.on { color: var(--cream); }
.motion .ladder span:last-child.on { color: var(--amber); }
.lane__head { display: flex; justify-content: space-between; align-items: baseline; font-size: 4.3cqw; }
.lane__head b { font-weight: 700; }
.lane__head span { font-weight: 700; font-size: 5.4cqw; font-feature-settings: "tnum"; }
.lane__track { position: relative; height: 11cqw; margin-top: 1.4cqw; border-radius: 99px; background: var(--d-surface); box-shadow: inset 0 0 0 .5cqw var(--d-border); }
.lane__fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--p, 1) * 100%); min-width: 11cqw; border-radius: 99px; background: var(--amber); }
.lane--ana .lane__fill { background: #CC79A7; }
.lane__token { position: absolute; top: 50%; left: 0; transform: translate(calc(var(--p, 1) * 88cqw - 100%), -50%); padding-right: .9cqw; }
.lane__token .mark { box-shadow: 0 0 0 .6cqw var(--ink); }
.fs__verdict { margin-top: 3.4cqw; padding: 2.6cqw 3cqw; border-radius: 3.6cqw; background: var(--green); color: var(--ink); text-align: center; font-weight: 700; font-size: 4.3cqw; }
.motion .fs__verdict { opacity: 0; transform: scale(.85); transition: opacity .2s, transform .4s var(--spring); }
.motion .fs__verdict.on { opacity: 1; transform: none; }
.fs__button { margin-top: auto; padding: 3.4cqw; border-radius: 4.6cqw; background: var(--blue); color: var(--white); text-align: center; font-weight: 700; font-size: 4.7cqw; box-shadow: 0 1.2cqw 0 var(--blue-lip); }
.fs__note { margin-top: 4cqw; font-size: 3.7cqw; line-height: 1.3; color: var(--d-text-2); }
.days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2cqw; margin-top: 4cqw; }
.days span { padding: 2cqw 0; border-radius: 3cqw; background: var(--d-surface); text-align: center; font-size: 4cqw; font-weight: 700; color: var(--d-text-2); transition: background-color .3s, color .3s; }
.days span.on { background: var(--amber); color: var(--ink); }
.table { margin-top: 4cqw; }
.table li { display: flex; align-items: center; gap: 2.6cqw; height: 17cqw; padding-inline: 3cqw; border-radius: 3.6cqw; background: var(--d-surface); font-size: 4.5cqw; font-weight: 500; margin-bottom: 2cqw; }
.table__p { width: 4cqw; font-weight: 700; color: var(--d-text-2); }
.table em { margin-left: auto; font-style: normal; font-weight: 700; font-feature-settings: "tnum"; }
.table li[data-name="You"] { background: var(--d-raised); box-shadow: inset 0 0 0 .5cqw var(--amber); }
.motion .table { position: relative; height: 76cqw; }
.motion .table li { position: absolute; left: 0; right: 0; top: 0; margin: 0; transform: translateY(calc(var(--row, 0) * 19cqw)); transition: transform .55s var(--spring); }
.pass { display: grid; justify-items: center; align-content: center; flex: 1; margin-top: 4cqw; border-radius: 6cqw; background: var(--d-surface); text-align: center; }
.pass__to { font-size: 4.6cqw; color: var(--d-text-2); font-weight: 500; }
.pass__name { font-size: 20cqw; font-weight: 700; line-height: 1.08; color: var(--amber); }
.pass__hand { width: 14cqw; height: 14cqw; display: grid; place-items: center; margin-top: 2cqw; border-radius: 50%; background: var(--blue); box-shadow: 0 1.1cqw 0 var(--blue-lip); }
.pass__hand svg { width: 8cqw; height: 8cqw; fill: none; stroke: var(--white); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.seats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2cqw; margin-top: 4cqw; }
.seats li { display: grid; justify-items: center; gap: 1.2cqw; padding: 2.2cqw 0; border-radius: 3.6cqw; font-size: 3.6cqw; font-weight: 700; color: var(--d-text-2); transition: background-color .25s, color .25s; }
.seats li.on { background: var(--d-raised); color: var(--cream); }
.fs--party .fs__note { margin-top: 3cqw; }

/* 5. Worlds */
.worlds { --wave-to: var(--sky); --wave-back: #A9D8F2; position: relative; overflow: clip; background: var(--cream); padding-block: clamp(50px, 6vw, 80px) clamp(100px, 13vw, 180px); }
.worlds__row { display: flex; align-items: center; gap: clamp(20px, 2.6vw, 38px); padding: 30px var(--gutter) 40px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
.worlds__row::-webkit-scrollbar { display: none; }
.worlds__row > li { flex: none; scroll-snap-align: center; }
.worlds__intro { width: min(calc(100vw - var(--gutter) * 2), 560px); margin-right: clamp(10px, 3vw, 40px); }
.worlds__hint { display: flex; align-items: center; gap: .5em; margin-top: 1.3em; font-weight: 700; color: var(--blue); }
.worlds__hint svg { width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.motion .worlds__hint svg { animation: nudge 1.4s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(7px); } }
.hint-scroll { display: none; }
.worlds__video .phone { --w: min(calc(80dvh * .505), 340px); transform: rotate(2deg); }
.world {
  position: relative; display: flex; flex-direction: column; width: clamp(262px, min(30vw, 47dvh), 430px); border-radius: 32px; overflow: hidden;
  transform: rotate(var(--tilt)); box-shadow: 0 7px 0 color-mix(in srgb, var(--c) 78%, #0F1014), 0 34px 44px -26px rgb(15 16 20 / .45);
  transition: transform .45s var(--spring), box-shadow .3s ease;
}
.world:hover, .world:focus-within { transform: rotate(0deg) translateY(-12px) scale(1.025); }
.world__art { aspect-ratio: 1 / .86; overflow: hidden; }
.world__art img { width: 118%; max-width: none; height: 100%; margin-left: -9%; object-fit: cover; }
.world__body { flex: 1; padding: 16px 20px 20px; background: var(--white); }
.world__head { display: flex; align-items: center; gap: 12px; }
.world__head .mark { font-size: 1.15rem; }
.world__cat { font-size: .88rem; font-weight: 500; color: var(--muted); line-height: 1.2; }
.world__name { font-size: 1.5rem; font-weight: 700; line-height: 1.12; }
.world__tag { margin-top: 10px; font-size: 1.04rem; font-weight: 500; line-height: 1.25; }
.world__sound { margin-top: 6px; font-size: .9rem; color: var(--muted); line-height: 1.25; }
.is-pinned .worlds__row { width: max-content; overflow: visible; padding-inline: var(--edge) 40vw; }
.is-pinned .hint-scroll { display: inline; }
.is-pinned .hint-swipe { display: none; }
.is-pinned.worlds { padding-block: 0; }
.is-pinned .worlds__pin { position: sticky; top: 0; height: 100dvh; display: flex; align-items: center; overflow: hidden; }

/* 6. Games */
.games { --wave-to: var(--garden-wall); --wave-back: var(--sage-light); --eyebrow: var(--ink); --lede: var(--ink); --focus: var(--ink); position: relative; overflow: clip; background: var(--sky); color: var(--ink); padding-top: clamp(40px, 6vw, 80px); }
.games__head { text-align: center; display: grid; justify-items: center; }
.games__head .hl { justify-content: center; }
.games__head .lede { max-width: 36em; }
.shelf { position: relative; margin-top: clamp(30px, 5vw, 60px); display: grid; justify-items: center; align-items: center; min-height: clamp(420px, 42vw, 620px); }
.marquee { position: relative; width: 100%; overflow: hidden; padding-block: 10px 14px; grid-area: 1 / 1; }
.marquee--a { align-self: center; transform: translateY(-58%); }
.marquee--b { align-self: center; transform: translateY(58%); }
.marquee__row { display: flex; gap: 14px; width: max-content; padding-right: 14px; }
.motion .marquee__row { animation: slide 190s linear infinite; }
.motion .marquee--b .marquee__row { animation-direction: reverse; animation-duration: 210s; }
.motion .marquee:hover .marquee__row { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.still .marquee, html:not(.motion) .marquee { overflow-x: auto; scrollbar-width: none; }
.pill { display: flex; align-items: center; gap: .6em; padding: .5em 1.15em .5em .55em; border-radius: 999px; background: var(--white); font-weight: 700; font-size: clamp(1rem, .96rem + .28vw, 1.2rem); white-space: nowrap; box-shadow: 0 4px 0 rgb(15 16 20 / .12), 0 14px 18px -12px rgb(15 16 20 / .3); transition: transform .3s var(--spring); }
.pill:hover { transform: translateY(-4px) scale(1.04) rotate(-1.4deg); }
.mark--pill { font-size: .92em; border-radius: .9em; }
.shelf__phone { position: relative; z-index: 2; grid-area: 1 / 1; }
.shelf__phone .phone { --w: clamp(190px, 21vw, 280px); }
.shelf__phone .phone__screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.shelf__phone .phone__screen img.on { opacity: 1; }
html:not(.motion) .shelf__phone .phone__screen img:first-child { opacity: 1; }
.cross { position: relative; height: clamp(150px, 19vw, 280px); }
.cross__spark { --sw: clamp(112px, 14vw, 210px); position: absolute; z-index: 4; left: 0; bottom: clamp(26px, 4.4vw, 70px); width: var(--sw); }
/* With motion, Spark stays on screen for all of Games: a layer the height of the section, and he sticks clear of the bar and the scroll hint. */
.motion .games { padding-bottom: clamp(150px, 19vw, 280px); }
.motion .cross { position: absolute; z-index: 4; inset: 0 0 clamp(26px, 4.4vw, 70px); height: auto; pointer-events: none; }
.motion .cross__spark { position: sticky; top: calc(100dvh - var(--dock) - 68px - var(--sw) * 1.077); bottom: auto; }
html:not(.motion) .cross__spark { left: 50%; margin-left: calc(clamp(112px, 14vw, 210px) / -2); }
.spark--cross { filter: drop-shadow(0 16px 12px rgb(15 16 20 / .2)); }

/* 7. Calm */
.calm { --wave-to: var(--amber); --wave-back: #F2C14E; --eyebrow: var(--sage-deep); --focus: var(--sage-ink); position: relative; overflow: clip; background: var(--garden-wall); color: var(--sage-ink); padding-top: clamp(30px, 4vw, 60px); }
.calm__grid { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 30px); }
.calm__eyebrow { grid-column: 1 / -1; margin-bottom: 0; text-align: center; }
.calm__card { display: flex; flex-direction: column; padding: clamp(22px, 3vw, 42px); border-radius: 34px; background: #FFFDF6; box-shadow: 0 6px 0 var(--sage-pale), 0 30px 44px -30px rgb(51 73 58 / .5); }
.calm__card > p { margin-top: .75em; line-height: 1.42; color: #40594A; font-size: clamp(1.0625rem, 1rem + .3vw, 1.2rem); }
.clockbox { display: grid; grid-template-columns: clamp(110px, 12vw, 170px) minmax(0, 1fr); align-items: center; gap: clamp(14px, 2vw, 26px); margin-top: auto; padding-top: 20px; }
.clockbox__bar { height: 14px; border-radius: 99px; background: var(--sage-pale); overflow: hidden; }
.clockbox__bar i { display: block; height: 100%; border-radius: 99px; background: var(--sage-deep); transform-origin: 0 50%; }
.motion .clockbox__bar i { animation: clock 8s linear infinite; }
@keyframes clock { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.clockbox__line { margin-top: 10px; min-height: 2.5em; font-weight: 500; line-height: 1.25; font-size: 1.02rem; }
.clockbox.is-calm .clockbox__bar i { animation: none; transform: scaleX(1); background: var(--sage-light); }
.switch { display: inline-flex; align-items: center; gap: .6em; min-height: 48px; padding: 4px 8px 4px 0; border: 0; background: none; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.switch__t { position: relative; width: 62px; height: 36px; border-radius: 99px; background: #AEBAA0; transition: background-color .25s; box-shadow: inset 0 2px 0 rgb(51 73 58 / .18); }
.switch__k { position: absolute; left: 4px; top: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--white); box-shadow: 0 2px 0 rgb(51 73 58 / .3); transition: transform .35s var(--spring); }
.switch[aria-checked="true"] .switch__t { background: var(--sage-deep); }
.switch[aria-checked="true"] .switch__k { transform: translateX(26px); }
.seedbox { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: auto; padding-top: 20px; }
.seedbox__boards { display: flex; gap: 12px; }
.seedbox__boards figcaption { margin-bottom: 6px; font-size: .9rem; font-weight: 700; }
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: clamp(110px, 11vw, 148px); padding: 6px; border-radius: 14px; background: var(--sage-pale); }
.board span { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--white); color: var(--c); }
.board svg { width: 74%; height: 74%; fill: currentColor; overflow: visible; }
.motion .board span { animation: dealt .4s var(--spring) both; animation-delay: calc(var(--n) * 14ms); }
@keyframes dealt { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }
.calm__a11y { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 14px; padding-top: 10px; }
.calm__a11y h3 { padding: .42em 1em; border-radius: 999px; background: var(--sage-ink); color: var(--cream); font-size: 1rem; font-weight: 700; }
.calm__a11y ul { display: contents; }
.calm__a11y li { padding: .45em 1em; border-radius: 999px; background: var(--sage-pale); font-weight: 500; font-size: 1rem; }
.calm__garden { position: relative; width: 100%; height: auto; margin-top: clamp(-90px, -5vw, -24px); }

/* 8. Closing */
/* 7b. The research. The base rules are the whole section as a plain stack; motion stacks the steps on a sticky stage. */
.research { --wave-to: var(--deep-2); --wave-back: var(--deep-1); --focus: var(--ink); --accent: var(--plum); position: relative; background: var(--pegs) 0 0 / 22px 22px, var(--amber); padding-bottom: clamp(90px, 13vw, 180px); }
.research__stage { display: grid; gap: clamp(48px, 7vw, 90px); padding-block: clamp(70px, 9vw, 120px) 40px; }
.research__dashes i { background: rgb(15 16 20 / .16); }
.research__dashes i::after { background: var(--ink); }
.rs { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 5vw, 80px); width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.research__ai { display: grid; gap: .08em; font-size: clamp(1.45rem, 3.4vw, 3.1rem); font-weight: 400; line-height: 1.08; }
.research__yours { margin-top: .32em; font-size: clamp(2rem, 3.9vw, 4.2rem); line-height: 1; }
.rs__title { font-size: clamp(1.9rem, 1.3rem + 1.9vw, 3.1rem); font-weight: 400; line-height: 1.04; }
.rs__body strong { font-weight: 700; }
.research__yours { --accent: var(--plum); }
.rs__body { margin-top: .7em; max-width: 30em; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); line-height: 1.4; color: var(--ink); }
.rs__src { margin-top: .9em; max-width: 34em; font-size: .9375rem; line-height: 1.35; color: rgb(15 16 20 / .82); }
.rs__src a { font-weight: 700; text-underline-offset: 2px; }
.rs--end { grid-template-columns: minmax(0, 1fr); gap: 0; justify-items: center; text-align: center; }
.rs__big { font-size: clamp(2.3rem, 1.1rem + 4.6vw, 5.6rem); font-weight: 400; line-height: 1.02; max-width: 12em; }
.rs__big .hl { justify-content: center; }
.rs--end .rs__body { font-size: clamp(1.1875rem, 1.05rem + .55vw, 1.625rem); max-width: 26em; }

.todo { position: relative; padding: clamp(16px, 2vw, 28px); border-radius: 30px; background: var(--cream); box-shadow: 0 6px 0 #B47C00, 0 30px 44px -30px rgb(15 16 20 / .55); }
.todo__title { font-size: .9375rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.todo__list { display: grid; gap: 8px; margin-top: 10px; }
.todo__row { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 14px; border-radius: 14px; background: var(--white); font-weight: 500; }
.todo__row--yours { background: var(--ink); color: var(--cream); font-weight: 700; }
.tick { flex: none; width: 26px; height: 26px; padding: 3px; border-radius: 8px; background: var(--green); fill: none; stroke: var(--white); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.box { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 3px solid var(--amber); }
.todo__cursor { display: none; }
.todo__say { position: absolute; z-index: 1; right: 24%; bottom: -15px; padding: 7px 13px; border-radius: 14px 14px 4px 14px; background: var(--plum); color: var(--cream); font-size: .9375rem; font-weight: 700; white-space: nowrap; }
.spark--research { position: absolute; z-index: 2; right: -5%; bottom: -13%; width: clamp(96px, 12vw, 176px); pointer-events: none; }

.scoreboard { color: var(--ink); }
.scoreboard__head { display: flex; justify-content: space-between; gap: 12px; padding: 0 4px clamp(12px, 1.2vw, 16px); font-size: .9375rem; font-weight: 700; }
.scoreboard__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.scoreboard--wide .scoreboard__tiles { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1fr); }
.research__pieces { position: absolute; inset: 0; z-index: 0; pointer-events: none; display: none; }
.motion .research__pieces { display: block; }
.stat { --bg: var(--blue); --lip: var(--blue-lip); --fg: var(--white); display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; padding: clamp(14px, 1.5vw, 22px); border-radius: clamp(20px, 1.9vw, 28px); background: var(--bg); color: var(--fg); box-shadow: 0 6px 0 var(--lip), 0 24px 30px -20px rgb(15 16 20 / .6); }
.stat:nth-child(2) { --bg: var(--plum); --lip: var(--plum-deep); --fg: var(--cream); }
.stat:nth-child(3) { --bg: #009E73; --lip: #007555; --fg: var(--ink); }
.stat dt { font-size: .9375rem; font-weight: 700; line-height: 1.2; }
.stat dd { margin: 0; font-size: clamp(2.1rem, 1rem + 2.9vw, 4.2rem); font-weight: 700; line-height: 1; -webkit-text-stroke: .025em currentColor; }

.motion .research__dashes { position: absolute; z-index: 3; left: 0; right: 0; top: 80px; justify-content: center; margin: 0; }
.motion .research__track { height: 560vh; }
.motion .research__stage { position: sticky; top: 0; display: block; height: 100dvh; padding: 0; overflow: clip; }
.motion .rs { position: absolute; inset: 0; align-content: center; padding-block: 100px calc(var(--dock) + 52px); visibility: hidden; opacity: 0; transform: translateY(22px); transition: opacity .1s ease, transform 0s .1s, visibility 0s .1s; }
.motion .rs.on { z-index: 2; visibility: visible; opacity: 1; transform: none; transition: opacity .26s ease .1s, transform .5s var(--spring) .1s, visibility 0s; }
.motion .rs__line { opacity: .14; transform: translateX(-12px); transition: opacity .3s ease, transform .5s var(--spring); }
.motion .rs__line.is-in { opacity: 1; transform: none; }
.motion .research__yours { opacity: 0; transform: scale(.9); transform-origin: 0 50%; transition: opacity .25s ease, transform .55s var(--spring); }
.motion .is-blocked .research__yours { opacity: 1; transform: none; }
.motion .tick { opacity: .12; transform: scale(.6); transition: opacity .2s ease, transform .4s var(--spring); }
.motion .todo__row.is-done .tick { opacity: 1; transform: none; }
.motion .todo__cursor { position: absolute; z-index: 1; left: 58%; top: 0; display: block; width: 34px; height: 34px; fill: var(--ink); stroke: var(--white); stroke-width: 1.6; stroke-linejoin: round; transform: translateY(var(--y, 40px)); transition: transform .4s var(--out), opacity .2s ease; }
.motion .is-blocked .todo__cursor { opacity: 0; transform: translate(70px, calc(var(--y, 40px) - 60px)) rotate(24deg); }
.motion .todo__say { opacity: 0; transform: translateY(8px) scale(.85); transform-origin: 100% 100%; transition: opacity .2s ease, transform .4s var(--spring); }
.motion .is-blocked .todo__say { opacity: 1; transform: none; transition-delay: .18s; }
.motion .spark--research { transform: translateY(70%) scale(.4); opacity: 0; transition: transform .55s var(--spring), opacity .15s ease; }
.motion .is-blocked .spark--research { transform: none; opacity: 1; }
.motion .stat { opacity: 0; transform: perspective(600px) rotateX(-65deg) translateY(10px); transform-origin: 50% 100%; }
.motion .rs.on .stat { opacity: 1; transform: none; transition: opacity .2s ease calc(var(--n) * 80ms + 120ms), transform .6s var(--spring) calc(var(--n) * 80ms + 120ms); }
@media (max-width: 899px) {
  .motion .research__pieces { display: none; }
  .rs { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .motion .rs { padding-block: 96px calc(var(--dock) + 14px); }
  .motion .research__dashes { top: 72px; }
  .research__yours { font-size: min(7.6vw, 3.4rem); }
  .rs__title { font-size: clamp(1.6rem, 6.6vw, 2.5rem); }
  .rs__body { font-size: 1rem; line-height: 1.34; }
  .rs__src { font-size: .8125rem; }
  .todo__row { min-height: 38px; padding: 4px 12px; }
  .tick, .box { width: 22px; height: 22px; }
  .todo__say { right: 27%; bottom: -13px; font-size: .8125rem; }
  .scoreboard__head { padding: 0 2px 8px; font-size: .8125rem; }
  .stat { padding: 12px 12px 14px; border-radius: 18px; gap: 4px; box-shadow: 0 5px 0 var(--lip), 0 18px 22px -16px rgb(15 16 20 / .6); }
  .stat dt { font-size: .8125rem; }
  .stat dd { font-size: clamp(1.5rem, 6.8vw, 2.5rem); }
}
/* Tall screens and TVs: the stage fills the window, so the content scales with it. */
@media (min-width: 1200px) and (min-height: 1100px) {
  .rs { max-width: min(92vw, 2400px); }
  .research__ai { font-size: min(3.4vw, 5.6rem); }
  .research__yours { font-size: min(3.9vw, 6.4rem); }
  .rs__title { font-size: min(3.4vw, 5.6rem); }
  .rs__body { font-size: min(1.5vw, 2.25rem); }
  .rs__src { font-size: min(1.05vw, 1.625rem); }
  .rs__big { font-size: min(5.4vw, 9rem); }
  .rs--end .rs__body { font-size: min(1.9vw, 2.9rem); }
  .todo { padding: 36px; border-radius: 40px; }
  .todo__title { font-size: 1.25rem; }
  .todo__list { gap: 12px; margin-top: 16px; }
  .todo__row { min-height: min(3.7vw, 96px); padding: 8px 22px; border-radius: 20px; gap: 18px; font-size: min(1.5vw, 2.25rem); }
  .tick, .box { width: min(2vw, 48px); height: min(2vw, 48px); border-radius: 12px; }
  .todo__say { font-size: min(1.15vw, 1.75rem); padding: 10px 18px; bottom: -22px; }
  .spark--research { width: min(13vw, 320px); }
  .motion .todo__cursor { width: 52px; height: 52px; }
  .scoreboard__tiles { gap: 16px; }
  .scoreboard__head { padding: 2px 8px 20px; font-size: min(1.1vw, 1.75rem); }
  .stat { padding: 22px; border-radius: 24px; gap: 10px; }
  .stat dt { font-size: min(1.1vw, 1.75rem); }
  .stat dd { font-size: min(4.2vw, 7.5rem); }
}
@media (max-width: 380px) and (max-height: 700px) {
  .motion .rs { padding-block: 86px calc(var(--dock) + 8px); }
  .rs { gap: 10px; }
  .rs__body { font-size: .9375rem; line-height: 1.28; }
  .rs__src { margin-top: .6em; font-size: .75rem; }
}

.closing { --focus: var(--sky); --accent: var(--amber); position: relative; isolation: isolate; overflow: clip; color: var(--cream); text-align: center; background: var(--pegs) 0 0 / 34px 34px, linear-gradient(180deg, var(--deep-2) 0%, var(--deep-3) 100%); padding-block: clamp(20px, 3vw, 40px) clamp(70px, 9vw, 120px); }
.closing__pieces { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.motion .closing__pieces .piece svg { opacity: 0; scale: .3; transition: opacity .3s, scale .8s var(--spring); transition-delay: calc(var(--n, 0) * 80ms); }
.motion .closing.is-in .closing__pieces .piece svg { opacity: 1; scale: 1; }
.closing__inner { display: grid; justify-items: center; }
.spark--closing { width: clamp(180px, 25vw, 340px); margin-bottom: -4%; cursor: pointer; filter: drop-shadow(0 22px 18px rgb(4 22 36 / .4)); }
.closing__title { font-size: clamp(2.8rem, .9rem + 6.8vw, 7.4rem); font-weight: 400; line-height: .98; }
.closing__title .hl { justify-content: center; }
.closing__cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; margin-top: clamp(24px, 3vw, 38px); }
.closing__note { margin-top: 18px; font-size: 1rem; color: #D6E3EC; font-weight: 500; }

/* 9. Footer */
.foot { --focus: var(--sky); background: var(--ink); color: var(--cream); padding-block: clamp(36px, 5vw, 60px); }
.foot__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 30px; align-items: center; }
.foot__brand .wordmark { width: clamp(210px, 26vw, 330px); height: auto; aspect-ratio: 8.83; }
.foot__brand p { margin-top: 10px; color: var(--d-text-2); font-weight: 500; }
.foot__links { display: flex; gap: 8px 22px; }
.foot__links a { display: inline-block; padding: .35em 0; font-weight: 700; text-underline-offset: 4px; }
.foot__legal { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--d-border); color: var(--d-muted); font-size: .95rem; }
.foot__legal--plain { margin-top: -8px; padding-top: 0; border-top: 0; }

/* The bottom bar and the scroll hint */
.dock {
  position: fixed; z-index: 45; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: 20px; background: var(--white); box-shadow: 0 10px 30px -10px rgb(15 16 20 / .4), 0 0 0 1px rgb(15 16 20 / .06);
  translate: -50% 0; transition: translate .45s var(--out), opacity .25s ease, visibility .25s;
}
.dock .badges { --badge: 44px; flex-wrap: nowrap; gap: 12px; }
.dock__play { min-height: 44px; padding: .4em 1.1em; border-radius: 10px; color: var(--white); background: var(--blue); font-size: 1rem; box-shadow: 0 3px 0 var(--blue-lip); white-space: nowrap; }
.dock-off .dock, .in-round .dock { translate: -50% calc(100% + 24px); opacity: 0; visibility: hidden; }
.more { position: fixed; z-index: 44; left: 50%; bottom: calc(var(--dock) + 12px + env(safe-area-inset-bottom)); translate: -50% 0; pointer-events: none; transition: left .45s var(--out), bottom .45s var(--out), opacity .25s ease, visibility .25s; }
.dock-off .more { bottom: calc(16px + env(safe-area-inset-bottom)); }
.in-round .more, .page-end .more { opacity: 0; visibility: hidden; }
/* The hero's third button reaches past centre on laptops, so the hint waits under Spark until the page moves. */
.at-hero .more { left: calc(50% + min(28vw, 500px)); }
.more__mouse { display: none; width: 28px; height: 44px; border: 2.5px solid var(--ink); border-radius: 14px; background: var(--cream); box-shadow: 0 3px 0 rgb(15 16 20 / .28), 0 10px 18px -8px rgb(15 16 20 / .45); }
.more__mouse i { display: block; width: 4px; height: 8px; margin: 7px auto 0; border-radius: 99px; background: var(--ink); }
.more__chev { width: 30px; height: 30px; padding: 5px; border-radius: 50%; background: var(--cream); fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; box-shadow: 0 2px 0 rgb(15 16 20 / .28), 0 6px 12px -6px rgb(15 16 20 / .45); }
@media (hover: hover) and (pointer: fine) { .more__mouse { display: block; } .more__chev { display: none; } }
.motion .more__mouse i { animation: wheel 1.7s var(--out) infinite; }
.motion .more__chev { animation: drift 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(-2px); } 25% { opacity: 1; } 75% { opacity: 1; transform: translateY(10px); } 100% { opacity: 0; transform: translateY(12px); } }
@keyframes drift { 50% { transform: translateY(3px); } }
html:not(.js) .dock, html:not(.js) .more { display: none; }

@media (max-width: 1180px) { .float--b { right: -11%; } }

/* Short laptop screens: keep the sticky stages inside the viewport */
@media (min-width: 900px) and (max-width: 1340px) {
  .hero__cta { gap: 10px; }
  .hero__cta .badges { --badge: 48px; }
  .hero__cta .btn { padding-inline: 1em; font-size: .95rem; }
}
@media (min-width: 900px) and (max-height: 680px) {
  /* The headline gives way so the progress bars never cross a longer step's title. */
  .friends__head .h2 { font-size: 8.6dvh; }
  .dashes { margin-top: 14px; }
}
@media (min-width: 900px) and (max-height: 800px) {
  /* Every way in stays above the fold, because the dock is off while these buttons are on screen. */
  .hero__title { font-size: 11.4dvh; }
  .hero__sub { margin-top: .7em; font-size: clamp(1rem, 2.9dvh, 1.25rem); }
  .hero__cta { margin-top: 16px; }
  .hero__pieces .piece:nth-child(5) { left: 57%; }
  .ritual .h2 { font-size: clamp(2.2rem, 7.2vh, 3.6rem); }
  .ritual .lede { font-size: 1rem; margin-top: .6em; }
  .step { padding-block: 3px; }
  .step .mark { font-size: .86rem; }
  .steps { gap: 2px; margin-top: 8px; }
  .ritual__done { margin-top: 6px; }
}

/* Phones and small tablets: designed, not shrunk */
@media (max-width: 899px) {
  :root { --dock: 70px; }
  .nav { justify-content: space-between; padding-left: 16px; width: calc(100vw - 20px); }
  .nav__links { display: none; }
  .wordmark { width: 128px; height: 15px; }
  .hero__brand .wordmark { width: 148px; height: 17px; }
  .hero__brand img { width: 38px; height: 38px; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); align-items: start; padding-top: 18px; padding-bottom: 76px; }
  .hero__title { font-size: min(clamp(3rem, 14.6vw, 5.6rem), 12dvh); }
  .hero__mascot { width: min(68vw, 330px); margin-top: 8px; }
  .spark--hero { margin-top: 0; }
  /* Spark stands dead centre on this first screen, so the hint waits in the corner, off his face. */
  .at-hero .more { left: calc(var(--gutter) + 15px); }
  .bubble { top: 7%; right: -10vw; width: 9.6em; font-size: .9rem; padding: .6em .8em; border-radius: 16px 16px 16px 5px; }
  .hero__sub { margin-top: .8em; font-size: 1.0625rem; }
  .hero__cta { gap: 12px; margin-top: 18px; }
  .hero__cta .badges, .closing__cta .badges { --badge: 48px; }
  .hero__cta .btn { flex: 1 1 140px; min-height: 48px; padding-inline: .8em; font-size: .98rem; text-align: left; }
  .hero__pieces .piece:nth-child(1) { left: 5%; top: 67%; }
  .hero__pieces .piece:nth-child(2) { left: 84%; top: 2%; }
  .hero__pieces .piece:nth-child(3) { left: 9%; top: 83%; }
  .hero__pieces .piece:nth-child(4) { left: 86%; top: 72%; }
  .hero__pieces .piece:nth-child(5) { left: 17%; top: 75%; }
  .hero__pieces .piece:nth-child(6) { left: 79%; top: 86%; }
  .hero__pieces .piece:nth-child(7) { left: 71%; top: 4%; }
  .hero__pieces .piece:nth-child(8) { left: 3%; top: 92%; }

  .ritual__grid { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 22px; }
  .ritual__copy { width: 100%; }
  .h2 { font-size: clamp(2.35rem, 10.6vw, 4rem); }
  .h2--xl { font-size: clamp(2.8rem, 13.4vw, 5rem); }
  .ritual .lede { margin-top: .6em; font-size: 1rem; line-height: 1.34; }
  .motion .ritual__stage { padding-block: 70px calc(var(--dock) + 8px); align-items: flex-start; }
  .motion .ritual__grid { height: 100%; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
  .steps { grid-template-columns: repeat(5, auto); justify-content: start; gap: 2px; margin-top: 10px; }
  .step { padding: 4px; }
  .step__text, .step__tick { display: none; }
  .motion .step.now { transform: translateY(-3px); }
  .ritual__done { display: none; }
  .ritual__phone { display: grid; justify-items: center; align-items: center; height: 100%; min-height: 0; width: 100%; }
  .phone--today { --w: clamp(150px, calc((100dvh - 420px) * .505), 60vw); }
  /* Copy height varies by device and Safari toolbar state, so the phone fits the row it is actually given. */
  .motion .ritual__phone { container-type: size; }
  .motion .phone--today { --w: min(calc((100cqh - 6px) * .505), 60vw); }
  .float { font-size: .84rem; }
  .float--a { left: 0; top: 12%; }
  .float--b { display: none; }
  .spark--peek { right: 2%; bottom: 2%; width: 26%; }
  html:not(.motion) .phone--today { --w: min(74vw, 300px); }

  .tiles { grid-template-columns: minmax(0, 1fr); }
  .tile { padding: 22px 24px 24px; border-radius: 28px; }
  .tile__n { font-size: 5.6rem; }

  .play__grid { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 34px; }
  .play__copy { width: 100%; }
  .phone--game { --w: min(88vw, 356px); }
  .spark--game { left: auto; right: -2%; top: -74px; bottom: auto; width: 126px; z-index: -1; }
  .play__beam { left: 50%; top: 66%; }

  .fph { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .fph__text { width: 100%; }
  .motion .friends__head { top: 74px; left: var(--gutter); right: var(--gutter); width: auto; }
  .friends__head .h2 { font-size: clamp(2.05rem, 8.8vw, 3.2rem); }
  .friends__head .eyebrow { margin-bottom: .4em; }
  .motion .dashes { margin-top: 12px; }
  .dashes i { width: 42px; }
  .motion .fph__text { left: var(--gutter); right: var(--gutter); bottom: calc(var(--dock) + 16px); width: auto; }
  .motion .fph__text p { font-size: .98rem; line-height: 1.3; margin-top: .25em; }
  .motion .fph__title { font-size: 1.28rem; }
  /* Safari's toolbar eats height, so the phone takes what the headline above and the text below leave it. */
  .motion .fph__phone { left: 50%; right: auto; top: 238px; transform: translateX(-50%); }
  .motion .phone--dark { --w: min(calc((100dvh - 356px - var(--dock)) * .505), 60vw); }
  .phone--dark { --w: min(74vw, 300px); }

  .worlds__row { padding-inline: calc((100vw - 262px) / 2); scroll-padding-inline: 20px; }
  .worlds__intro { scroll-snap-align: start; margin-left: calc((262px - 100vw) / 2 + var(--gutter)); margin-right: 0; }
  .worlds__video .phone { --w: min(70vw, 270px); }
  .world { width: 262px; }

  .shelf { min-height: clamp(380px, 104vw, 560px); }
  .shelf__phone .phone { --w: clamp(150px, 41vw, 220px); }
  .marquee--a { transform: translateY(-66%); }
  .marquee--b { transform: translateY(66%); }

  .calm__grid { grid-template-columns: minmax(0, 1fr); }
  .calm__garden { margin-top: 14px; }
  .clockbox { grid-template-columns: 108px minmax(0, 1fr); }

  .closing__cta .badges { flex: 1 1 100%; justify-content: center; }
  .closing__cta .btn { flex: 1 1 100%; justify-content: center; }
  .foot__inner { grid-template-columns: minmax(0, 1fr); }

  .dock { width: min(calc(100vw - 20px), 480px); justify-content: space-between; padding: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); border-radius: 18px; }
  .dock .badges { --badge: 40px; }
  .dock__play { flex: 1; min-width: 0; min-height: 40px; padding-inline: .5em; font-size: .95rem; line-height: 1.05; white-space: normal; text-align: center; }
}

/* On a phone the chevron shows only at the hero. Below it there is no free spot: riding the bar's top edge covered the
   store badges, above the bar it would cover the pinned sections' text (they keep only 8-16 px clear of the bar), and the
   game fills a small screen down to its footnote. Once the hero scrolls away the bar slides in and says the same thing. */
@media (max-width: 899px) and (pointer: coarse) {
  html:not(.at-hero) .more { opacity: 0; visibility: hidden; }
}

/* A narrow window on a computer shows both badges, which leaves no room for Play in the bar. The hero and closing still offer it. */
@media (max-width: 500px) {
  html:not([data-os]) .dock { justify-content: center; }
  html:not([data-os]) .dock__play { display: none; }
}

@media (max-width: 899px) and (max-height: 700px) {
  .motion .ritual .lede { font-size: .92rem; line-height: 1.26; }
  .motion .ritual .h2 { font-size: 1.9rem; }
  .worlds__intro .lede { font-size: .92rem; line-height: 1.26; }
  .worlds__intro .h2 { font-size: 1.9rem; }
  .phone--today { --w: clamp(150px, calc((100dvh - 330px) * .505), 60vw); }
}

@media (max-width: 380px) {
  .tilebtn { font-size: 3.1cqw; }
  .board { width: 104px; }
}

/* Reduced motion: nothing here moves on its own. The static page is the base above. */
.still *, .still *::before, .still *::after { animation: none !important; transition-duration: .01ms !important; }
