/* Bonding Pixels website – styles, version 0.1.0.
 * Direction "The bonder program" (seed 6fe8651e, .impeccable/surfaces/index-html.md)
 * in the games' Gold Chip world: warm black ground with a faint gold grid,
 * bronze chip surfaces, gold frames with three-tone pin rows, banded metal
 * gold with 1-unit pixel bevels, hard edges, no radius, no soft shadows.
 * Pixel type is the games' 5x7 font drawn as SVG (js/pixelfont.js), sizes in
 * multiples of 7 px; body text is Switzer. Teal only for progress and
 * success, coral only for errors. Tokens below come from
 * games/bondwords/bondwords.css; css/tweaks.css (phase 6) may override any
 * custom property. */

@font-face { font-family: "Switzer"; src: url("../assets/fonts/switzer/Switzer-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("../assets/fonts/switzer/Switzer-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("../assets/fonts/switzer/Switzer-Semibold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("../assets/fonts/switzer/Switzer-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  /* Colours (Gold Chip) */
  --bg: #0E0903;
  --grid-line: rgba(242, 195, 78, 0.07);
  --panel: #2B1C07;
  --panel-deep: #1C1204;
  --panel-hover: #3A2709;
  --board-bg: #140D03;
  --gold: #F2C34E;
  --gold-hi: #FFD966;
  --gold-light: #FFF0B8;
  --gold-pale: #FFE08A;
  --gold-mid: #E6B13A;
  --gold-deep: #C48F1E;
  --bronze: #B98A1E;
  --gold-dark: #9A6E12;
  --bevel-hi: #FFF7DC;
  --bevel-lo: #8A6212;
  --metal: linear-gradient(135deg, var(--gold-light) 0 18%, var(--gold-hi) 18% 46%, var(--gold-mid) 46% 74%, var(--gold-deep) 74%);
  --text: #FFF4D8;
  --text-dim: #CDB98A;
  --ink: #2A1A04;
  --teal: #00DCC6;
  --coral: #FF6B61;

  /* Pixel unit and derived sizes */
  --u: 2px;
  --b1: var(--u);
  --b2: calc(var(--u) * 2);
  --px-label: calc(var(--u) * 7);          /* 14 / 21 px */
  --px-small: 14px;                        /* fixed small pixel text */
  --px-head: calc(var(--u) * 14);          /* 28 / 42 px */
  --px-sub: 21px;                          /* hero subline: 21 / 28 px */
  --px-count: 28px;                        /* hero counter digits: 28 / 63 px */
  --icon: calc(var(--u) * 12);             /* 24 / 36 px */

  /* Type */
  --font-body: "Switzer", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-body: 18px;
  --fs-small: 16px;
  --fs-lead: 20px;
  --fs-statement: 22px;
  --lh-body: 1.55;

  /* Spacing */
  --gutter: 16px;
  --maxw: 1344px;
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 64px;
  --s6: 96px;
  --section-gap: 72px;
  --heading-gap: 24px;

  /* Hero */
  --hero-program-w: 300px;
  --hero-side-w: 340px;
  --hero-gap: 40px;
  --hero-ar: 1200 / 1008;
  --hero-reserve: 330px;                   /* viewport height kept free for header and bottom row */
  --mask-alpha: 0.86;

  /* Motion: everything discrete */
  --step-fast: 120ms;
}
@media (min-width: 480px) {
  :root { --u: 3px; --px-sub: 28px; --fs-lead: 21px; --fs-statement: 26px; }
}
@media (min-width: 720px) {
  :root { --gutter: 32px; --section-gap: 112px; --heading-gap: 32px; }
}
@media (min-width: 1000px) {
  :root { --gutter: 48px; --px-count: 63px; --fs-body: 19px; --fs-lead: 22px; --fs-statement: 30px; --section-gap: 144px; }
}

/* ---------- Base ---------- */

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

html {
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--gold-dark) var(--board-bg);
  accent-color: var(--gold);
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-variant-numeric: tabular-nums;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 24px 24px;
  overflow-x: hidden;
  caret-color: var(--gold);
}
::selection { background: var(--gold-hi); color: var(--ink); }

img, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }

a {
  color: var(--gold-hi);
  text-decoration-thickness: var(--b1);
  text-underline-offset: 0.22em;
}
a:hover { color: var(--gold-light); }
:focus-visible {
  outline: var(--b1) solid var(--text);
  outline-offset: var(--b1);
}
[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }

p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

.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;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 10;
  padding: 12px 16px; background: var(--gold-hi); color: var(--ink); font-weight: 600;
}
.skip-link:focus { top: 8px; }

.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* Pixel text (js/pixelfont.js): one SVG per word, wraps between words. */
.px {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  column-gap: calc(3em / 7);
  row-gap: calc(4em / 7);
  line-height: 1;
}
.px > .px-word { display: block; height: 1em; width: auto; flex: 0 0 auto; fill: currentColor; shape-rendering: crispEdges; overflow: visible; }
.px-inline { display: inline-flex; vertical-align: middle; }
.icon { display: block; width: var(--icon); height: var(--icon); fill: currentColor; shape-rendering: crispEdges; flex: 0 0 auto; }

/* Fallback look of pixel text before the script runs (or without it). */
[data-px]:not(.px) { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1.1; }

/* ---------- Buttons: pixel bevel, gold primary, bronze secondary ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 3);
  min-height: 48px;
  padding: calc(var(--u) * 4) calc(var(--u) * 6);
  font-size: var(--px-label);
  color: var(--gold-hi);
  background: var(--panel);
  border: var(--b2) solid var(--gold);
  box-shadow: inset var(--b1) var(--b1) 0 var(--panel-hover), inset calc(var(--b1) * -1) calc(var(--b1) * -1) 0 var(--board-bg);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background-color var(--step-fast) steps(2), color var(--step-fast) steps(2);
}
.btn .icon { width: calc(var(--u) * 8); height: calc(var(--u) * 8); }
.btn:hover { background: var(--panel-hover); color: var(--gold-light); }
.btn:active { transform: translateY(var(--u)); box-shadow: inset var(--b1) var(--b1) 0 var(--board-bg); }
.btn-gold {
  color: var(--ink);
  background: var(--metal);
  border-color: var(--gold-dark);
  box-shadow: inset var(--b1) var(--b1) 0 var(--bevel-hi), inset calc(var(--b1) * -1) calc(var(--b1) * -1) 0 var(--bevel-lo);
}
.btn-gold:hover { color: var(--ink); background: linear-gradient(135deg, var(--bevel-hi) 0 18%, var(--gold-light) 18% 46%, var(--gold-hi) 46% 74%, var(--gold-mid) 74%); }
.btn-gold:active { box-shadow: inset var(--b1) var(--b1) 0 var(--bevel-lo), inset calc(var(--b1) * -1) calc(var(--b1) * -1) 0 var(--bevel-hi); }

/* ---------- Chip frame with pin rows (as in the games) ---------- */

.chip {
  position: relative;
  background: var(--panel-deep);
  border: var(--b2) solid var(--gold-mid);
  box-shadow:
    inset 0 0 0 var(--u) var(--bg),
    inset 0 0 0 var(--b2) var(--gold-dark),
    0 0 0 var(--u) var(--bg),
    0 0 0 var(--b2) var(--gold-dark);
  padding: calc(var(--u) * 4);
  margin: calc(var(--u) * 7) 0;
}
.chip::before, .chip::after {
  content: "";
  position: absolute;
  left: calc(var(--u) * 7);
  right: calc(var(--u) * 7);
  height: calc(var(--u) * 4);
  background: repeating-linear-gradient(90deg, var(--gold-pale) 0 var(--u), var(--gold-mid) var(--u) calc(var(--u) * 2), var(--bronze) calc(var(--u) * 2) calc(var(--u) * 3), transparent calc(var(--u) * 3) calc(var(--u) * 7));
  pointer-events: none;
}
.chip::before { top: calc(var(--u) * -6); }
.chip::after { bottom: calc(var(--u) * -6); }

/* ---------- Header ---------- */

.site-header { padding: var(--s2) 0 var(--s1); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s1) var(--s3); }
.brand { margin: 0; font-size: inherit; line-height: 0; }
.brand a { display: inline-block; padding: 6px 0; }
.brand img { width: auto; height: 33px; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 0 calc(var(--u) * 7); margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--px-small);
  color: var(--text-dim);
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--gold-hi); }
@media (min-width: 1000px) {
  .site-header { padding: var(--s3) 0 var(--s2); }
  .site-nav a { font-size: 21px; }
}

/* ---------- Hero: the bonder program ---------- */

.hero { padding: var(--s1) 0 0; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "program" "stage" "side" "bottom";
  gap: var(--s2);
}
.program { grid-area: program; }
.hero-stage { grid-area: stage; min-width: 0; }
.hero-side { grid-area: side; }
.hero-bottom { grid-area: bottom; }

/* Program block */
.program {
  background: var(--panel-deep);
  border: var(--b1) solid var(--gold-dark);
  padding: calc(var(--u) * 5);
}
.program-title { font-size: var(--px-small); color: var(--teal); margin: 0 0 calc(var(--u) * 5); }
.program-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--u); }
.program-steps a {
  display: flex;
  align-items: center;
  gap: calc(var(--u) * 3);
  min-height: 44px;
  padding: 0 calc(var(--u) * 3);
  font-size: var(--px-small);
  color: var(--text-dim);
  text-decoration: none;
  border: var(--b1) solid transparent;
}
.program-steps a .num { color: var(--gold); }
.program-steps a:hover { color: var(--gold-hi); border-color: var(--gold-dark); }
.program-steps li.is-active a { color: var(--gold-hi); background: var(--panel); border-color: var(--gold); }
.program-steps li.is-active a .num { color: var(--gold-hi); }
.program-coords, .program-replay { display: none; }
@media (min-width: 420px) {
  .program-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .program-steps a { flex-direction: column; align-items: flex-start; justify-content: center; gap: calc(var(--u) * 2); padding: calc(var(--u) * 2) calc(var(--u) * 2); }
}

/* Stage: chip frame around the microscope photo and its reveal mask */
.hero-figure { margin: 0; }
.hero-figure .chip { margin: calc(var(--u) * 7) auto; }
.stage {
  position: relative;
  aspect-ratio: var(--hero-ar);
  background: var(--board-bg);
  overflow: hidden;
}
.stage img { width: 100%; height: 100%; object-fit: cover; }
.stage-mask {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
}
.stage-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(242, 195, 78, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 195, 78, 0.22) 1px, transparent 1px);
  background-size: calc(100% / 50) calc(100% / 42);
  opacity: 0;
}
.stage.is-programming .stage-grid { opacity: 1; }

/* Side: subline and counter */
.hero-sub { font-size: var(--px-sub); color: var(--text); margin: 0 0 var(--s3); max-width: 22ch; }
.hero-sub .gold { color: var(--gold-hi); }
.counter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: calc(var(--u) * 3) calc(var(--u) * 4); margin: 0 0 var(--s2); }
.counter-label { font-size: var(--px-small); color: var(--text-dim); }
.counter-row { display: flex; align-items: flex-end; gap: calc(var(--u) * 4); }
.counter-value { font-size: var(--px-count); color: var(--gold-hi); }
.counter-total { font-size: var(--px-small); color: var(--text-dim); }

.hero-lead { font-size: var(--fs-lead); line-height: 1.45; max-width: 26em; margin: 0; }
.hero-actions { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s3); }
.hero-actions .btn { width: 100%; }
@media (min-width: 480px) {
  .hero-actions { flex-direction: row; flex-wrap: wrap; }
  .hero-actions .btn { width: auto; }
}

@media (min-width: 720px) and (max-width: 999px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    grid-template-areas: "program program" "stage side" "bottom bottom";
    column-gap: var(--s4);
    align-items: center;
  }
}
@media (min-width: 1000px) {
  .hero { padding-top: 0; }
  .hero-grid {
    grid-template-columns: var(--hero-program-w) minmax(0, 1fr) var(--hero-side-w);
    grid-template-areas: "program stage side" "program bottom bottom";
    column-gap: var(--hero-gap);
    row-gap: var(--s2);
    align-items: start;
  }
  .program { align-self: stretch; display: flex; flex-direction: column; padding: calc(var(--u) * 7) calc(var(--u) * 6); }
  .program-title { font-size: 21px; margin-bottom: calc(var(--u) * 7); }
  .program-steps { grid-template-columns: 1fr; gap: calc(var(--u) * 2); }
  .program-steps a { flex-direction: row; align-items: center; justify-content: flex-start; gap: calc(var(--u) * 4); font-size: 21px; padding: 0 calc(var(--u) * 3); min-height: 48px; }
  .program-coords {
    display: block;
    list-style: none;
    margin: calc(var(--u) * 8) 0 0;
    padding: calc(var(--u) * 5) 0 0;
    border-top: var(--b1) solid var(--gold-dark);
    font-size: var(--px-small);
    color: var(--text-dim);
  }
  .program-coords li { display: flex; align-items: center; gap: calc(var(--u) * 4); min-height: 26px; }
  .program-coords .dot { width: 9px; height: 9px; border: 2px solid var(--gold-dark); flex: 0 0 auto; }
  .program-coords li.is-placed { color: var(--text); }
  .program-coords li.is-placed .dot { background: var(--gold-hi); border-color: var(--gold-hi); }
  .program-coords li.is-next .dot { border-color: var(--teal); }
  .program-replay { display: flex; margin-top: auto; padding-top: calc(var(--u) * 6); }
  .program-replay .btn { width: 100%; font-size: var(--px-small); }

  .hero-stage .chip { width: min(100%, calc((100svh - var(--hero-reserve)) * 1200 / 1008)); min-width: 420px; margin-top: calc(var(--u) * 6); }
  .hero-side { padding-top: calc(var(--u) * 6); }
  .hero-sub { margin-bottom: var(--s4); }
  .counter { flex-direction: column; align-items: flex-start; gap: calc(var(--u) * 3); }
  .counter-total { font-size: 21px; }
  .hero-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s4); }
  .hero-lead { max-width: 23em; }
  .hero-actions { margin-top: 0; }
}

/* ---------- Sections ---------- */

.section { padding: var(--section-gap) 0 0; }
.section-head { margin-bottom: var(--heading-gap); max-width: 46rem; }
.section-head h2 { font-size: var(--px-head); color: var(--gold); margin-bottom: calc(var(--u) * 7); }
.section-head p { color: var(--text-dim); font-size: var(--fs-lead); line-height: 1.45; margin: 0; }

/* Bands: full-width chip surface edged with pin rows */
.band {
  position: relative;
  margin-top: var(--section-gap);
  padding: calc(var(--section-gap) * 0.75) 0;
  background: var(--panel-deep);
  border-top: var(--b1) solid var(--gold-dark);
  border-bottom: var(--b1) solid var(--gold-dark);
}
.band::before, .band::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: calc(var(--u) * 4);
  background: repeating-linear-gradient(90deg, transparent 0 calc(var(--u) * 4), var(--gold-pale) calc(var(--u) * 4) calc(var(--u) * 5), var(--gold-mid) calc(var(--u) * 5) calc(var(--u) * 6), var(--bronze) calc(var(--u) * 6) calc(var(--u) * 7), transparent calc(var(--u) * 7) calc(var(--u) * 11));
  pointer-events: none;
}
.band::before { top: calc(var(--u) * -4 - var(--b1)); }
.band::after { bottom: calc(var(--u) * -4 - var(--b1)); }
.band + .section, .band + .band { margin-top: 0; }

/* ---------- Gallery ---------- */

.gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5) var(--s4); align-items: start; }
.entry { position: relative; min-width: 0; scroll-margin-top: var(--s3); transition: filter var(--step-fast) steps(2); }
.entry-frame {
  position: relative;
  margin-top: calc(var(--u) * 9);
  background: var(--board-bg);
  border: var(--b1) solid var(--gold-dark);
  padding: calc(var(--u) * 2);
  transition: border-color var(--step-fast) steps(2);
}
.entry-tab {
  position: absolute;
  left: calc(var(--b1) * -1);
  bottom: 100%;
  display: flex;
  align-items: center;
  height: calc(var(--u) * 9);
  padding: 0 calc(var(--u) * 4);
  font-size: var(--px-small);
  color: var(--text-dim);
  background: var(--panel);
  border: var(--b1) solid var(--gold-dark);
  border-bottom: 0;
  text-decoration: none;
}
.entry-tab:hover { color: var(--gold-hi); }
.entry-media { position: relative; aspect-ratio: var(--ar, 4 / 3); background: var(--board-bg); }
.entry-media > picture { display: block; }
.entry-media > img, .entry-media > picture, .entry-media > picture > img, .entry-media > video { width: 100%; height: 100%; }
.entry-media img, .entry-media video { object-fit: contain; }
.entry-thumbs { display: flex; flex-wrap: wrap; gap: calc(var(--u) * 2); list-style: none; margin: calc(var(--u) * 2) 0 0; padding: 0; }
.entry-thumbs a {
  position: relative;
  display: block;
  width: 56px;
  height: 44px;
  border: var(--b1) solid var(--gold-dark);
  background: var(--panel-deep);
}
.entry-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.entry-thumbs a[aria-current="true"] { border-color: var(--gold-hi); outline: var(--b1) solid var(--gold-hi); outline-offset: 0; }
.entry-thumbs a:hover { border-color: var(--gold); }
.entry-thumbs .play {
  position: absolute; right: 2px; bottom: 2px;
  width: 16px; height: 16px; padding: 2px;
  background: var(--metal); color: var(--ink);
}
.entry-thumbs .play .icon { width: 12px; height: 12px; }
.entry h3 { font-size: var(--px-label); color: var(--gold-hi); margin: var(--s2) 0 calc(var(--u) * 4); }
.entry .caption { color: var(--text-dim); font-size: var(--fs-small); max-width: 34em; margin: 0; }

/* Focus by brightness: hover or :target lights one picture, dims the rest. */
@media (hover: hover) {
  .gallery:hover .entry:not(:hover) { filter: brightness(0.5) sepia(0.6); }
  .entry:hover .entry-frame { border-color: var(--gold-hi); }
}
.gallery:has(.entry:target):not(:hover) .entry:not(:target) { filter: brightness(0.5) sepia(0.6); }
.entry:target .entry-frame { border-color: var(--gold-hi); }
.entry:target .entry-tab, .entry:target .entry-tab:hover { color: var(--ink); background: var(--metal); border-color: var(--gold-hi); }

@media (min-width: 720px) {
  .gallery { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .entry { grid-column: span 12; }
  .entry--g1 { grid-column: 1 / 7; grid-row: 1 / 3; }
  .entry--g2 { grid-column: 7 / 13; grid-row: 1; }
  .entry--g3 { grid-column: 7 / 13; grid-row: 2; }
  .entry--g4 { grid-column: 1 / 8; }
  .entry--g5 { grid-column: 8 / 13; }
  .entry--g6 { grid-column: 1 / 6; }
  .entry--g7 { grid-column: 6 / 13; }
}

/* ---------- Games ---------- */

.games { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); margin: 0; padding: 0; list-style: none; }
.game { display: flex; flex-direction: column; margin: calc(var(--u) * 7) 0; }
.game .chip { margin: 0; display: flex; flex-direction: column; height: 100%; padding: calc(var(--u) * 6); }
.game-shot { aspect-ratio: 1 / 1; overflow: hidden; border: var(--b1) solid var(--gold-dark); background: var(--board-bg); }
.game-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.game h3 { display: flex; gap: 0; font-size: var(--px-head); margin: calc(var(--u) * 7) 0 calc(var(--u) * 4); }
.game h3 .a { color: var(--text); }
.game h3 .b { color: var(--gold-hi); }
.game h3 .px { column-gap: 0; }
.game p { margin: 0 0 var(--s3); flex: 1 1 auto; }
.game .btn { align-self: flex-start; }
.games-note { margin: var(--s4) 0 0; color: var(--text-dim); display: flex; gap: var(--s2); align-items: center; }
.games-note .icon { color: var(--teal); width: 24px; height: 24px; }
@media (min-width: 720px) and (max-width: 999px) {
  .game .chip { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); column-gap: var(--s3); align-items: start; }
  .game-shot { grid-row: 1 / 4; }
  .game h3 { margin-top: 0; }
}
@media (min-width: 1000px) {
  .games { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
  .game:nth-child(2) { margin-top: calc(var(--u) * 7 + var(--s4)); }
  .game:nth-child(3) { margin-top: calc(var(--u) * 7 + var(--s4) * 2); }
}

/* ---------- How it's made: the bond path ---------- */

.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-items: start; --pad: 72px; --drop: 0px; }
.step { position: relative; display: grid; grid-template-columns: var(--pad) minmax(0, 1fr); align-content: start; column-gap: var(--s3); scroll-margin-top: var(--s3); }
.step-pad {
  grid-row: 1 / 3;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--pad);
  height: var(--pad);
  font-size: var(--px-head);
  color: var(--text-dim);
  background: var(--panel);
  border: var(--b2) solid var(--gold-dark);
  transition: background var(--step-fast) steps(2), color var(--step-fast) steps(2), border-color var(--step-fast) steps(2);
}
.step.is-bonded .step-pad {
  color: var(--ink);
  background: var(--metal);
  border-color: var(--gold-dark);
  box-shadow: inset var(--b1) var(--b1) 0 var(--bevel-hi), inset calc(var(--b1) * -1) calc(var(--b1) * -1) 0 var(--bevel-lo);
}
.step h3 { font-size: var(--px-label); color: var(--gold-hi); margin: calc(var(--u) * 2) 0 calc(var(--u) * 4); align-self: end; }
.step p { margin: 0; max-width: 32em; }
/* Wire between pads (mobile: straight down along the pads) */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(var(--pad) / 2 - var(--u));
  top: var(--pad);
  bottom: calc(var(--s4) * -1);
  width: var(--b2);
  background: var(--gold-dark);
  transition: background var(--step-fast) steps(2);
}
.step.is-bonded:not(:last-child)::after { background: var(--gold-hi); }

@media (min-width: 1000px) {
  .path { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--s4); --pad: 96px; --drop: 96px; }
  .step { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; margin-top: calc(var(--i) * var(--drop)); }
  .step-pad { grid-row: auto; }
  .step h3 { margin-top: var(--s3); }
  /* 90-degree wire: right from the pad's middle, then down onto the next pad */
  .step:not(:last-child)::after {
    left: var(--pad);
    top: calc(var(--pad) / 2 - var(--u));
    bottom: auto;
    width: calc(100% + var(--s4) - var(--pad) / 2 + var(--u));
    height: calc(var(--drop) - var(--pad) / 2 + var(--u));
    background: none;
    border-top: var(--b2) solid var(--gold-dark);
    border-right: var(--b2) solid var(--gold-dark);
  }
  .step.is-bonded:not(:last-child)::after { background: none; border-color: var(--gold-hi); }
}

.made-foot { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); margin-top: var(--s5); align-items: center; }
.statement { font-size: var(--fs-statement); line-height: 1.3; font-weight: 500; margin: 0; max-width: 24em; }
.statement strong { color: var(--gold-hi); font-weight: 600; }
.video-panel .chip { margin-top: calc(var(--u) * 7); }
.video-panel video { width: 100%; aspect-ratio: 16 / 9; background: var(--board-bg); }
.video-panel .btn { margin-top: var(--s3); }
@media (min-width: 1000px) {
  .made-foot { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--s5); margin-top: var(--s6); }
}

/* ---------- About ---------- */

.about { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-items: center; }
.about-mascot { width: 140px; }
.about-mascot img { width: 100%; height: auto; }
.about-text p { max-width: 36em; }
.about-text p:first-of-type { font-size: var(--fs-lead); line-height: 1.45; }
.links { list-style: none; margin: var(--s3) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
@media (min-width: 720px) {
  .about { grid-template-columns: 200px minmax(0, 1fr); gap: var(--s5); }
  .about-mascot { width: 200px; }
}
@media (min-width: 1000px) {
  .about { grid-template-columns: 240px minmax(0, 1fr); }
  .about-mascot { width: 240px; }
}

/* ---------- FAQ ---------- */

.faq { max-width: 52rem; border-top: var(--b1) solid var(--gold-dark); }
.faq details { border-bottom: var(--b1) solid var(--gold-dark); }
.faq summary {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 56px;
  padding: var(--s2) 0;
  font-size: var(--fs-lead);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { width: 24px; height: 24px; color: var(--gold); transition: transform var(--step-fast) steps(1); }
.faq details[open] summary .icon { transform: rotate(90deg); }
.faq summary:hover { color: var(--gold-hi); }
.faq .answer { padding: 0 0 var(--s3) 40px; max-width: 40em; }
.faq .answer p { margin: 0; }

/* ---------- Footer: imprint, privacy, credits ---------- */

.site-footer {
  position: relative;
  margin-top: var(--section-gap);
  padding: var(--s5) 0 var(--s4);
  background: var(--board-bg);
  border-top: var(--b1) solid var(--gold-dark);
  font-size: var(--fs-small);
}
.legal { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
.legal h2 { font-size: var(--px-label); color: var(--gold); margin-bottom: var(--s2); scroll-margin-top: var(--s3); }
.legal p { color: var(--text-dim); max-width: 40em; }
.legal .lead { color: var(--text); }
.legal address { font-style: normal; }
.legal dl { margin: 0 0 1em; color: var(--text-dim); }
.legal dt { color: var(--text); font-weight: 600; }
.legal dd { margin: 0 0 0.6em; }
.footer-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  margin-top: var(--s5);
  padding-top: var(--s3);
  border-top: var(--b1) solid var(--gold-dark);
  color: var(--text-dim);
}
.footer-bar p { margin: 0; }
.footer-bar a { color: var(--gold-hi); }
.footer-bar nav ul { display: flex; flex-wrap: wrap; gap: 0 var(--s3); list-style: none; margin: 0; padding: 0; }
.footer-bar nav a { display: inline-flex; min-height: 44px; align-items: center; }
.version { font-size: var(--px-small); color: var(--text-dim); }
@media (min-width: 1000px) {
  .legal { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); }
}

/* ---------- Page transitions: fade out, jump, fade in (no smooth scroll) ---------- */

main, .site-footer { transition: opacity var(--step-fast) steps(3); }
body.is-leaving main, body.is-leaving .site-footer { opacity: 0; }

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