/* Baron Waiter Traitor Spy — the website.
 * Colours from the game: the menu's ink, gold, cream and brass, the sleeping cars' blue, the title's red. */

:root {
  --ink: #0b0807;
  --ink-2: #15100c;
  --night: #0d1532;
  --navy: #142050;
  --blue: #283e90;
  --blue-hi: #3a56b4;
  --gold: #e8c468;
  --gold-hi: #f7dc8e;
  --cream: #f4ead0;
  --paper: #efe4c6;
  --paper-ink: #2a1c10;
  --brass: #6a4a1c;
  --brass-hi: #9a7232;
  --red: #c8402c;
  --text: #e7dcc2;
  --muted: #b2a487;
  --line: rgba(232, 196, 104, 0.24);
  --panel: rgba(18, 10, 8, 0.86);

  --header-h: 64px;
  --font-pixel: 'Tiny5', ui-monospace, 'Courier New', monospace;
  --font-serif: 'EB Garamond', Garamond, Georgia, serif;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.05vw + 13px, 21px);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;  /* the pixel font has one weight: no smeared bold */
}

img { max-width: 100%; display: block; }
a { color: var(--gold); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

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

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px;
  background: var(--gold); color: var(--ink);
  font-family: var(--font-pixel);
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ---- type ------------------------------------------------------------------------------------------- */

h2 {
  margin: 0 0 0.5em;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.3rem, 4.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.012em;
  color: var(--cream);
  text-wrap: balance;
}
h2 em { font-style: italic; color: var(--gold); }

.kicker {
  display: flex; align-items: center; gap: 14px;
  margin: 0 0 18px;
  font-family: var(--font-pixel);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.kicker::before {
  content: '';
  width: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.head--center { text-align: center; }
.head--center .kicker { justify-content: center; }
.head--center .kicker::after {
  content: '';
  width: 34px; height: 1px;
  background: linear-gradient(90deg, var(--gold), transparent);
}

/* ---- the buttons, as the game's menu draws its lines ----------------------------------------------- */

.pbtn {
  --bw: 3px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.7em;
  padding: 0.75em 1.3em;
  border: var(--bw) solid var(--brass-hi);
  background-color: var(--panel);
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-shadow: 0 2px 0 #0c0808;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.25s, border-color 0.25s, background-color 0.25s, transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.pbtn:hover,
.pbtn:focus-visible {
  color: var(--cream);
  border-color: var(--gold);
  background-color: rgba(58, 38, 14, 0.92);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(232, 196, 104, 0.18), 0 0 36px rgba(232, 196, 104, 0.16);
}
.pbtn:active { transform: translateY(0); }
.pbtn--primary {
  border-color: var(--gold);
  color: var(--cream);
  background-image: linear-gradient(rgba(232, 196, 104, 0.16), rgba(232, 196, 104, 0.05));
}
/* A glint of light across it now and then. */
.pbtn--primary::after {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 238, 190, 0.28) 50%, transparent 62%);
  transform: translateX(-130%);
  animation: glint 6s 2.4s infinite;
}
@keyframes glint {
  0%, 72% { transform: translateX(-130%); }
  88%, 100% { transform: translateX(130%); }
}

.price { display: inline-flex; align-items: baseline; gap: 0.45em; }
.price s { color: var(--muted); font-size: 0.78em; text-decoration-thickness: 2px; opacity: 0.8; }
.price b { color: var(--gold-hi); font-weight: 600; }

/* ---- the bar along the top ------------------------------------------------------------------------- */

.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  background: linear-gradient(rgba(6, 5, 4, 0.66), rgba(6, 5, 4, 0));
  transition: background-color 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}
.bar.is-solid {
  background-color: rgba(11, 8, 7, 0.9);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(0, 0, 0, 0.35);
}
.bar__brand {
  text-decoration: none;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 0.5s, transform 0.5s var(--ease);
  pointer-events: none;
}
.bar.is-past .bar__brand { opacity: 1; transform: none; pointer-events: auto; }

/* The name in the title's colours: red to yellow, leaning, with a black shadow. */
.brand {
  display: inline-block;
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-style: italic;
  white-space: nowrap;
  background: linear-gradient(#ffe066 15%, #f0a030 55%, #c8402c 90%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 #000) drop-shadow(1px 0 0 #7a1c10);
  transform: skewX(-6deg);
}
.brand--small { font-size: 0.95rem; }

.bar__nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.bar__nav a {
  position: relative;
  padding: 8px 12px;
  color: var(--text);
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-shadow: 0 1px 0 #000;
  transition: color 0.2s;
}
.bar__nav a::after {
  content: '';
  position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.bar__nav a:hover,
.bar__nav a.is-here { color: var(--gold-hi); }
.bar__nav a:hover::after,
.bar__nav a.is-here::after { transform: scaleX(1); }

.bar__end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.pbtn--bar { --bw: 2px; padding: 0.62em 1em; font-size: 0.95rem; }

.sound {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 2px solid var(--brass-hi);
  background: var(--panel);
  color: var(--gold);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, transform 0.3s var(--ease);
}
.sound svg { width: 20px; height: 20px; }
.sound:hover { border-color: var(--gold); color: var(--cream); transform: translateY(-1px); }
.sound .sound__on { display: none; }
.sound[aria-pressed='true'] .sound__on { display: inline; }
.sound[aria-pressed='true'] .sound__off { display: none; }
.sound[aria-pressed='true'] { border-color: var(--gold); }

/* ---- the hero -------------------------------------------------------------------------------------- */

.hero {
  --px: 4px;
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 420px;
  overflow: hidden;
  background: #000;
}
.hero canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  /* The game's own pointer: its cross-hairs. */
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 13 13' shape-rendering='crispEdges'%3E%3Cg fill='%230c0808'%3E%3Crect x='0' y='5' width='6' height='3'/%3E%3Crect x='7' y='5' width='6' height='3'/%3E%3Crect x='5' y='0' width='3' height='6'/%3E%3Crect x='5' y='7' width='3' height='6'/%3E%3C/g%3E%3Cg fill='%23f4ead0'%3E%3Crect x='1' y='6' width='4' height='1'/%3E%3Crect x='8' y='6' width='4' height='1'/%3E%3Crect x='6' y='1' width='1' height='4'/%3E%3Crect x='6' y='8' width='1' height='4'/%3E%3C/g%3E%3C/svg%3E") 13 13, crosshair;
}
.hero::after {
  content: '';
  position: absolute; inset: auto 0 -1px;
  height: 22%;
  background: linear-gradient(rgba(11, 8, 7, 0), rgba(11, 8, 7, 0.55) 55%, var(--ink));
  pointer-events: none;
}

/* The lines to pick, at the foot of the picture as in the game. */
.hero__cta {
  position: absolute; left: 0; right: 0;
  bottom: calc(var(--px) * 5 + env(safe-area-inset-bottom));
  z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(10px, calc(var(--px) * 3), 18px);
  padding: 0 16px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
}
.hero__cta > * { pointer-events: auto; }
.hero.is-ready .hero__cta { animation: rise 0.9s 1.15s var(--ease) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero.no-intro .hero__cta { animation: none; opacity: 1; transform: none; }

/* With the title stacked (a phone held upright), the lines come under it, in the evening sky, so that the
   train goes by unhidden; the note about the PC stays at the foot. */
.hero.is-narrow .hero__cta {
  top: calc(var(--title-bottom, 40%) + 16px);
  bottom: calc(14px + env(safe-area-inset-bottom));
}
.hero.is-narrow .hero__note { margin-top: auto; }

.hero__tagline {
  display: none;
  margin: 0 0 4px; padding: 0 8px;
  text-align: center;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.05rem, 4.4vw, 1.4rem);
  line-height: 1.35;
  color: var(--cream);
  text-shadow: 0 2px 10px rgba(5, 10, 30, 0.8);
}
.hero.has-tagline .hero__tagline { display: block; }

.hero__buttons {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(10px, calc(var(--px) * 10), 44px);
}
.pbtn--hero {
  --bw: clamp(2px, var(--px), 5px);
  min-width: clamp(180px, calc(var(--px) * 104), 470px);
  height: clamp(50px, calc(var(--px) * 15), 72px);
  padding: 0 1.1em;
  font-size: clamp(17px, calc(var(--px) * 6.4), 30px);
}
.pbtn--hero .price s { font-size: 0.7em; }

.hero__note {
  margin: 0;
  padding: 0.35em 0.9em;
  background: rgba(10, 7, 5, 0.6);
  font-family: var(--font-pixel);
  font-size: clamp(12px, 0.9vw + 8px, 15px);
  letter-spacing: 0.03em;
  color: var(--cream);
  text-align: center;
}
.hero__note a { color: var(--gold-hi); }

/* ---- the departure board --------------------------------------------------------------------------- */

.board {
  position: relative;
  overflow: hidden;
  background: #070504;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.board__track { display: flex; width: max-content; animation: board 48s linear infinite; }
.board:hover .board__track { animation-play-state: paused; }
.board__list { display: flex; margin: 0; padding: 0; list-style: none; }
.board__list li {
  display: flex; align-items: baseline; gap: 12px;
  padding: 15px 30px;
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.board__list li::after { content: '◆'; margin-left: 30px; color: var(--red); font-size: 0.6rem; }
.board__list b { color: var(--gold); font-weight: 500; }
.board__list time { color: var(--cream); opacity: 0.75; letter-spacing: 0.08em; }
@keyframes board { to { transform: translateX(-50%); } }

/* ---- the story ------------------------------------------------------------------------------------- */

section { position: relative; }
.story {
  --k: 2.2;  /* screen pixels to a pixel of the dusk strips */
  padding: clamp(96px, 13vw, 180px) 0 calc(150px * var(--k) + 40px);
  background: linear-gradient(180deg, var(--ink) 0%, #0d0f1c 40%, #121c42 78%, #18265a 100%);
  overflow: hidden;
}
.story__grid {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.lede {
  margin: 0;
  font-size: clamp(1.18rem, 0.7vw + 1rem, 1.42rem);
  line-height: 1.62;
  color: var(--text);
  max-width: 40em;
}
.lede--more { margin-top: 1.1em; color: var(--muted); }
.lede:not(.lede--more)::first-letter {
  float: left;
  margin: 0.1em 0.12em 0 0;
  font-size: 3.3em;
  line-height: 0.8;
  color: var(--gold);
  font-weight: 500;
}

.facts {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 34px 28px;
  margin: 0; padding: 8px 0 0;
  list-style: none;
}
.facts li { padding-top: 18px; border-top: 1px solid var(--line); }
.facts b {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-pixel);
  font-size: clamp(2.4rem, 3.4vw, 3.3rem);
  font-weight: 600;
  line-height: 1;
  color: var(--gold);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.6);
}
.facts span { display: block; color: var(--muted); font-size: 1rem; line-height: 1.45; }

/* The valley at dusk, going by as the page is scrolled (main.js moves it): the top 150 rows of the menu's
   strips, where each is painted down to its foot. */
.dusk {
  position: absolute; inset: auto 0 0;
  height: calc(150px * var(--k));
  pointer-events: none;
}
.dusk__strip {
  position: absolute; inset: 0;
  background-repeat: repeat-x;
  background-size: auto calc(216px * var(--k));
  background-position: 0 0;
  image-rendering: pixelated;
  will-change: background-position;
}
.dusk__strip--alps { background-image: url(../art/menu_alps.png); filter: brightness(0.5) saturate(0.55) hue-rotate(-8deg); opacity: 0.75; }
.dusk__strip--ridges { background-image: url(../art/menu_ridges.png); filter: brightness(0.32) saturate(0.6); }
.dusk__strip--hills { background-image: url(../art/menu_hills.png); filter: brightness(0.24) saturate(0.6); }
.dusk__strip--far { background-image: url(../art/menu_far.png); filter: brightness(0.17) saturate(0.5); }
.dusk::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(24, 38, 90, 0) 35%, rgba(11, 8, 7, 0.35) 72%, var(--ink) 100%);
}

/* ---- the trailer ----------------------------------------------------------------------------------- */

.trailer { padding: clamp(80px, 10vw, 140px) 0 clamp(40px, 5vw, 70px); background: var(--ink); }
.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: min(1040px, var(--video-max, 1040px));  /* main.js: no wider than the trailer's own pixels */
  margin: 0 auto;
  border: 3px solid #2d2114;
  outline: 1px solid rgba(232, 196, 104, 0.4);
  outline-offset: 6px;
  background: #000;
  overflow: hidden;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 120px rgba(58, 86, 180, 0.12);
}
/* Behind "coming soon": the GIF at a whole multiple of its pixels, cut to the frame (main.js sizes it). */
.screen__bg {
  position: absolute; left: 0; top: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: brightness(0.42) saturate(0.85);
  transition: filter 0.6s;
}
.screen:hover .screen__bg { filter: brightness(0.52) saturate(0.95); }
.screen__play {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  width: 100%;
  border: 0; background: none;
  color: var(--cream);
  font-family: var(--font-pixel);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.screen__play:disabled { cursor: default; }
.screen__icon {
  position: relative;
  width: clamp(72px, 9vw, 104px); aspect-ratio: 1;
  border: 3px solid var(--gold);
  border-radius: 50%;
  background: rgba(11, 8, 7, 0.55);
  transition: transform 0.4s var(--ease), background-color 0.3s;
}
.screen__icon::after {
  content: '';
  position: absolute; left: 54%; top: 50%;
  border-style: solid;
  border-width: 14px 0 14px 23px;
  border-color: transparent transparent transparent var(--gold);
  transform: translate(-50%, -50%);
}
.screen__play:not(:disabled):hover .screen__icon { transform: scale(1.08); background-color: rgba(232, 196, 104, 0.18); }
.screen__play:disabled .screen__icon { animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 196, 104, 0.35); }
  50% { box-shadow: 0 0 0 18px rgba(232, 196, 104, 0); }
}
.screen iframe,
.screen video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }

/* ---- the gallery: the train's blue, with the cream line under its windows -------------------------- */

.gallery {
  padding: clamp(90px, 11vw, 150px) 0;
  background:
    linear-gradient(180deg, var(--ink) 0, rgba(11, 8, 7, 0) 140px),
    linear-gradient(180deg, #0f1838 0%, #182a68 46%, #131f4c 100%);
}
.gallery::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 7px;
  border-top: 2px solid rgba(244, 234, 208, 0.55);
  background: var(--ink);
}

.shots {
  --gap: clamp(14px, 1.8vw, 26px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 48px;
}
.shot { margin: 0; position: relative; }
.shot--big { grid-column: span 2; grid-row: span 2; }
/* A last row that is not full goes in the middle, however many scenes there are. After the big one (four cells)
   every third tile starts a row in three columns, every second in two. One tile alone takes the middle column;
   tiles that cannot be there move over by half a column ("left: 50%" is half of their own cell). */
@media (width > 920px) {
  .shots > .shot:last-child:nth-child(3n+1) { grid-column: 2; }
  .shots > .shot:not(.shot--big):nth-last-child(2):nth-child(3n+1),
  .shots > .shot:not(.shot--big):nth-last-child(2):nth-child(3n+1) + .shot { left: calc(50% + var(--gap) / 2); }
}
@media (640px < width <= 920px) {
  .shots > .shot:not(.shot--big):last-child:nth-child(2n) { left: calc(50% + var(--gap) / 2); }
}
.shot button {
  position: relative;
  display: block; width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 3px solid #1d1710;
  border-radius: 14px 14px 5px 5px;  /* the window of a sleeping car */
  background: #05060c;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 0 0 1px rgba(232, 196, 104, 0.32), 0 22px 44px rgba(3, 6, 20, 0.55);
  transition: box-shadow 0.5s var(--ease);
}
.shot[style*='width'] { margin-inline: auto; }  /* shrunk to its picture's exact size: in the middle of its cell */
.shot button::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), inset 0 -60px 50px -30px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: filter 0.6s; filter: saturate(0.92) brightness(0.96); }
.shot button:hover,
.shot button:focus-visible {
  box-shadow: 0 0 0 2px rgba(232, 196, 104, 0.85), 0 30px 60px rgba(3, 6, 20, 0.7), 0 0 44px rgba(232, 196, 104, 0.2);
}
.shot button:hover img { filter: saturate(1.06) brightness(1.06); }

/* Pixel art at a whole multiple of its own pixels (main.js decides): each pixel a sharp square, the picture
   placed where main.js says, cut by its frame where it is larger. Smaller than it is, it is scaled down
   smoothly instead. */
img.is-exact {
  max-width: none;
  object-fit: fill;
  image-rendering: pixelated;
}
.shot img.is-exact,
.screen img.is-exact { position: absolute; }
img.is-smooth { image-rendering: auto; }
.shot figcaption {
  margin-top: 12px;
  padding-left: 4px;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.35;
  color: #cfc4a8;
}
.shot.is-more { animation: rise-in 0.7s var(--ease) both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(20px); } }
.gallery__more { display: flex; justify-content: center; margin-top: 48px; }

/* ---- requirements: a timetable on paper ------------------------------------------------------------ */

.reqs {
  padding: clamp(90px, 11vw, 150px) 0 clamp(50px, 6vw, 90px);
  background: radial-gradient(1200px 600px at 85% 30%, rgba(40, 62, 144, 0.16), transparent 70%), var(--ink);
}
.reqs__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.reqs__intro > p:not(.kicker) { color: var(--text); max-width: 32em; }
.tip {
  margin-top: 26px;
  padding: 18px 20px;
  border-left: 3px solid var(--gold);
  background: rgba(232, 196, 104, 0.06);
  font-size: 1rem;
  color: var(--muted) !important;
}
.tip b { color: var(--cream); font-weight: 500; }
.tip em { color: var(--cream); }
kbd {
  display: inline-block;
  padding: 0.05em 0.45em;
  border: 1px solid var(--brass-hi);
  border-bottom-width: 3px;
  background: #1c140d;
  color: var(--gold);
  font-family: var(--font-pixel);
  font-size: 0.82em;
  line-height: 1.4;
}

.timetable {
  position: relative;
  padding: 30px clamp(22px, 3vw, 40px) 26px;
  background:
    repeating-linear-gradient(0deg, rgba(90, 60, 20, 0.035) 0 1px, transparent 1px 4px),
    radial-gradient(120% 90% at 30% 20%, #f6edd3, #e8d9b2);
  color: var(--paper-ink);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  transform: rotate(0.6deg);
  transition: transform 0.6s var(--ease);
}
.timetable:hover { transform: rotate(0deg) translateY(-4px); }
.timetable__head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-bottom: 12px;
  margin-bottom: 6px;
  border-bottom: 3px double var(--paper-ink);
  font-family: var(--font-pixel);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.timetable__head span:first-child { font-size: 1.1rem; font-weight: 600; letter-spacing: 0.16em; }
.timetable dl { margin: 0; }
.timetable dl > div {
  display: grid;
  grid-template-columns: 7.2em minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px dotted rgba(42, 28, 16, 0.45);
}
.timetable dt {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-top: 0.25em;
  color: #6b4a22;
}
.timetable dd { margin: 0; font-size: 1.04rem; line-height: 1.42; }
.timetable__foot { margin: 16px 0 0; font-size: 0.92rem; font-style: italic; color: #5a4128; }
.stamp {
  position: absolute; right: 22px; top: -18px;
  padding: 6px 14px;
  border: 3px solid rgba(184, 50, 36, 0.78);
  border-radius: 4px;
  color: rgba(184, 50, 36, 0.85);
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(239, 228, 198, 0.6);
  transform: rotate(-9deg);
  mix-blend-mode: multiply;
}

/* ---- questions ------------------------------------------------------------------------------------- */

.faq {
  padding: clamp(80px, 10vw, 140px) 0;
  background: linear-gradient(180deg, var(--ink), #0e0b10);
}
.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: clamp(32px, 6vw, 90px);
  align-items: start;
}
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 2px;
  font-size: clamp(1.2rem, 0.8vw + 1rem, 1.45rem);
  font-weight: 500;
  color: var(--cream);
  cursor: pointer;
  list-style: none;
  transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  flex: none;
  width: 18px; height: 18px;
  background:
    linear-gradient(var(--gold), var(--gold)) center / 100% 3px no-repeat,
    linear-gradient(var(--gold), var(--gold)) center / 3px 100% no-repeat;
  transition: transform 0.4s var(--ease);
}
.faq details[open] summary::after { transform: rotate(135deg); }
.faq summary:hover { color: var(--gold-hi); }
.faq__a { overflow: hidden; }
.faq__a p { margin: 0 0 26px; max-width: 36em; color: var(--muted); font-size: 1.08rem; }

/* ---- the ticket ------------------------------------------------------------------------------------ */

.buy {
  padding: clamp(90px, 11vw, 150px) 0 clamp(200px, 22vw, 300px);
  background: linear-gradient(180deg, #0e0b10 0%, #101a40 30%, #1e367a 62%, #3f6cad 82%, #8c98b8 100%);
  overflow: hidden;
}
/* The far side of the valley at dusk, going by as it does behind the menu: each layer its own width a round. */
.valley { --k: 3; position: absolute; inset: auto 0 0; height: calc(140px * var(--k)); pointer-events: none; }
.valley__strip {
  --w: calc(450px * var(--k));
  position: absolute; left: 0; bottom: 0;
  width: calc(100% + var(--w));
  height: 100%;
  background-repeat: repeat-x;
  background-size: auto calc(216px * var(--k));
  background-position: 0 0;
  image-rendering: pixelated;
  animation: valley 86s linear infinite;
  will-change: transform;
}
.valley__strip--alps { background-image: url(../art/menu_alps.png); filter: brightness(0.8) saturate(0.8); }
.valley__strip--clouds { --w: calc(540px * var(--k)); background-image: url(../art/menu_clouds.png); filter: brightness(0.85); }
.valley__strip--ridges { --w: calc(720px * var(--k)); background-image: url(../art/menu_ridges.png); filter: brightness(0.62) saturate(0.85); }
.valley__strip--hills { --w: calc(1080px * var(--k)); background-image: url(../art/menu_hills.png); filter: brightness(0.5) saturate(0.85); }
.valley__strip--far { --w: calc(1440px * var(--k)); background-image: url(../art/menu_far.png); filter: brightness(0.4) saturate(0.85); }
@keyframes valley { to { transform: translateX(calc(-1 * var(--w))); } }
/* With scripts, main.js moves them instead, by whole pixels of the screen, at a whole scale (--k). */
.js .valley__strip { animation: none; }
.valley::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14, 20, 50, 0.1), rgba(11, 8, 7, 0.25) 60%, var(--ink) 100%);
}

.buy__inner { position: relative; z-index: 1; }
.buy h2 { text-shadow: 0 4px 30px rgba(5, 8, 30, 0.6); }
.buy__sub { margin: 0 auto; max-width: 30em; font-style: italic; font-size: 1.2rem; color: var(--cream); opacity: 0.9; }

.ticket {
  --notch: 16px;
  --stub: 290px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--stub);
  max-width: 860px;
  margin: 52px auto 0;
  background:
    repeating-linear-gradient(0deg, rgba(90, 60, 20, 0.035) 0 1px, transparent 1px 4px),
    radial-gradient(120% 120% at 20% 10%, #f8f0d8, #e6d6ac);
  color: var(--paper-ink);
  filter: drop-shadow(0 34px 50px rgba(0, 0, 0, 0.55));
  -webkit-mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
  mask:
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 0, #0000 98%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle var(--notch) at calc(100% - var(--stub)) 100%, #0000 98%, #000) bottom / 100% 51% no-repeat;
}
.ticket__main {
  position: relative;
  padding: 30px clamp(22px, 3.4vw, 44px) 26px;
  border: 2px solid rgba(42, 28, 16, 0.75);
  border-right: 0;
  margin: 10px 0 10px 10px;
}
.ticket__line {
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 3px double rgba(42, 28, 16, 0.75);
  font-family: var(--font-pixel);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.ticket__rows { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 28px; margin: 0; }
.ticket__rows dt {
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7a5628;
}
.ticket__rows dd { margin: 2px 0 0; font-size: 1.32rem; font-weight: 500; line-height: 1.2; }
.ticket__serial {
  position: absolute; right: 18px; bottom: 10px;
  margin: 0;
  font-family: var(--font-pixel);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--red);
  opacity: 0.8;
}
.ticket__stub {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 30px 24px;
  border-left: 2px dashed rgba(42, 28, 16, 0.55);
  text-align: center;
}
.ticket__was { font-family: var(--font-pixel); font-size: 1.15rem; color: #8a6a44; text-decoration-thickness: 2px; }
.ticket__price {
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 4rem;
  line-height: 0.95;
  color: var(--paper-ink);
  text-shadow: 3px 3px 0 rgba(200, 64, 44, 0.35);
}
.pbtn--ticket { margin-top: 12px; width: 100%; font-size: 1.1rem; padding: 0.9em 1em; }
.ticket__fine { margin-top: 8px; font-family: var(--font-pixel); font-size: 0.72rem; letter-spacing: 0.06em; color: #6b4a22; }

/* ---- the foot -------------------------------------------------------------------------------------- */

.foot { padding: 34px 0 calc(34px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--ink); }
.foot__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover, .foot a[aria-current] { color: var(--gold); }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; }
.foot__links button {
  padding: 0; border: 0; background: none;
  font: inherit; letter-spacing: inherit; color: var(--muted);
  cursor: pointer;
}
.foot__links button:hover { color: var(--gold); }

/* ---- the question about Google Analytics (js/consent.js): both answers alike ------------------------- */

.consent {
  position: fixed; z-index: 60;
  left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(760px, 100% - 32px); margin-inline: auto;
  display: flex; align-items: center; gap: 18px 26px;
  padding: 18px 22px;
  border: 2px solid var(--brass-hi);
  outline: 1px solid rgba(232, 196, 104, 0.3); outline-offset: 4px;
  background: rgba(11, 8, 7, 0.96);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: rise-in 0.6s var(--ease) both;
}
.consent__text { margin: 0; font-size: 0.92rem; line-height: 1.45; color: var(--text); }
.consent__text b { color: var(--cream); font-weight: 600; }
.consent__buttons { display: flex; gap: 12px; flex-shrink: 0; }
.consent .pbtn { padding: 0.65em 1.1em; font-size: 0.95rem; min-width: 7.5em; }

/* ---- the imprint (imprint.html): the timetable's paper, lying straight -------------------------------- */

.legal { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.legal__main { flex: 1; width: min(820px, 100% - 40px); padding: calc(var(--header-h) + 48px) 0 96px; }
.legal__back {
  display: inline-block; margin-bottom: 36px;
  font-family: var(--font-pixel); font-size: 0.85rem; letter-spacing: 0.06em;
  color: var(--muted); text-decoration: none;
}
.legal__back:hover { color: var(--gold); }
.legal .timetable, .legal .timetable:hover { transform: none; }
.legal .timetable dl > div { grid-template-columns: 9.5em minmax(0, 1fr); }
.legal .timetable a { color: #7a4a10; overflow-wrap: anywhere; }
.legal .timetable a:hover { color: var(--red); }
/* The download button on the paper (download.html) keeps the buttons' own colours. */
.legal .timetable a.pbtn { color: var(--cream); }
.legal .timetable a.pbtn:hover, .legal .timetable a.pbtn:focus-visible { color: var(--cream); }
.legal__doc section { padding: 4px 0 10px; border-bottom: 1px dotted rgba(42, 28, 16, 0.45); }
.legal__doc h3 {
  margin: 22px 0 10px;
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b4a22;
}
.legal__doc p { margin: 0 0 12px; font-size: 1.02rem; line-height: 1.5; }
.legal__doc code { font-family: ui-monospace, Consolas, 'Courier New', monospace; font-size: 0.86em; }
.legal__settings {
  padding: 0; border: 0; background: none;
  font: inherit; color: #7a4a10; text-decoration: underline; text-underline-offset: 0.2em;
  cursor: pointer;
}
.legal__settings:hover { color: var(--red); }
.todo {  /* a fact the imprint still needs: red, so that it cannot go live unnoticed */
  padding: 0 0.3em;
  background: rgba(200, 64, 44, 0.16);
  outline: 1px dashed rgba(184, 50, 36, 0.8);
  color: #a3241a;
  font-style: italic;
}

/* ---- the gallery's large picture ------------------------------------------------------------------- */

.lightbox {
  width: fit-content;
  max-width: none; max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
/* It fades in, and does not grow: scaled even for a moment, the pixel art would go soft. */
.lightbox[open] { animation: fade-in 0.3s var(--ease); }
.lightbox::backdrop {
  background: rgba(4, 3, 2, 0.88);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
@keyframes fade-in { from { opacity: 0; } }
.lightbox__figure { margin: 0; }
.lightbox img {
  box-sizing: content-box;  /* its size is the picture's (main.js), the frame comes outside it */
  width: min(768px, 100vw - 16px);
  border: 3px solid #2d2114;
  outline: 1px solid rgba(232, 196, 104, 0.45);
  background: #000;
}
.lightbox figcaption { margin-top: 14px; text-align: center; font-style: italic; color: var(--cream); }
.lightbox__btn,
.lightbox__close {
  position: absolute;
  display: grid; place-items: center;
  border: 2px solid var(--brass-hi);
  background: var(--panel);
  color: var(--gold);
  font-family: var(--font-pixel);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.lightbox__btn { top: calc(50% - 40px); width: 48px; height: 64px; font-size: 2rem; }
.lightbox__prev { left: -64px; }
.lightbox__next { right: -64px; }
.lightbox__close { top: -54px; right: 0; width: 42px; height: 42px; font-size: 1.6rem; }
.lightbox__btn:hover,
.lightbox__close:hover { border-color: var(--gold); color: var(--cream); }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60;
  padding: 14px 22px;
  border: 2px solid var(--gold);
  background: rgba(18, 10, 8, 0.95);
  color: var(--cream);
  font-family: var(--font-pixel);
  font-size: 0.98rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform 0.45s var(--ease), opacity 0.45s;
  pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ---- coming into view ------------------------------------------------------------------------------ */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--delay, 0ms);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
/* Stills of the page (?t=): everything where it ends up, with nothing caught on its way there. */
.still *,
.still *::before,
.still *::after { transition: none !important; }
.js .timetable[data-reveal] { transform: translateY(28px) rotate(0.6deg); }
.js .timetable[data-reveal].is-in { transform: rotate(0.6deg); }
.js .timetable[data-reveal].is-in:hover { transform: rotate(0deg) translateY(-4px); }

/* ---- narrower windows ------------------------------------------------------------------------------ */

@media (max-width: 1080px) {
  .bar__nav { display: none; }
  .bar__brand { margin-right: auto; }
}

@media (max-width: 920px) {
  .story__grid,
  .reqs__grid,
  .faq__grid { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: 1fr 1fr; }
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lightbox__prev { left: 8px; }
  .lightbox__next { right: 8px; }
  .lightbox__btn { top: auto; bottom: -70px; }
  .lightbox figcaption { padding: 0 64px; }
  .screen__play { gap: 10px; font-size: clamp(0.72rem, 2.6vw, 1rem); letter-spacing: 0.08em; }
  .screen__icon { width: clamp(52px, 13vw, 80px); }
  .screen__icon::after { border-width: 10px 0 10px 16px; }
}

@media (max-width: 640px) {
  :root { --header-h: 56px; }
  .bar { gap: 10px; }
  .brand { font-size: 0.95rem; }
  .pbtn--bar { padding: 0.6em 0.8em; font-size: 0.9rem; gap: 0.5em; }
  .sound { width: 38px; height: 38px; }
  .shots { grid-template-columns: minmax(0, 1fr); }
  .shot--big { grid-column: auto; grid-row: auto; }
  .hero__buttons { flex-direction: column; align-items: stretch; width: min(100%, 360px); }
  .pbtn--hero { min-width: 0; width: 100%; }
  .facts { gap: 26px 20px; }
  .ticket { --stub: 100%; grid-template-columns: minmax(0, 1fr); -webkit-mask: none; mask: none; }
  .ticket__main { margin: 10px 10px 0; border-right: 2px solid rgba(42, 28, 16, 0.75); border-bottom: 0; }
  .ticket__stub { border-left: 0; border-top: 2px dashed rgba(42, 28, 16, 0.55); margin: 0 10px 10px; padding: 24px 20px 22px; }
  .ticket__rows { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .timetable dl > div,
  .legal .timetable dl > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .valley { --k: 2; }
  .story { --k: 1.5; }
  .foot__inner { justify-content: center; text-align: center; }
  .consent { flex-direction: column; align-items: stretch; padding: 16px 16px 14px; }
  .consent__buttons .pbtn { flex: 1; min-width: 0; }
}

@media (max-width: 400px) {
  .bar__brand { display: none; }
  .bar__end { margin-left: auto; }
  .pbtn--bar .price s { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .board__track,
  .valley__strip { animation: none !important; }
  .hero__cta { opacity: 1; transform: none; }
}
