/* ═══════════════════════════════════════════════════════════════════════════
   MAGNOPE — $MGNOPE
   "The Field Studies" — mid-century product-catalogue documentation set.
   Palette extracted from the supplied studio photography.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── the four-colour system, straight off the art ── */
  --bg: #EBD8C0;
  /* studio cyclorama cream */
  --bg-warm: #E3CCAF;
  /* floor, slightly cooler than the wall */
  --paper: #F4E9D9;
  /* robot shell — lit surfaces, cards */
  --paper-hi: #FBF4E8;
  --ink: #23220E;
  /* deep olive-black — all text */
  --olive: #414019;
  /* the sculptural backdrop dune — structural dark */
  --olive-lo: #2E2D10;
  --olive-hi: #575430;

  /* ── accents ── */
  --yellow: #F2B516;
  /* the moulded plastic chair — PRIMARY */
  --yellow-lo: #C98F05;
  --yellow-hi: #FFD05C;

  /* rationed to polarity markers only — never a large field */
  --red: #C4180A;
  --blue: #0C2A8C;

  /* mascot only: MAGNOPE's eyes. never UI chrome. */
  --cyan: #5BE9EF;

  --shadow: #6E6D80;
  /* blue-violet studio cast shadow */

  --line: rgba(35, 34, 14, .17);
  --line-soft: rgba(35, 34, 14, .09);
  --muted: rgba(35, 34, 14, .62);
  --muted-2: rgba(35, 34, 14, .45);

  --disp: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Karla", "Segoe UI", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  /* consistent studio light: from upper-left, shadow falls lower-right */
  --cast: 10px 13px 0 -1px rgba(110, 109, 128, .16), 26px 34px 46px -18px rgba(110, 109, 128, .55);
  --cast-sm: 5px 7px 0 -1px rgba(110, 109, 128, .14), 12px 16px 24px -10px rgba(110, 109, 128, .45);

  --nav-h: 68px;
  --ease: cubic-bezier(.22, .68, .28, 1);
}

/* ═══ reset ═══ */
*,
*::before,
*::after {
  box-sizing: border-box
}

[hidden] {
  display: none !important
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font: 400 clamp(15px, 1.02vw, 17px)/1.62 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* every figure on the page is a measurement — lining tabular figures keep
   the spec cards and readouts aligned like a typeset datasheet */
.spec-v,
.tok-v,
.tel-v,
.ro-v,
.beat-time,
.ca-pill,
.tray-item .qty {
  font-variant-numeric: lining-nums tabular-nums
}

img,
svg {
  display: block;
  max-width: 100%
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer
}

a {
  color: inherit;
  text-decoration: none
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0
}

ol,
ul {
  list-style: none;
  padding: 0
}

::selection {
  background: var(--yellow);
  color: var(--ink)
}

:target {
  scroll-margin-top: calc(var(--nav-h) + 26px)
}

:focus-visible {
  outline: 2.5px solid var(--ink);
  outline-offset: 3px;
  border-radius: 2px
}

/* custom scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--olive) var(--bg-warm)
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px
}

::-webkit-scrollbar-track {
  background: var(--bg-warm)
}

::-webkit-scrollbar-thumb {
  background: var(--olive);
  border: 3px solid var(--bg-warm)
}

.skip {
  position: fixed;
  top: -100px;
  left: 14px;
  z-index: 999;
  background: var(--ink);
  color: var(--bg);
  padding: 11px 18px;
  font: 500 12px/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: top .2s
}

.skip:focus {
  top: 12px
}

.wrap {
  width: min(1240px, 100% - 2 * clamp(20px, 5vw, 56px));
  margin-inline: auto
}

/* ═══ page furniture ═══ */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 3;
  pointer-events: none;
  opacity: .32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.scrollbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: transparent;
  pointer-events: none
}

.scrollbar i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--yellow);
  box-shadow: 0 0 0 1px rgba(35, 34, 14, .1)
}

/* the pointer's field — a magnet that follows you */
#fieldLayer {
  position: fixed;
  inset: 0;
  z-index: 58;
  pointer-events: none;
  contain: strict
}

.fmag {
  position: absolute;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  will-change: transform;
  transition: opacity .3s
}

.fmag.idle {
  opacity: 0
}

.fmag-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(196, 24, 10, .3);
  animation: ring 2.6s var(--ease) infinite;
}

.fmag-rings::after,
.fmag-rings::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: inherit;
  animation: ring 2.6s var(--ease) infinite;
}

.fmag-rings::before {
  animation-delay: -.87s
}

.fmag-rings::after {
  animation-delay: -1.74s
}

@keyframes ring {
  from {
    transform: translate(-50%, -50%) scale(.55);
    opacity: .85
  }

  to {
    transform: translate(-50%, -50%) scale(3.6);
    opacity: 0
  }
}

.fmag-rings::before,
.fmag-rings::after {
  transform-origin: center;
  top: 0;
  left: 0;
  transform: none
}

/* dropped magnets (long-press egg) sit in the page */
.dropmag {
  position: absolute;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  z-index: 57;
  cursor: grab;
  pointer-events: auto;
  filter: drop-shadow(6px 8px 6px rgba(110, 109, 128, .55));
  animation: drop-in .45s var(--ease) both;
}

@keyframes drop-in {
  from {
    transform: scale(.2) rotate(-25deg);
    opacity: 0
  }
}

/* ═══ nav ═══ */
.nav {
  position: sticky;
  top: 0;
  z-index: 55;
  background: rgba(235, 216, 192, .84);
  backdrop-filter: blur(11px) saturate(1.3);
  border-bottom: 1px solid var(--line-soft);
  transition: border-color .3s, background .3s
}

.nav.stuck {
  border-bottom-color: var(--line);
  background: rgba(235, 216, 192, .95)
}

.nav-in {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 22px
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto
}

.brand-mag {
  width: 26px;
  height: 26px;
  flex: none;
  transition: transform .4s var(--ease)
}

.brand:hover .brand-mag {
  transform: rotate(-14deg) scale(1.08)
}

.brand-name {
  font: 800 18px/1 var(--disp);
  font-variation-settings: "wdth" 100;
  letter-spacing: -.005em
}

.brand-tick {
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .1em;
  color: var(--muted-2);
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px
}

.nav-links a {
  position: relative;
  font: 500 12px/1 var(--mono);
  letter-spacing: .07em;
  padding: 10px 13px;
  color: var(--muted);
  transition: color .22s
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 4px;
  height: 1.5px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease)
}

.nav-links a:hover {
  color: var(--ink)
}

.nav-links a:hover::after {
  transform: scaleX(1)
}

.nav-links a.active {
  color: var(--ink)
}

.nav-links .nav-cta {
  background: var(--ink);
  color: var(--bg);
  border-radius: 3px;
  margin-left: 8px;
  padding: 11px 15px;
  transition: background .22s, transform .22s
}

.nav-links .nav-cta::after {
  display: none
}

.nav-links .nav-cta:hover {
  background: var(--olive);
  color: var(--yellow);
  transform: translateY(-1px)
}

.burger {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px
}

.burger span {
  width: 21px;
  height: 1.8px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s
}

.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.8px) rotate(45deg)
}

.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0
}

.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.8px) rotate(-45deg)
}

/* ═══ shared: plate numbers, section heads ═══ */
.plate-no {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 400 11px/1 var(--mono);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.plate-no .rule {
  flex: 1;
  max-width: 90px;
  height: 1px;
  background: var(--line)
}

.sec {
  padding: clamp(68px, 7.4vw, 112px) 0;
  position: relative
}

.sec-head {
  max-width: 720px;
  margin-bottom: clamp(40px, 5vw, 68px)
}

.sec-h2 {
  font: 800 clamp(2.05rem, 5.1vw, 3.7rem)/.98 var(--disp);
  font-variation-settings: "wdth" 96;
  letter-spacing: -.028em;
  margin: 18px 0 16px;
  text-wrap: balance
}

.sec-lede {
  font-size: clamp(1rem, 1.25vw, 1.14rem);
  color: var(--muted);
  max-width: 56ch;
  text-wrap: pretty
}

/* ═══ buttons ═══ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  background: transparent;
  font: 500 12.5px/1 var(--mono);
  letter-spacing: .06em;
  white-space: nowrap;
  transition: transform .22s var(--ease), background .22s, color .22s, box-shadow .22s;
  box-shadow: 3px 4px 0 -1px rgba(110, 109, 128, .3);
}

.btn img {
  width: 17px;
  height: 17px;
  flex: none
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 8px 0 -1px rgba(110, 109, 128, .34)
}

.btn:active {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 -1px rgba(110, 109, 128, .3)
}

.btn-primary {
  background: var(--yellow);
  border-color: var(--ink)
}

.btn-primary:hover {
  background: var(--yellow-hi)
}

.btn-icon {
  padding: 13px 14px
}

.btn-lg {
  padding: 16px 26px;
  font-size: 13.5px
}

.btn:disabled {
  opacity: .42;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: 3px 4px 0 -1px rgba(110, 109, 128, .2) !important
}

/* ═══ HERO ═══ */
.hero {
  padding: clamp(46px, 6vw, 84px) 0 clamp(30px, 4vw, 50px);
  position: relative
}

.hero::before {
  /* the olive dune, abstracted into a backdrop curve */
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 62%;
  background:
    radial-gradient(120% 100% at 78% 100%, rgba(65, 64, 25, .10) 0%, transparent 62%),
    linear-gradient(to bottom, transparent, rgba(110, 109, 128, .07));
  pointer-events: none;
}

.hero-in {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: center
}

.hero-h1 {
  font: 800 clamp(2.7rem, 7.6vw, 6rem)/.9 var(--disp);
  font-variation-settings: "wdth" 100;
  letter-spacing: -.038em;
  margin: 20px 0 24px;
}

.hero-h1 .line {
  display: block
}

.hero-h1 .line-2 {
  color: var(--olive)
}

.hero-h1 .word {
  display: inline-block;
  white-space: nowrap
}

.hero-h1 .ch {
  display: inline-block;
  will-change: transform
}

.hero-sub {
  font-size: clamp(1rem, 1.3vw, 1.16rem);
  color: var(--muted);
  max-width: 50ch;
  text-wrap: pretty
}

/* contract pill */
.ca {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0 22px;
  flex-wrap: wrap
}

.ca-label {
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted-2)
}

.ca-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 12px 16px;
  border: 1.5px dashed var(--line);
  border-radius: 4px;
  background: var(--paper);
  font: 400 13px/1 var(--mono);
  letter-spacing: .02em;
  transition: transform .3s var(--ease), border-color .25s, background .25s;
  box-shadow: var(--cast-sm);
}

.ca-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.ca-pill:hover {
  border-color: var(--ink);
  border-style: solid;
  background: var(--paper-hi)
}

.ca-copy {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round
}

.ca-pill.copied {
  border-color: var(--yellow-lo);
  border-style: solid;
  background: var(--yellow-hi)
}

.hero-cta {
  display: flex;
  gap: 11px;
  flex-wrap: wrap
}

.hero-foot {
  margin-top: 28px;
  font: 400 11.5px/1.7 var(--mono);
  letter-spacing: .07em;
  color: var(--muted-2);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap
}

.hero-foot .sep {
  opacity: .4;
  margin: 0 4px
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex: none
}

.dot-red {
  background: var(--red)
}

.dot-yellow {
  background: var(--yellow)
}

/* ── the plate system: framed photographic plates with museum labels ── */
.plate {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 14px 14px 0;
  box-shadow: var(--cast);
  transition: transform .5s var(--ease);
}

.plate-img {
  position: relative;
  overflow: visible;
  background: var(--bg-warm)
}

.plate-img img {
  width: 100%;
  height: auto
}

.plate figcaption {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 13px 2px 14px;
  border-top: 1px solid var(--line-soft);
  margin-top: 14px;
  font: 400 11px/1.5 var(--mono);
  letter-spacing: .04em;
  color: var(--muted-2);
}

.cap-no {
  color: var(--ink);
  letter-spacing: .16em;
  text-transform: uppercase;
  flex: none
}

.hero-plate {
  transform: rotate(-.7deg)
}

.wide-plate {
  margin-top: clamp(46px, 6vw, 76px);
  transform: rotate(.4deg)
}

/* exploded-diagram callouts */
.callout {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .5s var(--ease), transform .5s var(--ease)
}

.reveal.in .callout {
  opacity: 1;
  transform: none
}

.callout i {
  position: absolute;
  display: block;
  background: var(--ink)
}

.callout i::before {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink)
}

.callout b {
  display: block;
  font: 500 10px/1.35 var(--mono);
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--paper-hi);
  border: 1px solid var(--line);
  padding: 6px 9px;
  white-space: nowrap;
  box-shadow: 3px 4px 0 -1px rgba(110, 109, 128, .2);
}

.callout b em {
  display: block;
  font-style: normal;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
  margin-top: 2px
}

/* a: subject (upper right) */
.callout-a {
  top: 24%;
  right: -8px;
  transform-origin: left
}

.callout-a i {
  right: 100%;
  top: 12px;
  width: 46px;
  height: 1px
}

.callout-a i::before {
  left: -3px;
  top: -2.5px
}

.callout-a b {
  transform: translateX(6px)
}

/* b: threat (lower left) */
.callout-b {
  bottom: 12%;
  left: -10px
}

.callout-b i {
  left: 100%;
  top: 12px;
  width: 40px;
  height: 1px
}

.callout-b i::before {
  right: -3px;
  top: -2.5px;
  background: var(--red)
}

.callout-b b {
  border-color: rgba(196, 24, 10, .4)
}

.callout-b b em {
  color: var(--red)
}

/* c: countermeasure (lower right) */
.callout-c {
  bottom: 26%;
  right: -6px
}

.callout-c i {
  right: 100%;
  top: 12px;
  width: 34px;
  height: 1px
}

.callout-c i::before {
  left: -3px;
  top: -2.5px;
  background: var(--yellow-lo)
}

.callout-c b {
  border-color: rgba(201, 143, 5, .45)
}

.callout-c b em {
  color: var(--yellow-lo)
}

.scroll-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: clamp(32px, 4vw, 54px) auto 0;
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--muted-2);
  transition: color .25s
}

.scroll-hint svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: bob 2.4s var(--ease) infinite
}

.scroll-hint:hover {
  color: var(--ink)
}

@keyframes bob {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(5px)
  }
}

/* ═══ MARQUEE — text splays around a pinned magnet ═══ */
.marquee {
  position: relative;
  background: var(--olive);
  color: var(--bg);
  border-top: 1px solid var(--olive-lo);
  border-bottom: 1px solid var(--olive-lo);
  overflow: hidden;
  padding: 18px 0;
  isolation: isolate;
}

.marquee::after {
  /* the pinned field, dead centre */
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 190px;
  height: 190px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 24, 10, .28) 0%, rgba(12, 42, 140, .16) 42%, transparent 68%);
  pointer-events: none;
  z-index: 1;
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  width: max-content;
  will-change: transform
}

.mq-word {
  display: inline-block;
  padding: 0 .38em;
  font: 700 clamp(1.15rem, 2.4vw, 1.75rem)/1 var(--disp);
  font-variation-settings: "wdth" 88;
  letter-spacing: -.01em;
  will-change: transform;
}

.mq-word.mq-tick {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(.85rem, 1.5vw, 1.1rem);
  letter-spacing: .1em;
  color: var(--yellow);
  transform-origin: center;
}

.mq-sep {
  display: inline-flex;
  align-items: center;
  padding: 0 .5em;
  will-change: transform
}

.mq-sep svg {
  width: clamp(15px, 1.9vw, 21px);
  height: auto;
  opacity: .95
}

/* ═══ THE INCIDENT ═══ */
.incident {
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg-warm) 100%)
}

.beats {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  counter-reset: beat
}

.beat {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0 clamp(18px, 3vw, 48px);
  padding: clamp(26px, 3.4vw, 40px) 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.beat::before {
  /* the vertical progress spine */
  content: "";
  position: absolute;
  left: 92px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-soft);
  transform: translateX(calc(-1 * clamp(9px, 1.7vw, 24px)))
}

/* everything except the timestamp lives in the second column */
.beat> :not(.beat-time) {
  grid-column: 2
}

.beat-time {
  grid-column: 1;
  grid-row: 1;
  font: 400 11px/1.5 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2);
  padding-top: 7px
}

.beat h3 {
  font: 700 clamp(1.25rem, 2.3vw, 1.72rem)/1.14 var(--disp);
  font-variation-settings: "wdth" 92;
  letter-spacing: -.02em;
  margin-bottom: 10px
}

.beat p {
  color: var(--muted);
  max-width: 62ch;
  text-wrap: pretty
}

.beat-quote {
  margin-top: 14px !important;
  font: 700 clamp(1.3rem, 2.6vw, 2rem)/1 var(--disp);
  font-variation-settings: "wdth" 100;
  letter-spacing: -.03em;
  color: var(--ink) !important;
  padding: 14px 0 4px;
}

.beat-quote::before {
  content: "▸ ";
  color: var(--yellow-lo)
}

.beat-last h3 {
  color: var(--olive)
}

/* ═══ SPECIFICATION ═══ */
.specs {
  background: var(--bg-warm)
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(14px, 1.6vw, 20px)
}

/* six cards read best as two balanced rows of three */
@media (min-width:1000px) {
  .spec-grid {
    grid-template-columns: repeat(3, 1fr)
  }
}

.spec {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(22px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 9px;
  box-shadow: var(--cast-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}

.spec-k {
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted-2)
}

.spec-v {
  font: 800 clamp(2.1rem, 3.9vw, 3rem)/1 var(--disp);
  font-variation-settings: "wdth" 92;
  letter-spacing: -.035em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.spec-v em {
  font: 400 12px/1 var(--mono);
  font-style: normal;
  letter-spacing: .1em;
  color: var(--muted-2);
  text-transform: uppercase
}

.spec-n {
  font-size: .89rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 6px;
  text-wrap: pretty
}

.spec-fail {
  background: var(--olive);
  border-color: var(--olive-lo);
  color: var(--bg)
}

.spec-fail .spec-k {
  color: rgba(235, 216, 192, .6)
}

.spec-fail .spec-n {
  color: rgba(235, 216, 192, .74)
}

.spec-none {
  color: var(--red);
  text-transform: lowercase;
  position: relative;
  display: inline-block;
  width: max-content
}

.spec-none::after {
  content: "";
  position: absolute;
  left: -4%;
  right: -4%;
  top: 54%;
  height: 4px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .7s var(--ease) .25s
}

.reveal.in .spec-none::after {
  transform: scaleX(1)
}

/* ═══ THE CROSSING ═══ */
.crossing {
  background: linear-gradient(to bottom, var(--bg-warm), var(--bg))
}

.cross-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(18px, 2.4vw, 30px);
  align-items: start
}

.cross-stage {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--cast);
  padding: 12px;
  overflow: hidden
}

#crossCanvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
  background: linear-gradient(to bottom, #F3E7D4 0%, #EEDCC4 62%, #E3CCAF 100%);
}

.cross-banner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-3deg);
  background: var(--paper-hi);
  border: 2px solid var(--ink);
  padding: 20px 32px;
  text-align: center;
  box-shadow: var(--cast);
  animation: stamp .45s var(--ease) both;
  z-index: 3;
  max-width: 84%;
}

@keyframes stamp {
  from {
    transform: translate(-50%, -50%) rotate(-3deg) scale(1.5);
    opacity: 0
  }
}

.cross-banner strong {
  display: block;
  font: 800 clamp(1.3rem, 2.6vw, 2rem)/1 var(--disp);
  font-variation-settings: "wdth" 96;
  letter-spacing: -.03em;
  text-transform: uppercase
}

.cross-banner span {
  display: block;
  margin-top: 8px;
  font: 400 11px/1.4 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-2)
}

.cross-ui {
  display: flex;
  flex-direction: column;
  gap: 16px
}

.cross-tray {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px
}

.tray-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 13px 8px 11px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 3px;
  cursor: grab;
  transition: transform .2s var(--ease), border-color .2s, background .2s, box-shadow .2s;
  box-shadow: 3px 4px 0 -1px rgba(110, 109, 128, .18);
  touch-action: none;
}

.tray-item:hover:not(.spent) {
  transform: translate(-2px, -2px);
  border-color: var(--ink);
  box-shadow: 6px 8px 0 -1px rgba(110, 109, 128, .24)
}

.tray-item.sel {
  border-color: var(--ink);
  background: var(--yellow-hi)
}

.tray-item.spent {
  opacity: .34;
  cursor: not-allowed;
  filter: grayscale(1)
}

.tray-item svg {
  width: 42px;
  height: 34px
}

.tray-item b {
  font: 500 9.5px/1 var(--mono);
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--muted)
}

.tray-item .qty {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font: 500 10px/19px var(--mono);
  text-align: center
}

.cross-readout {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 15px 16px;
  display: grid;
  gap: 12px;
  box-shadow: var(--cast-sm)
}

.ro {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: baseline
}

.ro-k {
  font: 400 10px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-2)
}

.ro-v {
  font: 500 13px/1 var(--mono);
  letter-spacing: .04em;
  text-align: right
}

.ro-bar {
  grid-column: 1/-1;
  height: 3px;
  background: rgba(35, 34, 14, .12);
  display: block;
  overflow: hidden
}

.ro-bar i {
  display: block;
  height: 100%;
  background: var(--yellow);
  transition: width .25s linear, background .3s
}

.ro-bar i.low {
  background: var(--red)
}

.cross-btns {
  display: grid;
  gap: 9px
}

.cross-btns .btn {
  justify-content: center
}

.cross-help {
  font-size: .8rem;
  line-height: 1.65;
  color: var(--muted-2)
}

.cross-help+.cross-help {
  margin-top: -6px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft)
}

.cross-help-b {
  color: var(--ink);
  font-weight: 600
}

.cross-scrollnote {
  display: none;
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 10px
}

.cross-help kbd {
  font: 500 10px/1 var(--mono);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 3px;
  padding: 3px 5px;
  background: var(--paper);
  color: var(--muted)
}

/* ═══ TOKENOMICS ═══ */
.tok-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(13px, 1.5vw, 18px)
}

/* five cards, one of which spans two columns = six cells: three columns
   fills exactly two rows with no orphan */
@media (min-width:900px) {
  .tok-grid {
    grid-template-columns: repeat(3, 1fr)
  }
}

.tok {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(20px, 2.2vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--cast-sm)
}

.tok-big {
  grid-column: span 2;
  background: var(--ink);
  color: var(--bg);
  border-color: var(--olive-lo)
}

.tok-big .tok-k {
  color: rgba(235, 216, 192, .6)
}

.tok-big .tok-n {
  color: rgba(235, 216, 192, .7)
}

.tok-big .tok-v {
  color: var(--yellow)
}

.tok-k {
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted-2)
}

.tok-v {
  font: 800 clamp(1.6rem, 3.1vw, 2.5rem)/1 var(--disp);
  font-variation-settings: "wdth" 90;
  letter-spacing: -.035em;
  display: flex;
  align-items: baseline
}

.tok-v em {
  font-style: normal
}

.tok-word {
  font-variation-settings: "wdth" 84;
  font-size: clamp(1.4rem, 2.5vw, 2rem)
}

.tok-n {
  font-size: .85rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 4px
}

/* live telemetry */
.telemetry {
  margin-top: clamp(20px, 2.4vw, 30px);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--cast-sm)
}

.tel-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft)
}

.tel-head .plate-no {
  margin-right: auto
}

.tel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
  flex: none
}

.telemetry[data-state="live"] .tel-dot {
  background: #2E8B3D;
  animation: pulse 2s ease-in-out infinite
}

.telemetry[data-state="warming"] .tel-dot {
  background: var(--yellow-lo)
}

.telemetry[data-state="error"] .tel-dot {
  background: var(--red)
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(46, 139, 61, .5)
  }

  70% {
    box-shadow: 0 0 0 7px rgba(46, 139, 61, 0)
  }
}

.tel-state {
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-2)
}

.tel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr))
}

.tel {
  padding: 18px;
  border-right: 1px solid var(--line-soft);
  display: grid;
  gap: 7px
}

.tel:last-child {
  border-right: 0
}

.tel-k {
  font: 400 10px/1 var(--mono);
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-2)
}

.tel-v {
  font: 500 clamp(1.05rem, 1.8vw, 1.4rem)/1 var(--mono);
  letter-spacing: -.01em
}

.tel-v.up {
  color: #2E8B3D
}

.tel-v.down {
  color: var(--red)
}

/* ═══ HOW TO BUY ═══ */
.buy {
  background: var(--olive);
  color: var(--bg)
}

.buy .plate-no,
.buy .sec-lede {
  color: rgba(235, 216, 192, .66)
}

.buy .plate-no .rule {
  background: rgba(235, 216, 192, .25)
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 2vw, 26px)
}

.step {
  position: relative;
  padding: clamp(24px, 2.6vw, 32px);
  background: rgba(235, 216, 192, .055);
  border: 1px solid rgba(235, 216, 192, .17);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background .3s, border-color .3s, transform .3s var(--ease);
}

.step:hover {
  background: rgba(235, 216, 192, .1);
  border-color: rgba(235, 216, 192, .34);
  transform: translateY(-3px)
}

.step-n {
  font: 400 11px/1 var(--mono);
  letter-spacing: .24em;
  color: var(--yellow)
}

.step img {
  width: 30px;
  height: 30px;
  filter: brightness(0) invert(1);
  opacity: .9
}

.step h3 {
  font: 700 1.22rem/1.15 var(--disp);
  font-variation-settings: "wdth" 92;
  letter-spacing: -.02em
}

.step p {
  font-size: .92rem;
  color: rgba(235, 216, 192, .74);
  text-wrap: pretty
}

/* ═══ PROTOCOL ═══ */
.proto-line {
  height: 2px;
  background: var(--line-soft);
  margin-bottom: 30px;
  overflow: hidden
}

.proto-line i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--yellow)
}

.protos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(16px, 2vw, 24px)
}

.proto {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(22px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  gap: 11px;
  box-shadow: var(--cast-sm)
}

.proto-n {
  font: 400 10.5px/1 var(--mono);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted-2)
}

.proto h3 {
  font: 700 clamp(1.3rem, 2.2vw, 1.7rem)/1.1 var(--disp);
  font-variation-settings: "wdth" 92;
  letter-spacing: -.025em
}

.proto p {
  font-size: .92rem;
  color: var(--muted);
  text-wrap: pretty
}

.proto-s {
  margin-top: auto;
  padding-top: 12px;
  font: 500 10px/1 var(--mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted-2)
}

.proto-s::before {
  content: "○ "
}

.proto-done {
  color: var(--olive)
}

.proto-done::before {
  content: "● "
}

.proto-live {
  color: var(--yellow-lo)
}

.proto-live::before {
  content: "◐ "
}

/* ═══ COMMUNITY ═══ */
.community {
  background: var(--bg-warm);
  text-align: center;
  border-top: 1px solid var(--line)
}

.community-in {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px
}

.community .plate-no {
  justify-content: center
}

/* ISO 7010 W006 warning sign */
.warn-sign {
  width: clamp(84px, 11vw, 116px);
  height: auto;
  filter: drop-shadow(7px 9px 0 rgba(110, 109, 128, .22))
}

.hero-plate.spooked {
  box-shadow: 10px 13px 0 -1px rgba(196, 24, 10, .2),
    26px 34px 46px -18px rgba(110, 109, 128, .55)
}

.community-h {
  font: 800 clamp(2.4rem, 7.4vw, 5.4rem)/.92 var(--disp);
  font-variation-settings: "wdth" 100;
  letter-spacing: -.04em;
  text-transform: uppercase;
  text-wrap: balance
}

.community-p {
  color: var(--muted);
  max-width: 52ch;
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  text-wrap: pretty
}

.community-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px
}

/* ═══ FOOTER ═══ */
.foot {
  background: var(--olive-lo);
  color: rgba(235, 216, 192, .8);
  padding: clamp(46px, 5vw, 70px) 0 34px
}

.foot-in {
  display: grid;
  gap: 26px
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font: 800 19px/1 var(--disp);
  color: var(--bg)
}

.foot-brand em {
  font: 400 11px/1 var(--mono);
  font-style: normal;
  letter-spacing: .12em;
  color: var(--yellow);
  margin-left: 4px
}

.foot-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap
}

.foot-links a {
  font: 400 12px/1 var(--mono);
  letter-spacing: .07em;
  color: rgba(235, 216, 192, .66);
  transition: color .2s
}

.foot-links a:hover {
  color: var(--yellow)
}

.foot-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}

.foot-social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(235, 216, 192, .2);
  border-radius: 3px;
  transition: border-color .22s, background .22s, transform .22s var(--ease)
}

.foot-social img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
  opacity: .78;
  transition: opacity .22s
}

.foot-social a:hover {
  border-color: var(--yellow);
  background: rgba(242, 181, 22, .1);
  transform: translateY(-2px)
}

.foot-social a:hover img {
  opacity: 1
}

.foot-legal {
  font-size: .82rem;
  line-height: 1.72;
  color: rgba(235, 216, 192, .5);
  max-width: 76ch;
  border-top: 1px solid rgba(235, 216, 192, .14);
  padding-top: 24px;
  text-wrap: pretty
}

.foot-copy {
  font: 400 11px/1 var(--mono);
  letter-spacing: .12em;
  color: rgba(235, 216, 192, .4)
}

.foot-copy .sep {
  margin: 0 8px
}

/* ═══ toast ═══ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 30px;
  transform: translate(-50%, 24px);
  z-index: 90;
  background: var(--ink);
  color: var(--bg);
  padding: 13px 22px;
  border-radius: 3px;
  font: 500 12px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
  box-shadow: var(--cast);
  max-width: calc(100vw - 40px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0)
}

/* ═══ scroll reveal ═══ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .75s var(--ease), transform .75s var(--ease)
}

.reveal.in {
  opacity: 1;
  transform: none
}

/* body-wide recoil (press M) */
body.recoil main,
body.recoil .foot,
body.recoil .nav {
  transition: transform .55s cubic-bezier(.2, .9, .25, 1)
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width:1040px) {
  .cross-wrap {
    grid-template-columns: 1fr
  }

  .cross-tray {
    grid-template-columns: repeat(4, 1fr)
  }

  .cross-ui {
    order: 2
  }
}

@media (max-width:900px) {
  .hero-in {
    grid-template-columns: 1fr;
    gap: 40px
  }

  .hero-plate {
    order: -1;
    transform: none;
    max-width: 560px;
    width: 100%;
    margin-inline: auto
  }

  .tok-big {
    grid-column: span 2
  }
}

@media (max-width:820px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px -18px rgba(110, 109, 128, .6);
    padding: 8px 0 14px;
  }

  .nav-links.open {
    display: flex
  }

  .nav-links a {
    padding: 15px clamp(20px, 5vw, 56px);
    font-size: 13px
  }

  .nav-links a::after {
    display: none
  }

  .nav-links .nav-cta {
    margin: 8px clamp(20px, 5vw, 56px) 0;
    text-align: center;
    padding: 15px
  }

  .burger {
    display: flex
  }

  .beat {
    grid-template-columns: 1fr;
    gap: 6px
  }

  .beat::before {
    display: none
  }

  .beat-time {
    padding-top: 0
  }
}

@media (max-width:620px) {
  :root {
    --nav-h: 60px
  }

  .callout b em {
    font-size: 11px
  }

  .callout b {
    font-size: 9px;
    padding: 5px 7px
  }

  .callout-a {
    right: 2px
  }

  .callout-a i {
    width: 22px
  }

  .callout-b {
    left: 2px
  }

  .callout-b i {
    width: 20px
  }

  .callout-c {
    right: 2px
  }

  .callout-c i {
    width: 18px
  }

  .tok-big {
    grid-column: 1/-1
  }

  .tel {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft)
  }

  .tel:last-child {
    border-bottom: 0
  }

  .cross-tray {
    grid-template-columns: repeat(2, 1fr)
  }

  .hero-cta {
    gap: 8px
  }

  /* the stage would otherwise squeeze to ~300px wide, which makes the
     furniture too small to hit with a thumb — hold a workable width and
     let the stage itself scroll sideways */
  .cross-stage {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch
  }

  #crossCanvas {
    min-width: 600px
  }

  .cross-scrollnote {
    display: block
  }

  .btn {
    padding: 12px 16px;
    font-size: 12px
  }

  .foot-links {
    gap: 14px
  }
}

@media (max-width:420px) {
  .callout {
    display: none
  }
}

/* coarse pointers get no magnet cursor */
@media (pointer:coarse) {
  #fieldLayer {
    display: none
  }
}

/* ═══════════ REDUCED MOTION ═══════════
   Honoured by default; ?motion=force re-enables (this build machine has
   reduced-motion on at the OS level). */
@media (prefers-reduced-motion:reduce) {
  html:not(.motion-force) * {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  html:not(.motion-force) .reveal {
    opacity: 1;
    transform: none
  }

  html:not(.motion-force) .callout {
    opacity: 1;
    transform: none
  }

  html:not(.motion-force) .spec-none::after {
    transform: scaleX(1)
  }

  html:not(.motion-force) .marquee-track {
    transform: none !important
  }

  html:not(.motion-force) .fmag-rings {
    display: none
  }
}
