/* ===========================================================================
   Pokeshucker. One black hall, twelve lit plinths, one slab in the light.
   Every colour and every size in this file is measured off his two X visuals
   (DESIGN-NOTES.md). Nothing here draws a panel with a CSS border: every
   surface is a raster object painted by tools/glass.mjs and nine sliced, and
   every object in the hall is a render that keeps its own black and is
   composited with screen, the way light adds to light.
   =========================================================================== */

@font-face { font-family: "Excon"; src: url(fonts/Excon-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Excon"; src: url(fonts/Excon-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Excon"; src: url(fonts/Excon-Bold.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Krypton"; src: url(fonts/MonaspaceKrypton-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Krypton"; src: url(fonts/MonaspaceKrypton-Medium.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  /* the palette, picked out of art/ref/brand */
  --ground: #090a0b;
  --lift: #151615;
  --lime: #b2ff05;
  --lime-deep: #74b90d;
  --lime-dark: #2a370c;
  --blue: #0019ff;
  --clear: #d6d5d0;
  --white: #ffffff;
  --text: #dfe3dd;
  --dim: #929a93;

  /* the scale, his order of 2026-10-20: 12 14 16 20 24 32 48 */
  --t-label: 16px;
  --t-body: 16px;
  --t-value: 20px;
  --t-head: 24px;
  --t-big: 32px;
  --t-display: 48px;

  /* the step, 4 8 12 16 24 32 48 and nothing between */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;

  --sans: "Excon", "Helvetica Neue", Arial, sans-serif;
  --mono: "Krypton", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --col: 1120px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }
body {
  background: var(--ground);
  color: var(--text);
  font: 400 var(--t-body)/1.5 var(--sans);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

#studio { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.hall { position: relative; max-width: var(--col); margin: 0 auto; padding: 0 var(--s5) var(--s7); }

/* ------------------------------------------------------------------ type */
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p, dl, ul, ol { margin: 0; }
a { color: var(--lime); }

.label {
  margin: 0;
  font: 500 var(--t-label)/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.read {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  margin-top: var(--s3);
  font: 500 var(--t-big)/1 var(--sans);
  letter-spacing: 0.01em;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.read span { font-family: var(--mono); font-size: var(--t-label); font-weight: 400; color: var(--dim); letter-spacing: 0.04em; }
.note { margin-top: var(--s3); font-size: var(--t-body); line-height: 1.5; color: var(--dim); }
.muted { color: var(--dim); }

/* -------------------------------------------------------------- masthead */
.masthead {
  position: relative;
  padding: 120px 0 var(--s7);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand count" "brand label" "tabs tabs";
  column-gap: var(--s7);
}
.laser {
  position: absolute;
  top: 64px; left: 50%;
  width: 100vw; height: 36px;
  margin-left: -50vw;
  background: url(img/g-laser.png) center / 32px 36px repeat-x;
  pointer-events: none;
}
.brand { grid-area: brand; max-width: 620px; }
.wordmark {
  font: 500 var(--t-display)/1 var(--sans);
  letter-spacing: 0.36em;
  color: var(--white);
  /* the tracking hangs a gap off the last letter: pull the block back onto the grid */
  margin-right: -0.36em;
}
.strap { margin-top: var(--s5); font-size: var(--t-body); color: var(--dim); max-width: 56ch; }

.count {
  grid-area: count;
  justify-self: end;
  display: flex;
  align-items: baseline;
  gap: var(--s1);
  font: 500 var(--t-display)/1 var(--sans);
  color: var(--lime);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(178, 255, 5, 0.45);
}
.count span { font-size: var(--t-head); color: var(--lime-deep); }
.count-label {
  grid-area: label;
  justify-self: end;
  margin-top: var(--s3);
  font: 500 var(--t-label)/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.tabs { grid-area: tabs; margin-top: var(--s7); display: flex; flex-wrap: wrap; gap: var(--s3); }

/* ----------------------------------------------------------------- keys
   A key is the black plinth of the hall, lit along its top edge. The solid
   lime one is the slab's own label strip, and there is only ever one. */
.key {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 48px;
  padding: 0 var(--s5);
  border: 10px solid transparent;
  border-image: url(img/g-key.png) 20 fill / 10px / 0 stretch;
  background: none;
  font: 500 var(--t-body)/1 var(--sans);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: filter 0.12s ease, transform 0.12s ease;
}
.key img { display: block; width: 20px; height: 20px; }
.key:hover { filter: brightness(1.75); color: var(--white); }
.key:active { transform: translateY(1px); }
.key:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.key.is-on, .key[aria-current="page"] {
  border-image-source: url(img/g-key-on.png);
  color: var(--lime);
  filter: drop-shadow(0 0 12px rgba(178, 255, 5, 0.22));
}
.key[disabled], .key[aria-disabled="true"] {
  border-image-source: url(img/g-key-off.png);
  color: #747c75;
  cursor: not-allowed;
  filter: none;
}
.key-go {
  width: 100%;
  border-image-source: url(img/g-key-go.png);
  color: #0d1403;
  font-weight: 700;
}
.key-go:hover { filter: brightness(1.12); }
.key-go[disabled] { border-image-source: url(img/g-key-off.png); color: #747c75; }

/* --------------------------------------------------------------- panels */
.panel {
  border: 14px solid transparent;
  border-image: url(img/g-panel.png) 28 fill / 14px / 0 stretch;
  padding: var(--s5);
}

/* A hairline is drawn by a pseudo element, never by a border on the box that
   holds the text: a bordered box becomes the box the padding is measured from,
   and then every label in it reads as pressed against its edge. */
.hair { position: relative; }
.hair::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: rgba(214, 213, 208, 0.1);
}
.deck {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 300px;
  gap: var(--s5);
  align-items: start;
}

/* the rail: four readings on one sheet, one padding, hairlines between */
.rail .group + .group { position: relative; margin-top: var(--s5); padding-top: var(--s5); }
.rail .group + .group::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: rgba(214, 213, 208, 0.1);
}
.belt { margin-top: var(--s3); display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s1); }
.belt img { display: block; width: 100%; height: auto; mix-blend-mode: screen; }
.gauge {
  margin-top: var(--s4);
  height: 14px;
  border: 7px solid transparent;
  border-image: url(img/g-track.png) 14 fill / 7px / 0 stretch;
  position: relative;
}
.gauge-fill {
  position: absolute;
  left: -7px; top: -7px; bottom: -7px;
  min-width: 14px;
  width: 14px;
  border: 7px solid transparent;
  border-image: url(img/g-fill.png) 14 fill / 7px / 0 stretch;
  filter: drop-shadow(0 0 8px rgba(178, 255, 5, 0.35));
  transition: width 0.3s ease;
}
.feed { list-style: none; padding: 0; margin-top: var(--s4); font: 400 var(--t-label)/1.6 var(--mono); }
.feed li { display: flex; justify-content: space-between; gap: var(--s3); color: var(--dim); }
.feed li + li { margin-top: var(--s2); }
.feed b { color: var(--text); font-weight: 400; }

/* ---------------------------------------------------------------- stage */
.stage { min-width: 0; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.slot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0 0 var(--s3);
  border: 0;
  background: none;
  color: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.slot-n {
  display: block;
  font: 400 var(--t-label)/1 var(--mono);
  letter-spacing: 0.08em;
  color: #747c75;
}
.slot-art { display: block; position: relative; margin-top: var(--s2); aspect-ratio: 640 / 583; }
.slot-art img { position: absolute; display: block; mix-blend-mode: screen; }
.slot-art .plinth { left: 50%; bottom: -6%; width: 96%; height: auto; transform: translateX(-50%); }
.slot-art .case { inset: 0; width: 100%; height: 100%; }
/* the card window of the case, measured off the render by tools/art.mjs */
.slot-art .art {
  left: 37.03%; top: 24.01%; width: 27.5%; height: 42.37%;
  object-fit: cover;
  mix-blend-mode: normal;
}
.slot-empty {
  position: absolute;
  left: 0; right: 0; top: 38%;
  font: 400 var(--t-label)/1 var(--mono);
  letter-spacing: 0.08em;
  color: #747c75;
}
.slot-val { display: block; margin-top: var(--s2); font: 500 var(--t-body)/1.2 var(--mono); color: var(--white); }
.slot-pip { display: block; margin: var(--s2) auto 0; width: 60%; height: 2px; background: rgba(214, 213, 208, 0.12); }
.slot-pip i { display: block; height: 100%; background: var(--lime); box-shadow: 0 0 6px rgba(178, 255, 5, 0.6); }
/* The lift and the glow live on the pictures, never on the cell around them: a filter, an opacity
   or a transform on an ancestor isolates the blend, and the render's own black comes back as a box
   around every case. */
.slot-art img { transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease; }
.slot:hover .slot-art .case { transform: translateY(-3px); filter: brightness(1.22); }
.slot:hover .slot-art .art { transform: translateY(-3px); }
.slot:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
.slot.is-on .slot-art .case { filter: brightness(1.06); }
/* The chosen plinth gets more light on its floor, not a shadow: drop-shadow on an opaque render
   traces the PICTURE'S RECTANGLE, and the hall grows twelve lime boxes. */
.slot.is-on .slot-art::after {
  content: "";
  position: absolute;
  left: -10%; right: -10%; bottom: -14%;
  height: 56%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(178, 255, 5, 0.45), rgba(178, 255, 5, 0) 70%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.slot.is-on .slot-n, .slot.is-on .slot-val { color: var(--lime); }
.slot.is-empty { cursor: default; }
.slot.is-empty .slot-val { color: #747c75; }
.slot.is-gone { cursor: default; }
.slot.is-gone .slot-art img { opacity: 0.5; }
.stage-note {
  margin-top: var(--s5);
  padding: 0 var(--s5);
  text-align: center;
  font-size: var(--t-body);
  color: var(--dim);
}

/* --------------------------------------------------------------- column */
.column { display: grid; gap: var(--s5); min-width: 0; align-content: start; }
.cells { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.cell .read { font-size: var(--t-value); }
.cell .label { white-space: nowrap; }
.pills { margin-top: var(--s4); display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.pill { padding: 0 var(--s2); }
.throw .key-go { margin-top: var(--s4); }
.card-name { margin-top: var(--s3); font: 500 var(--t-value)/1.3 var(--sans); color: var(--white); }

.rows { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s4); row-gap: 0; margin-top: var(--s4); }
.rows dt, .rows dd {
  position: relative;
  margin: 0;
  padding: var(--s3) 0;
  font: 400 var(--t-label)/1.5 var(--mono);
  min-width: 0;
  overflow-wrap: anywhere;
}
/* One hairline a ROW, not one a cell: each half reaches across the grid gap so the
   line runs the full width of the row and the values sit on one right line. */
.rows dt::before, .rows dd::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0; right: 0;
  height: 1px;
  background: rgba(214, 213, 208, 0.08);
}
.rows dd::before { left: calc(var(--s4) * -1); }
.rows dt:first-of-type::before, .rows dt:first-of-type + dd::before { display: none; }
.rows dt { color: var(--dim); }
.rows dd { color: var(--white); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* --------------------------------------------------------------- window */
.window { padding: 0; margin-top: var(--s7); }
.window-bar {
  margin: calc(var(--s4) * -1) calc(var(--s4) * -1) 0;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 var(--s5);
  border: 10px solid transparent;
  border-image: url(img/g-bar.png) 20 fill / 10px / 0 stretch;
  font: 700 var(--t-body)/1 var(--sans);
  letter-spacing: 0.04em;
  color: #0d1403;
}
.window-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: var(--s7);
  padding: var(--s5) var(--s4) var(--s4);
}
.ticker { font: 500 var(--t-head)/1 var(--mono); color: var(--lime); }
.window-note { margin: var(--s3) 0 var(--s5); color: var(--dim); }
.mint {
  margin: var(--s3) 0 var(--s4);
  padding: var(--s3) var(--s4);
  border: 10px solid transparent;
  border-image: url(img/g-well.png) 20 fill / 10px / 0 stretch;
  font: 400 var(--t-body)/1.5 var(--mono);
  color: var(--white);
  user-select: all;
  overflow-wrap: anywhere;
}
.links { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.links .key { width: 100%; padding: 0 var(--s3); }
.links #buyKey { grid-column: 1 / -1; }
.window-right .label { margin-top: var(--s5); }

/* ---------------------------------------------------------------- sheets */
.sheet { padding: var(--s5) var(--s4); }
.sheet h2 { font-size: var(--t-big); color: var(--white); }
.sheet h3 { margin-top: var(--s6); font-size: var(--t-head); color: var(--white); }
.sheet h4 { font-size: var(--t-body); color: var(--white); }
.sheet p { margin-top: var(--s4); max-width: 72ch; color: var(--text); }
.sheet .key { margin-top: var(--s5); }
.sheet .table { width: 100%; margin-top: var(--s4); border-collapse: collapse; }
.sheet th {
  text-align: left;
  white-space: nowrap;
  font: 500 var(--t-label)/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  padding: var(--s2) var(--s4) var(--s2) 0;
}
.sheet td {
  position: relative;
  padding: var(--s3) var(--s4) var(--s3) 0;
  font: 400 var(--t-label)/1.5 var(--mono);
  color: var(--text);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.sheet td::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: rgba(214, 213, 208, 0.08);
}
.sheet td:first-child { width: 34%; color: var(--dim); }
.sheet td a { white-space: nowrap; }
.sheet td:last-child { color: var(--white); }
.steps { list-style: none; margin-top: var(--s5); padding: 0; display: grid; gap: var(--s5); }
.step { display: grid; grid-template-columns: 56px minmax(0, 1fr) 120px; gap: var(--s5); align-items: center; }
/* Every step carries the object it is about, lit the way the hall lights it. */
.step-art { width: 120px; height: auto; display: block; mix-blend-mode: screen; justify-self: center; }
.step-art.is-small { width: 56px; }
.step-n {
  font: 400 var(--t-big)/1 var(--mono);
  color: var(--lime);
  letter-spacing: 0.02em;
}
.step p { margin-top: var(--s2); color: var(--dim); }

/* ----------------------------------------------------------------- band */
.band {
  position: relative;
  margin-top: var(--s7);
  padding-top: var(--s5);
  text-align: center;
  font-size: var(--t-body);
  color: var(--dim);
}
.band::before {
  content: "";
  position: absolute;
  left: 50%; top: 0;
  width: 160px;
  height: 1px;
  margin-left: -80px;
  background: rgba(178, 255, 5, 0.45);
}

/* ------------------------------------------------------------- the widths */
@media (max-width: 1080px) {
  .deck { grid-template-columns: 240px minmax(0, 1fr); }
  .slots { grid-template-columns: repeat(4, 1fr); }
  .column { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; align-items: start; }
  .column .cells { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .window-body { grid-template-columns: minmax(0, 1fr) 320px; gap: var(--s5); }
}
@media (max-width: 900px) {
  .masthead { padding-top: 104px; grid-template-columns: minmax(0, 1fr) auto; }
  .wordmark { font-size: var(--t-big); letter-spacing: 0.28em; }
  .count { font-size: var(--t-big); }
  .deck { grid-template-columns: minmax(0, 1fr); }
  .rail { grid-row: 3; }
  .stage { grid-row: 1; }
  .column { grid-row: 2; }
  .window-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .hall { padding: 0 var(--s4) var(--s6); }
  .masthead { padding: 96px 0 var(--s6); grid-template-columns: minmax(0, 1fr); grid-template-areas: "brand" "count" "label" "tabs"; }
  .count, .count-label { justify-self: start; }
  .count { margin-top: var(--s5); }
  .tabs { margin-top: var(--s5); }
  .tabs .key { flex: 1 1 44%; padding: 0 var(--s3); }
  .wordmark { font-size: var(--t-head); letter-spacing: 0.22em; }
  .column { grid-template-columns: minmax(0, 1fr); }
  .column .cells { grid-template-columns: 1fr 1fr; }
  .slots { grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
  .belt { grid-template-columns: repeat(10, 1fr); }
  .window-body { padding: var(--s4) var(--s3) var(--s3); }
  .links { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
