/* Naughty Horse — homepage.
   Racecard look: heavy rules, numbered runners, a Form line per game. Games keep their own brand inside
   their media; the studio shell stays flat (no glows, no gradient text, no entrance animations). */

@font-face {
  font-family: "Archivo";
  src: url(fonts/archivo.woff2) format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Orbitron";
  src: url(fonts/orbitron-900.woff2) format("woff2");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "Press Start 2P";
  src: url(fonts/press-start-2p.woff2) format("woff2");
  font-display: swap;
}

/* Palette "Paper" (V picked it on 2026-10-25 over Turf and Royal, which live in commit e19bf9b).
   The accent is the logo's pink (#f3156d) darkened to pass AA with white text; V picked it
   over the original crimson #d0112b on the same day.
   Every text/control pair is checked against WCAG AA by tools/contrast.py. */
:root {
  --bg: #ffffff;
  --surface: #f2f2f0;
  --ink: #111111;
  --muted: #555555;
  --rule: #b8b8b8;
  --accent: #d8105b;
  --on-accent: #ffffff;

  --gutter: clamp(16px, 4vw, 56px);
  /* Side padding of full-width blocks: the gutter, or more on wide screens so the content never
     runs wider than 1328 px (1440 with gutters). % resolves against the block that uses it. */
  --edge: max(var(--gutter), calc((100% - 1328px) / 2));
  --cond: 62%;
  --semi: 78%;
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* Menu jumps land below the sticky masthead (95 px desktop, 113 px phones). */
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", "Arial Narrow", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  font-kerning: normal;
}

img,
video { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: var(--edge);
  top: -100px;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  z-index: 20;
}
.skip:focus { top: 12px; }

/* Type */

.display {
  margin: 0;
  font-weight: 900;
  font-stretch: var(--cond);
  text-transform: uppercase;
  line-height: 0.86;
  letter-spacing: 0.005em;
  font-size: clamp(52px, 8vw, 112px);
}
.display--sm { font-size: clamp(32px, 4vw, 48px); }
.display--xl { font-size: clamp(56px, 11vw, 168px); overflow-wrap: anywhere; }
/* Keeps the studio name on one line where it fits; phones let it wrap (see the phone block). */
.keep { white-space: nowrap; }

.label {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  font-stretch: var(--semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

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

.wm-soundway {
  margin: 0;
  font-family: "Orbitron", "Archivo", sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
  /* "SOUNDWAY" in Orbitron 900 measures 7.03 em: size it to fit the column, never clip. */
  font-size: max(34px, min(148px, calc((100vw - 2 * var(--gutter)) / 7.3)));
}
.wm-soundway span:first-child { color: #ff2d95; }
.wm-soundway span:last-child { color: #2ee6ff; }
.wm-soundway--sm {
  font-size: clamp(30px, 3.4vw, 44px);
  /* The game's own colours need its own dark plate on light palettes. */
  display: inline-block;
  padding: 6px 12px 4px;
  background: #05020f;
}

.wm-recoil {
  margin: 0;
  display: inline-block;
  padding: 12px 14px 10px;
  background: #120806;
  color: #ff7a1a;
  font-family: "Press Start 2P", monospace;
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1;
  text-transform: uppercase;
}

/* Buttons */

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 14px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid currentColor;
  font-weight: 800;
  font-stretch: var(--semi);
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  line-height: 1.1;
  transition: transform 80ms ease-out, box-shadow 80ms ease-out;
}
.btn:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 currentColor; }
.btn:active { transform: none; box-shadow: none; }
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.btn--primary:hover { box-shadow: 3px 3px 0 var(--ink); }
.btn--ghost { background: transparent; color: var(--ink); }

.link {
  font-weight: 800;
  font-stretch: var(--semi);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 17px;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

/* Masthead */

/* Sticky: the menu stays at the top while the page scrolls (V, 2026-10-25). */
.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
  padding: 18px var(--edge);
  background: var(--bg);
  border-bottom: 3px solid var(--ink);
}

/* Logo kit rule: the horizontal logo is never narrower than 180 px (56 px tall = 213 px wide). */
.brand { display: inline-flex; }
.brand img { display: block; width: auto; height: 56px; }

.nav { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.nav a {
  font-weight: 800;
  font-stretch: var(--semi);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 16px;
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 3px solid transparent;
}
.nav a:hover { border-bottom-color: var(--accent); }

/* Hero: always dark, it is the game's own footage. */

.hero {
  position: relative;
  min-height: min(84vh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #05020f;
  color: #ffffff;
  --ink: #ffffff;
}
.hero__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::after {
  /* Readability scrim under the text, not decoration. */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5, 2, 15, 0.92) 0%, rgba(5, 2, 15, 0.55) 38%, rgba(5, 2, 15, 0) 70%);
}
/* Full width with the --edge padding, so the text column lines up with the masthead and sections.
   No max-width here: one that adds --edge subtracts the padding twice and squeezes the text to a
   word per line on 4K screens. The pitch and the wordmark carry their own limits. */
.hero__body {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 var(--edge) clamp(32px, 6vh, 64px);
}
.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-weight: 800;
  font-stretch: var(--semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 15px;
}
.no {
  padding: 4px 8px 3px;
  background: #ffffff;
  color: #111111;
}
.hero__pitch {
  margin: 14px 0 0;
  max-width: 30ch;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.3;
  font-weight: 500;
}
.hero__meta {
  margin: 18px 0 0;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d6d3e6;
}

/* Sections */

.runners,
.news { padding: clamp(56px, 8vw, 112px) var(--edge) 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.section-head__aside {
  margin: 0;
  max-width: 30ch;
  color: var(--muted);
  font-size: 19px;
}

/* Racecard */

.card {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 3px solid var(--ink);
}

.runner {
  display: grid;
  grid-template-columns: 104px minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 3vw, 48px);
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}

.runner__no { display: flex; justify-content: center; }
.num {
  display: block;
  width: 88px;
  padding: 10px 0 6px;
  background: var(--ink);
  color: var(--bg);
  text-align: center;
  font-weight: 900;
  font-stretch: var(--cond);
  font-size: 84px;
  line-height: 0.8;
}

.runner__text > p { margin: 14px 0 0; max-width: 46ch; }
.runner__genre {
  font-size: 14px;
  font-weight: 800;
  font-stretch: var(--semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.form { margin: 18px 0 0; font-size: 15px; }
.form div { display: flex; gap: 12px; flex-wrap: wrap; }
.form dt {
  font-weight: 800;
  font-stretch: var(--semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.form dd { margin: 0; font-variant-numeric: tabular-nums; }

.runner__media img,
.runner__media video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 2px solid var(--ink);
}
.runner__media { position: relative; }
.runner__media--pixel video { image-rendering: pixelated; background: #120806; }

/* Pause/play for looping clips; shown by site.js only while a clip can play. */
.vbtn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  min-width: 64px;
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  background: rgba(10, 10, 10, 0.78);
  color: #ffffff;
  font: 800 13px/1 "Archivo", Arial, sans-serif;
  font-stretch: var(--semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.vbtn[hidden] { display: none; }
.vbtn:hover { background: #000000; }
.vbtn--hero { top: 16px; bottom: auto; right: var(--edge); }

.runner--empty { align-items: center; }
.runner--empty .num { background: transparent; color: var(--muted); outline: 2px dashed var(--muted); outline-offset: -2px; }
.runner--empty .runner__text { grid-column: 2 / -1; }
.runner--empty p { color: var(--muted); }

/* About band */

.about {
  margin-top: clamp(56px, 8vw, 112px);
  padding: clamp(56px, 8vw, 104px) var(--edge);
  background: var(--accent);
  color: var(--on-accent);
}
.about__body {
  max-width: 34ch;
  margin: clamp(24px, 3vw, 40px) 0 0 auto;
}
.about__body p { margin: 0; }
.about__body p + p { margin-top: 14px; }
.lede {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.25;
  font-weight: 600;
}

/* News */

.news__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 3px solid var(--ink);
}
.news__list li {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.news__list time {
  font-weight: 900;
  font-stretch: var(--cond);
  text-transform: uppercase;
  font-size: 26px;
  line-height: 1;
}
.news__list p { margin: 0; max-width: 60ch; }
.news__list a { font-weight: 700; text-underline-offset: 3px; white-space: nowrap; }

/* Footer */

.footer {
  margin-top: clamp(56px, 8vw, 112px);
  padding: 40px var(--edge) 32px;
  border-top: 3px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  font-size: 17px;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li + li { margin-top: 6px; }
.footer .inline { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer .inline li + li { margin-top: 0; }
.footer p { margin: 0; }
.footer a { text-underline-offset: 3px; }
.footer__legal { grid-column: 1 / -1; color: var(--muted); font-size: 14px; }

/* Press kits */

.press { padding: clamp(40px, 6vw, 88px) var(--edge) 0; }
.press-head .label a { color: inherit; }
/* On white the game's cyan reads at 1.6:1, so the wordmark keeps its own dark plate. */
.wm-soundway--kit {
  display: inline-block;
  margin-top: 6px;
  padding: 10px 18px 8px;
  background: #05020f;
  font-size: max(30px, min(96px, calc((100vw - 2 * var(--gutter) - 36px) / 7.3)));
}
.press-head__pitch { margin: 18px 0 0; max-width: 44ch; font-size: clamp(19px, 1.8vw, 24px); line-height: 1.35; }
.press-head__note { margin: 16px 0 0; color: var(--muted); font-size: 15px; }
.press .card { margin-top: clamp(32px, 4vw, 56px); }
.runner__media--wide img { aspect-ratio: auto; }

.press-section { margin-top: clamp(56px, 7vw, 96px); padding-top: 20px; border-top: 3px solid var(--ink); }
.press-section > h2 { margin-bottom: 22px; }
.press-text { margin: 0 0 16px; max-width: 64ch; }
.press-copy { max-width: 70ch; }
.press-copy .label { margin: 30px 0 8px; }
.press-copy .label:first-child { margin-top: 0; }
.press-copy p { margin: 0 0 14px; }
.features { margin: 0; padding-left: 1.2em; }
.features li + li { margin-top: 8px; }

.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); margin: 0; }
.facts div { display: contents; }
.facts dt,
.facts dd { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.facts dt {
  padding-right: 32px;
  font-size: 14px;
  font-weight: 800;
  font-stretch: var(--semi);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.facts dd { margin: 0; }

.thumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 18px 16px;
}
.thumbs--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); margin-bottom: 24px; }
.thumbs a { display: block; text-decoration: none; }
.thumbs img { width: 100%; height: auto; border: 2px solid var(--ink); }
.thumbs a:hover img { border-color: var(--accent); }
.thumbs__cap { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }

.files { list-style: none; margin: 0; padding: 0; columns: 2 280px; }
.files li { padding: 6px 0; break-inside: avoid; }

.logos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}
.logos__tile a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  height: 100%;
  padding: 24px;
  text-decoration: none;
}
.logos__tile img { width: 100%; height: auto; }
.logos__tile--dark a { background: #0c0c0c; }
.logos__tile--dark .thumbs__cap { color: #c8c8c8; }
.logos__tile--light a { background: var(--surface); }

/* 404 */

.lost { padding: clamp(56px, 10vw, 140px) var(--edge) clamp(72px, 10vw, 140px); }
.lost__text { margin: 24px 0 0; max-width: 40ch; font-size: clamp(19px, 1.8vw, 24px); }

/* Phones */

@media (max-width: 820px) {
  body { font-size: 17px; }
  .runner {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 18px 16px;
    padding: 28px 0;
  }
  .runner__media { grid-column: 1 / -1; }
  .num { width: 60px; font-size: 56px; }
  .about__body { margin-left: 0; }
  /* The sticky masthead takes less of a phone screen: tighter padding, nav right under the logo. */
  html { scroll-padding-top: 124px; }
  .masthead { padding-top: 8px; padding-bottom: 4px; row-gap: 0; }
  .keep { white-space: normal; }
  .brand img { height: 48px; } /* 183 px wide, still above the kit's 180 px minimum */
  /* 44 px touch targets for text links. */
  .nav { gap: 0 22px; }
  .nav a { display: inline-block; padding: 12px 0; font-size: 15px; }
  .footer a,
  .actions .link { display: inline-block; padding: 10px 0; }
  .footer li + li { margin-top: 0; }
  .vbtn { min-height: 44px; }
  .news__list li { grid-template-columns: 1fr; gap: 6px; }
  .footer { grid-template-columns: 1fr; }
  .hero { min-height: 78svh; }
}

/* Mid widths (tablets, small laptops): three columns leave the text 270-340 px wide, so the clip
   moves under the text. */
@media (min-width: 821px) and (max-width: 1100px) {
  .runner { grid-template-columns: 104px minmax(0, 1fr); }
  .runner__media { grid-column: 2; max-width: 640px; }
}

/* Phones: the number sits beside the game's name; text, buttons and clip take the full width.
   display: contents lifts .runner__text's children into the runner grid (plain divs only, so no
   semantics are lost). */
@media (max-width: 600px) {
  .runner { grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; row-gap: 0; }
  .runner__text { display: contents; }
  .runner__no { grid-row: 1; grid-column: 1; align-self: center; }
  .runner__text > :is(h2, h3) { grid-row: 1; grid-column: 2; align-self: center; justify-self: start; }
  .runner__text > :not(h2, h3) { grid-column: 1 / -1; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { padding-bottom: 0; border-bottom: 0; }
  .runner__media { grid-column: 1 / -1; margin-top: 20px; }
  .num { width: 48px; font-size: 44px; padding: 8px 0 5px; }
  /* "SOUNDWAY" is 7.03 em plus the plate's 24 px: it must fit beside the 48 px number. */
  .wm-soundway--sm { font-size: min(30px, calc((100vw - 2 * var(--gutter) - 86px) / 7.3)); }
}

/* The narrowest phones (320-380 px): the four menu items on one row under the logo. */
@media (max-width: 380px) {
  .nav { gap: 0 14px; }
  .nav a { font-size: 13.5px; letter-spacing: 0.03em; }
}

/* Short screens (phones in landscape): a slimmer sticky masthead. */
@media (max-height: 500px) and (min-width: 601px) {
  html { scroll-padding-top: 80px; }
  .masthead { padding-top: 8px; padding-bottom: 8px; }
  .brand img { height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
