/* KESTREL coming-soon page. The game runs behind everything (.stage); the page takes the light
   of whichever stop the live match is on (html[data-stop]). Faces are the game's own. */

:root {
  --ink: #0c1220;
  --ink2: #121b2e;
  --paper: #eef2f7;
  --mute: #a9b4c6;
  --line: rgba(238, 242, 247, 0.16);
  --display: 'Jersey 10', 'Arial Narrow', Impact, sans-serif;
  --body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* the dial's sun path */
  --dawn: #9fd4ff;
  --noon: #f2c14e;
  --dusk: #ff8a5c;
  /* per stop, set below */
  --accent: #ffb347;
  --accent2: #6a5cff;
  --glow: rgba(255, 179, 71, 0.35);
  --veil: rgba(12, 18, 32, 0.55);
  color-scheme: dark;
}
html[data-stop="rimefall"] { --accent: #9fd4ff; --accent2: #ffd2a8; --glow: rgba(159, 212, 255, 0.35); --veil: rgba(10, 20, 36, 0.5); }
html[data-stop="saltpan"]  { --accent: #f2c14e; --accent2: #e0663a; --glow: rgba(242, 193, 78, 0.35); --veil: rgba(28, 22, 14, 0.5); }
html[data-stop="canopy"]   { --accent: #ff9a5c; --accent2: #c86ad8; --glow: rgba(255, 154, 92, 0.35); --veil: rgba(26, 14, 30, 0.5); }
html[data-stop="farm"]     { --accent: #ff7ad0; --accent2: #ffb36b; --glow: rgba(255, 122, 208, 0.32); --veil: rgba(26, 14, 30, 0.5); }
html[data-stop="bigfarm"]  { --accent: #ff8a4c; --accent2: #8bd06a; --glow: rgba(255, 138, 76, 0.35); --veil: rgba(22, 16, 22, 0.5); }
html[data-stop="quay"]     { --accent: #ffb347; --accent2: #7a6cff; --glow: rgba(255, 179, 71, 0.35); --veil: rgba(10, 12, 30, 0.5); }
html[data-stop="ashveil"]  { --accent: #e9e4d4; --accent2: #d4502f; --glow: rgba(212, 80, 47, 0.32); --veil: rgba(16, 16, 20, 0.58); }
html[data-stop="kestrel"]  { --accent: #f2c230; --accent2: #4fa3ff; --glow: rgba(79, 163, 255, 0.32); --veil: rgba(8, 16, 30, 0.5); }
html[data-stop="survival"] { --accent: #b7e36a; --accent2: #f2c230; --glow: rgba(183, 227, 106, 0.3); --veil: rgba(8, 16, 30, 0.55); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; color: var(--paper); background: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: var(--accent); transition: color .6s; }
a:hover { color: var(--paper); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
html:not(.js) .js-only { display: none !important; }

/* ---------------------------------------------------------------- the stage */
.stage { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #000; }
.stage .still img, .stage iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0;
  image-rendering: pixelated;
}
.stage iframe { pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.stage.live iframe { opacity: 1; }
.stage.live .still { opacity: 0; transition: opacity 1.2s ease 0.4s; }
.stage .veil {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--veil) 0%, rgba(0,0,0,0) 62%),
    linear-gradient(0deg, rgba(8,10,18,.82) 0%, rgba(8,10,18,0) 34%),
    linear-gradient(180deg, rgba(8,10,18,.55) 0%, rgba(8,10,18,0) 18%);
  transition: background 1s;
}
/* scrolled past the hero: the match dims so the words lead, but never goes away */
body.deep .stage .veil { background: rgba(8, 10, 18, 0.7); }
.stage .grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .18; mix-blend-mode: overlay;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.08) 0 1px, transparent 1px 3px);
}

/* ---------------------------------------------------------------- bar */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: max(12px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(8,10,18,.7), rgba(8,10,18,0));
}
.bar a { color: var(--paper); text-decoration: none; font: 400 22px/1 var(--display); letter-spacing: .04em; }
.bar a:hover { color: var(--accent); }
.bar nav { display: flex; gap: 18px; }
@media (max-width: 760px) { .bar nav { display: none; } }

/* ---------------------------------------------------------------- live scoreline */
.score {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 20;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 8px 10px 8px 14px; background: rgba(8,10,18,.78); border: 1px solid var(--line);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font: 400 20px/1 var(--display); letter-spacing: .05em; max-width: calc(100vw - 32px);
}
.score[hidden] { display: none; }
.score .dot { width: 9px; height: 9px; border-radius: 50%; background: #ff4a3a; box-shadow: 0 0 10px #ff4a3a; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.score-where { color: var(--mute); }
.score-line b { font-weight: 400; }
.score-line i { font-style: normal; font-size: 26px; }
.score .crew { color: #6fb6ff; }
.score .cors { color: #ffae4a; }
.score .sep { color: var(--mute); padding: 0 6px; }
.score-clock { color: var(--paper); min-width: 3.2em; }
.score-btn { font: 400 18px/1 var(--display); letter-spacing: .05em; color: var(--paper); background: none; border: 1px solid var(--line); padding: 6px 10px; cursor: pointer; }
.score-btn:hover { border-color: var(--accent); color: var(--accent); }

/* the kill feed, echoed from the game in the page's own type */
.feed {
  position: fixed; right: max(18px, env(safe-area-inset-right)); top: 76px; z-index: 15; margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px; pointer-events: none;
  font: 400 19px/1.1 var(--display); letter-spacing: .04em;
}
.feed li { background: rgba(8,10,18,.7); padding: 5px 10px; border-right: 3px solid var(--c, var(--accent)); animation: feedIn .35s ease-out, feedOut .6s ease-in 5.4s forwards; white-space: nowrap; }
.feed .k { color: var(--kc, #6fb6ff); }
.feed .v { color: var(--vc, #ffae4a); }
.feed .x { color: var(--mute); padding: 0 6px; }
@keyframes feedIn { from { transform: translateX(16px); opacity: 0; } }
@keyframes feedOut { to { opacity: 0; transform: translateY(-6px); } }
body.deep .feed { opacity: .55; }
@media (max-width: 760px) { .feed { display: none; } .score { left: max(12px, env(safe-area-inset-left)); right: auto; font-size: 17px; gap: 8px; } .score-where { display: none; } }
/* short landscape screens: the dial gives way first */
@media (max-height: 760px) and (min-width: 801px) { .title .t { font-size: clamp(72px, 10vw, 150px); } .dial-wrap { max-width: 400px; } }

/* ---------------------------------------------------------------- hero */
main { position: relative; z-index: 5; }
.hero { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 84px max(24px, 6vw) 64px; position: relative; }
.hero-in { max-width: 1060px; }
.hero-in .lede, .hero-in .live-note { max-width: 640px; }
.controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px 34px; }
.controls .dial-wrap { flex: 1 1 400px; }
@media (min-width: 1000px) { .controls .knobs { flex-direction: column; align-items: flex-start; margin: 0 0 54px; } }
.kicker { font: 400 22px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; transition: color .8s; }
.title { margin: 0; line-height: .8; }
.title .t {
  display: inline-block; position: relative;
  font: 400 clamp(84px, 13vw, 188px)/.8 var(--display); letter-spacing: .02em; color: var(--paper);
  text-shadow: 0 0 40px var(--glow), 4px 4px 0 rgba(0,0,0,.45);
  transition: text-shadow 1s;
}
/* a one-pixel misregistration in the hour's colour, the way the painterly pass dithers */
.title .t::after {
  content: attr(data-text); position: absolute; left: 3px; top: 3px; z-index: -1;
  color: var(--accent2); opacity: .55; transition: color 1s;
}
.lede { font-size: clamp(18px, 1.9vw, 22px); line-height: 1.42; margin: 14px 0 8px; max-width: 34em; text-shadow: 0 1px 12px rgba(0,0,0,.7); }
.live-note { color: var(--mute); font-size: 14.5px; margin: 0 0 6px; max-width: 36em; }

.dial-wrap { margin: 6px 0 4px; max-width: 470px; }
.dial { width: 100%; height: auto; overflow: visible; }
.dial .horizon { stroke: var(--line); stroke-width: 1; }
.dial .hz { fill: var(--mute); font: 400 13px var(--display); letter-spacing: .08em; }
.dial .arc { opacity: .8; }
.stopmark { cursor: pointer; outline: none; }
.stopmark circle, .stopmark rect, .stopmark path { fill: rgba(8,10,18,.75); stroke: var(--paper); stroke-width: 1.5; transition: fill .3s, stroke .3s, transform .3s; transform-box: fill-box; transform-origin: center; }
.stopmark text { fill: var(--paper); font: 400 18px var(--display); letter-spacing: .06em; text-anchor: middle; paint-order: stroke; stroke: rgba(0,0,0,.6); stroke-width: 3px; }
.stopmark text.small { font-size: 15px; }
.stopmark:hover circle, .stopmark:hover rect, .stopmark:hover path,
.stopmark:focus-visible circle, .stopmark:focus-visible rect, .stopmark:focus-visible path { stroke: var(--accent); transform: scale(1.25); }
.stopmark.on circle, .stopmark.on rect, .stopmark.on path { fill: var(--accent); stroke: var(--paper); filter: drop-shadow(0 0 8px var(--accent)); }
.stopmark.on text { fill: var(--accent); }
.dial-now { margin: 0; color: var(--paper); font-size: 15px; min-height: 2.9em; text-shadow: 0 1px 8px rgba(0,0,0,.8); }
.dial-now b { font: 400 21px/1 var(--display); letter-spacing: .04em; color: var(--accent); }

.knobs { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 8px 0 0; }
.knobs[hidden] { display: none; }
.knob { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.knob-l { font: 400 18px/1 var(--display); letter-spacing: .1em; color: var(--mute); margin-right: 4px; text-transform: uppercase; }
.knob button, .pill {
  font: 400 19px/1 var(--display); letter-spacing: .05em; color: var(--paper);
  background: rgba(8,10,18,.6); border: 1px solid var(--line); padding: 7px 11px; min-height: 36px; cursor: pointer;
}
.knob button:hover, .pill:hover { border-color: var(--accent); }
.knob button[aria-pressed="true"] { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.pill { display: inline-block; text-decoration: none; margin-top: 14px; }
.pill[hidden] { display: none; }
.scrollcue { position: absolute; left: 50%; bottom: 28px; width: 22px; height: 36px; border: 2px solid var(--paper); border-radius: 12px; opacity: .6; }
.scrollcue span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; background: var(--paper); border-radius: 2px; animation: cue 1.8s infinite; }
@keyframes cue { 60% { transform: translateY(10px); opacity: 0; } }
@media (max-width: 760px) { .scrollcue { display: none; } }

/* ---------------------------------------------------------------- panels */
.panel { padding: 110px max(24px, 6vw); position: relative; }
.col { max-width: 720px; }
.col.wide { max-width: 1240px; }
.eyebrow { font: 400 20px/1 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; transition: color .8s; }
h2 { font: 400 clamp(46px, 6.4vw, 84px)/.92 var(--display); letter-spacing: .01em; margin: 0 0 22px; text-shadow: 0 2px 20px rgba(0,0,0,.6); }
h3 { font: 400 26px/1 var(--display); letter-spacing: .04em; margin: 26px 0 10px; color: var(--paper); }
.panel p, .panel li { text-shadow: 0 1px 10px rgba(0,0,0,.65); }
.aside { color: var(--mute); font-size: 15px; }
.plain { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; }

.modes { margin: 24px 0; display: grid; gap: 2px; }
.modes div { display: grid; grid-template-columns: 210px 1fr; gap: 18px; align-items: baseline; padding: 14px 16px; background: rgba(8,10,18,.62); border-left: 3px solid var(--accent); }
.modes dt { font: 400 26px/1 var(--display); letter-spacing: .04em; }
.modes dd { margin: 0; color: var(--paper); }
@media (max-width: 640px) { .modes div { grid-template-columns: 1fr; gap: 4px; } }

/* the stops: a filmstrip; the live one is lit */
.stops { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1100px) { .stops { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stops { grid-template-columns: 1fr; } }
.stops button {
  all: unset; box-sizing: border-box; display: block; width: 100%; cursor: pointer; position: relative;
  background: rgba(8,10,18,.72); border: 1px solid var(--line); transition: border-color .3s, transform .3s;
}
.stops button:hover, .stops button:focus-visible { border-color: var(--accent); transform: translateY(-3px); }
.stops li.on button { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 30px var(--glow); }
.stops img { display: block; width: 100%; height: auto; aspect-ratio: 1600 / 740; object-fit: cover; image-rendering: pixelated; }
.stops .hour { position: absolute; top: 10px; left: 10px; font: 400 18px/1 var(--display); letter-spacing: .1em; text-transform: uppercase; background: rgba(8,10,18,.8); padding: 4px 8px; color: var(--accent); }
.stops li.on .hour::after { content: ' \00b7 live'; color: #ff6a5a; }
.stops b { display: block; font: 400 26px/1 var(--display); letter-spacing: .03em; padding: 12px 14px 4px; }
.stops .blurb { display: block; padding: 0 14px 14px; font-size: 14.5px; line-height: 1.45; color: var(--mute); }

/* the roster: the ten in the live match */
.roster { margin-top: 28px; background: rgba(8,10,18,.7); border: 1px solid var(--line); padding: 16px 18px; }
.roster[hidden] { display: none; }
.roster-head { margin: 0 0 10px; color: var(--mute); font-size: 14.5px; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .teams { grid-template-columns: 1fr; } }
.team h3 { margin: 0 0 8px; font-size: 22px; }
.team.crew h3 { color: #6fb6ff; }
.team.cors h3 { color: #ffae4a; }
.team ol { list-style: none; margin: 0; padding: 0; font: 400 20px/1.35 var(--display); letter-spacing: .03em; }
.team li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 6px; transition: background .4s; }
.team li.down { opacity: .45; }
.team li.flash { background: rgba(255,255,255,.14); }
.team li .kd { color: var(--mute); }

/* ranks */
.ranks { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ranks li {
  font: 400 19px/1 var(--display); letter-spacing: .04em; padding: 7px 10px 7px 26px; position: relative;
  background: rgba(8,10,18,.7); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); color: var(--c);
}
.ranks li::before { content: ''; position: absolute; left: 9px; top: 50%; width: 9px; height: 9px; margin-top: -5px; background: var(--c); transform: rotate(45deg); }
.ranks li.apex { box-shadow: 0 0 18px color-mix(in srgb, var(--c) 50%, transparent); }

/* arms */
.arms { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 640px) { .arms { grid-template-columns: 1fr; } }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.list li { font: 400 19px/1 var(--display); letter-spacing: .03em; padding: 7px 10px; background: rgba(8,10,18,.68); border: 1px solid var(--line); }

/* the dead: a still that breaks the column */
.panel.shot { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; }
@media (max-width: 900px) { .panel.shot { grid-template-columns: 1fr; } }
.still-fig { margin: 0; border: 1px solid var(--line); box-shadow: 0 30px 60px rgba(0,0,0,.5); }
.still-fig img, .phone img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.link { all: unset; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link:hover { color: var(--paper); }

/* the phone: the game's own screen, held sideways */
.phone { margin: 10px 0 24px; padding: 14px 22px; background: #05070c; border-radius: 34px; border: 2px solid #2a3244; box-shadow: 0 0 0 6px #10151f, 0 30px 70px rgba(0,0,0,.6); max-width: 640px; }
.phone img { border-radius: 10px; }
.beats { padding-left: 1.1em; }
.beats li { margin: 8px 0; }

/* coming soon */
.soon { padding: 140px max(24px, 6vw) 100px; position: relative; text-align: left; }
.soon h2 { font-size: clamp(54px, 8vw, 110px); }
.facts { font: 400 24px/1.4 var(--display); letter-spacing: .05em; color: var(--accent); }
.maker { color: var(--mute); }
.foot { position: relative; z-index: 5; padding: 30px max(24px, 6vw) 90px; color: var(--mute); font-size: 13.5px; border-top: 1px solid var(--line); background: rgba(8,10,18,.85); }
