/*
 * Prospect Racing — the pre-launch site.
 *
 * The game's menu language, carried to the web (Game/Resources/UI/menu.rcss,
 * `body.color-menu`): the photograph is the subject; a translucent cobalt
 * field holds the words, a narrow coral edge leaned 7° marks its boundary,
 * celadon names the screen on a plate. Barlow Condensed for titles and
 * numbers, Barlow for sentences. Square corners, hairlines, white the only
 * text colour, coral the way on.
 */

@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/Barlow-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/BarlowCondensed-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }

:root {
  /* The game's palette, verbatim. */
  --ink: #102d4b;
  --ink-muted: #102d4b99;
  --field: #1b3f60ce;
  --field-solid: #163652;
  --band: #1b3f60a8;
  --wash: #14314da6;
  --mint: #b7d5cc;
  --coral: #dc8273;
  --coral-edge: #dc8273c4;
  --void: #060d17;
  --text: #ffffff8c;
  --text-strong: #ffffff;
  --hairline: #ffffff24;
  --focus: #5cc8ff;

  --column: min(46vw, 700px);
  --gutter: 56px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--void); }

body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font-family: "Barlow", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--text-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--coral); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

img { display: block; max-width: 100%; height: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* MARK: - The plate
 * A screen's name: ink capitals on a celadon slab. */
.plate {
  display: inline-block;
  margin: 0 0 22px -14px;
  padding: 5px 18px 7px 14px;
  background: var(--mint);
  color: var(--ink);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 26px;
  line-height: 32px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Titles and hero figures lean 12°; sentences never. */
.lean { display: inline-block; transform: skewX(-12deg); transform-origin: 0 100%; }

.caption {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text);
}

/* MARK: - The hero: the paddock's screen */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--void);
}

.hero-picture,
.hero-picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* Anchored right, as in the game: a narrower frame crops the dark side, never the subject. */
.hero-picture img { object-fit: cover; object-position: right center; }

.color-band {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: var(--column);
  background: var(--field);
}
.color-edge {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--column);
  width: 16px;
  background: var(--coral-edge);
  transform: skewX(-7deg);
  transform-origin: 0 100%;
}

.stage {
  position: relative;
  width: var(--column);
  min-width: 360px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 9vh 40px 7vh var(--gutter);
  display: flex;
  flex-direction: column;
}

.stage .plate { margin-bottom: 0; align-self: flex-start; }

.hero-title {
  margin: 8vh 0 0;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: clamp(44px, 4.6vw, 80px);
  line-height: 0.95;
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-strong);
}
.hero-title .lean { padding-right: 0.08em; }

.lede {
  margin: 28px 0 0;
  max-width: 30em;
  font-size: 19px;
  color: #ffffffb8;
}

/* MARK: - The sign-up */
.signup { margin-top: auto; padding-top: 48px; max-width: 480px; }
.signup .caption { display: block; margin-bottom: 10px; }

.entry {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid #ffffff59;
}
.entry:focus-within { border-bottom-color: var(--coral); }

.entry input {
  flex: 1;
  min-width: 0;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-strong);
  font: 500 20px/1.3 "Barlow", sans-serif;
}
.entry input::placeholder { color: #ffffff59; }
.entry input:focus { outline: none; }

/* The way on: coral, square, ink letters, the game's chevron. */
.primary {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 8px 20px 10px 22px;
  border: 0;
  border-radius: 0;
  background: var(--coral);
  color: var(--ink);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.1s;
}
.primary .go { margin-left: 14px; }
.primary:hover,
.primary:focus-visible { background: var(--mint); outline: none; }
.primary[disabled] { background: #dc827366; color: var(--ink-muted); cursor: default; }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.45;
}
.consent input {
  appearance: none;
  flex: none;
  width: 18px; height: 18px;
  margin: 1px 0 0;
  border: 1px solid #ffffff8c;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
}
.consent input:checked { background: var(--coral); border-color: var(--coral); box-shadow: inset 0 0 0 3px var(--field-solid); }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.signup-status {
  min-height: 1.5em;
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--text-strong);
}
.signup-status.error { color: var(--coral); }

.signup.done .entry,
.signup.done .consent,
.signup.done .actions { display: none; }
.signup.done .signup-status {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.actions { margin-top: 20px; }

.scroll-cue {
  align-self: flex-start;
  margin-top: 36px;
  text-decoration: none;
  color: var(--text);
}
.scroll-cue:hover { color: var(--coral); }

/* MARK: - The film
 * The page's centrepiece: a 16:9 frame as wide as the page allows, on a
 * cobalt field with the coral edge along its foot. Until the film exists,
 * the frame holds a poster and a "coming soon" plate. */
.film-section {
  position: relative;
  padding: 88px var(--gutter) 104px;
  background: var(--ink);
  border-top: 1px solid var(--hairline);
}
.film-inner { max-width: 1280px; margin: 0 auto; }
.film-section .plate { margin: 0 0 28px; }
.film { margin: 0; }
.film-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--void);
  overflow: hidden;
  border-bottom: 6px solid var(--coral);
}
.film-frame iframe,
.film-placeholder,
.film-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.film-frame iframe { border: 0; background: var(--void); }
.film-placeholder img { object-fit: cover; object-position: right center; filter: saturate(0.85) brightness(0.7); }
.film-soon {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
  padding: 8px 22px 10px 18px;
  background: var(--mint);
  color: var(--ink);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 3.2vw, 44px);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

/* MARK: - Features
 * A tile each, as a product page lays them out: a short headline leaned, one
 * line under it. Text tiles sit on the cobalt field; picture tiles carry the
 * words over the photograph's dark left side. */
.features {
  padding: 96px var(--gutter) 104px;
  border-top: 1px solid var(--hairline);
}
.features-inner { max-width: 1280px; margin: 0 auto; }
.features .plate { margin: 0 0 28px; }

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.feature {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  padding: 36px 40px 40px;
  background: var(--void);
}
.feature-wide { grid-column: span 6; min-height: 240px; }
.feature-text { grid-column: span 2; background: var(--field-solid); }
.feature-wide.feature-text { grid-column: span 6; border-left: 6px solid var(--coral); }
.feature-large { grid-column: span 4; min-height: 440px; }
.feature-half { grid-column: span 3; min-height: 400px; }

.feature picture,
.feature picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.feature picture img { object-fit: cover; object-position: right center; }
/* Darken the foot, where the words sit, without hiding the subject. */
.feature picture::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #060d17e6 0%, #060d1780 35%, #060d1700 65%);
}

.feature-title {
  position: relative;
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1;
  text-transform: uppercase;
  color: var(--text-strong);
}
.feature-wide .feature-title { font-size: clamp(44px, 6vw, 88px); }
.feature p {
  position: relative;
  max-width: 30em;
  margin: 14px 0 0;
  font-size: 18px;
  color: #ffffffcc;
}
.feature-wide p { font-size: 22px; }

/* The closing sign-up: a second paddock screen on a different photograph. */
.closing { padding: 0; }
.closing .stage { min-height: 80vh; }
.closing .hero-title { margin-top: 6vh; }

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding: 28px var(--gutter) 36px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
}
footer a { color: var(--text); }
footer a:hover { color: var(--coral); }

/* MARK: - Prose pages (privacy) */
.prose {
  max-width: 720px;
  padding: 72px var(--gutter) 96px;
}
.prose h1 { margin: 0 0 32px; }
.prose h2 {
  margin: 40px 0 8px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 24px;
  text-transform: uppercase;
  color: var(--text-strong);
}
.prose p, .prose li { color: #ffffffb0; }
.back-link {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
}

/* The way on, in the frame's middle: the game's coral button, larger. */
.film-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 30px 14px 32px;
  font-size: clamp(24px, 2.6vw, 36px);
  text-decoration: none;
}
.film-play:hover { color: var(--ink); }
.film-play[hidden], .film-soon[hidden], .film-note[hidden] { display: none; }
.film-note { margin-top: 12px; font-size: 13px; }

/* MARK: - Narrow frames
 * The column takes the whole width; the photograph shows through a deeper
 * field, and the coral edge moves to the column's foot. */
@media (max-width: 980px) {
  .feature-text, .feature-large { grid-column: span 6; }
  .feature-text { min-height: 0; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; --column: 100vw; }
  .color-band { width: 100%; background: linear-gradient(180deg, #102d4bcc 0%, #1b3f60e6 55%, #163652f5 100%); }
  .color-edge { display: none; }
  .hero-picture img { object-position: 72% center; }
  .stage { min-width: 0; width: 100%; padding: 36px var(--gutter) 40px; }
  .stage .plate { margin-left: 0; font-size: 22px; line-height: 28px; }
  .hero-title { margin-top: 14vh; font-size: clamp(34px, 10.6vw, 60px); }
  .lede { font-size: 17px; }
  .signup { padding-top: 36px; }
  .entry { flex-direction: column; border-bottom: 0; }
  .entry input { border-bottom: 1px solid #ffffff59; }
  .actions .primary { width: 100%; justify-content: space-between; }
  .plate { margin-left: 0; }
  .film-section { padding: 56px 0 64px; }
  .film-section .plate { margin-left: var(--gutter); }
  .film-frame { border-bottom-width: 4px; }
  .film-note { padding: 0 var(--gutter); }
  .features { padding: 56px var(--gutter) 64px; }
  .feature-grid { grid-template-columns: 1fr; gap: 8px; }
  .feature, .feature-wide, .feature-text, .feature-large, .feature-half,
  .feature-wide.feature-text { grid-column: auto; min-height: 300px; padding: 24px 20px 26px; }
  .feature-wide, .feature-text, .feature-wide.feature-text { min-height: 0; padding-top: 40px; }
  .feature p, .feature-wide p { font-size: 17px; }
  .closing .stage { min-height: 70vh; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
