/* ═══════════════════════════════════════════════════════════════════════
   Wishes of Tomorrow — landing page.
   Tokens are the Nocturne design-system values; everything below them is
   page-specific. Dark-only by design: the page is a night sky.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --color-bg: #161826;
  --color-surface: #232532;
  --color-text: #e9e9ed;
  --color-accent: #9184d9;
  --color-divider: color-mix(in srgb, #e9e9ed 16%, transparent);

  --color-neutral-800: #3f424d;
  --color-neutral-900: #292b31;

  --color-accent-100: #f5f4ff;
  --color-accent-300: #d2cefd;
  --color-accent-400: #b5abfc;
  --color-accent-600: #796cbf;
  --color-accent-800: #423a6a;
  --color-accent-900: #2b2741;

  --color-section: #262a60;

  --font-heading: "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-pixel: "Press Start 2P", ui-monospace, monospace;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --shadow-sm: 0 0 0 1px #3f424d;
  --shadow-lg: 0 0 0 1px #9397ab, 0 16px 40px rgba(0, 0, 0, 0.65);

  --ease: cubic-bezier(.2, .8, .3, 1);
  --gutter: 40px;
  --maxw: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Components below set `display`, which would otherwise out-specify the
   hidden attribute and leave [hidden] elements on screen. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}

a { color: var(--color-accent-400); text-decoration: none; }
a:hover { color: var(--color-accent-300); }
img { display: block; max-width: 100%; }
figure { margin: 0; }
p { margin: 0; }

::selection { background: var(--color-accent-800); color: var(--color-accent-100); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 60;
  padding: 10px 16px; background: var(--color-surface); color: var(--color-text);
  border-radius: 0 0 var(--radius-md) 0;
}
.skip:focus { left: 0; }

/* Anchors sit under a sticky header, so give them room. */
[id] { scroll-margin-top: 84px; }

.wrap { max-width: var(--maxw); margin: 0 auto; }
.section { padding: 92px var(--gutter) 20px; }

.kicker {
  font-family: var(--font-pixel);
  font-size: 9px;
  line-height: 1.6;
  color: var(--color-accent);
}
.kicker.mt { margin-top: 56px; }

.section > h2 { margin-top: 16px; font-size: clamp(28px, 4vw, 44px); }
.section h2.h-sm { margin: 16px 0 22px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.025em; }

.accent { color: var(--color-accent); }

/* — animations ─────────────────────────────────────────────────────── */
@keyframes twinkle { 0%, 100% { opacity: .15 } 50% { opacity: .95 } }
@keyframes blink   { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }
@keyframes float   { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-12px) } }
@keyframes drift   { 0%, 100% { transform: translate3d(0, 0, 0) } 50% { transform: translate3d(3%, -2%, 0) } }
@keyframes sweep   { 0% { transform: translateX(-120%) } 100% { transform: translateX(220%) } }
@keyframes marquee { from { transform: translateX(0) } to { transform: translateX(-50%) } }

/* A shared overlay: the 1-in-3 scanline that ties the page to the hardware. */
.scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px);
}

/* — header ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; flex-wrap: wrap; gap: 22px;
  padding: 14px var(--gutter);
  background: rgba(22, 24, 38, .74);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(233, 233, 237, .10);
}
.brand {
  display: flex; align-items: center; gap: 10px; margin-right: auto;
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: .04em;
  color: rgba(233, 233, 237, .82); white-space: nowrap;
}
.brand:hover { color: var(--color-text); }
.brand-mark {
  width: 8px; height: 8px; flex: none;
  background: var(--color-accent);
  animation: twinkle 1.6s steps(1) infinite;
}
/* Back to the studio hub. Body font, not the pixel face — Press Start 2P
   has no arrow glyph and falls back mid-word. */
.back-link {
  display: flex; align-items: center; gap: 9px; margin-right: auto;
  font-size: 13.5px; color: rgba(233, 233, 237, .72); white-space: nowrap;
}
.back-link:hover { color: var(--color-text); }
.back-link span { transition: transform .2s ease; }
.back-link:hover span { transform: translateX(-3px); }

.site-nav { display: flex; flex-wrap: wrap; gap: 22px; }
.site-nav a { font-size: 13.5px; color: rgba(233, 233, 237, .72); }
.site-nav a:hover { color: var(--color-text); }
.btn-nav {
  font-size: 13.5px; font-weight: 500; color: var(--color-text);
  border: 1px solid var(--color-accent); border-radius: var(--radius-md);
  padding: 7px 14px; white-space: nowrap;
  transition: background .18s ease, transform .18s ease;
}
.btn-nav:hover { background: rgba(145, 132, 217, .16); transform: translateY(-1px); color: var(--color-text); }

/* — hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 96px var(--gutter) 84px;
  background: linear-gradient(180deg, #12142a 0%, #1b1d38 42%, var(--color-bg) 100%);
}
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars span { position: absolute; background: var(--color-accent-300); }
.hero-bloom {
  position: absolute; top: -20%; left: 8%; width: 60vw; height: 60vw;
  border-radius: 50%; filter: blur(24px); pointer-events: none;
  background: radial-gradient(circle, rgba(145, 132, 217, .18), transparent 62%);
  animation: drift 30s ease-in-out infinite;
}
.hero > .scanlines { opacity: .5; }

.hero-inner {
  position: relative; max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  gap: 56px; align-items: center;
}

.badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-pixel); font-size: 9px; line-height: 1.2; letter-spacing: .06em;
  color: var(--color-accent);
  border: 1px solid rgba(145, 132, 217, .45); border-radius: 999px;
  padding: 8px 14px; white-space: nowrap;
}
.badge-dot { width: 6px; height: 6px; background: var(--color-accent); animation: twinkle 1.6s steps(1) infinite; }

.hero h1 { margin-top: 26px; font-size: clamp(44px, 6.6vw, 86px); line-height: .96; letter-spacing: -0.035em; }
.lede {
  margin-top: 26px; max-width: 50ch;
  font-size: 17.5px; line-height: 1.65;
  color: rgba(233, 233, 237, .74); text-wrap: pretty;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.btn-start {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-pixel); font-size: 11px;
  color: var(--color-text);
  border: 1px solid var(--color-accent); border-radius: var(--radius-md);
  padding: 16px 24px;
  transition: transform .2s var(--ease), background .2s ease, box-shadow .2s ease;
}
.btn-start:hover {
  color: var(--color-text);
  transform: translateY(-2px);
  background: rgba(145, 132, 217, .16);
  box-shadow: 0 10px 30px rgba(145, 132, 217, .24);
}
.btn-start-label { position: relative; z-index: 1; }
.btn-start-sweep {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent, rgba(213, 206, 253, .3), transparent);
  transform: translateX(-120%);
  animation: sweep 4s ease-in-out infinite;
}
.btn-quiet {
  display: inline-flex; align-items: center;
  font-size: 14px; font-weight: 500; color: rgba(233, 233, 237, .78);
  border: 1px solid rgba(233, 233, 237, .18); border-radius: var(--radius-md);
  padding: 16px 24px;
  transition: border-color .2s ease, color .2s ease;
}
.btn-quiet:hover { border-color: rgba(233, 233, 237, .42); color: var(--color-text); }

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 22px; margin-top: 30px;
  font-size: 13px; color: rgba(233, 233, 237, .5);
}

.hero-art {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--color-surface); box-shadow: var(--shadow-lg);
  transition: transform .25s var(--ease);
}
/* Diagonal-hatch stage the oni bobs over, in place of key art. */
.hero-art-stage {
  aspect-ratio: 3 / 2;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: repeating-linear-gradient(135deg, var(--color-surface) 0 9px, #282a38 9px 18px);
}
.hero-art-stage img {
  /* Scales with the card so it doesn't get lost on a wide viewport. */
  width: clamp(112px, 36%, 190px); height: auto; aspect-ratio: 1;
  image-rendering: pixelated;
  animation: float 5s ease-in-out infinite;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .5));
}
.hero-art figcaption {
  font-family: var(--font-pixel); font-size: 8px; letter-spacing: .06em;
  color: rgba(233, 233, 237, .42);
  padding: 14px 16px; border-top: 1px solid rgba(233, 233, 237, .08);
}

/* — trailer placeholder ─────────────────────────────────────────────── */
.trailer {
  margin-top: 20px; aspect-ratio: 16 / 7;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 16px; text-align: center;
  border-radius: var(--radius-lg);
  background: repeating-linear-gradient(135deg, #1e2030 0 10px, var(--color-surface) 10px 20px);
  box-shadow: var(--shadow-sm);
}
.trailer-play {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--color-accent); color: var(--color-accent); font-size: 20px;
}
.trailer-label {
  font-family: var(--font-pixel); font-size: 9px; line-height: 1.9;
  color: rgba(233, 233, 237, .45);
}
.trailer-label span { color: rgba(233, 233, 237, .3); }

/* — marquee ────────────────────────────────────────────────────────── */
.marquee {
  overflow: hidden; padding: 13px 0;
  background: rgba(35, 37, 50, .5);
  border-top: 1px solid rgba(233, 233, 237, .10);
  border-bottom: 1px solid rgba(233, 233, 237, .10);
}
.marquee-track {
  display: flex; width: max-content;
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: .08em;
  color: rgba(233, 233, 237, .42);
  animation: marquee 30s linear infinite;
}
.marquee-track span { padding-right: 34px; }
.marquee-track .d { color: var(--color-accent); }

/* — features ───────────────────────────────────────────────────────── */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px; margin-top: 36px;
}
.feature {
  padding: 26px; border-radius: var(--radius-lg);
  background: var(--color-surface); box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s ease;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 0 1px var(--color-accent-600), 0 16px 34px rgba(0, 0, 0, .45);
}
.feature-num { font-family: var(--font-pixel); font-size: 9px; color: var(--color-accent); }
.feature h3 { margin-top: 14px; font-size: 19px; letter-spacing: -0.02em; }
.feature p { margin-top: 10px; font-size: 14.5px; line-height: 1.6; color: rgba(233, 233, 237, .66); text-wrap: pretty; }

/* — media ──────────────────────────────────────────────────────────── */
.shot-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px; margin-top: 20px;
}
/* The tile owns the aspect ratio, not the image: the images carry width/height
   attributes, which would otherwise fix their height and leave CSS
   aspect-ratio with nothing to solve for. */
.shot {
  border-radius: var(--radius-md); overflow: hidden;
  background: var(--color-surface); box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s ease;
}
.shot:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: 0 0 0 1px var(--color-accent-600), 0 16px 34px rgba(0, 0, 0, .5);
}
/* height:auto is load-bearing — the imgs carry width/height attributes, and
   without it the presentational height wins and aspect-ratio never applies. */
.shot img {
  width: 100%; height: auto; aspect-ratio: 3 / 2;   /* the GBA's own 240x160 */
  object-fit: cover; image-rendering: pixelated;
}
/* Captions sit under the frame, not over it: these are real screenshots and
   the games's own text boxes live along the bottom edge. */
.shot figcaption {
  padding: 12px 14px;
  border-top: 1px solid rgba(233, 233, 237, .08);
  font-family: var(--font-pixel); font-size: 8px; line-height: 1.9;
}
.shot figcaption b { display: block; font-weight: 400; color: rgba(233, 233, 237, .88); }
.shot figcaption span { color: rgba(233, 233, 237, .45); }

.rail-head { display: flex; align-items: baseline; gap: 16px; margin-top: 56px; }
.rail-hint { font-size: 12.5px; white-space: nowrap; color: rgba(233, 233, 237, .4); }

.cast-rail {
  display: flex; gap: 16px; margin: 20px calc(var(--gutter) * -1) 0;
  padding: 4px var(--gutter) 22px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: var(--color-neutral-800) transparent;
}
.cast {
  flex: 0 0 250px; scroll-snap-align: start;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--color-surface); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s ease;
}
.cast:hover { transform: translateY(-5px); box-shadow: 0 0 0 1px var(--color-accent-600), 0 18px 38px rgba(0, 0, 0, .5); }
.cast-art {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: linear-gradient(165deg, var(--color-accent-900), #1b1d2c);
}
.cast-art img {
  width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated;
  transition: transform .45s var(--ease);
}
.cast:hover .cast-art img { transform: scale(1.06); }
.cast-body { padding: 18px 20px 22px; }
.cast-name { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; }
.cast-role { margin-top: 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--color-accent); }
.cast-body p { margin-top: 10px; font-size: 14px; line-height: 1.6; color: rgba(233, 233, 237, .62); text-wrap: pretty; }

/* — download ───────────────────────────────────────────────────────── */
.download-panel {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg); padding: 52px 44px;
  background: linear-gradient(135deg, var(--color-section), var(--color-accent-900) 55%, var(--color-accent-900));
}
.download-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(233, 233, 237, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 233, 237, .06) 1px, transparent 1px);
  background-size: 32px 32px;
}
.download-inner {
  position: relative;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 36px; align-items: center;
}
.download-inner h2 { font-size: clamp(28px, 3.6vw, 42px); }
.download-inner > div > p {
  margin-top: 14px; max-width: 42ch;
  font-size: 15.5px; line-height: 1.65; color: rgba(233, 233, 237, .74); text-wrap: pretty;
}

.version-chip {
  margin-top: 26px;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border: 1px solid rgba(233, 233, 237, .16); border-radius: var(--radius-md);
  background: rgba(22, 24, 38, .42);
}
.digits { display: flex; gap: 4px; }
.digits span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; padding: 7px 4px;
  border-radius: var(--radius-sm); background: #1b1d2c;
  box-shadow: inset 0 0 0 1px rgba(233, 233, 237, .12);
  font-family: var(--font-pixel); font-size: 13px; color: var(--color-accent);
}
.digits span.dot { min-width: 12px; color: rgba(233, 233, 237, .4); }
.version-label {
  font-size: 12px; line-height: 1.5; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(233, 233, 237, .5);
}
.version-label span {
  text-transform: none; letter-spacing: 0; white-space: nowrap;
  color: rgba(233, 233, 237, .38);
}

.build-line {
  margin-top: 18px;
  font-family: var(--font-pixel); font-size: 8px; line-height: 2;
  color: rgba(233, 233, 237, .42);
}
.caret { animation: blink 1.1s steps(1) infinite; }

.download-links { display: flex; flex-direction: column; gap: 10px; }
.dl {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(233, 233, 237, .22); border-radius: var(--radius-md);
  color: var(--color-text); font-weight: 500; font-size: 15px;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.dl:hover { color: var(--color-text); border-color: rgba(233, 233, 237, .5); transform: translateX(3px); }
.dl-primary { border-color: var(--color-accent-400); }
.dl-primary:hover { background: rgba(213, 206, 253, .16); border-color: var(--color-accent-400); }
.dl-meta { font-weight: 400; font-size: 12.5px; color: rgba(233, 233, 237, .6); }

/* — in-browser patcher ─────────────────────────────────────────────── */
.patcher {
  margin-top: 16px; padding: 34px 36px;
  border: 1px solid rgba(233, 233, 237, .14); border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.patcher-head { display: flex; gap: 28px; align-items: flex-start; flex-wrap: wrap; }
.patcher-head > div:first-child { flex: 1 1 320px; }
.patcher-head h3 { margin-top: 14px; font-size: clamp(21px, 2.6vw, 27px); }
.patcher-head p {
  margin-top: 12px; max-width: 62ch;
  font-size: 14.5px; line-height: 1.6; color: rgba(233, 233, 237, .68); text-wrap: pretty;
}
.patcher-head b { color: var(--color-text); font-weight: 500; }

.patcher-privacy {
  flex: 0 0 auto; display: flex; align-items: center; gap: 11px;
  padding: 12px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--color-accent-800); background: rgba(43, 39, 65, .5);
  font-family: var(--font-pixel); font-size: 8px; line-height: 1.9;
  color: rgba(233, 233, 237, .62);
}
.patcher-privacy .lock { color: var(--color-accent); font-size: 15px; }

.patch-steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px; margin-top: 26px;
}
.patch-slot {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border: 1px dashed rgba(233, 233, 237, .22); border-radius: var(--radius-md);
  background: rgba(22, 24, 38, .4);
  transition: border-color .2s ease, background .2s ease;
}
.patch-slot[data-drop] { border-color: var(--color-accent); background: rgba(145, 132, 217, .12); }
.patch-slot[data-state="ok"] { border-style: solid; border-color: var(--color-accent-600); }
.patch-step {
  flex: none; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); background: #1b1d2c;
  box-shadow: inset 0 0 0 1px rgba(233, 233, 237, .12);
  font-family: var(--font-pixel); font-size: 10px; color: var(--color-accent);
}
.patch-slot-body { flex: 1 1 auto; min-width: 0; }
.patch-slot-label {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(233, 233, 237, .45);
}
.patch-slot-name {
  margin-top: 3px; font-size: 14.5px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.patch-slot-note { font-size: 12.5px; color: rgba(233, 233, 237, .5); }
.patch-pick {
  flex: none; cursor: pointer;
  padding: 8px 14px; font-size: 13px; font-weight: 500;
  border: 1px solid rgba(233, 233, 237, .24); border-radius: var(--radius-md);
  transition: border-color .2s ease, background .2s ease;
}
.patch-pick:hover { border-color: var(--color-accent); background: rgba(145, 132, 217, .12); }
.patch-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.patch-pick:focus-within { outline: 2px solid var(--color-accent); outline-offset: 2px; }

.patch-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.patch-apply {
  cursor: pointer; font: inherit;
  font-family: var(--font-pixel); font-size: 11px; color: var(--color-text);
  background: transparent;
  border: 1px solid var(--color-accent); border-radius: var(--radius-md);
  padding: 15px 24px;
  transition: background .2s ease, transform .2s ease, opacity .2s ease;
}
.patch-apply:hover:not(:disabled) { background: rgba(145, 132, 217, .16); transform: translateY(-1px); }
.patch-apply:disabled { opacity: .4; cursor: not-allowed; }
.patch-result {
  display: inline-flex; align-items: center;
  padding: 15px 24px; font-size: 14px; font-weight: 500;
  color: var(--color-text);
  border: 1px solid var(--color-accent-400); border-radius: var(--radius-md);
  background: rgba(213, 206, 253, .12);
}
.patch-result:hover { color: var(--color-text); background: rgba(213, 206, 253, .2); }

.patch-status {
  margin-top: 18px; padding-left: 16px;
  border-left: 2px solid rgba(233, 233, 237, .2);
  font-size: 14px; line-height: 1.55;
}
.patch-status strong { display: block; font-weight: 500; }
.patch-status span { display: block; margin-top: 2px; font-size: 13px; color: rgba(233, 233, 237, .58); }
.patch-status.is-idle { border-color: rgba(233, 233, 237, .2); color: rgba(233, 233, 237, .7); }
.patch-status.is-busy { border-color: var(--color-accent); color: var(--color-accent-300); }
.patch-status.is-ok   { border-color: #6fcf97; color: #9ce0b6; }
.patch-status.is-warn { border-color: #e0a35c; color: #efc48f; }
.patch-status.is-bad  { border-color: #e0748a; color: #f0a3b1; }

.patch-legal {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid rgba(233, 233, 237, .1);
  font-size: 12.5px; line-height: 1.6; color: rgba(233, 233, 237, .45); text-wrap: pretty;
}

/* — requirements + changelog ───────────────────────────────────────── */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; }

.req { margin: 0; }
.req > div {
  display: flex; gap: 20px; padding: 14px 0;
  border-top: 1px solid rgba(233, 233, 237, .10);
}
.req dt {
  min-width: 120px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(233, 233, 237, .45);
}
.req dd { margin: 0; font-size: 14.5px; line-height: 1.55; color: rgba(233, 233, 237, .8); }

.change {
  position: relative; padding: 0 0 22px 24px;
  border-left: 1px solid rgba(233, 233, 237, .14);
}
.change-dot { position: absolute; left: -4px; top: 5px; width: 7px; height: 7px; background: var(--color-accent); }
.change-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.change-v { font-family: var(--font-pixel); font-size: 10px; }
.change-date { font-size: 12.5px; color: rgba(233, 233, 237, .45); }
.change p { margin-top: 8px; font-size: 14.5px; line-height: 1.6; color: rgba(233, 233, 237, .7); text-wrap: pretty; }
.change-note { font-size: 13.5px; color: rgba(233, 233, 237, .45); }

/* — faq ────────────────────────────────────────────────────────────── */
.faq { max-width: 820px; padding-bottom: 100px; }
.faq > h2 { margin-bottom: 26px; font-size: clamp(26px, 3.4vw, 38px); }
.faq details { border-top: 1px solid rgba(233, 233, 237, .12); padding: 18px 0; }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  font-size: 16.5px; font-weight: 500; color: var(--color-text);
  transition: color .2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--color-accent-300); }
.faq summary > span:first-child { flex: 1 1 auto; min-width: 0; }
.faq .plus { flex: 0 0 auto; color: var(--color-accent); font-size: 18px; transition: transform .2s ease; }
.faq details[open] .plus { transform: rotate(45deg); }
.faq details p {
  margin-top: 12px; max-width: 62ch;
  font-size: 15px; line-height: 1.65; color: rgba(233, 233, 237, .68); text-wrap: pretty;
}

/* — footer ─────────────────────────────────────────────────────────── */
.site-footer {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
  padding: 26px var(--gutter) 44px;
  border-top: 1px solid rgba(233, 233, 237, .10);
  font-size: 13px; color: rgba(233, 233, 237, .45);
}
.foot-brand { margin-right: auto; }

/* ═══════════════════════════════════════════════════════════════════════
   Flatfoot Labs (labs.html) — the studio hub. Shares every token and most
   components with the game page; what follows is only what differs.
   ═══════════════════════════════════════════════════════════════════ */

.labs-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.labs-main, .labs .site-header, .labs .site-footer { position: relative; z-index: 1; }

.bloom { position: absolute; border-radius: 50%; filter: blur(30px); }
.bloom-a {
  top: -25%; left: -15%; width: 70vw; height: 70vw;
  background: radial-gradient(circle, rgba(145, 132, 217, .20), transparent 62%);
  animation: drift-a 26s ease-in-out infinite;
}
.bloom-b {
  bottom: -30%; right: -20%; width: 75vw; height: 75vw;
  background: radial-gradient(circle, rgba(38, 42, 96, .55), transparent 62%);
  animation: drift-b 34s ease-in-out infinite;
}
@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1) }
  50% { transform: translate3d(4%, -3%, 0) scale(1.12) }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.1) }
  50% { transform: translate3d(-5%, 4%, 0) scale(1) }
}
.labs-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(233, 233, 237, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 233, 237, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 72%);
          mask-image: radial-gradient(ellipse at 50% 0%, #000 10%, transparent 72%);
}

.labs-brand { gap: 11px; font-family: var(--font-body); }
.logo-grid {
  display: grid; grid-template-columns: repeat(3, 5px); grid-template-rows: repeat(3, 5px);
  gap: 2px; flex: none;
}
.logo-grid i { background: var(--color-accent-800); }
.logo-grid i.on { background: var(--color-accent); }
.labs-wordmark { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--color-text); }

.labs-hero { padding: 120px var(--gutter) 90px; }
.labs-hero h1 {
  margin-top: 26px; max-width: 14ch;
  font-size: clamp(52px, 8.4vw, 124px); line-height: .94; letter-spacing: -0.035em;
}
.lede.wide { max-width: 56ch; margin-top: 32px; font-size: 18px; }
.btn-start-sm { font-family: var(--font-body); font-size: 14px; font-weight: 500; padding: 13px 22px; }
.btn-quiet-sm { padding: 13px 22px; }
.marquee-track.slow { animation-duration: 34s; }

/* — project cards — */
.project {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  margin-top: 38px; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--color-surface); box-shadow: var(--shadow-sm);
  color: var(--color-text);
  transition: box-shadow .25s ease, transform .25s var(--ease);
}
.project:hover {
  color: var(--color-text);
  box-shadow: 0 0 0 1px var(--color-accent-600), 0 22px 50px rgba(0, 0, 0, .55);
}
.project-copy { padding: 40px 40px 44px; display: flex; flex-direction: column; gap: 18px; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { font-size: 11px; padding: 3px 10px; border-radius: 6px; }
.tag-accent { background: var(--color-accent-800); color: var(--color-accent-100); }
.tag-outline { border: 1px solid rgba(233, 233, 237, .18); color: rgba(233, 233, 237, .68); }
.project h3 { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -0.03em; line-height: 1.05; }
.project p { max-width: 44ch; font-size: 16px; line-height: 1.6; color: rgba(233, 233, 237, .72); text-wrap: pretty; }
.project-cta {
  margin-top: auto; display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; font-weight: 500; color: var(--color-accent);
}
.project-cta .arrow { transition: transform .25s ease; }
.project:hover .project-cta .arrow { transform: translateX(4px); }
.project-art {
  position: relative; min-height: 300px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--color-accent-900), #1b1d2c 60%, var(--color-section));
}
.project-art img {
  width: 180px; height: 180px; image-rendering: pixelated;
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, .55));
  animation: float 5s ease-in-out infinite;
  mix-blend-mode: lighten;
}
.project-version {
  position: absolute; bottom: 16px; right: 18px;
  font-family: var(--font-pixel); font-size: 8px; color: rgba(233, 233, 237, .4);
}

.slot-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px; margin-top: 18px;
}
.slot {
  position: relative; overflow: hidden; min-height: 210px; padding: 26px;
  display: flex; flex-direction: column; gap: 12px;
  border: 1px dashed rgba(233, 233, 237, .20); border-radius: var(--radius-lg);
  background: rgba(35, 37, 50, .35);
  transition: border-color .25s ease, background .25s ease, transform .25s var(--ease);
}
.slot:hover { border-color: rgba(145, 132, 217, .7); background: rgba(66, 58, 106, .24); }
.slot-num { font-family: var(--font-pixel); font-size: 9px; color: rgba(233, 233, 237, .35); }
.slot-title { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.slot p { font-size: 14px; line-height: 1.6; color: rgba(233, 233, 237, .55); text-wrap: pretty; }
.slot-status { margin-top: auto; font-size: 12.5px; color: rgba(233, 233, 237, .4); }

.studio-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px; padding-top: 44px;
  border-top: 1px solid rgba(233, 233, 237, .10);
}
.studio-grid p {
  margin-top: 16px; font-size: 15.5px; line-height: 1.65;
  color: rgba(233, 233, 237, .72); text-wrap: pretty;
}

.contact-section { padding-bottom: 110px; }
.contact-inner { position: relative; }
.contact-inner h2 { max-width: 18ch; font-size: clamp(28px, 4vw, 44px); }
.contact-inner > p {
  margin: 18px 0 30px; max-width: 48ch;
  font-size: 16px; line-height: 1.6; color: rgba(233, 233, 237, .72);
}
.dl-inline { justify-content: flex-start; gap: 9px; padding: 13px 22px; font-size: 14px; }
.dl-inline:hover { transform: translateY(-2px); }

/* — responsive ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --gutter: 22px; }
  .hero { padding-top: 64px; padding-bottom: 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { order: -1; }
  .section { padding-top: 68px; }
  .download-panel { padding: 36px 24px; }
  .site-header { gap: 14px; padding: 12px var(--gutter); }
  .site-nav { gap: 16px; order: 3; width: 100%; }
  .cast { flex-basis: 220px; }

  .patcher { padding: 24px 20px; }
  .patch-slot { flex-wrap: wrap; }
  .patch-pick { width: 100%; text-align: center; }

  .labs-hero { padding: 72px var(--gutter) 60px; }
  .project { grid-template-columns: 1fr; }
  .project-art { order: -1; min-height: 220px; }
  .project-copy { padding: 28px 24px 32px; }
}

@media (max-width: 460px) {
  .badge { font-size: 8px; padding: 7px 11px; }
  .marquee-track { font-size: 9px; }
  .req > div { flex-direction: column; gap: 4px; }
}

/* Reveal-on-scroll is applied by site.js; without JS everything stays visible. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
