:root {
  --mono: "Courier New", Courier, monospace;
  --hazard: repeating-linear-gradient(-45deg, #fff 0 8px, #000 8px 16px);
  --gutter: clamp(16px, 8vw, 120px);
  --col: 720px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: #000;
  color: #fff;
  font-family: var(--mono);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: none;
}

::selection { background: #fff; color: #000; }

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

/* ============================================================ void */
#void { position: fixed; inset: 0; z-index: 0; background: #000; }
#void canvas { display: block; width: 100vw; height: 100vh; image-rendering: pixelated; }

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,0.25) 3px);
  mix-blend-mode: multiply;
}

/* ============================================================ HUD */
.hud {
  position: fixed;
  z-index: 4;
  font-size: 11px;
  letter-spacing: 0.25em;
  opacity: 0.75;
  pointer-events: none;
  mix-blend-mode: difference;
  white-space: nowrap;
}
.hud-tl { top: 12px; left: 14px; }
.hud-tr { top: 12px; right: 14px; }
.hud-bl { bottom: 12px; left: 14px; }
.hud-br { bottom: 12px; right: 14px; opacity: 0.4; font-size: 10px; }

.hud b {
  display: inline-block;
  width: 7px; height: 11px;
  background: #fff;
  vertical-align: -1px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { to { opacity: 0; } }

/* ============================================================ sections */
main { position: relative; z-index: 2; }

.s {
  min-height: 100vh;
  padding: 50vh var(--gutter) 18vh;
  position: relative;
}

/* rotated gutter tag per section */
.s[data-label]::before {
  content: attr(data-label);
  position: absolute;
  left: 22px;
  top: 50vh;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11px;
  letter-spacing: 0.35em;
  background: #000;
  padding: 10px 4px;
  border-left: 4px solid #fff;
}
.s[data-label]::after {
  content: "";
  position: absolute;
  left: 22px;
  top: calc(50vh + 140px);
  width: 19px;
  height: 90px;
  background: var(--hazard);
  opacity: 0.85;
}

.s.hero { padding: 0; position: relative; }
.s.end { min-height: 80vh; }

.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.4em;
  opacity: 0.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  mix-blend-mode: difference;
}
.scroll-hint i {
  display: block;
  width: 1px; height: 36px;
  background: #fff;
  transform-origin: top;
  animation: drop 1.6s ease-in-out infinite;
}
@keyframes drop {
  0% { transform: scaleY(0); opacity: 0; }
  40% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(20px); opacity: 0; }
}

/* ============================================================ readouts: text on black strips, void between the lines */
.readout { max-width: var(--col); }

.r {
  display: inline;
  background: #000;
  color: #fff;
  padding: 0.25em 0.5em;
  line-height: 1.9;
  font-size: clamp(13px, 1.6vw, 16px);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.r.big { font-size: clamp(15px, 2.2vw, 22px); letter-spacing: 0.12em; }

.readout p { display: block; margin-bottom: 0.9rem; }
.readout p.r { display: inline; }
.readout p.r::after { content: ""; display: block; height: 0.9rem; }

.links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 1.2rem; }

.k {
  color: #fff;
  background: #000;
  text-decoration: none;
  padding: 0.4em 0.6em;
  letter-spacing: 0.12em;
  font-size: clamp(12px, 1.5vw, 14px);
  white-space: nowrap;
}
.k:hover, .k:focus { background: #fff; color: #000; outline: none; }

/* ============================================================ departure board */
.board {
  max-width: var(--col);
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 2.5rem;
}

.day {
  display: flex;
  align-items: stretch;
  align-self: flex-start;
  margin-top: 1.2rem;
  background: #fff;
  color: #000;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 32px;
  padding: 0 10px 0 0;
}
.day::before { content: ""; display: block; width: 18px; background: var(--hazard); margin-right: 6px; }
.day canvas { display: block; }
.board .day:first-child { margin-top: 0; }

.row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: #000;
  padding: 0.45em 0.6em;
  font-size: clamp(12px, 1.5vw, 15px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.row .t { flex: 0 0 auto; min-width: 7.5em; opacity: 0.75; font-variant-numeric: tabular-nums; }
.row .lead { flex: 1 1 24px; min-width: 24px; border-bottom: 1px dotted rgba(255,255,255,0.45); transform: translateY(-0.35em); }
.row .n { flex: 0 1 auto; text-align: right; }
.row .n a { color: #fff; text-decoration: none; }
.row .n a:hover { background: #fff; color: #000; }
.row .n small { display: block; font-size: 0.8em; opacity: 0.65; letter-spacing: 0.15em; }
.row .dj { display: block; font-size: 0.85em; opacity: 0.7; }
.row .dj::before { content: "> "; }
.row.status .n { text-align: left; opacity: 0.7; }
.row.status .n a { text-decoration: underline; }

/* prose rows (where) do not shout */
#where .board .row { text-transform: none; letter-spacing: 0; }
#where .board .row .n { text-align: left; }
#where .board .row .t { text-transform: uppercase; }

.note { font-size: 11px; letter-spacing: 0.2em; opacity: 0.55; max-width: var(--col); }

/* ============================================================ map: inverted OSM, the void bleeds through */
.map {
  max-width: var(--col);
  height: 56vh;
  min-height: 280px;
  margin: 2rem 0 0.8rem;
  position: relative;
}
.map iframe {
  width: 100%; height: 100%; display: block;
  filter: grayscale(1) invert(1) contrast(1.3);
  opacity: 0.9;
}

/* ============================================================ no WebGL: show the headings in the DOM instead */
body.nogl .sr {
  position: static;
  width: auto; height: auto;
  clip: auto;
  white-space: normal;
  font-weight: bold;
  text-transform: uppercase;
  font-size: clamp(2rem, 8vw, 6rem);
  line-height: 1;
  margin-bottom: 1.5rem;
}
body.nogl .s { padding-top: 14vh; }
body.nogl .s.hero { padding: 30vh var(--gutter) 0; }

/* ============================================================ small screens */
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .s { padding-top: 46vh; }
  .hud-tr, .hud-br { display: none; }
  .s[data-label]::before, .s[data-label]::after { display: none; }
  .row { flex-wrap: wrap; }
  .row .lead { display: none; }
  .row .t { min-width: 100%; opacity: 0.6; font-size: 0.85em; }
  .row .n { text-align: left; }
  .k { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint i, .hud b { animation: none; }
}
