/* ==========================================================================
   World of Empires III — site styles
   ========================================================================== */

/* Tokens ------------------------------------------------------------------- */
:root {
  --bg: #0b0907;
  --bg-2: #120e0a;
  --bg-3: #1a140d;
  --bg-glow: #1d1710;
  --stripe-a: #15110c;
  --stripe-b: #110e0a;

  --text: #e9e1d3;
  --heading: #f4e9d2;
  --body: #cfc4b0;
  --muted: #b9a47c;
  --dim: #8a7a5e;
  --gold: #d9b46a;
  --gold-light: #f3d9a0;
  --gold-deep: #9a7434;

  --line: rgba(217, 180, 106, 0.14);
  --line-2: rgba(217, 180, 106, 0.18);
  --line-3: rgba(217, 180, 106, 0.25);
  --line-4: rgba(217, 180, 106, 0.35);

  --gold-gradient: linear-gradient(180deg, #f6e2b0 0%, #d9b46a 52%, #a87f3b 100%);

  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Spectral", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --content: 1180px;
  --section-y: clamp(72px, 10vw, 140px);
  --header-h: 72px;

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--text);
  background: var(--bg) radial-gradient(ellipse 80% 60% at 50% 0%, var(--bg-glow) 0%, var(--bg) 70%) no-repeat;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  color: var(--gold-light);
}

:focus-visible {
  outline: 1px solid var(--gold-light);
  outline-offset: 4px;
}

h1,
h2,
h3,
p,
figure {
  margin: 0;
}

::selection {
  color: var(--bg);
  background: var(--gold);
}

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--gold);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  color: var(--bg);
}

/* Header ------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: rgba(11, 9, 7, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background 0.4s, border-color 0.4s;
}

/* On pages that open with full-bleed art, the header floats over it until
   the visitor scrolls (main.js toggles .is-scrolled). */
.has-hero .site-header {
  position: fixed;
  left: 0;
  right: 0;
}

.js .has-hero .site-header:not(.is-scrolled) {
  background: linear-gradient(180deg, rgba(11, 9, 7, 0.7), rgba(11, 9, 7, 0));
  border-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.brand {
  display: block;
  flex-shrink: 0;
}

.brand img {
  width: auto;
  height: 40px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s var(--ease-out);
}

.brand:hover img {
  transform: scale(1.03);
}

.site-nav {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
  white-space: nowrap;
  color: var(--muted);
  transition: color 0.2s;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease-out);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-light);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

@media (max-width: 520px) {
  :root {
    --header-h: 60px;
  }

  .site-header {
    gap: 12px;
  }

  .brand img {
    height: 28px;
  }

  .site-nav {
    gap: 14px;
    font-size: 11px;
    letter-spacing: 0.12em;
  }
}

/* Shared building blocks --------------------------------------------------- */
main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: var(--content);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  position: relative;
  padding: var(--section-y) 0;
}

.section--flush-top {
  padding-top: 0;
}

.section--trailer {
  padding-top: clamp(24px, 4vw, 48px);
}

/* Full-bleed pages: the hero fades into flat --bg, so drop the top glow. */
body.has-hero {
  background: var(--bg);
}

.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 780px;
  margin: 0 auto clamp(40px, 6vw, 72px);
  text-align: center;
}

.section-head--left {
  align-items: flex-start;
  margin-left: 0;
  text-align: left;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

.eyebrow::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.section-head--left .eyebrow::before,
.banner .eyebrow::before {
  display: none;
}

.title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 58px);
  line-height: 1.1;
  color: var(--heading);
  text-wrap: balance;
}

.title em,
.page-title em {
  font-style: normal;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.65;
  font-weight: 300;
  color: var(--body);
  text-wrap: pretty;
}

/* Diamond ornament between two hairlines */
.ornament {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(280px, 60%);
  margin: 0 auto;
  color: var(--gold);
}

.ornament::before,
.ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-4));
}

.ornament::after {
  background: linear-gradient(90deg, var(--line-4), transparent);
}

.ornament span {
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  transform: rotate(45deg);
}

/* Buttons */
.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--gold);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #1a1206;
  background: var(--gold-gradient);
  box-shadow: 0 10px 30px rgba(217, 180, 106, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, background 0.2s, color 0.2s;
}

.btn:hover {
  color: #1a1206;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(217, 180, 106, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn--ghost {
  color: var(--gold-light);
  background: rgba(11, 9, 7, 0.45);
  border-color: var(--line-4);
  box-shadow: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.btn--ghost:hover {
  color: var(--heading);
  background: rgba(217, 180, 106, 0.14);
  border-color: var(--gold);
  box-shadow: none;
}

.btn__play {
  width: 0;
  height: 0;
  border-left: 10px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* Placeholder (striped frame used until real art is dropped in) ------------ */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  background: repeating-linear-gradient(135deg, var(--stripe-a) 0 14px, var(--stripe-b) 14px 28px);
}

/* Media frame: holds either a .placeholder or an <img> --------------------- */
.frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-3);
  background: var(--stripe-b);
}

.frame > img,
.frame > .placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gilded corner brackets on framed art */
.corners::before,
.corners::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 26px;
  height: 26px;
  pointer-events: none;
  border: 1px solid var(--gold);
}

.corners::before {
  top: 10px;
  left: 10px;
  border-right: 0;
  border-bottom: 0;
}

.corners::after {
  right: 10px;
  bottom: 10px;
  border-left: 0;
  border-top: 0;
}

/* Scroll reveal: content is only hidden when the script is there to bring it back. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes drift {
    from { transform: scale(1.04) translate3d(0, 0, 0); }
    to   { transform: scale(1.14) translate3d(-1.5%, -1%, 0); }
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
  }
}

/* Home: hero --------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 32px) var(--gutter) 112px;
  overflow: hidden;
  isolation: isolate;
}

.hero__art {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

/* Darken the edges and fade the bottom into the page. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(11, 9, 7, 0.15) 0%, rgba(11, 9, 7, 0.55) 70%, rgba(11, 9, 7, 0.85) 100%),
    linear-gradient(180deg, rgba(11, 9, 7, 0.35) 0%, rgba(11, 9, 7, 0) 30%, rgba(11, 9, 7, 0.2) 60%, var(--bg) 100%);
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3.4vw, 34px);
  width: 100%;
}

.hero__logo {
  width: min(880px, 100%);
  margin: 0;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.75));
}

.hero__logo img {
  width: 100%;
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(13px, 1.4vw, 18px);
  letter-spacing: 0.42em;
  text-align: center;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--gold-light);
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.9);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  border: 1px solid var(--line-3);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.26em;
  text-align: center;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(11, 9, 7, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.pulse {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(217, 180, 106, 0.6);
}

.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  transform: translateX(-50%);
}

.hero__scroll::after {
  content: "";
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--gold), transparent);
}

@media (max-width: 520px) {
  .status {
    padding: 8px 14px;
    font-size: 10px;
    letter-spacing: 0.16em;
  }
}

@media (max-height: 640px) {
  .hero__scroll {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero__art img {
    animation: drift 30s ease-in-out infinite alternate;
  }

  .hero__content > * {
    animation: rise 1.1s var(--ease-out) both;
  }

  .hero__content > :nth-child(2) { animation-delay: 0.15s; }
  .hero__content > :nth-child(3) { animation-delay: 0.3s; }
  .hero__content > :nth-child(4) { animation-delay: 0.45s; }

  .pulse {
    animation: pulse 2.4s ease-out infinite;
  }

  .hero__scroll::after {
    animation: drip 2.4s ease-in-out infinite;
  }

  @keyframes pulse {
    70%  { box-shadow: 0 0 0 9px rgba(217, 180, 106, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 180, 106, 0); }
  }

  @keyframes drip {
    0%   { transform-origin: top; transform: scaleY(0); }
    50%  { transform-origin: top; transform: scaleY(1); }
    51%  { transform-origin: bottom; transform: scaleY(1); }
    100% { transform-origin: bottom; transform: scaleY(0); }
  }
}

/* Trailer ------------------------------------------------------------------ */
.trailer {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line-4);
  background: repeating-linear-gradient(135deg, var(--stripe-a) 0 14px, var(--stripe-b) 14px 28px);
  background-size: cover;
  background-position: center;
  box-shadow: 0 0 0 6px rgba(217, 180, 106, 0.05), 0 40px 120px rgba(0, 0, 0, 0.7);
}

.trailer.has-video::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(11, 9, 7, 0.1) 0%, rgba(11, 9, 7, 0.65) 100%);
}

.trailer iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.trailer__play {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  width: 100%;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  background: none;
  cursor: pointer;
}

.trailer__play:disabled {
  cursor: default;
}

.trailer__icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(72px, 9vw, 112px);
  height: clamp(72px, 9vw, 112px);
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: rgba(11, 9, 7, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background 0.3s, transform 0.3s var(--ease-out);
}

/* A second ring that breathes around the play button */
.trailer__icon::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid var(--line-4);
  border-radius: 50%;
}

.trailer__icon::before {
  content: "";
  margin-left: 6px;
  border-left: 24px solid var(--gold);
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
}

.trailer__play:not(:disabled):hover .trailer__icon,
.trailer__play:focus-visible .trailer__icon {
  background: rgba(217, 180, 106, 0.2);
  transform: scale(1.06);
}

.trailer__play:focus-visible {
  outline-offset: -8px;
}

.trailer__label {
  padding: 0 16px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
}

.trailer.has-video .trailer__label {
  color: var(--heading);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.95);
}

@media (prefers-reduced-motion: no-preference) {
  .trailer.has-video .trailer__icon::after {
    animation: breathe 3s ease-in-out infinite;
  }

  @keyframes breathe {
    50% {
      inset: -18px;
      opacity: 0.2;
    }
  }
}

/* Home: stats -------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line-2);
  /* The 1px gaps reveal this colour, drawing the dividers. */
  background: var(--line-2);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: clamp(28px, 4vw, 44px) 12px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
}

.stat__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: lining-nums tabular-nums;
}

.stat__label {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Home: ages showcase ------------------------------------------------------ */
.ages__stage {
  position: relative;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  border: 1px solid var(--line-3);
  background: var(--bg-2);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}

.ages__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.1s ease, visibility 0s linear 1.1s;
}

.ages__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 1.1s ease, visibility 0s;
}

.ages__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ages__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 9, 7, 0.88) 0%, rgba(11, 9, 7, 0.45) 38%, rgba(11, 9, 7, 0) 65%),
    linear-gradient(0deg, rgba(11, 9, 7, 0.7) 0%, rgba(11, 9, 7, 0) 40%);
}

.ages__caption {
  position: absolute;
  left: clamp(20px, 5vw, 64px);
  bottom: clamp(24px, 5vw, 64px);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: min(460px, calc(100% - 40px));
}

.ages__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.ages__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.05;
  color: var(--heading);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.ages__text {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  font-weight: 300;
  color: var(--body);
  text-wrap: pretty;
}

@media (max-width: 760px) {
  .ages__stage {
    aspect-ratio: 4 / 5;
  }

  .ages__slide::after {
    background: linear-gradient(0deg, rgba(11, 9, 7, 0.95) 0%, rgba(11, 9, 7, 0.6) 45%, rgba(11, 9, 7, 0) 70%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .ages__slide.is-active img {
    animation: drift 16s ease-out both;
  }

  .ages__slide.is-active .ages__caption > * {
    animation: rise 0.9s var(--ease-out) both;
  }

  .ages__slide.is-active .ages__caption > :nth-child(2) { animation-delay: 0.12s; }
  .ages__slide.is-active .ages__caption > :nth-child(3) { animation-delay: 0.24s; }
}

.ages__rail {
  position: relative;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

/* The hairline the era markers sit on, and the gold line that fills it */
.ages__rail::before,
.ages__rail::after {
  content: "";
  position: absolute;
  top: 28px;
  left: 0;
  height: 1px;
}

.ages__rail::before {
  right: 0;
  background: var(--line-3);
}

.ages__rail::after {
  width: var(--progress, 0%);
  background: var(--gold);
  transition: width 0.8s var(--ease-out);
}

.ages__tab {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 21px 4px 8px;
  border: 0;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  background: none;
  cursor: pointer;
  transition: color 0.3s;
}

.ages__tab::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 1px solid var(--line-4);
  background: var(--bg);
  transform: rotate(45deg);
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.ages__tab:hover,
.ages__tab[aria-selected="true"] {
  color: var(--gold-light);
}

.ages__tab.is-past::before {
  border-color: var(--gold);
}

.ages__tab[aria-selected="true"]::before {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 16px rgba(217, 180, 106, 0.7);
}

.ages__tab:focus-visible {
  outline-offset: -2px;
}

@media (max-width: 760px) {
  .ages__rail {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
  }

  .ages__rail::-webkit-scrollbar {
    display: none;
  }

  .ages__rail::after {
    display: none;
  }

  .ages__rail li {
    flex: 0 0 auto;
    scroll-snap-align: center;
  }

  .ages__tab {
    padding-inline: 14px;
  }
}

/* Pillars (feature cards) -------------------------------------------------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(16px, 2vw, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pillar {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  transition: transform 0.4s var(--ease-out), border-color 0.4s, box-shadow 0.4s;
}

.pillar:hover {
  border-color: var(--line-4);
  transform: translateY(-4px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.pillar__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.pillar__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}

.pillar:hover .pillar__media img {
  transform: scale(1.06);
}

.pillar__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--bg-3) 0%, rgba(26, 20, 13, 0) 55%);
}

.pillar__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px clamp(22px, 2.4vw, 30px) clamp(26px, 3vw, 34px);
}

.pillar__kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.pillar__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(21px, 2vw, 25px);
  line-height: 1.2;
  color: var(--heading);
}

.pillar__text {
  font-size: 17px;
  line-height: 1.6;
  font-weight: 300;
  color: var(--body);
  text-wrap: pretty;
}

/* Text-only mechanic tiles */
.mechanics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line-2);
  background: var(--line-2);
}

.mechanic {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--bg);
  transition: background 0.4s;
}

.mechanic:hover {
  background: var(--bg-2);
}

.mechanic svg {
  width: 34px;
  height: 34px;
  margin-bottom: 6px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mechanic h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 0.04em;
  color: var(--heading);
}

.mechanic p {
  font-size: 17px;
  line-height: 1.6;
  font-weight: 300;
  color: var(--body);
  text-wrap: pretty;
}

/* Home: leaders band ------------------------------------------------------- */
.leaders {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background:
    radial-gradient(ellipse 55% 70% at 72% 70%, rgba(217, 180, 106, 0.18) 0%, rgba(217, 180, 106, 0) 70%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}

.leaders__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: end;
  gap: clamp(24px, 4vw, 56px);
}

.leaders__text {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-self: center;
  padding: var(--section-y) 0;
}

.leaders__art {
  padding-top: clamp(40px, 6vw, 80px);
}

.leaders__art img {
  width: 100%;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.7));
  -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 80%, transparent 100%);
}

@media (max-width: 860px) {
  .leaders__grid {
    grid-template-columns: 1fr;
  }

  .leaders__text {
    padding-bottom: 0;
  }
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 300;
  color: var(--body);
}

.checklist li::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border: 1px solid var(--gold);
  transform: rotate(45deg) translateY(-2px);
}

/* Full-bleed call to action ------------------------------------------------ */
.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(520px, 78vh, 760px);
  padding: var(--section-y) var(--gutter);
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

.cta__art {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.cta__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(11, 9, 7, 0.2) 28%, rgba(11, 9, 7, 0.3) 72%, var(--bg) 100%),
    radial-gradient(ellipse at center, rgba(11, 9, 7, 0.5), rgba(11, 9, 7, 0.05));
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  max-width: 780px;
}

.cta .title {
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

/* Left-aligned variant, for art whose subject sits on the right. */
.cta--left {
  justify-content: flex-start;
  text-align: left;
}

.cta--left .cta__inner {
  align-items: flex-start;
  width: 100%;
  max-width: calc(var(--content) - 2 * var(--gutter));
  margin: 0 auto;
  padding-right: min(45%, 520px);
}

.cta--left .cta__inner > * {
  max-width: 620px;
}

.cta--left .ornament {
  margin: 0;
  width: 180px;
}

.cta--left .ornament::before {
  display: none;
}

.cta--left .platforms,
.cta--left .actions {
  justify-content: flex-start;
}

.cta--left::before {
  background:
    linear-gradient(180deg, var(--bg) 0%, rgba(11, 9, 7, 0) 25%, rgba(11, 9, 7, 0) 75%, var(--bg) 100%),
    linear-gradient(90deg, rgba(11, 9, 7, 0.85) 0%, rgba(11, 9, 7, 0.5) 40%, rgba(11, 9, 7, 0) 70%);
}

@media (max-width: 860px) {
  .cta--left .cta__inner {
    padding-right: 0;
  }

  .cta--left::before {
    background:
      linear-gradient(180deg, var(--bg) 0%, rgba(11, 9, 7, 0.45) 25%, rgba(11, 9, 7, 0.6) 75%, var(--bg) 100%);
  }
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.platform {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 200px;
  padding: 11px 22px;
  border: 1px solid var(--line-4);
  text-align: left;
  background: rgba(11, 9, 7, 0.6);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.platform svg {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  fill: var(--gold-light);
}

.platform small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.platform strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.06em;
  color: var(--heading);
}

/* Inner pages: banner ------------------------------------------------------ */
.banner {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(460px, 74vh, 700px);
  padding: calc(var(--header-h) + 48px) 0 clamp(48px, 7vw, 96px);
  overflow: hidden;
  isolation: isolate;
}

.banner__art {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.banner__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 9, 7, 0.88) 0%, rgba(11, 9, 7, 0.4) 55%, rgba(11, 9, 7, 0.1) 100%),
    linear-gradient(180deg, rgba(11, 9, 7, 0.5) 0%, rgba(11, 9, 7, 0) 30%, rgba(11, 9, 7, 0) 60%, var(--bg) 100%);
}

.banner__inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  max-width: 720px;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5.6vw, 72px);
  line-height: 1.06;
  color: var(--heading);
  text-wrap: balance;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7);
}

@media (prefers-reduced-motion: no-preference) {
  .banner__art img {
    animation: drift 30s ease-in-out infinite alternate;
  }

  .banner__inner > * {
    animation: rise 1s var(--ease-out) both;
  }

  .banner__inner > :nth-child(2) { animation-delay: 0.12s; }
  .banner__inner > :nth-child(3) { animation-delay: 0.24s; }
}

/* The Game: feature rows --------------------------------------------------- */
.features {
  display: flex;
  flex-direction: column;
  gap: clamp(72px, 10vw, 136px);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}

.feature:nth-child(even) {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.feature:nth-child(even) .feature__text {
  order: 2;
}

@media (max-width: 860px) {
  .feature,
  .feature:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .feature:nth-child(even) .feature__text {
    order: 0;
  }
}

.feature__text {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.feature__number {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(52px, 6vw, 84px);
  line-height: 1;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.feature__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 34px);
  line-height: 1.15;
  letter-spacing: 0.03em;
  color: var(--heading);
  text-wrap: balance;
}

.feature__body {
  font-size: 19px;
  line-height: 1.65;
  font-weight: 300;
  color: var(--body);
  text-wrap: pretty;
}

.feature__media {
  aspect-ratio: 16 / 10;
  margin: 0;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}

.feature__media > img {
  transition: transform 1.4s var(--ease-out);
}

.feature:hover .feature__media > img {
  transform: scale(1.04);
}

/* Leaders art is a cut-out on transparency: give it a lit stage. */
.feature__media--cutout {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 28px 28px 0;
  background:
    radial-gradient(ellipse 70% 70% at 50% 80%, rgba(217, 180, 106, 0.24), rgba(217, 180, 106, 0) 70%),
    linear-gradient(180deg, var(--bg-3), var(--bg));
}

.frame.feature__media--cutout > img {
  height: auto;
  object-fit: contain;
}

.feature:hover .feature__media--cutout > img {
  transform: none;
}

/* The Game: era timeline --------------------------------------------------- */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 7vw, 88px);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Spine of the timeline */
.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--line-4) 4%, var(--line-4) 96%, transparent);
}

.era {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(56px, 8vw, 112px);
}

.era::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 13px;
  height: 13px;
  border: 1px solid var(--gold);
  background: var(--bg);
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow: 0 0 0 6px var(--bg);
}

.era:nth-child(even) .era__media {
  order: 2;
}

.era__media {
  aspect-ratio: 16 / 9;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.era__text {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.era__num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.era__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 34px);
  color: var(--heading);
}

.era__body {
  font-size: 18px;
  line-height: 1.6;
  font-weight: 300;
  color: var(--body);
  text-wrap: pretty;
}

@media (max-width: 760px) {
  .timeline::before {
    left: 6px;
  }

  .era {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-left: 32px;
  }

  .era::before {
    top: 0;
    left: 6px;
    transform: translate(-50%, 0) rotate(45deg);
  }

  .era:nth-child(even) .era__media {
    order: 0;
  }
}

/* Media: gallery ----------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery .frame {
  display: block;
  aspect-ratio: 16 / 9;
  border-color: var(--line-2);
}

/* The lead image spans two columns and two rows on wide screens. */
@media (min-width: 1100px) {
  .gallery--featured > li:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }

  .gallery--featured > li:first-child .frame {
    aspect-ratio: auto;
    height: 100%;
  }
}

/* The closing image runs the full width of the grid as a finale. */
.gallery--featured > li:last-child {
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .gallery--featured > li:last-child .frame {
    aspect-ratio: 21 / 8;
  }
}

/* In-game screenshots: two columns, the first shot runs the full width.
   Frames follow the screenshots' own shape so no interface is cropped. */
@media (min-width: 720px) {
  .gallery--screens {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery--screens > li:first-child {
    grid-column: 1 / -1;
  }
}

.gallery--screens .frame {
  aspect-ratio: 1920 / 1046;
}

/* "Work in progress" disclaimer above the screenshots */
.wip-note {
  display: flex;
  align-items: center;
  gap: 14px 20px;
  margin: 0 0 24px;
  padding: 16px 20px;
  border: 1px solid var(--line-3);
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, rgba(217, 180, 106, 0.08), rgba(217, 180, 106, 0.02));
}

.wip-note p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--body);
}

.wip-note__tag {
  flex: none;
  padding: 6px 10px;
  border: 1px solid var(--line-4);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--gold-light);
}

@media (max-width: 620px) {
  .wip-note {
    flex-direction: column;
    align-items: flex-start;
  }
}

.gallery a.frame > img {
  transition: transform 0.8s var(--ease-out);
}

.gallery a.frame:hover > img {
  transform: scale(1.05);
}

.gallery a.frame::after {
  content: attr(data-caption);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 40px 18px 14px;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--heading);
  background: linear-gradient(0deg, rgba(11, 9, 7, 0.9), rgba(11, 9, 7, 0));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}

.gallery a.frame:hover::after,
.gallery a.frame:focus-visible::after {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .gallery a.frame::after {
    opacity: 1;
    transform: none;
  }
}

.gallery a.frame:focus-visible {
  outline-offset: 2px;
}

/* Media: downloads --------------------------------------------------------- */
.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.download {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--line-2);
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}

.download:hover {
  color: var(--text);
  border-color: var(--gold);
  transform: translateY(-3px);
}

.download__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  padding: 16px;
  overflow: hidden;
  background: var(--bg);
}

.download__preview img {
  max-height: 100%;
  object-fit: contain;
}

.download__preview--cover {
  padding: 0;
}

.download__preview--cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.download__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.download strong {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.06em;
  color: var(--heading);
}

.download small {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--gold);
}

/* Lightbox ----------------------------------------------------------------- */
.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(16px, 4vw, 56px) clamp(16px, 4vw, 72px) clamp(64px, 7vw, 96px);
  border: 0;
  color: var(--text);
  background: transparent;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgba(11, 9, 7, 0.95);
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid var(--line-4);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.7);
}

.lightbox__caption {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 3vw, 36px);
  max-width: calc(100% - 32px);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.24em;
  text-align: center;
  text-transform: uppercase;
  color: var(--gold-light);
  transform: translateX(-50%);
}

.lightbox__btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--line-4);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
  color: var(--gold);
  background: rgba(11, 9, 7, 0.7);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lightbox__btn:hover {
  color: var(--gold-light);
  background: rgba(217, 180, 106, 0.15);
}

.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev  { left: 16px;  top: 50%; transform: translateY(-50%); }
.lightbox__next  { right: 16px; top: 50%; transform: translateY(-50%); }

.lightbox__btn[hidden] {
  display: none;
}

/* Privacy: short banner and date ------------------------------------------- */
.banner--short {
  min-height: clamp(380px, 56vh, 540px);
}

.legal-date {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Privacy: "in short" promises --------------------------------------------- */
.promises {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.promise {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 24px 26px;
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(217, 180, 106, 0.07), rgba(217, 180, 106, 0.015));
}

.promise::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.promise__mark {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.promise h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  color: var(--heading);
}

.promise p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
}

/* Privacy: contents rail and policy text ----------------------------------- */
.legal {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: clamp(40px, 6vw, 88px);
  padding-top: clamp(56px, 8vw, 96px);
}

.legal__toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  padding-left: 18px;
  border-left: 1px solid var(--line-2);
}

.legal__toc-title {
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal__toc ol {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.legal__toc li {
  counter-increment: toc;
}

.legal__toc a {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 5px 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--dim);
  transition: color 0.2s;
}

.legal__toc a::before {
  content: counter(toc, decimal-leading-zero);
  flex: none;
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-deep);
}

.legal__toc a:hover,
.legal__toc a[aria-current="true"] {
  color: var(--gold-light);
}

.legal__toc a[aria-current="true"]::after {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: -19px;
  width: 1px;
  background: var(--gold);
}

.legal__body {
  max-width: 760px;
  counter-reset: part;
}

.legal__body > section {
  scroll-margin-top: calc(var(--header-h) + 24px);
  counter-increment: part;
}

.legal__body > section + section {
  margin-top: clamp(48px, 6vw, 72px);
  padding-top: clamp(48px, 6vw, 72px);
  border-top: 1px solid var(--line);
}

.legal__body h2 {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 22px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 2.8vw, 32px);
  line-height: 1.2;
  color: var(--heading);
}

.legal__body h2::before {
  content: counter(part, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.legal__body h3 {
  margin: 32px 0 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--heading);
}

.legal__body p,
.legal__body li {
  font-size: 18px;
  line-height: 1.75;
  color: var(--body);
}

.legal__body p + p,
.legal__body p + ul,
.legal__body ul + p {
  margin-top: 16px;
}

.legal__body ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal__body ul > li {
  position: relative;
  padding-left: 26px;
}

/* Small gold diamond as the bullet */
.legal__body ul > li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 4px;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

.legal__body strong {
  font-weight: 400;
  color: var(--heading);
}

.legal__body a {
  border-bottom: 1px solid var(--line-4);
}

.legal__body a:hover {
  border-bottom-color: var(--gold-light);
}

/* Privacy: what-we-collect table ------------------------------------------- */
.legal-table {
  margin: 28px 0 8px;
  border: 1px solid var(--line-2);
}

.legal-table__row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  padding: 18px 22px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--body);
}

.legal-table__row + .legal-table__row {
  border-top: 1px solid var(--line);
}

.legal-table__row > [role="rowheader"] {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--heading);
}

.legal-table__head {
  padding-top: 12px;
  padding-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(217, 180, 106, 0.06);
}

@media (max-width: 860px) {
  .legal {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The contents become a compact two-column index above the text. */
  .legal__toc {
    position: static;
    padding: 20px;
    border: 1px solid var(--line-2);
  }

  .legal__toc ol {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    column-gap: 20px;
  }

  .legal__toc a[aria-current="true"]::after {
    display: none;
  }
}

@media (max-width: 620px) {
  .legal-table__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
    padding: 16px 18px;
  }

  .legal-table__head {
    display: none;
  }

  .legal__body p,
  .legal__body li {
    font-size: 17px;
  }
}

/* Footer ------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg), #070605);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding-top: 44px;
  padding-bottom: 36px;
}

.site-footer__brand img {
  width: auto;
  height: 44px;
  opacity: 0.9;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.site-footer nav a {
  color: var(--muted);
}

.site-footer nav a:hover {
  color: var(--gold-light);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  width: 100%;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
}

/* Emblem marquee ----------------------------------------------------------- */
.marquee {
  display: flex;
  overflow: hidden;
  padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee__track {
  display: flex;
  flex-shrink: 0;
  gap: clamp(20px, 3vw, 40px);
  margin: 0;
  padding: 0 clamp(10px, 1.5vw, 20px);
  list-style: none;
}

.marquee__track img {
  width: clamp(64px, 7vw, 92px);
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s var(--ease-out);
}

.marquee__track img:hover {
  transform: scale(1.12);
}

@media (prefers-reduced-motion: no-preference) {
  .marquee__track {
    animation: marquee 70s linear infinite;
  }

  .marquee:hover .marquee__track {
    animation-play-state: paused;
  }

  @keyframes marquee {
    to { transform: translateX(-100%); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee {
    flex-wrap: wrap;
    justify-content: center;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .marquee__track {
    flex-wrap: wrap;
    justify-content: center;
    flex-shrink: 1;
  }

  .marquee__track[aria-hidden] {
    display: none;
  }
}

.marquee-caption {
  margin-top: 28px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-align: center;
  text-transform: uppercase;
  color: var(--muted);
}

/* Emblem mosaic (feature media on The Game) -------------------------------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-content: center;
  gap: clamp(6px, 1.2vw, 14px);
  padding: clamp(14px, 3vw, 32px);
  background:
    radial-gradient(ellipse 70% 70% at 50% 50%, rgba(217, 180, 106, 0.12), rgba(217, 180, 106, 0) 70%),
    linear-gradient(180deg, var(--bg-3), var(--bg));
}

@media (max-width: 860px) {
  .feature__media.mosaic {
    aspect-ratio: auto;
  }
}

.frame.mosaic > img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  transition: transform 0.4s var(--ease-out);
}

.frame.mosaic > img:hover {
  transform: scale(1.15);
}

/* The Game: civilization roster -------------------------------------------- */
.roster {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 64px);
}

.roster__era {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: 24px clamp(24px, 4vw, 56px);
  padding-top: clamp(28px, 3vw, 40px);
  border-top: 1px solid var(--line-2);
}

@media (max-width: 760px) {
  .roster__era {
    grid-template-columns: 1fr;
  }
}

.roster__era-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--heading);
}

.roster__era-count {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.civs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.civ {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease-out);
}

.civ:hover {
  border-color: var(--line-4);
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  transform: translateY(-2px);
}

.civ img {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
  transition: transform 0.4s var(--ease-out);
}

.civ:hover img {
  transform: rotate(-6deg) scale(1.08);
}

.civ__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--heading);
}

.civ__leaders {
  margin-top: 3px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 300;
  color: var(--body);
}

.civ__tag {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

/* The Game: wonder and unit icons ------------------------------------------ */
.icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 136px), 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 18px 10px 16px;
  border: 1px solid var(--line);
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(217, 180, 106, 0.09), rgba(217, 180, 106, 0) 70%), var(--bg-2);
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
}

.icon-card:hover {
  border-color: var(--line-4);
  transform: translateY(-3px);
}

.icon-card img {
  width: 88px;
  height: 88px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55));
  transition: transform 0.4s var(--ease-out);
}

.icon-card:hover img {
  transform: scale(1.1);
}

.icon-card span {
  font-family: var(--font-display);
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.04em;
  color: var(--heading);
}

.icon-card small {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.split-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 40px;
  margin-bottom: 32px;
}

.split-head .section-head {
  max-width: 620px;
  margin: 0;
}

.split-head .lead {
  max-width: 420px;
}

.subhead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px);
  color: var(--heading);
}

.stack-lg > * + * {
  margin-top: clamp(64px, 8vw, 104px);
}

.note {
  margin-top: 24px;
  font-size: 16px;
  font-style: italic;
  font-weight: 300;
  color: var(--dim);
}
