/* WAVEFALL — the marketing page only (index.html). privacy.html and support.html keep
   wavefall.css, untouched, so nothing here can reach the two URLs a store reviewer opens.

   The idea: the page is a wave function collapse. Every <section class="fs"> sits on a
   field of undecided squares (page.js draws it) that collapses into claimed ground as it
   scrolls into view, the way a city claims the map in the game. The palette is the
   game's own, from the UI block's `C` and seat tables and the icon art:
     void    #15122a   undecided ground: the page
     dot     #26213f   the faint wave of maybes
     road    #c2ab80   brass: headings
     caption #e6d5ae   the store captions' ink
     stone   #9ea3b5   the keep: quiet text
     seats   blue #5b95f0 / red #d44d63 / amber #e39a3b / violet #a06ff0, with their hi tones
   Dark only, on purpose: the game's first screen is the void.

   Type is the game's: Pixelify Sans for display, Silkscreen for labels, both OFL, both
   taken from the game file's own embedded copies and served from fonts/. Body text is the
   system face, because a paragraph in a pixel font is a paragraph nobody finishes.
   No external requests of any kind. */

@font-face { font-family: "WF Pixel"; src: url(fonts/pixelify-sans.woff2) format("woff2"); font-weight: 400; font-display: optional; }
@font-face { font-family: "WF Label"; src: url(fonts/silkscreen.woff2) format("woff2"); font-weight: 400; font-display: optional; }

:root {
  --void: #15122a;
  --dot: #26213f;
  --ink: #e6e1d3;
  --dim: #a7a3b8;
  --road: #c2ab80;
  --cap: #e6d5ae;
  --edge: #8f7b57;
  --stone: #9ea3b5;
  --plate: #2a2540;
  --plate-hi: #3a3452;
  --plate-lo: #1c1830;
  --blue: #5b95f0; --blue-hi: #a9ccff; --blue-lo: #2f5cae;
  --red: #d44d63;  --red-hi: #ffa3ae;
  --amber: #e39a3b; --amber-hi: #ffd08a;
  --violet: #a06ff0; --violet-hi: #d4bcff;
  --gold: #e8b64c;
  --seat: var(--blue); --seat-hi: var(--blue-hi);
  --pixel: "WF Pixel", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --label: "WF Label", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gut: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}
[data-seat="1"] { --seat: var(--red); --seat-hi: var(--red-hi); }
[data-seat="2"] { --seat: var(--amber); --seat-hi: var(--amber-hi); }
[data-seat="3"] { --seat: var(--violet); --seat-hi: var(--violet-hi); }

* { box-sizing: border-box; }
html { background: var(--void); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--ink);
  font: 17px/1.62 var(--body);
  /* the undecided wave, for everything that is not a field (and for a visitor with no scripts) */
  background: radial-gradient(var(--dot) 1.5px, transparent 1.6px) 0 0 / 24px 24px, var(--void);
  overflow-x: hidden;
}

a { color: var(--blue-hi); text-underline-offset: 3px; }
a:hover { color: #fff; }
strong, b { color: #fff; font-weight: 650; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: min(1160px, 100%); margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 20; background: #fff; color: #000; padding: 8px 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.pointer-coarse { display: none; }
@media (pointer: coarse) { .pointer-fine { display: none; } .pointer-coarse { display: inline; } }
html:not(.js) .js-only { display: none !important; }

/* ------------------------------------------------------------------ bar */
.bar { position: relative; z-index: 3; }
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.back, .bar nav a {
  font: 12px/1 var(--label);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--stone);
}
.bar nav { display: flex; gap: clamp(12px, 2.4vw, 28px); }
.bar nav a:hover, .back:hover { color: var(--cap); }
@media (max-width: 560px) { .bar nav a:not([href="support"]) { display: none; } }

/* ---------------------------------------------------------------- fields */
.fs { position: relative; padding: clamp(64px, 9vw, 120px) 0; isolation: isolate; overflow: hidden; }
/* Without scripts there is no field, so the claimed ground is painted plainly instead. */
html:not(.js) .fs > .wrap { background: rgba(31, 36, 70, .55); padding-top: 32px; padding-bottom: 32px; }
.field {
  position: absolute; left: 0; top: 0; z-index: -1;
  image-rendering: pixelated; image-rendering: crisp-edges;
  pointer-events: none;
}
.fs > .wrap { position: relative; }

/* ------------------------------------------------------------------ type */
.kicker {
  margin: 0 0 14px;
  font: 12px/1.4 var(--label);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--seat-hi);
}
.kicker::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 10px; background: var(--seat); box-shadow: 2px 2px 0 #000; vertical-align: 1px; }
h1, h2, h3 { font-weight: 400; }
h2 {
  margin: 0 0 28px;
  max-width: 22ch;
  font: clamp(2rem, 1.3rem + 3vw, 3.4rem)/1.04 var(--pixel);
  letter-spacing: .01em;
  color: var(--cap);
  text-shadow: 3px 3px 0 #000;
  text-wrap: balance;
}
h2.big { max-width: none; font-size: clamp(2.2rem, 1.2rem + 4.4vw, 4.6rem); }
h3 {
  margin: 36px 0 12px;
  font: 16px/1.3 var(--label);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--road);
}
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.08rem, 1rem + .35vw, 1.25rem); line-height: 1.55; color: #f0ebdd; }
.narrow { max-width: 62ch; }
.cols { display: grid; gap: clamp(28px, 5vw, 72px); grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
.cols > div > h3:first-child { margin-top: 4px; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ hero */
.hero { padding-top: 8px; padding-bottom: clamp(56px, 8vw, 104px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "head board" "body board";
  column-gap: clamp(32px, 6vw, 96px);
  align-items: end;
  min-height: min(calc(100svh - 68px), 980px);
}
.hero-head { grid-area: head; align-self: end; container-type: inline-size; }
.hero-body { grid-area: body; align-self: start; max-width: 36rem; }
.board-fig { grid-area: board; align-self: center; margin: 0; }

.wordmark {
  margin: 0;
  font: clamp(3rem, 10vw, 8rem)/.9 var(--pixel);
  font-size: min(17.5cqi, 9rem); /* the word fills its column and never reaches the board */
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--cap);
  text-shadow: .05em .05em 0 #000;
}
.tagline {
  margin: 18px 0 28px;
  font: clamp(1.35rem, 1rem + 1.5vw, 2.1rem)/1.15 var(--pixel);
  color: var(--blue-hi);
}
.hero .lede { margin-bottom: 26px; }

.get { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 0 0 22px; }
.soon {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0;
  padding: 14px 18px 12px;
  font: 14px/1 var(--label);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cap);
  background: var(--plate);
  border: 3px solid #000;
  box-shadow: inset 3px 3px 0 var(--plate-hi), inset -3px -3px 0 var(--plate-lo), 4px 4px 0 #000;
}
.soon-mark { width: 10px; height: 10px; background: var(--gold); box-shadow: 0 0 0 2px #000; animation: blink 1.6s steps(2, jump-none) infinite; }
@keyframes blink { 50% { background: var(--edge); } }
.badge img { display: block; height: 54px; width: auto; }
.badge:hover { filter: brightness(1.15); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 7px 10px 5px;
  font: 12px/1 var(--label);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--stone);
  border: 2px solid var(--dot);
  background: rgba(21, 18, 42, .7);
}

/* the board: the game's own frame, a black edge inside a brass one */
.board {
  position: relative;
  aspect-ratio: 192 / 312;
  height: min(78svh, 820px);
  background: var(--void);
  border: 4px solid #000;
  outline: 3px solid var(--edge);
  outline-offset: 0;
  box-shadow: 10px 10px 0 rgba(0, 0, 0, .55);
  touch-action: manipulation;
}
.board .poster, .board canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated; image-rendering: crisp-edges;
}
.board canvas { cursor: crosshair; opacity: 0; transition: opacity .25s steps(3); }
.js .board .poster { visibility: hidden; }
.js .board { background: radial-gradient(var(--dot) 1px, transparent 1.2px) 0 0 / 12px 12px, var(--void); }
.board.on canvas { opacity: 1; }
.board .over {
  position: absolute; left: 8%; right: 8%; top: 42%; margin: 0;
  padding: 14px 10px 12px;
  text-align: center;
  font: 14px/1.35 var(--label);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cap);
  background: var(--plate);
  border: 3px solid #000;
  box-shadow: inset 3px 3px 0 var(--plate-hi), 4px 4px 0 #000;
  opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.board .over.on { opacity: 1; transform: none; }
.board .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 14px 18px 12px;
  font: 14px/1 var(--label); letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: var(--blue-lo); border: 3px solid #000;
  box-shadow: inset 3px 3px 0 var(--blue), 4px 4px 0 #000; cursor: pointer;
}
.hud { display: flex; align-items: center; gap: 10px; height: 26px; margin: 0 0 10px; }
.tug { flex: 1; display: flex; height: 14px; border: 3px solid #000; background: var(--dot); box-sizing: content-box; }
.tug i { display: block; height: 100%; transition: flex-grow .5s; }
.tug-lab { font: 12px/1 var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--stone); min-width: 7ch; text-align: right; }
html:not(.js) .hud { visibility: hidden; }
.board-cap {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px;
  max-width: calc(min(78svh, 820px) * 192 / 312 + 8px);
  margin-top: 14px;
  font-size: 14px; line-height: 1.45; color: var(--dim);
}
.live-dot { width: 8px; height: 8px; margin-right: 4px; background: var(--red); box-shadow: 0 0 0 2px #000; align-self: center; }
.js .live-dot { animation: blink 1.2s steps(2, jump-none) infinite; }
html:not(.js) .live-dot { display: none; }

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "board" "body";
    min-height: 0;
  }
  .hero-head { text-align: center; padding-top: 12px; }
  .tagline { margin: 10px 0 22px; }
  .board-fig { justify-self: center; width: min(100%, calc((100svh - 250px) * 192 / 312)); min-width: min(100%, 250px); }
  .board { height: auto; width: 100%; }
  .board-cap { max-width: none; justify-content: center; text-align: center; }
  .hero-body { margin-top: 36px; }
}

/* ------------------------------------------------------------------ wave */
.live { padding: 12px 14px; border-left: 4px solid var(--seat); background: rgba(21, 18, 42, .55); font-size: 15px; color: var(--dim); }
.live b { font-variant-numeric: tabular-nums; color: var(--cap); }
.lexicon { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 0; padding: 0; list-style: none; }
.lexicon li { display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; }
.lexicon canvas { grid-row: span 2; width: 48px; height: 48px; image-rendering: pixelated; border: 3px solid #000; background: var(--void); }
.lexicon b { font: 13px/1.2 var(--label); letter-spacing: .06em; text-transform: uppercase; color: var(--cap); align-self: end; }
.lexicon span { font-size: 14px; line-height: 1.3; color: var(--dim); align-self: start; }
@media (max-width: 400px) { .lexicon { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------- steer */
.steer-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "console head" "console verbs";
  column-gap: clamp(32px, 6vw, 88px);
  align-items: start;
}
.steer-head { grid-area: head; }
.console { grid-area: console; display: grid; gap: 16px; justify-items: start; }
.console .board { height: min(76svh, 720px); }
.verbs { grid-area: verbs; margin: 8px 0 0; display: grid; gap: 14px; }
.verbs div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding-top: 14px; border-top: 2px solid var(--dot); }
.verbs dt { font: 13px/1.5 var(--label); letter-spacing: .06em; text-transform: uppercase; color: var(--cap); }
.verbs dd { margin: 0; color: #d9d4c6; }
html:not(.js) .steer-grid { grid-template-columns: 1fr; grid-template-areas: "head" "verbs"; }

.pad { width: 100%; display: grid; gap: 10px; }
.who { margin: 0; min-height: 3em; font-size: 14px; line-height: 1.45; color: var(--dim); }
.who b { color: var(--blue-hi); }
.intents { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.orders { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.orders:last-child { grid-template-columns: 1fr auto auto; }
.verb {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px;
  padding: 10px 6px 8px;
  font: 12px/1 var(--label);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cap);
  background: var(--plate-hi);
  border: 3px solid #000;
  box-shadow: inset 3px 3px 0 #4d4668, inset -3px -3px 0 var(--plate);
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.verb canvas { width: 24px; height: 24px; image-rendering: pixelated; }
.verb:hover { color: #fff; }
.verb:active { transform: translate(1px, 1px); }
.verb[aria-pressed="true"] { color: #fff; background: var(--blue-lo); box-shadow: inset 3px 3px 0 var(--blue), inset -3px -3px 0 #22448a; }
.verb.wide { flex-direction: row; font-size: 14px; }
.verb.power { flex-direction: row; font-size: 13px; background: #4a3a1c; box-shadow: inset 3px 3px 0 #7a6230, inset -3px -3px 0 #2e2410; }
.verb.power .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(232, 182, 76, .35); }
.verb.power.ready { background: #8a6a24; box-shadow: inset 3px 3px 0 var(--gold), inset -3px -3px 0 #5a4414; color: #fff; }
.verb.power .pw-name { position: relative; }
#giveback { font-size: 11px; }

@media (max-width: 860px) {
  .steer-grid { grid-template-columns: 1fr; grid-template-areas: "head" "console" "verbs"; }
  .console { justify-items: center; margin: 12px 0 28px; }
  .console .board { height: auto; width: min(100%, calc((100svh - 250px) * 192 / 312)); min-width: min(100%, 250px); }
  .pad { max-width: 520px; }
  .verbs div { grid-template-columns: 1fr; gap: 4px; }
}

/* --------------------------------------------------------------- dynasty */
.ticks { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 10px; height: 10px; background: var(--seat); box-shadow: 2px 2px 0 #000; }
.shots-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border: 3px solid #000; box-shadow: 6px 6px 0 rgba(0, 0, 0, .5); background: var(--plate-lo); }
.shot figcaption { margin-top: 10px; font: 12px/1.35 var(--label); letter-spacing: .06em; text-transform: uppercase; color: var(--stone); }
.cols-media { align-items: center; }
.keystones { display: flex; flex-wrap: wrap; gap: 14px 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.keystones li { width: 92px; display: grid; justify-items: center; gap: 8px; text-align: center; font: 11px/1.25 var(--label); letter-spacing: .04em; text-transform: uppercase; color: var(--dim); }
.keystones canvas { width: 48px; height: 48px; image-rendering: pixelated; border: 3px solid #000; outline: 2px solid var(--gold); outline-offset: -1px; }

/* --------------------------------------------------------------- peoples */
.civs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; margin: 36px 0 0; padding: 0; list-style: none; }
.civ {
  position: relative;
  padding: 18px 20px 16px;
  background: rgba(21, 18, 42, .72);
  border: 3px solid #000;
  box-shadow: inset 0 0 0 2px var(--dot), 6px 6px 0 rgba(0, 0, 0, .45);
}
.civ-art { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 12px; }
.crest { width: 60px; height: 68px; image-rendering: pixelated; }
.town { width: 192px; height: 48px; image-rendering: pixelated; border: 3px solid #000; background: var(--void); }
.civ h3 { margin: 0; font: 1.7rem/1.05 var(--pixel); letter-spacing: .01em; text-transform: none; color: var(--cap); }
.civ .layer { margin: 4px 0 12px; font: 11px/1.3 var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--amber-hi); }
.civ p { font-size: 15px; line-height: 1.5; margin-bottom: .6em; }
.civ .pw b { color: var(--gold); }
.civ .trait { color: #d9d4c6; }
.civ .look { margin: 0; font-size: 13px; color: var(--dim); font-style: italic; }
@media (max-width: 400px) { .town { width: 144px; height: 36px; } .crest { width: 45px; height: 51px; } }

/* --------------------------------------------------------------- between */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
.trio > div { padding: 4px 20px 8px; border-left: 4px solid var(--seat); background: rgba(21, 18, 42, .55); }
.trio h3 { margin-top: 14px; }
@media (max-width: 760px) { .trio { grid-template-columns: 1fr; } }
.shots-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0; padding: 0; list-style: none; }
.flip { grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr); }
@media (max-width: 860px) {
  .flip { grid-template-columns: 1fr; }
  .shots-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(46vw, 220px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-right: calc(-1 * var(--gut)); }
  .shots-row li { scroll-snap-align: start; }
}

/* ----------------------------------------------------------------- facts */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 0 28px; margin: 0 0 32px; }
.facts div { padding: 12px 0; border-top: 2px solid var(--dot); }
.facts dt { font: 12px/1.4 var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--road); }
.facts dd { margin: 2px 0 0; }
.privacy-line { max-width: 62ch; padding: 16px 18px; border-left: 4px solid #6cb863; background: rgba(29, 42, 78, .55); }

/* ------------------------------------------------------------------- faq */
.qa { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 0 40px; }
.qa div { padding: 16px 0 6px; border-top: 2px solid var(--dot); }
.qa dt { font: 1.2rem/1.25 var(--pixel); color: var(--cap); margin-bottom: 6px; }
.qa dd { margin: 0 0 10px; color: #d9d4c6; }

/* ------------------------------------------------------------------- get */
.get-sec { text-align: center; padding-bottom: clamp(80px, 12vw, 160px); }
.get-sec h2 { margin-left: auto; margin-right: auto; }
.get-sec .narrow { margin-left: auto; margin-right: auto; }
.get-sec .get { justify-content: center; margin: 28px 0; }
.more { color: var(--dim); font-size: 15px; }

/* ---------------------------------------------------------------- footer */
.foot { padding: 32px 0 48px; border-top: 3px solid #000; background: #100e21; font-size: 14px; color: var(--dim); }
.footlinks { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 16px; padding: 0; list-style: none; font: 12px/1 var(--label); letter-spacing: .08em; text-transform: uppercase; }
.foot p { margin: 0 0 8px; max-width: 70ch; }

@media (prefers-reduced-motion: reduce) {
  .soon-mark, .js .live-dot { animation: none; }
  .tug i, .board canvas, .board .over { transition: none; }
}
