:root {
  --ink: #12263a;
  --paper: #f7f3e8;
  --card: #fffdf6;
  --ground: #5c452e;
  --ground-deep: #46341f;
  --grass: #4d9e40;
  --yellow: #f2c230;
  --sky-top: #5b9bd8;
  --sky-bottom: #d2ebf7;
  --pink: #f099ad;
  --on-ground: #f7efe0;
  --on-ground-soft: #dccfb9;
  --line: #ddd4bf;
  --muted: #55606b;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  --display: "Arial Black", "Avenir Next Heavy", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 var(--body);
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 5;
  background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(48px, 8vw, 88px) 0; }

h2 {
  font: 900 clamp(30px, 5.4vw, 46px)/1.08 var(--display);
  letter-spacing: -.01em;
}
.lead-s { margin-top: 8px; font-size: 18px; }

/* Hero: the page's sky; the ground of the scene continues into the next section. */
.hero {
  position: relative;
  display: flex; flex-direction: column;
  background: linear-gradient(var(--sky-top), var(--sky-bottom) 72%);
  overflow: hidden;
}
.bar {
  position: relative; z-index: 2;
  display: flex; justify-content: flex-end;
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding: 16px var(--gutter) 0;
}
.langs { display: flex; gap: 4px; font-weight: 600; font-size: 15px; }
.langs a, .langs span {
  display: block; padding: 8px 12px; min-height: 40px; border-radius: 999px; text-decoration: none;
}
.langs a:hover { background: rgb(255 255 255 / .4); }
.langs [aria-current] { background: var(--ink); color: #fff; }

.hero-copy {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding: clamp(12px, 3vh, 36px) var(--gutter) 0;
}
.logo img { display: block; width: min(100%, 720px); height: auto; margin-left: -4px; }
.tagline {
  margin-top: clamp(16px, 2.6vh, 24px);
  font: 800 clamp(21px, 3.4vw, 32px)/1.2 var(--body);
  max-width: 24em;
}
.lead { margin-top: 10px; max-width: 34em; font-size: clamp(17px, 2vw, 19px); }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 20px; }
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 12px 22px;
  border: 3px solid var(--ink); border-radius: 14px;
  font: 800 18px/1.2 var(--body);
  text-decoration: none;
  background: var(--yellow);
  box-shadow: 0 5px 0 var(--ink);
}
.cta svg { width: 22px; height: 22px; flex: none; }
a.cta { transition: transform .1s, box-shadow .1s; }
a.cta:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--ink); }
.cta.is-soon { background: var(--card); box-shadow: none; border-style: dashed; }
.platforms { font-weight: 600; font-size: 16px; }

.scene-box {
  position: relative;
  /* Height alone sets the scene's scale: 620/1600 of the width fits the action at any width up to
     the cap, below 300px the sides go; wider screens see more land, the top is never cut. */
  height: clamp(300px, 38.75vw, 620px);
  margin-top: 8px;
  overflow: hidden;
}
.scene { position: absolute; bottom: 0; left: 50%; height: 100%; width: auto; aspect-ratio: 4400 / 620; max-width: none; transform: translateX(-50%); }

/* Motion is decoration only: all of it stops for prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  .spin { animation: spin .7s linear infinite; transform-box: fill-box; transform-origin: center; }
  .bob { animation: bob 2.6s ease-in-out infinite; }
  .flame { animation: flicker .28s steps(2) infinite; transform-box: fill-box; transform-origin: right center; }
  .stomp-a > *, .stomp-b > * { animation: none; }
  .drift-a { animation: drift 34s ease-in-out infinite alternate; }
  .drift-b { animation: drift 46s ease-in-out infinite alternate-reverse; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-14px); } }
@keyframes flicker { 50% { transform: scaleX(.72); } }
@keyframes drift { to { translate: 60px 0; } }

/* Run loop, on the ground of the hero. */
.loop { background: var(--ground); color: var(--on-ground); padding-top: 8px; }
.loop-list { display: grid; gap: 16px; margin-top: 24px; counter-reset: step; }
.loop-list li { counter-increment: step; padding-left: 58px; position: relative; }
.loop-list li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--yellow); color: var(--ink);
  font: 900 21px/42px var(--display); text-align: center;
}
.loop-list h3 { font: 900 22px/1.3 var(--display); }
.loop-list p { color: var(--on-ground-soft); }

/* Garage */
.garage-list {
  display: grid; gap: 14px; margin-top: 24px;
  grid-template-columns: repeat(3, 1fr);
}
.vcard {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 16px 16px;
}
.vcard svg { width: 100%; height: auto; }
.vcard h3 { margin-top: 8px; font: 800 19px/1.25 var(--body); }
.vcard p { margin-top: 2px; font-size: 15px; line-height: 1.4; color: var(--muted); }

/* Tracks */
.tracks { background: var(--ink); color: #fff; }
.tracks .lead-s { color: #c4d0dc; }
.track-list { display: grid; gap: 14px; margin-top: 24px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.tcard { background: #1b3349; border-radius: 16px; overflow: hidden; }
.tcard svg { width: 100%; height: auto; }
.tcard div { padding: 12px 16px 16px; }
.tcard h3 { font: 800 19px/1.25 var(--body); }
.tcard p { font-size: 15px; line-height: 1.4; color: #c4d0dc; }

/* And on the road */
.more-list { display: grid; gap: 22px 32px; margin-top: 24px; grid-template-columns: repeat(3, 1fr); }
.more-list h3 { font: 800 19px/1.25 var(--body); padding-top: 10px; border-top: 4px solid var(--grass); }
.more-list p { margin-top: 2px; font-size: 16px; color: var(--muted); }

/* Screenshots */
.shots { background: #efe8d6; }
.shot-list { display: grid; gap: 14px; margin-top: 24px; grid-template-columns: repeat(3, 1fr); }
.shot img { display: block; width: 100%; height: auto; border-radius: 12px; }
.shot figcaption { margin-top: 6px; font-weight: 600; font-size: 15px; }
.shot-empty {
  display: grid; place-items: center;
  aspect-ratio: 16 / 9;
  border: 2px dashed #a79b82; border-radius: 12px;
  color: #5f5645; font-size: 15px; font-weight: 600; text-align: center; padding: 8px;
}

/* Footer */
.foot { background: var(--ground-deep); color: var(--on-ground); padding: 40px 0 32px; font-size: 16px; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
.foot h2 { font: 800 19px/1.3 var(--body); }
.foot a { font-weight: 600; text-underline-offset: 3px; }
.foot-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  margin-top: 28px; padding-top: 16px; border-top: 1px solid #6d5a42;
  color: var(--on-ground-soft); font-size: 15px;
}

.nf { min-height: 100svh; display: grid; place-content: center; gap: 12px; padding: 24px var(--gutter); text-align: center; background: linear-gradient(var(--sky-top), var(--sky-bottom)); }
.nf h1 { font: 900 clamp(28px, 7vw, 44px)/1.1 var(--display); }

@media (max-width: 760px) {
  .garage-list, .shot-list {
    grid-auto-flow: column; grid-template-columns: none;
    grid-auto-columns: min(78vw, 300px);
    overflow-x: auto; scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 10px;
    scroll-padding-inline: var(--gutter);
  }
  .garage-list > *, .shot-list > * { scroll-snap-align: start; }
  .more-list { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (min-width: 761px) {
  .loop-list { grid-template-columns: repeat(3, 1fr); gap: 28px; }
}
@media (max-width: 480px) {
  .more-list { grid-template-columns: 1fr; }
}
