/* Gulf Gambit — website
 *
 * The palette, typography and shapes here are the web translation of
 * BRAND_IDENTITY.md. Where a value has a token name in the game, the CSS custom
 * property carries the same name so the two can be compared by eye.
 *
 * Three rules from the game carry over and explain most of what follows:
 *   · Light comes from the upper left. Every gradient that implies a surface
 *     runs top-left → bottom-right.
 *   · Text on dark is engraved: a tight black shadow at y:1, radius 0. Never a
 *     soft blur.
 *   · One chamfered silhouette. The 45° corner cut is the brand's signature,
 *     done here with clip-path rather than border-radius.
 */

:root {
  /* Core palette — BRAND_IDENTITY.md §1 */
  --outline-black: #021413;
  --warm-dark: #080e16;
  --faction-cyan: #00c7ff;
  --cta-gold: #ffc436;
  --map-gold: #cca038;
  --faction-red: #e8362e;
  --palm-green: #388552;

  /* Surfaces — the deep navy stack the panels are built from */
  --navy-900: #010714;
  --navy-800: #03152f;
  --navy-700: #06142c;
  --navy-600: #0b2554;
  --navy-500: #06285c;

  /* Ink */
  --ink: #f4f1e8;
  --ink-dim: rgba(244, 241, 232, 0.72);
  /* 0.46 measured 4.22:1 against --navy-900, which is under the 4.5:1 WCAG AA
     floor for body text. 0.50 measures 4.82:1 and is visually almost
     indistinguishable. Do not lower it again without re-measuring. */
  --ink-faint: rgba(244, 241, 232, 0.5);

  /* The board itself, for accents that should read as "map" */
  --sand: #e3b678;

  --measure: 68rem;
  --engraved: 0 1px 0 rgba(0, 0, 0, 0.9);
}

/* The one display face the whole game uses. */
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/BarlowCondensed-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

/* ── Keyboard access ───────────────────────────────────────────────────────
   The site had no visible focus indicator at all, which makes it unusable by
   keyboard: you can tab, but you cannot see where you are. `:focus-visible`
   rather than `:focus` so a mouse click does not leave a ring behind.

   The outline is gold on a dark field (12.67:1) with a dark offset ring
   underneath it, so it stays visible over the cyan cards and the gold CTA
   alike — an outline that disappears on one background is not an indicator. */
:focus-visible {
  outline: 3px solid var(--cta-gold);
  outline-offset: 2px;
  border-radius: 2px;
  box-shadow: 0 0 0 5px rgba(1, 7, 20, 0.85);
}

/* Off-screen until focused. First thing in the tab order, so a keyboard or
   switch user can jump the nav instead of walking it on every page. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--cta-gold);
  color: var(--outline-black);
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

body {
  margin: 0;
  background: var(--navy-900);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

/* The backdrop: deep matte navy with the upper-left key light, exactly the
   pairing LobbyOuterBackdrop makes in the app. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(
      60rem 40rem at 12% 0%,
      rgba(0, 199, 255, 0.13),
      transparent 70%
    ),
    radial-gradient(
      50rem 40rem at 100% 100%,
      rgba(0, 0, 0, 0.65),
      transparent 60%
    ),
    linear-gradient(160deg, var(--navy-700), var(--navy-900) 60%);
}

/* Halftone, not paper grain — BRAND_IDENTITY.md rule 10. 16px spacing and a
   ~1.1px dot, matching DiplomacyHalftone's panel settings. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(
    rgba(0, 199, 255, 0.05) 1.1px,
    transparent 1.1px
  );
  background-size: 16px 16px;
}

/* ---- Typography ------------------------------------------------------- */

h1,
h2,
h3,
h4,
.display {
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0;
  text-shadow: var(--engraved);
}

/* All-caps content always carries tracking ≥ 1.0 — BRAND_IDENTITY.md §2. */
h1 {
  font-size: clamp(2.75rem, 9vw, 5.5rem);
  letter-spacing: 0.04em;
}

h2 {
  font-size: clamp(1.75rem, 4.2vw, 2.75rem);
  letter-spacing: 0.05em;
}

h3 {
  font-size: 1.3rem;
  letter-spacing: 0.06em;
}

a {
  color: var(--faction-cyan);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: #7fe0ff;
}

/* The section eyebrow: 12/2.4 in the game, in the section's accent colour. */
.eyebrow {
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 0.8125rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faction-cyan);
  text-shadow: var(--engraved);
  margin: 0 0 0.75rem;
}

.lede {
  font-size: clamp(1.125rem, 2.2vw, 1.375rem);
  color: var(--ink-dim);
  max-width: 46ch;
}

/* ---- Layout ----------------------------------------------------------- */

.wrap {
  width: min(100% - 2.5rem, var(--measure));
  margin-inline: auto;
}

section {
  padding-block: clamp(3rem, 6vw, 4.75rem);
}

.section-head {
  margin-bottom: 2.5rem;
}

.section-head p {
  color: var(--ink-dim);
  max-width: 58ch;
  margin: 0.75rem 0 0;
}

/* ---- The chamfered silhouette ----------------------------------------- */

/* One family, per rule 4. `--cut` is the 45° corner cut in px; panels use 14,
   rows and buttons 7. */
.chamfer {
  --cut: 14px;
  clip-path: polygon(
    var(--cut) 0,
    calc(100% - var(--cut)) 0,
    100% var(--cut),
    100% calc(100% - var(--cut)),
    calc(100% - var(--cut)) 100%,
    var(--cut) 100%,
    0 calc(100% - var(--cut)),
    0 var(--cut)
  );
}

/* The panel recipe, §6.1: deep navy gradient, cyan glows, centre vignette,
   twin border, drop shadow. clip-path cannot carry a stroke, so the border is
   drawn as a chamfered element sitting behind an inset copy — the same trick
   the app does with two strokes at different insets. */
.panel {
  --cut: 14px;
  position: relative;
  padding: 1px;
  background: linear-gradient(
    135deg,
    #6fe4ff,
    var(--faction-cyan) 35%,
    rgba(0, 92, 130, 0.5)
  );
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.55));
}

.panel > .panel-inner {
  --cut: 13px;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background:
    radial-gradient(
      28rem 20rem at 50% 0%,
      rgba(0, 199, 255, 0.18),
      transparent 70%
    ),
    radial-gradient(
      24rem 24rem at 0% 50%,
      rgba(0, 199, 255, 0.1),
      transparent 70%
    ),
    linear-gradient(180deg, #0b1526, #050e1f 55%, var(--outline-black));
  height: 100%;
}

/* ---- Buttons ---------------------------------------------------------- */

/* The arcade button, §6.3: body gradient top→bottom, white shine on top,
   inner shadow at the bottom, inset accent ring, outer black hairline, and a
   glow + drop shadow pair. */
.btn {
  --tint: var(--cta-gold);
  --cut: 7px;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  padding: 0.9rem 1.6rem;
  border: 0;
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 1.0625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--outline-black);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  background: linear-gradient(
    180deg,
    var(--tint),
    color-mix(in srgb, var(--tint) 55%, #000)
  );
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.3, 0.64, 1), filter 0.18s;
  filter: drop-shadow(0 1px 9px rgba(255, 196, 54, 0.32))
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}

/* Top shine and bottom inner shadow, drawn as one overlay. */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.4),
    transparent 45%,
    transparent 55%,
    rgba(0, 0, 0, 0.45)
  );
  pointer-events: none;
}

.btn:hover {
  filter: drop-shadow(0 1px 14px rgba(255, 196, 54, 0.5))
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}

/* Press: scale 0.94 with a spring, as in the app. */
.btn:active {
  transform: scale(0.94);
}

/* An outlined chamfered element cannot get its stroke from `box-shadow: inset`
   — the shadow is drawn on the border-box and the clip-path then slices the
   corners off, leaving the four 45° cuts unstroked and the frame visibly
   broken. So the outline is a layer, not a stroke: the host is filled with the
   edge colour and an inset pseudo-element covers everything but a 1.6px
   margin. The edge then follows the whole silhouette, diagonals included.
   This is the same construction as `.panel`. */
.outlined {
  position: relative;
  isolation: isolate;
  background: var(--edge);
}

.outlined::before {
  content: "";
  position: absolute;
  inset: 1.6px;
  z-index: -1;
  background: var(--body);
  /* One pixel less cut, so the inner shape sits parallel to the outer one. */
  clip-path: polygon(
    calc(var(--cut) - 1px) 0,
    calc(100% - var(--cut) + 1px) 0,
    100% calc(var(--cut) - 1px),
    100% calc(100% - var(--cut) + 1px),
    calc(100% - var(--cut) + 1px) 100%,
    calc(var(--cut) - 1px) 100%,
    0 calc(100% - var(--cut) + 1px),
    0 calc(var(--cut) - 1px)
  );
}

.btn--ghost {
  --tint: var(--faction-cyan);
  --edge: rgba(0, 199, 255, 0.55);
  --body: linear-gradient(180deg, rgba(0, 60, 88, 0.92), rgba(2, 20, 34, 0.92));
  color: var(--ink);
  text-shadow: var(--engraved);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}

/* The gold button's shine overlay would sit on top of the ghost body, so the
   ghost variant drops it. */
.btn--ghost::after {
  display: none;
}

.btn--ghost:hover {
  --edge: rgba(0, 199, 255, 0.9);
  --body: linear-gradient(180deg, rgba(0, 82, 118, 0.95), rgba(3, 28, 46, 0.95));
  filter: drop-shadow(0 1px 10px rgba(0, 199, 255, 0.35))
    drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

/* ---- Nav -------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(1, 7, 20, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 199, 255, 0.18);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.7rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.nav-brand img {
  width: 2rem;
  height: 2rem;
  border-radius: 22%;
}

.nav-brand span {
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: var(--engraved);
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 0.9375rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--ink-dim);
  text-decoration: none;
  text-shadow: var(--engraved);
}

.nav-links a:hover {
  color: var(--cta-gold);
}

/* Below the fold-out width the links would crowd the wordmark. The sections
   are all reachable by scrolling, so the nav simply sheds them. */
@media (max-width: 40rem) {
  .nav-links {
    display: none;
  }
}

/* ---- Hero ------------------------------------------------------------- */

/* Full-bleed: the map fills the viewport behind the title, scrimmed hard
   enough that white text stays legible over the busiest part of the board. */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: min(78vh, 44rem);
  padding-block: clamp(4rem, 12vw, 8rem);
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Two scrims: a vertical one so the nav and the copy both have a dark bed, and
   a centre-out radial so the middle of the map stays readable. */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      70% 60% at 50% 45%,
      rgba(1, 7, 20, 0.72),
      rgba(1, 7, 20, 0.88) 100%
    ),
    linear-gradient(
      180deg,
      rgba(1, 7, 20, 0.9),
      rgba(1, 7, 20, 0.55) 35%,
      var(--navy-900)
    );
}

.hero-inner {
  display: grid;
  justify-items: center;
}

/* The source icon is a full-bleed square, because that is what Apple requires —
   it applies the corner mask itself, and a pre-rounded icon is a rejection. The
   web has no such mask, so the rounding is applied here. 22% is iOS's own
   radius, which is what makes this read as an app icon rather than a picture. */
.hero-mark {
  width: min(38vw, 9rem);
  height: auto;
  border-radius: 22%;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.8))
    drop-shadow(0 0 50px rgba(0, 199, 255, 0.22));
}

.hero h1 {
  margin-bottom: 1.25rem;
  color: var(--cta-gold);
}

.hero .lede {
  margin-inline: auto;
}

.hero .btn-row {
  justify-content: center;
}

/* "Coming to iOS" — a status, not a button. Styled so it cannot be mistaken
   for a store link that goes nowhere. */
.pill {
  --cut: 7px;
  --edge: rgba(255, 196, 54, 0.55);
  --body: rgba(28, 20, 4, 0.86);
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 1.6rem;
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 1.0625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cta-gold);
  text-shadow: var(--engraved);
}

/* ---- Intro ------------------------------------------------------------ */

.intro {
  text-align: center;
  padding-block: clamp(3rem, 7vw, 5rem);
}

.intro h2 {
  max-width: 20ch;
  margin-inline: auto;
}

.intro-copy {
  max-width: 62ch;
  margin: 1.25rem auto 0;
  color: var(--ink-dim);
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
}

/* ---- Alternating features --------------------------------------------- */

.feature {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.feature-grid {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  grid-template-columns: 1fr;
}

@media (min-width: 56rem) {
  .feature-grid {
    grid-template-columns: 0.85fr 1.15fr;
  }

  /* A feature band with no screenshot.
     Without this the copy is pinned into the 0.85fr column and the image
     column stays empty, so the text reads at about 40% width beside a hole.
     Centred rather than merely widened, matching `.band-head`, so it reads as
     a deliberate statement band instead of a two-column layout that lost
     its picture. */
  .feature-grid.is-copy-only {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .feature-grid.is-copy-only .feature-copy p {
    max-width: 58ch;
    margin-inline: auto;
  }

  /* Flipping by grid-column rather than direction keeps the source order —
     copy first — so the reading order is right without CSS. */
  .feature-grid.is-flipped .feature-copy {
    grid-column: 2;
    grid-row: 1;
  }

  .feature-grid.is-flipped .feature-shot {
    grid-column: 1;
    grid-row: 1;
  }
}

.feature-copy h2 {
  margin-block: 0.25rem 1rem;
}

.feature-copy p {
  margin: 0;
  color: var(--ink-dim);
  max-width: 46ch;
}

.feature-shot {
  margin: 0;
}

/* The screenshots already carry their own rounded frame, so the page adds
   depth only — a drop shadow and a cyan bleed, never a second border. */
.feature-shot img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.7))
    drop-shadow(0 0 40px rgba(0, 199, 255, 0.12));
}

/* ---- Betrayal band ---------------------------------------------------- */

.band {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  background:
    radial-gradient(
      50rem 24rem at 50% 0%,
      rgba(232, 54, 46, 0.12),
      transparent 70%
    );
}

.band-head {
  text-align: center;
  margin-bottom: 2.25rem;
}

.band-head p {
  margin-inline: auto;
}

.band-shot {
  margin: 0;
  width: min(100% - 2.5rem, 76rem);
  margin-inline: auto;
}

.band-shot img {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.75));
}

/* ---- Gallery ---------------------------------------------------------- */

.gallery {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}

.gallery figure {
  margin: 0;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 0.6rem;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.6));
}

.gallery figcaption {
  margin-top: 0.6rem;
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-shadow: var(--engraved);
}

/* ---- Stat strip ------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1px;
  background: rgba(0, 199, 255, 0.22);
  border-block: 1px solid rgba(0, 199, 255, 0.22);
}

.stat {
  background: linear-gradient(180deg, #071427, var(--navy-900));
  padding: 1.5rem 1rem;
  text-align: center;
}

.stat dt {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.35rem;
}

.stat dd {
  margin: 0;
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 2.25rem;
  letter-spacing: 0.02em;
  color: var(--cta-gold);
  text-shadow: var(--engraved);
}

/* ---- Card grids ------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

/* The row card, §6.2: faction tint fading to dark navy left→right, a top
   shine band, a faction stroke inset 2px, and the outer black hairline. */
.card {
  --tint: var(--faction-cyan);
  --cut: 7px;
  position: relative;
  padding: 1.4rem 1.35rem;
  background: linear-gradient(
      90deg,
      color-mix(in srgb, var(--tint) 35%, #04101b),
      #04101b 70%
    ),
    #04101b;
  box-shadow: inset 0 0 0 2px var(--outline-black),
    inset 0 0 0 3.5px color-mix(in srgb, var(--tint) 80%, transparent);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}

/* 16px top shine band. */
.card::before {
  content: "";
  position: absolute;
  inset: 2px 2px auto;
  height: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}

.card h3 {
  color: #fff;
  margin-bottom: 0.5rem;
}

.card p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.9875rem;
}

.card .num {
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  color: var(--tint);
  text-shadow: var(--engraved);
  display: block;
  margin-bottom: 0.4rem;
}

/* ---- Powers ----------------------------------------------------------- */

.powers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* The identity chip. Nation short name and colour only — no flags. */
.power {
  --tint: var(--faction-cyan);
  --cut: 5px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.9rem;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--tint) 38%, #04101b),
    #04101b
  );
  box-shadow: inset 0 0 0 1.6px var(--outline-black),
    inset 0 0 0 2.8px color-mix(in srgb, var(--tint) 75%, transparent);
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: var(--engraved);
}

/* The glossy orb, §6.4 (row scale): radial body lit from (30%, 28%), black
   hairline, white specular highlight, drop shadow. */
.power .orb {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 28%,
    color-mix(in srgb, var(--tint) 100%, #fff 25%),
    var(--tint) 45%,
    color-mix(in srgb, var(--tint) 55%, #000)
  );
  box-shadow: 0 0 0 1.4px var(--outline-black), 0 1.5px 2px rgba(0, 0, 0, 0.5);
  flex: none;
}

.power .home {
  color: var(--ink-faint);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
}

/* ---- Phase track ------------------------------------------------------ */

.track {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
  list-style: none;
  padding: 0;
  margin: 0;
}

.track li {
  --cut: 6px;
  flex: 1 1 8.5rem;
  padding: 1rem 0.9rem;
  background: linear-gradient(180deg, #0a1a30, #05101f);
  box-shadow: inset 0 0 0 1.6px var(--outline-black),
    inset 0 0 0 2.6px rgba(0, 199, 255, 0.35);
}

.track li.is-optional {
  box-shadow: inset 0 0 0 1.6px var(--outline-black),
    inset 0 0 0 2.6px rgba(204, 160, 56, 0.45);
}

.track .step {
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--faction-cyan);
  display: block;
  text-shadow: var(--engraved);
}

.track li.is-optional .step {
  color: var(--map-gold);
}

.track .name {
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 1.0625rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-top: 0.2rem;
  text-shadow: var(--engraved);
}

.track .note {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  display: block;
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* ---- Footer ----------------------------------------------------------- */

footer {
  border-top: 1px solid rgba(0, 199, 255, 0.2);
  padding-block: 3rem;
  color: var(--ink-faint);
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  gap: 2rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  align-items: start;
}

/* The brand column carries the mark and the notice, so it gets more room than
   the three link columns. */
.footer-grid .footer-col:first-child {
  grid-column: span 2;
  min-width: 0;
}

@media (max-width: 40rem) {
  .footer-grid .footer-col:first-child {
    grid-column: auto;
  }
}

.footer-col h4 {
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faction-cyan);
  margin: 0 0 0.75rem;
  text-shadow: var(--engraved);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.footer-note {
  margin: 1rem 0 0;
  line-height: 1.6;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 22%;
}

.footer-brand strong {
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  display: block;
  text-shadow: var(--engraved);
}

/* The legal pages still use the flat link row. */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---- Legal pages ------------------------------------------------------ */

.legal {
  padding-block: 3.5rem 5rem;
}

.legal .doc {
  max-width: 46rem;
}

.legal h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
}

.legal h2 {
  font-size: 1.5rem;
  margin-top: 2.75rem;
  margin-bottom: 0.75rem;
  color: var(--cta-gold);
}

.legal h3 {
  font-size: 1.125rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--faction-cyan);
}

.legal p,
.legal li {
  color: var(--ink-dim);
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal hr {
  border: 0;
  border-top: 1px solid rgba(0, 199, 255, 0.18);
  margin-block: 2.5rem;
}

.legal strong {
  color: var(--ink);
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin-block: 1.25rem;
  font-size: 0.9375rem;
}

.legal th,
.legal td {
  border: 1px solid rgba(0, 199, 255, 0.18);
  padding: 0.6rem 0.8rem;
  text-align: left;
  vertical-align: top;
  color: var(--ink-dim);
}

.legal th {
  background: rgba(0, 199, 255, 0.07);
  color: var(--ink);
  font-weight: 600;
}

/* Wide content scrolls inside its own container; the page never does. */
.table-scroll {
  overflow-x: auto;
}

.legal blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--map-gold);
  background: rgba(204, 160, 56, 0.08);
  color: var(--ink-dim);
}

.legal blockquote p {
  margin: 0;
}

/* An unfilled [PLACEHOLDER] left in the source. Marked so it is impossible to
   mistake a draft for a finished document — see build.py. */
.ph {
  background: rgba(232, 54, 46, 0.18);
  box-shadow: inset 0 0 0 1px rgba(232, 54, 46, 0.55);
  color: #ff9d97;
  padding: 0 0.3em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}

/* The draft banner the build injects while placeholders remain. */
.draft-banner {
  --cut: 8px;
  background: linear-gradient(180deg, #4a1410, #2a0a08);
  box-shadow: inset 0 0 0 2px var(--outline-black),
    inset 0 0 0 3.5px rgba(232, 54, 46, 0.7);
  padding: 1.1rem 1.35rem;
  margin-bottom: 2.5rem;
}

.draft-banner strong {
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ff6b62;
  display: block;
  margin-bottom: 0.3rem;
  text-shadow: var(--engraved);
}

.draft-banner p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.9375rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-family: "Barlow Condensed", ui-sans-serif, sans-serif;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.875rem;
  text-decoration: none;
}

/* ---- Motion ----------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
