:root {
  --night: #030b22;
  --river: #0b4f6c;
  --azure: #1aa3c4;
  --key: #f28c28;
  --glow: #ffb868;
  --bone: #f4e3b2;
  --mist: #a9c3d2;
  --display: "Chakra Petch", "Avenir Next Condensed", "Trebuchet MS", sans-serif;
  --body: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 72px);
}

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

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

body {
  margin: 0;
  background: var(--night);
  color: var(--mist);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

/* Hero: the river at dusk, the pitch on the left, the box on the right. */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  grid-template-rows: auto 1fr;
  column-gap: var(--gutter);
  min-height: 100svh;
  padding: clamp(20px, 3.5vh, 40px) var(--gutter) 0;
  background:
    linear-gradient(to bottom, transparent 62%, var(--night) 100%),
    linear-gradient(to right, rgb(3 11 34 / 0.72) 0%, rgb(3 11 34 / 0.25) 45%, transparent 70%),
    image-set(url("img/river-1280.webp") 1x, url("img/river-2560.webp") 2x) center 40% / cover no-repeat,
    var(--night);
}

.masthead { grid-column: 1 / -1; }
.logo { width: clamp(180px, 20vw, 280px); }

.pitch {
  align-self: center;
  max-width: 34rem;
  padding-block: 2rem 14vh;
}

h1 {
  font: 700 clamp(2.6rem, 5.4vw, 5rem)/0.98 var(--display);
  letter-spacing: -0.015em;
  color: var(--bone);
  text-wrap: balance;
}

.lede {
  margin-top: 1.5rem;
  max-width: 30rem;
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  color: #d3e3ec;
}

.status {
  margin-top: 2rem;
  padding-left: 1rem;
  border-left: 3px solid var(--key);
  font: 500 1.0625rem/1.4 var(--display);
  color: var(--glow);
}

.stage {
  position: relative;
  min-height: min(78svh, 760px);
  align-self: stretch;
}

.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
  opacity: 0;
  outline: none;
}
.stage canvas.is-dragging { cursor: grabbing; }
.stage canvas:focus-visible { outline: 2px solid var(--glow); outline-offset: -6px; border-radius: 12px; }

.still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 62%, transparent 100%);
}

.hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(16px, 5vh, 48px);
  text-align: center;
  font: 500 0.9375rem/1 var(--display);
  color: var(--mist);
  opacity: 0;
  pointer-events: none;
}

.stage.is-live canvas { opacity: 1; }
.stage.is-live .still { display: none; }
.stage.is-live .hint { opacity: 0.85; }

/* Three plain facts under the river. */
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 104px) var(--gutter);
}

.facts h2 {
  font: 700 1.5rem/1.15 var(--display);
  color: var(--bone);
}
.facts p { margin-top: 0.6rem; max-width: 32ch; }

footer {
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid rgb(26 163 196 / 0.18);
  font-size: 0.9375rem;
  color: #7f9aab;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    background:
      linear-gradient(to bottom, rgb(3 11 34 / 0.2) 0%, transparent 30%, transparent 60%, var(--night) 100%),
      url("img/river-1280.webp") 86% 30% / cover no-repeat,
      var(--night);
  }
  .logo { width: min(62vw, 250px); }
  .stage { grid-row: 2; min-height: min(56svh, 460px); margin-inline: calc(var(--gutter) * -0.6); }
  .hint { bottom: 4px; }
  .pitch { grid-row: 3; padding-block: 1.5rem 3rem; }
  .facts { grid-template-columns: minmax(0, 1fr); }
}
