/* I Go You Go — the website. Colours, type and the 3D key come from the game
 * (igyg-app src/brand/tokens.js and kit.css at origin/main dce7485). */
:root {
  --paper: #FBFAF6; --card: #fff; --sunk: #F3F1E9; --ink: #1C1B19; --ink70: #4B4A45; --grey: #6B6A65; --faint: #74726A;
  --line: #E9E6DC; --line2: #DCD8CC;
  --p1: #2F7FD6; --p1deep: #1F5FAE; --p1soft: #E4EFFB; --p1line: #BFD9F4; --p1fill: #2B6FBF;
  --p2: #F0603C; --p2deep: #B03C17; --p2soft: #FCE8E1; --p2line: #F8C9BB;
  --go: #5DA425; --goDeep: #36701A; --goSoft: #E7F2DB; --amber: #F4A823; --amberInk: #8A6A00; --amberSoft: #FDF0D6;
  --ghost: #9AA3AE; --ghostDeep: #4B5563; --ghostSoft: #EEF1F4;
  --display: "Fredoka", ui-rounded, system-ui, sans-serif; --body: "Nunito", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1); --spring: cubic-bezier(0.2, 1.5, 0.35, 1);
  --soft: 0 2px 0 rgba(28,27,25,.04), 0 8px 24px rgba(28,27,25,.06);
  --lift: 0 4px 0 rgba(28,27,25,.05), 0 18px 50px rgba(28,27,25,.10);
  --loop: 8s;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 17px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--p1deep); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 10; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 12px; font: 600 15px var(--display); text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)); }

/* ── nav ── */
.nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
.mark { display: flex; align-items: center; gap: 10px; font: 700 22px/1 var(--display); letter-spacing: -.02em; text-decoration: none; }
.mark b { color: var(--p1); } .mark i { font-style: normal; color: var(--p2); }
.navlinks { display: flex; gap: 6px; }
.navlinks a { display: block; padding: 8px 12px; border-radius: 999px; font: 600 15px var(--display); color: var(--ink70); text-decoration: none; }
.navlinks a:hover { background: var(--sunk); }
@media (max-width: 640px) { .navlinks li:not(:last-child) { display: none; } .navlinks a { background: var(--p1soft); color: var(--p1deep); } }

/* ── hero stage: the background is whoever's go it is ── */
.hero { padding: 6px 0 56px; }
.stage { position: relative; isolation: isolate; overflow: hidden; border-radius: 36px; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 12px; min-height: 520px; padding: 46px 40px; background: var(--p1soft); box-shadow: var(--lift); animation: turn-bg var(--loop) infinite; }
.stage::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 72% 55%, rgba(255,255,255,.8), transparent 70%); }
@keyframes turn-bg { 0%, 44% { background: var(--p1soft); } 46%, 94% { background: var(--p2soft); } 96%, 100% { background: var(--p1soft); } }
.hero h1 { font: 700 clamp(60px, 9vw, 108px)/.86 var(--display); letter-spacing: -.035em; margin-bottom: 18px; }
.hero h1 .a, .hero h1 .b { display: block; }
/* Coral darkened from the game's #F0603C: large text needs 3:1 on both turn tints (3.6+). */
.hero h1 .a { color: var(--p1); } .hero h1 .b { color: #D9481F; }
.lede { font: 600 clamp(19px, 2.2vw, 24px)/1.3 var(--display); max-width: 440px; margin-bottom: 26px; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pill { font: 600 13px var(--display); letter-spacing: .05em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; background: #fff; border: 2px solid var(--line); }
.pill.p1 { color: var(--p1deep); border-color: var(--p1line); } .pill.p2 { color: var(--p2deep); border-color: var(--p2line); } .pill.am { color: var(--amberInk); border-color: #F6D79A; }

.duo { position: relative; height: 420px; }
.duo-fig { position: absolute; bottom: 10px; width: min(50%, 250px); }
.duo-fig.left { left: 0; animation: reps-a var(--loop) infinite; }
.duo-fig.right { right: 0; animation: reps-b var(--loop) infinite; }
/* Four reps on your go, still while you rest. */
@keyframes reps-a { 0%, 3%, 40%, 100% { transform: none; } 7%, 16%, 25%, 34% { transform: translateY(-14px); } 11.5%, 20.5%, 29.5%, 38% { transform: translateY(0) scaleY(.96); } }
@keyframes reps-b { 0%, 53%, 90%, 100% { transform: none; } 57%, 66%, 75%, 84% { transform: translateY(-14px); } 61.5%, 70.5%, 79.5%, 88% { transform: translateY(0) scaleY(.96); } }
/* The baton: across in x, an arc in y. */
/* x travels by transform (no layout): a box 60% wide from 20%, moved by its own width. */
.baton-x { position: absolute; left: 20%; width: 60%; top: 50%; animation: baton-x var(--loop) infinite; }
.baton-y { animation: baton-y var(--loop) infinite; }
.baton-y { width: 0; }
.baton { width: 54px; height: 54px; max-width: none; transform: translate(-50%, -50%); animation: baton-spin var(--loop) infinite; }
@keyframes baton-x { 0%, 40% { transform: none; } 50%, 90% { transform: translateX(100%); } 100% { transform: none; } }
@keyframes baton-y { 0%, 40%, 50%, 90%, 100% { transform: none; } 45%, 95% { transform: translateY(-170px); } }
@keyframes baton-spin { 0%, 40% { rotate: 0deg; } 50%, 90% { rotate: 360deg; } 100% { rotate: 720deg; } }
.motion-toggle { position: absolute; right: 16px; bottom: 14px; z-index: 2; padding: 8px 12px; border-radius: 999px; border: 2px solid rgba(28,27,25,.12); background: rgba(255,255,255,.85); font: 600 13px var(--display); color: var(--ink70); cursor: pointer; }
/* Motion runs only while <html> has .motion: site.js adds it once the pause button works,
 * never under reduced motion, and the pause button takes it away. So with no JS, or paused,
 * every loop is still (WCAG 2.2.2). */
html:not(.motion) *, html:not(.motion) *::before, html:not(.motion) *::after { animation-play-state: paused !important; }
[hidden] { display: none !important; }

/* ── the 3D key (kit.css .ig-key) ── */
.key { --h: 60px; --d: 6px; --face: var(--p1fill); --slab: #21579a; position: relative; display: inline-flex; flex-direction: column; height: calc(var(--h) + var(--d)); border-radius: 999px; text-decoration: none; font: 600 19px var(--display); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.key.coral { --face: var(--p2deep); --slab: #7d2a10; }
.key-shadow, .key-slab { position: absolute; left: 0; right: 0; top: var(--d); bottom: 0; border-radius: 999px; }
.key-shadow { background: rgba(28,27,25,.28); filter: blur(3px); transform: translateY(4px); transition: transform 120ms var(--ease-out); }
.key-slab { background: var(--slab); }
.key-face { position: relative; display: flex; align-items: center; gap: 10px; height: var(--h); padding: 0 26px; border-radius: 999px; background: var(--face); color: #fff; box-shadow: inset 0 2px 0 rgba(255,255,255,.22); transition: transform 260ms var(--spring); }
.key:hover .key-face { transform: translateY(-2px); }
.key:hover .key-face svg { animation: nudge 600ms var(--spring) infinite alternate; }
@keyframes nudge { to { transform: translateX(4px); } }
.key:active .key-face, .key[data-pressed] .key-face { transform: translateY(calc(var(--d) - 1px)); transition-duration: 120ms; }
.key:active .key-shadow { transform: translateY(1px); }
.key:focus-visible { outline: 3px solid var(--slab); outline-offset: 4px; border-radius: 999px; }
.final .key:focus-visible { outline-color: #fff; }
h2[tabindex="-1"]:focus { outline: none; }

.store, .store-soon { display: inline-flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 18px; border-radius: 16px; background: var(--ink); color: #fff; text-decoration: none; font: 600 16px/1.1 var(--display); }
.store small { display: block; font-weight: 500; font-size: 11px; opacity: .85; }
.store-soon { background: transparent; color: var(--ink70); padding: 0 6px; min-height: 0; font-size: 15px; }
.store.light { background: #fff; color: var(--ink); }
.store-soon.light { color: rgba(255,255,255,.85); }

/* ── sections ── */
section { padding: 64px 0; }
.kicker { font: 600 13px var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin-bottom: 10px; }
h2 { font: 700 clamp(34px, 4.8vw, 56px)/.98 var(--display); letter-spacing: -.025em; margin-bottom: 16px; text-wrap: balance; }
.sub { font-size: 18px; color: var(--ink70); max-width: 560px; }

.watch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.phone { justify-self: center; width: min(290px, 78vw); aspect-ratio: 390 / 844; border-radius: 46px; background: var(--ink); padding: 11px; box-shadow: 0 30px 60px rgba(28,27,25,.18); rotate: -3deg; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 36px; overflow: hidden; background: var(--p1); }
.gameplay { width: 100%; height: 100%; object-fit: cover; }
.vid-toggle { position: absolute; left: 50%; bottom: 20px; translate: -50% 0; width: 60px; height: 60px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25); cursor: pointer; }
.vid-toggle .i-pause, .vid-toggle[data-state="playing"] .i-play { display: none; }
.vid-toggle[data-state="playing"] .i-pause { display: block; }

.how { background: var(--sunk); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 30px; counter-reset: s; }
.step { --c: var(--p1); background: #fff; border-radius: 26px; padding: 22px; box-shadow: var(--soft); border-top: 6px solid var(--c); }
.step[data-tone="p2"] { --c: var(--p2); } .step[data-tone="go"] { --c: var(--go); } .step[data-tone="ghost"] { --c: var(--ghost); }
.step-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 18px var(--display); color: #fff; background: var(--c); margin-bottom: 14px; }
.step[data-tone="go"] .step-n { background: var(--goDeep); } .step[data-tone="ghost"] .step-n { background: var(--ghostDeep); } .step[data-tone="p2"] .step-n { background: var(--p2deep); } .step[data-tone="p1"] .step-n { background: var(--p1fill); }
.step h3 { font: 600 21px/1.1 var(--display); margin-bottom: 8px; }
.step p { color: var(--ink70); }

.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 30px; }
.feat { --bg: var(--p1soft); --fg: var(--p1deep); position: relative; overflow: hidden; min-height: 240px; padding: 24px; border-radius: 28px; background: var(--bg); transition: transform 300ms var(--spring); }
.feat:hover { transform: translateY(-4px) rotate(-.6deg); }
.feat[data-tone="ghost"] { --bg: var(--ghostSoft); --fg: var(--ghostDeep); }
.feat[data-tone="am"] { --bg: var(--amberSoft); --fg: var(--amberInk); }
.feat[data-tone="go"] { --bg: var(--goSoft); --fg: var(--goDeep); }
.feat[data-tone="p2"] { --bg: var(--p2soft); --fg: var(--p2deep); }
.feat[data-tone="plain"] { --bg: #fff; --fg: var(--ink); border: 2px solid var(--line); }
.feat.wide { grid-column: span 2; }
.feat h3 { font: 600 24px/1.05 var(--display); color: var(--fg); margin-bottom: 8px; max-width: 70%; }
.feat p { color: var(--ink70); max-width: 290px; }
.feat-art { position: absolute; right: 4px; bottom: -6px; }
.feat:not(.wide) .feat-art { right: -10px; }
.badge { position: absolute; top: 18px; right: 18px; font: 700 12px var(--display); letter-spacing: .06em; text-transform: uppercase; background: #fff; color: var(--p2deep); padding: 5px 10px; border-radius: 999px; }
.crests { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.crest { animation: bob 3s ease-in-out 3; animation-delay: calc(var(--i) * -.6s); }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-4deg); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; max-width: 620px; }
.chip { padding: 7px 13px; border-radius: 999px; background: var(--sunk); font: 600 15px var(--display); color: var(--ink70); animation: pop 4s var(--spring) 3; animation-delay: calc(var(--i) * .25s); }
.chip.fmt { background: var(--amberSoft); color: #7A5E00; }
@keyframes pop { 0%, 12%, 100% { transform: none; } 6% { transform: translateY(-5px) scale(1.06); } }
.ladder { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; max-width: 280px; counter-reset: r; }
.ladder li { counter-increment: r; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; padding: 6px 12px 6px 10px; font: 600 16px var(--display); }
.ladder li::before { content: counter(r); width: 14px; color: var(--grey); }
.ladder li.you { outline: 3px solid var(--go); }
.ladder .heads { display: flex; flex: 1; }
.ladder .heads img, .ladder .blank { width: 30px; height: 30px; border-radius: 50%; background: var(--sunk); border: 2px solid #fff; }
.ladder .heads > * + * { margin-left: -8px; }
.ladder .score { font-variant-numeric: tabular-nums; }

/* ── closing band ── */
.final { position: relative; overflow: hidden; isolation: isolate; text-align: center; border-radius: 40px; padding: 72px 22px; margin: 16px 0 56px; background: var(--ink); color: #fff; }
.final h2 { font-size: clamp(48px, 8vw, 92px); color: #fff; }
.final h2 .a { color: #8CBDF2; } .final h2 .b { color: #FF9F86; }
.final .sub { color: rgba(255,255,255,.82); margin: 0 auto 30px; }
.final .ctas { justify-content: center; }
.confetti { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: fall linear infinite; }
@keyframes fall { to { transform: translateY(640px) rotate(540deg); } }
.burst i { position: fixed; z-index: 20; width: 10px; height: 14px; border-radius: 3px; pointer-events: none; animation: burst 900ms var(--ease-out) forwards; }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 0; padding-bottom: calc(40px + env(safe-area-inset-bottom)); color: var(--grey); font: 600 14px var(--body); }

/* ── phone ── */
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; min-height: 0; padding: 30px 22px 56px; border-radius: 30px; }
  .duo { height: 230px; margin-top: 8px; }
  .duo-fig { width: min(46%, 200px); }
  @keyframes baton-y { 0%, 40%, 50%, 90%, 100% { transform: none; } 45%, 95% { transform: translateY(-90px); } }
  .watch-grid { grid-template-columns: 1fr; gap: 36px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .feats { grid-template-columns: 1fr; }
  .feat.wide { grid-column: auto; }
  .feat.wide[data-tone="p1"] { min-height: 300px; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .ctas { flex-direction: column; align-items: stretch; }
  .ctas .key { width: 100%; }
  .ctas .key-face { justify-content: center; }
  .store-soon { justify-content: center; }
  section { padding: 52px 0; }
}

/* ── reduced motion: still poses, nothing loops ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .baton-x { transform: translateX(50%); } .baton-y { transform: translateY(-60px); }
  .confetti, .motion-toggle { display: none; }
}
