/* Layout concept: the factory blueprint. A live CAD drafting table: crosshair guides, rubber stamps,
   conveyor belts and a logo that splits into its colorways as you move. */
:root {
  --ink: #070c29;       /* brand navy, the drafting table */
  --ink-2: #0e1648;     /* raised panels */
  --line: #24307a;      /* blueprint rules */
  --volt: #0072ef;      /* brand electric blue */
  --ice: #9fdcff;       /* ice blue, guides and highlights */
  --red: #db162f;       /* logo red */
  --paper: #f1f4ff;     /* text */
  --mute: #98a4d8;      /* secondary text, navy-tinted */
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-cond: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --f-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
  --logo: url("img/logo-mask.png");
  --mono: url("img/mono-mask.png");
  --word: url("img/word-mask.png");
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font: 400 1.0625rem/1.6 var(--f-body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden; cursor: crosshair;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
a, button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ice); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--red); color: #fff; }

/* blueprint grid: major + minor lines */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(159,220,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159,220,255,.07) 1px, transparent 1px),
    linear-gradient(rgba(159,220,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159,220,255,.03) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}
/* film grain */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 50% { transform: translate(-3%, 2%); } 100% { transform: translate(2%, -3%); } }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--f-mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- CAD crosshair ---------- */
.cad { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.cad i { position: absolute; background: rgba(159,220,255,.35); }
.cad .h { left: 0; right: 0; height: 1px; top: 0; }
.cad .v { top: 0; bottom: 0; width: 1px; left: 0; }
.cad .read { position: absolute; top: 0; left: 0; color: var(--ice); background: rgba(7,12,41,.8); padding: 3px 6px; border: 1px solid rgba(159,220,255,.35); white-space: nowrap; font-size: .66rem; }
@media (hover: none), (pointer: coarse) { .cad { display: none; } body { cursor: auto; } }

/* stamps dropped on click */
.stamp {
  position: absolute; z-index: 30; pointer-events: none; width: 96px; aspect-ratio: 500/702;
  -webkit-mask: var(--mono) center/contain no-repeat; mask: var(--mono) center/contain no-repeat;
  animation: stamp 2.6s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes stamp {
  0% { transform: translate(-50%,-50%) scale(1.8) rotate(var(--r)); opacity: 0; }
  12% { transform: translate(-50%,-50%) scale(1) rotate(var(--r)); opacity: 1; }
  75% { opacity: .9; }
  100% { transform: translate(-50%,-50%) scale(1) rotate(var(--r)); opacity: 0; }
}

/* ---------- nav ---------- */
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 35; background: rgba(7,12,41,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.navlogo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.navlogo .m { width: 26px; aspect-ratio: 700/983; background: url("img/mono-gradient.png") center/contain no-repeat; transition: transform .4s cubic-bezier(.3,1.6,.5,1); }
.navlogo:hover .m { transform: rotate(-12deg) scale(1.15); }
.navlogo .w { display: block; width: 104px; aspect-ratio: 600/177; background: var(--paper); -webkit-mask: var(--word) center/contain no-repeat; mask: var(--word) center/contain no-repeat; transition: background .3s; }
.navlogo:hover .w { background: var(--ice); }
.nav ul { display: flex; gap: clamp(12px, 3vw, 30px); list-style: none; margin: 0; padding: 0; align-items: center; }
.nav a.link { text-decoration: none; color: var(--mute); }
.nav a.link:hover, .nav a.link[aria-current="page"] { color: var(--ice); }
.btn {
  display: inline-flex; align-items: center; gap: .5em; font-family: var(--f-mono); font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 600; padding: .85em 1.25em; border-radius: 999px; text-decoration: none;
  background: var(--red); color: #fff; border: 0; box-shadow: 4px 4px 0 var(--ice);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ice); }
.btn:active { transform: translate(3px,3px); box-shadow: 0 0 0 var(--ice); }
.btn.ghost { background: transparent; color: var(--paper); border: 1px solid var(--ice); box-shadow: 4px 4px 0 var(--volt); }
.btn.ghost:hover { box-shadow: 6px 6px 0 var(--volt); }

/* ---------- hero ---------- */
.hero { position: relative; overflow-x: clip; padding-block: clamp(36px, 7vw, 90px) clamp(28px, 5vw, 56px); }
.hero-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--mute); margin-bottom: clamp(16px, 3vw, 28px); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--red); margin-right: 8px; animation: blink 1.1s steps(2) infinite; vertical-align: 1px; }
@keyframes blink { 50% { opacity: .2; } }

/* the split logo: three colorway layers over a paper base */
.biglogo { position: relative; width: min(100%, 1100px); aspect-ratio: 1400/647; margin-inline: auto; }
.biglogo span {
  position: absolute; inset: 0; -webkit-mask: var(--logo) center/contain no-repeat; mask: var(--logo) center/contain no-repeat;
  transition: transform .12s linear;
}
.biglogo .l-red { background: var(--red); mix-blend-mode: screen; }
.biglogo .l-volt { background: var(--volt); mix-blend-mode: screen; }
.biglogo .l-ice { background: var(--ice); mix-blend-mode: screen; }
.biglogo .l-base { background: var(--paper); }
.biglogo.glitch .l-red { transform: translate(-14px, 4px) !important; }
.biglogo.glitch .l-volt { transform: translate(12px, -6px) !important; }
.biglogo.glitch .l-base { clip-path: inset(38% 0 44% 0); transform: translateX(18px); }
.dim { display: flex; align-items: center; gap: 10px; color: var(--ice); margin: 10px auto 0; width: min(100%, 1100px); }
.dim::before, .dim::after { content: ""; flex: 1; height: 1px; background: var(--ice); opacity: .5; }

.hero h1 {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase; text-align: center;
  font-size: clamp(2rem, 6.6vw, 5.6rem); line-height: 1; letter-spacing: -.02em; margin: clamp(24px, 4vw, 44px) 0 0; text-wrap: balance;
}
.hero h1 .swap { display: inline-block; background: var(--red); color: #fff; padding: .02em .22em .08em; transform: rotate(-3deg); box-shadow: 6px 6px 0 var(--ice); }
.hero .lede { max-width: 58ch; margin: 24px auto 0; text-align: center; color: var(--mute); font-size: clamp(1.02rem, 1.5vw, 1.2rem); }
.hero .lede strong { color: var(--paper); font-weight: 600; }
.hero .ctas { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 28px; }
.hint { text-align: center; color: var(--ice); opacity: .7; margin-top: 22px; }
@media (hover: none), (pointer: coarse) { .hint { display: none; } }

/* ---------- crossing tape bands ---------- */
.tapes { position: relative; height: clamp(150px, 18vw, 220px); margin-block: clamp(10px, 3vw, 30px); overflow: hidden; }
.tape { position: absolute; left: -10%; width: 120%; top: 50%; display: flex; overflow: hidden; padding-block: 14px; }
.tape.a { background: var(--red); transform: translateY(-50%) rotate(-4deg); z-index: 2; }
.tape.b { background: var(--ice); color: var(--ink); transform: translateY(-50%) rotate(3deg); }
.tape div { display: flex; flex-shrink: 0; gap: 28px; padding-right: 28px; animation: roll 26s linear infinite; font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(1.1rem, 2.6vw, 2rem); white-space: nowrap; }
.tape.b div { animation-direction: reverse; animation-duration: 34s; }
.tape div span::after { content: "\2726"; margin-left: 28px; }
@keyframes roll { to { transform: translateX(-100%); } }

/* ---------- section heads ---------- */
.shead { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.shead h2 { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2rem, 5.4vw, 4.4rem); line-height: .95; margin: 0; letter-spacing: -.02em; }
.shead h2 em { font-style: normal; color: transparent; -webkit-text-stroke: 2px var(--ice); }
.shead p { margin: 0; color: var(--mute); max-width: 40ch; }
.tagno { color: var(--red); display: block; margin-bottom: 8px; }

/* ---------- conveyor ---------- */
.belt-zone { padding-block: clamp(40px, 6vw, 80px); overflow: hidden; }
.belt { display: flex; overflow: hidden; padding-block: 22px; border-block: 2px dashed var(--line); background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(159,220,255,.05) 38px 40px); }
.belt + .belt { border-top: 0; }
.track { display: flex; gap: 22px; padding-right: 22px; flex-shrink: 0; animation: roll 70s linear infinite; }
.belt.rev .track { animation-direction: reverse; animation-duration: 90s; }
.belt:hover .track { animation-play-state: paused; }
.ep {
  position: relative; flex: 0 0 auto; width: clamp(240px, 25vw, 330px); text-decoration: none; border-radius: 6px;
  background: var(--ink-2); border: 1px solid var(--line); transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
}
.ep:nth-child(3n) { transform: rotate(-2deg); } .ep:nth-child(3n+1) { transform: rotate(1.5deg); } .ep:nth-child(3n+2) { transform: rotate(-.5deg); }
.ep:hover, .ep:focus-visible { transform: rotate(0) translateY(-8px) scale(1.04); box-shadow: 8px 8px 0 var(--red); z-index: 2; }
.ep img { aspect-ratio: 16/9; width: 100%; object-fit: cover; border-radius: 6px 6px 0 0; background: linear-gradient(135deg, var(--ink-2), var(--line)); }
.ep .meta { padding: 12px 14px 14px; display: grid; gap: 4px; }
.ep .tag { color: var(--ice); }
.ep .t { font-weight: 600; line-height: 1.3; font-size: .95rem; }
.ep .g { color: var(--mute); }
.ep .qc {
  position: absolute; top: 18px; right: 12px; font-family: var(--f-mono); font-weight: 600; font-size: .72rem; letter-spacing: .14em;
  color: var(--red); border: 2px solid var(--red); padding: 4px 8px; background: rgba(241,244,255,.92); border-radius: 4px;
  transform: rotate(12deg) scale(1.8); opacity: 0; transition: .25s cubic-bezier(.2,.8,.2,1);
}
.ep:hover .qc, .ep:focus-visible .qc { opacity: 1; transform: rotate(12deg) scale(1); }

/* ---------- lever machine ---------- */
.machine { padding-block: clamp(48px, 7vw, 100px); }
.machine-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.machine p { color: var(--mute); max-width: 44ch; }
.slot { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 70px; gap: 18px; padding: 22px; border: 2px solid var(--ice); border-radius: 8px; background: var(--ink-2); box-shadow: 10px 10px 0 var(--volt); }
.slot::before { content: "UNIT FF-01 \00B7 RANDOMIZER"; position: absolute; top: -11px; left: 18px; background: var(--ink); padding: 0 8px; font: 600 .66rem/1.6 var(--f-mono); letter-spacing: .14em; color: var(--ice); }
.slot-window { position: relative; border-radius: 4px; overflow: hidden; background: #000; aspect-ratio: 16/9; border: 1px solid var(--line); }
.slot-window img { width: 100%; height: 100%; object-fit: cover; transition: filter .2s; }
.slot.spinning .slot-window img { filter: blur(7px) hue-rotate(90deg) saturate(2); }
.slot-window::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 2px, transparent 2px 4px); pointer-events: none; }
.slot-read { grid-column: 1; display: flex; justify-content: space-between; gap: 14px; align-items: end; flex-wrap: wrap; }
.slot-read > div { min-width: 0; flex: 1 1 200px; }
.slot-read .tag { color: var(--ice); }
.slot-read .t { font-weight: 600; font-size: 1.08rem; line-height: 1.3; margin-top: 4px; }
.slot-read .g { color: var(--mute); }
.lever { grid-column: 2; grid-row: 1 / span 2; position: relative; border: 0; background: none; padding: 0; width: 70px; justify-self: center; }
.lever .slotbar { position: absolute; left: 50%; top: 10%; bottom: 10%; width: 14px; transform: translateX(-50%); border-radius: 8px; background: var(--ink); border: 2px solid var(--line); }
.lever .arm { position: absolute; left: 50%; bottom: 50%; width: 8px; height: 42%; margin-left: -4px; background: var(--paper); border-radius: 4px; transform-origin: 50% 100%; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.lever .knob { position: absolute; left: 50%; top: -22px; width: 40px; height: 40px; margin-left: -20px; border-radius: 50%; background: var(--red); box-shadow: inset -6px -6px 0 rgba(0,0,0,.25), 0 0 0 3px var(--paper); }
.lever.pulled .arm { transform: scaleY(-1); }
.lever .lbl { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: var(--ice); font: 600 .62rem var(--f-mono); letter-spacing: .14em; }

/* ---------- magnet board ---------- */
.board-zone { padding-block: clamp(40px, 6vw, 80px); }
.board { position: relative; min-height: 440px; border: 2px dashed var(--line); border-radius: 8px; overflow: hidden; touch-action: none; }
.board .chip {
  position: absolute; user-select: none; cursor: grab; touch-action: none;
  font-family: var(--f-display); font-weight: 800; text-transform: uppercase; font-size: clamp(.95rem, 2vw, 1.5rem);
  padding: .45em .8em; border-radius: 999px; white-space: nowrap; transition: box-shadow .15s, transform .15s;
  transform: rotate(var(--r, 0deg));
}
.board .chip:active { cursor: grabbing; }
.board .chip.c1 { background: var(--red); color: #fff; }
.board .chip.c2 { background: var(--ice); color: var(--ink); }
.board .chip.c3 { background: var(--volt); color: #fff; }
.board .chip.c4 { background: transparent; color: var(--paper); border: 2px solid var(--paper); }
.board .chip.drag { box-shadow: 8px 10px 0 rgba(0,0,0,.45); transform: rotate(0deg) scale(1.08); z-index: 5; }
.board .note { position: absolute; right: 14px; bottom: 10px; color: var(--mute); }

/* ---------- outlets ---------- */
.plug { padding-block: clamp(48px, 7vw, 100px); }
.outlets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.outlet {
  position: relative; display: grid; gap: 30px; min-height: 160px; padding: 20px 22px 24px; text-decoration: none; overflow: hidden;
  border: 2px solid var(--line); border-radius: 8px; background: var(--ink); transition: transform .2s, background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.outlet .k { display: flex; justify-content: space-between; color: var(--mute); }
.outlet b { font-family: var(--f-display); font-weight: 900; font-size: clamp(1.4rem, 2.6vw, 2.1rem); text-transform: uppercase; line-height: 1; align-self: end; position: relative; z-index: 1; }
.outlet::after {
  content: ""; position: absolute; right: -14px; bottom: -36px; width: 110px; aspect-ratio: 500/702; background: currentColor; opacity: 0;
  -webkit-mask: var(--mono) center/contain no-repeat; mask: var(--mono) center/contain no-repeat; transform: rotate(-12deg); transition: opacity .25s;
}
.outlet:hover { transform: translate(-3px,-3px) rotate(-1deg); }
.outlet:hover::after { opacity: .18; }
.outlet:nth-child(3n+1):hover { background: var(--red); border-color: var(--red); box-shadow: 8px 8px 0 var(--ice); }
.outlet:nth-child(3n+2):hover { background: var(--ice); border-color: var(--ice); color: var(--ink); box-shadow: 8px 8px 0 var(--red); }
.outlet:nth-child(3n):hover { background: var(--volt); border-color: var(--volt); box-shadow: 8px 8px 0 var(--ice); }
.outlet:hover .k { color: inherit; }

/* ---------- footer ---------- */
.footlogo { width: min(100% - 2 * var(--gutter), 1200px); aspect-ratio: 1400/647; margin: clamp(30px, 6vw, 70px) auto 0; -webkit-mask: var(--logo) center/contain no-repeat; mask: var(--logo) center/contain no-repeat; background: linear-gradient(90deg, var(--red), var(--volt), var(--ice), var(--red)); background-size: 300% 100%; animation: flow 8s linear infinite; }
@keyframes flow { to { background-position: 300% 0; } }
footer { border-top: 1px solid var(--line); margin-top: 30px; padding-block: 24px 40px; color: var(--mute); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- about ---------- */
.about-hero h1 { font-size: clamp(2.4rem, 7.2vw, 6.6rem); line-height: .92; text-align: left; margin-top: 0; }
.about-hero h1 .o { color: transparent; -webkit-text-stroke: 2px var(--ice); }
.about-hero h1 .r { color: var(--red); }
.about-hero .lede { text-align: left; margin-left: 0; }
.scr { display: inline-block; }

.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-block: clamp(20px, 4vw, 40px); }
.spec { position: relative; padding: 28px 22px 26px; border: 1px solid var(--ice); border-radius: 4px; display: grid; gap: 12px; align-content: start; background: rgba(14,22,72,.6); transition: transform .25s; }
.spec:nth-child(1) { transform: rotate(-1.5deg); } .spec:nth-child(2) { transform: translateY(18px) rotate(1deg); } .spec:nth-child(3) { transform: rotate(-.5deg); }
.spec:hover { transform: rotate(0) translateY(-6px); }
.spec::before, .spec::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--red); }
.spec::before { top: -7px; left: -7px; border-right: 0; border-bottom: 0; }
.spec::after { bottom: -7px; right: -7px; border-left: 0; border-top: 0; }
.spec .mono { color: var(--ice); }
.spec h3 { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(1.3rem, 2.4vw, 1.9rem); line-height: 1; margin: 0; }
.spec p { margin: 0; color: var(--mute); }

.host { padding-block: clamp(60px, 9vw, 120px); }
.host-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.polaroids { position: relative; aspect-ratio: 1 / 1; max-width: 100%; }
.polaroids figure { position: absolute; margin: 0; width: 72%; padding: 10px 10px 34px; background: var(--paper); border-radius: 3px; box-shadow: 0 24px 50px -16px rgba(0,0,0,.8); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.polaroids figure img { aspect-ratio: 16/9; object-fit: cover; width: 100%; background: var(--line); }
.polaroids figcaption { position: absolute; bottom: 8px; left: 12px; color: var(--ink); font: 600 .7rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.polaroids figure:nth-child(1) { top: 0; left: 0; transform: rotate(-7deg); }
.polaroids figure:nth-child(2) { top: 30%; right: 0; transform: rotate(5deg); }
.polaroids figure:nth-child(3) { bottom: 0; left: 10%; transform: rotate(-2deg); }
.polaroids figure:hover { transform: rotate(0) scale(1.06); z-index: 3; }
.host h2 { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2.2rem, 5.6vw, 4.4rem); line-height: .95; margin: 8px 0 18px; letter-spacing: -.02em; }
.host h2 span { color: var(--red); }
.host p { color: var(--mute); max-width: 54ch; }
.host p strong { color: var(--paper); font-weight: 600; }
.host .ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 26px; }

.shelf { padding-block: 0 clamp(48px, 7vw, 90px); }
.chips { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.chips a { display: inline-flex; gap: .6em; align-items: baseline; text-decoration: none; padding: .75em 1.1em; border: 2px solid var(--line); border-radius: 999px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.chips li:nth-child(odd) a { transform: rotate(-1.5deg); } .chips li:nth-child(even) a { transform: rotate(1.2deg); }
.chips a:hover { transform: rotate(0) translateY(-3px); border-color: var(--red); box-shadow: 5px 5px 0 var(--red); }
.chips .mono { color: var(--ice); font-size: .68rem; }

/* ---------- entry ---------- */
.rise { animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.rise.d1 { animation-delay: .08s; } .rise.d2 { animation-delay: .16s; } .rise.d3 { animation-delay: .24s; }
@keyframes rise { from { transform: translateY(26px); opacity: .001; } }

@media (max-width: 860px) {
  .machine-grid, .host-grid { grid-template-columns: minmax(0, 1fr); }
  .specs { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .spec:nth-child(2) { transform: rotate(1deg); }
  .nav ul .hide-sm { display: none; }
  .outlets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .outlets .outlet:first-child { grid-column: span 2; }
}
@media (max-width: 520px) {
  .outlets { grid-template-columns: minmax(0, 1fr); }
  .outlets .outlet:first-child { grid-column: auto; }
  .outlet { min-height: 116px; }
  .board { min-height: 520px; }
  .slot { grid-template-columns: minmax(0, 1fr) 56px; padding: 18px 14px; }
  .lever { width: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .belt { overflow-x: auto; }
}

/* ---------- certified badge: spinning ring of text around the gradient monogram ---------- */
.badge { position: absolute; right: var(--gutter); top: clamp(70px, 9vw, 120px); width: clamp(110px, 13vw, 170px); aspect-ratio: 1; z-index: 3; pointer-events: none; }
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 14s linear infinite; }
.badge text { fill: var(--ice); font: 600 10.5px var(--f-mono); letter-spacing: 2.6px; text-transform: uppercase; }
.badge .core { position: absolute; inset: 27%; background: url("img/mono-gradient.png") center/contain no-repeat; filter: drop-shadow(0 6px 14px rgba(0,114,239,.5)); }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) { .badge { top: 54px; width: 92px; opacity: .9; } }

/* ---------- about hero: tilting gradient monogram ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: clamp(20px, 4vw, 60px); align-items: center; }
.monofloat { position: relative; aspect-ratio: 700/983; max-width: 100%; perspective: 900px; }
.monofloat img { width: 100%; height: 100%; object-fit: contain; transition: transform .15s linear; filter: drop-shadow(18px 22px 0 rgba(219,22,47,.9)); }
.monofloat::after { content: "FIG. 1 \00B7 THE FACTORY"; position: absolute; left: 0; bottom: -28px; color: var(--ice); font: 600 .66rem var(--f-mono); letter-spacing: .14em; }
@media (max-width: 860px) { .about-grid { grid-template-columns: minmax(0, 1fr); } .monofloat { width: 46%; justify-self: end; } }

/* =================== BLUEPRINT LAYER =================== */
/* thicker drafting grid + paper vignette */
body::before {
  background-image:
    radial-gradient(ellipse at 50% 20%, transparent 40%, rgba(3,6,22,.55) 100%),
    linear-gradient(rgba(159,220,255,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159,220,255,.09) 1px, transparent 1px),
    linear-gradient(rgba(159,220,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159,220,255,.035) 1px, transparent 1px);
  background-size: 100% 100%, 120px 120px, 120px 120px, 24px 24px, 24px 24px;
}

/* fixed rulers along the top-left edges */
.ruler-y { position: fixed; left: 0; top: 0; bottom: 0; width: 18px; z-index: 34; pointer-events: none;
  background: rgba(7,12,41,.85) repeating-linear-gradient(180deg, rgba(159,220,255,.55) 0 1px, transparent 1px 12px) right / 6px 100% no-repeat;
  border-right: 1px solid rgba(159,220,255,.25); }
.ruler-y::before { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 11px; background: repeating-linear-gradient(180deg, rgba(159,220,255,.75) 0 1px, transparent 1px 60px); }
.ruler-y i { position: absolute; left: 0; width: 18px; height: 2px; background: var(--red); top: 0; box-shadow: 0 0 8px var(--red); }
.ruler-y b { position: absolute; left: 20px; top: 0; transform: translateY(-50%); font: 600 .6rem var(--f-mono); letter-spacing: .1em; color: var(--red); background: var(--ink); padding: 1px 4px; border: 1px solid var(--red); white-space: nowrap; }
@media (max-width: 860px), (pointer: coarse) { .ruler-y { display: none; } }

/* registration corner marks on major sections */
.bp { position: relative; }
.bp::before, .bp::after { content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none; border: 1.5px solid rgba(159,220,255,.6); }
.bp::before { top: 0; left: max(4px, calc(var(--gutter) - 14px)); border-right: 0; border-bottom: 0; }
.bp::after { bottom: 0; right: max(4px, calc(var(--gutter) - 14px)); border-left: 0; border-top: 0; }

/* dimension lines between sections */
.dimline { display: flex; align-items: center; gap: 12px; color: var(--ice); max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); opacity: .85; }
.dimline::before, .dimline::after { content: ""; flex: 1; height: 9px;
  background: linear-gradient(var(--ice), var(--ice)) center / 100% 1px no-repeat,
              linear-gradient(var(--ice), var(--ice)) left / 1px 100% no-repeat,
              linear-gradient(var(--ice), var(--ice)) right / 1px 100% no-repeat; opacity: .6; }
.dimline span { white-space: nowrap; }
.dimline em { font-style: normal; color: var(--red); }

/* callout leader under section titles */
.shead h2 { position: relative; }
.shead h2::after { content: attr(data-ref); position: absolute; left: 100%; top: -6px; margin-left: 14px; white-space: nowrap;
  font: 600 .62rem var(--f-mono); letter-spacing: .14em; color: var(--ice); padding: 2px 6px 2px 26px;
  background: linear-gradient(var(--ice), var(--ice)) 0 50% / 20px 1px no-repeat; }
@media (max-width: 700px) { .shead h2::after { display: none; } }

/* compass construction drawing behind the hero logo */
.compass { position: absolute; left: 50%; top: 46%; width: min(120vw, 1100px); aspect-ratio: 1; transform: translate(-50%, -50%); z-index: -1; pointer-events: none; opacity: .35; }
.compass svg { width: 100%; height: 100%; animation: spin 120s linear infinite; }
.compass circle, .compass line, .compass path { fill: none; stroke: var(--ice); stroke-width: .6; }
.compass .dash { stroke-dasharray: 4 6; }
.compass .red { stroke: var(--red); stroke-width: .9; }
.compass text { fill: var(--ice); font: 600 7px var(--f-mono); letter-spacing: 1.5px; stroke: none; }

/* blueprint duotone thumbnails, full color on hover */
.ep .shot, .slot-window, .polaroids figure .shot { position: relative; display: block; background: var(--volt); overflow: hidden; }
.ep img, .polaroids img { filter: grayscale(1) contrast(1.2) brightness(1.05); mix-blend-mode: multiply; transition: filter .35s, mix-blend-mode .35s; }
.ep:hover img, .ep:focus-visible img, .polaroids figure:hover img { filter: none; mix-blend-mode: normal; }
.ep .shot::after, .polaroids .shot::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(159,220,255,.18) 1px, transparent 1px) 0 0 / 100% 16px, linear-gradient(90deg, rgba(159,220,255,.18) 1px, transparent 1px) 0 0 / 16px 100%; transition: opacity .3s; }
.ep:hover .shot::after { opacity: 0; }
.ep .meta { border-top: 1px dashed var(--line); }
.ep .tag::before { content: "REF "; color: var(--mute); }

/* hatching on panels */
.hatch { background-image: repeating-linear-gradient(45deg, rgba(159,220,255,.07) 0 1px, transparent 1px 9px); }
.board { background: repeating-linear-gradient(45deg, rgba(159,220,255,.05) 0 1px, transparent 1px 11px), rgba(14,22,72,.35); border-style: dashed; border-color: rgba(159,220,255,.4); }
.board::before { content: "DETAIL 03 \00B7 SCALE 1:1 \00B7 MAGNETIC"; position: absolute; left: 12px; top: 10px; font: 600 .62rem var(--f-mono); letter-spacing: .14em; color: var(--ice); opacity: .8; }
.slot { background: repeating-linear-gradient(45deg, rgba(159,220,255,.05) 0 1px, transparent 1px 10px), var(--ink-2); }

/* outlets get spec annotations */
.outlet { border-style: dashed; border-color: rgba(159,220,255,.35); }
.outlet .k::before { content: attr(data-n); margin-right: auto; padding-right: 8px; color: var(--ice); opacity: .7; }

/* buttons get a dashed construction ring */
.btn { position: relative; }
.btn::after { content: ""; position: absolute; inset: -6px; border: 1px dashed rgba(159,220,255,.0); border-radius: 999px; transition: border-color .2s, inset .2s; pointer-events: none; }
.btn:hover::after { border-color: rgba(159,220,255,.7); inset: -9px; }

/* specs, chips and polaroids pick up construction lines */
.spec { border-style: dashed; background: repeating-linear-gradient(45deg, rgba(159,220,255,.04) 0 1px, transparent 1px 10px), rgba(14,22,72,.6); }
.spec h3::after { content: ""; display: block; width: 60px; height: 9px; margin-top: 10px;
  background: linear-gradient(var(--red), var(--red)) center / 100% 1px no-repeat, linear-gradient(var(--red), var(--red)) left / 1px 100% no-repeat, linear-gradient(var(--red), var(--red)) right / 1px 100% no-repeat; }
.chips a { border-style: dashed; }
.polaroids figure { background: #e9f0ff; }

/* engineering title block in the footer */
.titleblock { max-width: var(--max); margin: 30px auto 0; padding-inline: var(--gutter); }
.titleblock table { width: 100%; border-collapse: collapse; color: var(--ice); font: 500 .7rem/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.titleblock td { border: 1px solid rgba(159,220,255,.45); padding: 8px 10px; vertical-align: top; }
.titleblock td small { display: block; font-size: .56rem; color: var(--mute); letter-spacing: .14em; margin-bottom: 3px; }
.titleblock td.big { font-family: var(--f-display); font-weight: 900; font-size: 1.1rem; color: var(--paper); letter-spacing: 0; }
.titleblock .tb-wrap { overflow-x: auto; }
.titleblock td.stamp-cell { color: var(--red); font-weight: 600; }

/* =================== MEET THE HOST =================== */
.portrait { position: relative; margin: 0; transform: rotate(2.5deg); max-width: 420px; justify-self: end; width: 100%; }
.portrait .shot { display: block; border: 2px solid var(--ice); padding: 10px; background: rgba(14,22,72,.7); box-shadow: 14px 14px 0 var(--red); }
.portrait img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: top; background: var(--line); display: block; }
.portrait figcaption { margin-top: 14px; color: var(--ice); }
.portrait::before, .portrait::after { content: ""; position: absolute; width: 26px; height: 26px; border: 2px solid var(--ice); }
.portrait::before { top: -12px; left: -12px; border-right: 0; border-bottom: 0; }
.portrait::after { bottom: 20px; right: -12px; border-left: 0; border-top: 0; }
.portrait-badge { position: absolute; left: -34px; bottom: 40px; width: 74px; aspect-ratio: 700/983; background: url("img/mono-gradient.png") center/contain no-repeat; transform: rotate(-12deg); filter: drop-shadow(4px 6px 0 rgba(0,0,0,.4)); }
.about-hero .ctas { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 26px; }

.spec-stack { display: grid; gap: 16px; }
.statcard { border: 1px dashed rgba(159,220,255,.5); border-radius: 4px; padding: 20px 22px; display: grid; gap: 6px; background: repeating-linear-gradient(45deg, rgba(159,220,255,.04) 0 1px, transparent 1px 10px); }
.statcard:nth-child(2) { transform: translateX(24px); } .statcard:nth-child(3) { transform: translateX(8px); }
.statcard b { font-family: var(--f-display); font-weight: 900; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1; color: var(--paper); }
.statcard:nth-child(1) b { color: var(--red); } .statcard:nth-child(3) b { color: var(--ice); }
.statcard .mono { color: var(--mute); }

.family { padding-block: clamp(56px, 8vw, 110px); }
.family-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.bigh { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: clamp(2rem, 5vw, 3.8rem); line-height: .95; margin: 8px 0 18px; letter-spacing: -.02em; }
.bigh em { font-style: normal; color: transparent; -webkit-text-stroke: 2px var(--ice); }
.family p { color: var(--mute); max-width: 56ch; }
.family p strong { color: var(--paper); }
.polaroid-one { margin: 0; padding: 12px 12px 44px; background: #e9f0ff; border-radius: 3px; transform: rotate(-3deg); box-shadow: 0 30px 60px -20px rgba(0,0,0,.8); position: relative; transition: transform .3s; }
.polaroid-one:hover { transform: rotate(0) scale(1.03); }
.polaroid-one img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: var(--line); }
.polaroid-one figcaption { position: absolute; left: 14px; bottom: 12px; color: var(--ink); font: 600 .74rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.polaroid-one::before { content: ""; position: absolute; top: -14px; left: 50%; width: 90px; height: 26px; transform: translateX(-50%) rotate(2deg); background: rgba(159,220,255,.55); }

.causes-zone { padding-block: clamp(48px, 7vw, 100px); }
.causes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.cause { display: grid; grid-template-rows: auto 1fr; border: 1px dashed rgba(159,220,255,.45); border-radius: 6px; overflow: hidden; background: var(--ink-2); transition: transform .25s, box-shadow .25s; }
.cause:nth-child(1) { transform: rotate(-1deg); } .cause:nth-child(3) { transform: rotate(1deg); }
.cause:hover { transform: translateY(-6px) rotate(0); box-shadow: 8px 8px 0 var(--red); }
.cause .shot { position: relative; display: block; background: var(--volt); }
.cause img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; filter: grayscale(1) contrast(1.15); mix-blend-mode: multiply; transition: filter .35s, mix-blend-mode .35s; }
.cause:hover img { filter: none; mix-blend-mode: normal; }
.cause-body { padding: 20px 20px 24px; display: grid; gap: 10px; align-content: start; }
.cause-body .loc { color: var(--ice); }
.cause-body h3 { font-family: var(--f-display); font-weight: 900; text-transform: uppercase; font-size: 1.25rem; line-height: 1.05; margin: 0; }
.cause-body p { margin: 0; color: var(--mute); font-size: .95rem; }
.cause-body p strong { color: var(--paper); }
.cause-body .btn { justify-self: start; margin-top: 6px; }

@media (max-width: 960px) { .causes { grid-template-columns: minmax(0, 1fr); } .cause, .cause:nth-child(n) { transform: none; } }
@media (max-width: 860px) {
  .family-grid { grid-template-columns: minmax(0, 1fr); }
  .portrait { justify-self: center; max-width: 340px; }
  .portrait-badge { left: -14px; width: 56px; }
  .statcard:nth-child(n) { transform: none; }
}
