/* =========================================================
   BIG JOHN & LIL JOHN
   A home video tape that happens to have a coin in it.
   ========================================================= */

@font-face { font-family: "Bowlby"; src: url("../assets/fonts/bowlby-one-sc.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "VT323"; src: url("../assets/fonts/vt323.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("../assets/fonts/courier-prime-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("../assets/fonts/courier-prime-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Marker"; src: url("../assets/fonts/permanent-marker.woff2") format("woff2"); font-display: swap; }

:root {
  /* the world */
  --ink: #0e0b09;
  --ink-2: #17110d;
  --brown: #24170f;
  --brown-2: #3a2619;
  --flesh: #e9837c;
  --flesh-hi: #f6a9a0;
  --flesh-lo: #c45c58;
  --cream: #efe5cf;
  --paper: #f4eddc;
  --paper-2: #e6dcc4;
  --vhs: #f3f2ea;
  --tungsten: #ffb257;
  --crt: #2440c9;
  --crt-deep: #0a1638;
  --vfd: #8bf1d4;
  --green: #a3bd8d;
  --red: #e2372b;
  --yellow: #ffd23f;

  /* type */
  --f-disp: "Bowlby", "Arial Black", Impact, sans-serif;
  --f-osd: "VT323", "Courier New", monospace;
  --f-mono: "Courier Prime", "Courier New", Courier, monospace;
  --f-hand: "Marker", "Comic Sans MS", cursive;

  --deck-h: 52px;
  --gutter: clamp(16px, 5vw, 72px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--deck-h); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 400 17px/1.5 var(--f-mono);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }

.osd { font-family: var(--f-osd); letter-spacing: .06em; text-transform: uppercase; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--cream); color: var(--ink); padding: 8px 12px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px dashed var(--vfd); outline-offset: 3px; }

.h-display {
  font-family: var(--f-disp);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.01em;
  text-transform: uppercase;
  font-size: clamp(44px, 7.4vw, 104px);
}

.ch-tag {
  font-size: 20px;
  color: rgba(239, 229, 207, .55);
  margin-bottom: clamp(24px, 4vw, 48px);
}

/* ---------- analog layer ---------- */
.fx { position: fixed; inset: 0; pointer-events: none; z-index: 90; }
.fx-grain {
  inset: -50%;
  opacity: .09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .9s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); } 40% { transform: translate(5%, -7%); }
  60% { transform: translate(-3%, 8%); } 80% { transform: translate(7%, 2%); } 100% { transform: translate(0, 0); }
}
.fx-lines {
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.16) 2px 3px);
  opacity: .55;
}
.fx-track {
  top: -20%; bottom: auto; height: 14vh;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.05) 40%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.04) 60%, transparent);
  mix-blend-mode: screen;
  opacity: 0;
}
.fx-track.is-rolling { animation: track 1.1s linear 1; }
@keyframes track { 0% { opacity: 0; transform: translateY(0); } 10% { opacity: 1; } 90% { opacity: 1; } 100% { opacity: 0; transform: translateY(125vh); } }

/* ---------- the VCR deck (nav) ---------- */
.deck {
  position: fixed; z-index: 100; top: 0; left: 0; right: 0;
  height: var(--deck-h);
  display: flex; align-items: center; gap: 16px;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
  background: linear-gradient(#1c1612, #0f0c0a);
  border-bottom: 1px solid #000;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 2px 0 rgba(0,0,0,.35);
}
.deck-brand {
  font-family: var(--f-disp); font-size: 19px; text-decoration: none; white-space: nowrap;
  color: var(--flesh); letter-spacing: .01em;
}
.deck-brand small { font-size: 11px; color: var(--cream); opacity: .8; }
.deck-vfd {
  margin: 0 auto;
  display: flex; align-items: center; gap: 14px;
  padding: 3px 14px;
  background: #050807;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px #2a2420, inset 0 2px 6px rgba(0,0,0,.9);
  font-family: var(--f-osd); font-size: 22px; line-height: 1.1; color: var(--vfd);
  text-shadow: 0 0 6px rgba(139,241,212,.55);
  white-space: nowrap;
}
.vfd-dim { opacity: .45; }
.vfd-counter { min-width: 7ch; font-variant-numeric: tabular-nums; }
.vfd-ch { color: var(--tungsten); text-shadow: 0 0 6px rgba(255,178,87,.5); }
.vfd-ch.is-flick { animation: vfdflick .35s steps(3) 1; }
@keyframes vfdflick { 0% { opacity: .2; } 50% { opacity: 1; } 70% { opacity: .4; } 100% { opacity: 1; } }

.deck-controls { display: flex; gap: 8px; align-items: center; }
.deck-btn {
  height: 34px; min-width: 34px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 12px;
  font-family: var(--f-osd); font-size: 20px; letter-spacing: .06em; text-decoration: none;
  color: var(--cream);
  background: linear-gradient(#3a322c, #231d19);
  border: 1px solid #000; border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 2px 0 #000;
  transition: transform .06s, box-shadow .06s;
}
.deck-btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 #000; }
.deck-btn svg { width: 18px; height: 18px; }
.ico-sound .waves { display: none; }
.is-music .ico-sound .waves { display: inline; }
.is-music .ico-sound .cross { display: none; }
.is-music #musicToggle { color: var(--vfd); }
.is-music #musicToggle .ico-sound .waves { animation: blink 1.6s steps(1) infinite; }
.deck-buy { background: linear-gradient(var(--flesh-hi), var(--flesh)); color: var(--ink); font-weight: 700; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 22px;
  font-family: var(--f-osd); font-size: 24px; letter-spacing: .06em; text-decoration: none; text-transform: uppercase;
  border: 2px solid var(--ink); border-radius: 4px;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .06s, box-shadow .06s, filter .15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); }
.btn-pink { background: var(--flesh); color: var(--ink); }
.btn-big { min-height: 64px; font-size: 30px; padding: 0 30px; }
.btn-vhs { background: var(--vhs); color: var(--crt); border-color: var(--vhs); box-shadow: 0 4px 0 rgba(0,0,0,.35); }
.is-disabled { opacity: .5; pointer-events: none; }

/* =========================================================
   CH01 HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  padding-top: var(--deck-h);
  display: flex; align-items: flex-end;
  overflow: hidden;
  background: #120c08;
}
.hero-media { position: absolute; inset: var(--deck-h) 0 0 0; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(14,11,9,.92) 0%, rgba(14,11,9,.55) 26%, rgba(14,11,9,0) 52%),
    radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(0,0,0,.45) 100%);
}

.viewfinder { position: absolute; inset: 22px; z-index: 2; pointer-events: none; font-family: var(--f-osd); color: var(--vhs); text-shadow: 0 0 4px rgba(0,0,0,.8); }
.vf-c { position: absolute; width: 34px; height: 34px; border: 3px solid rgba(243,242,234,.85); }
.vf-c.tl { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.vf-c.tr { top: 0; right: 0; border-left: 0; border-bottom: 0; }
.vf-c.bl { bottom: 0; left: 0; border-right: 0; border-top: 0; }
.vf-c.br { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.vf-rec { position: absolute; top: 12px; right: 96px; font-size: 26px; display: flex; align-items: center; gap: 8px; }
.vf-rec b { width: 14px; height: 14px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.vf-batt { position: absolute; top: 18px; right: 44px; width: 38px; height: 17px; border: 2px solid var(--vhs); display: flex; gap: 2px; padding: 2px; }
.vf-batt::after { content: ""; position: absolute; right: -6px; top: 4px; width: 4px; height: 6px; background: var(--vhs); }
.vf-batt i { flex: 1; background: var(--vhs); }
.vf-batt i:last-child { animation: blink 2s steps(1) infinite; }
.vf-date { display: none; position: absolute; top: 12px; left: 16px; font-size: 24px; line-height: 1; }

.sound-hint {
  position: absolute; z-index: 3; right: 44px; bottom: 44px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  font-family: var(--f-osd); font-size: 20px; letter-spacing: .06em;
  color: var(--vhs); background: rgba(0,0,0,.55);
  border: 1px solid rgba(243,242,234,.45); border-radius: 3px;
}
.sound-hint svg { width: 18px; height: 18px; }
.is-sound .sound-hint { color: var(--vfd); border-color: var(--vfd); }

.hero-copy {
  position: relative; z-index: 3;
  width: 100%;
  padding: 0 var(--gutter) clamp(48px, 7vh, 88px);
}
.hero-pair { font-size: 22px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; color: var(--vhs); }
.chip-jnj { background: var(--vhs); color: var(--ink); padding: 0 8px; }

.logo { font-family: var(--f-disp); font-weight: 400; line-height: .82; text-transform: uppercase; margin: 0; }
.logo-big {
  display: block;
  font-size: clamp(64px, 12.5vw, 200px);
  color: var(--flesh);
  text-shadow: 0 2px 0 var(--flesh-lo), 0 6px 0 rgba(0,0,0,.45), 0 0 40px rgba(233,131,124,.25);
  letter-spacing: -.02em;
}
.logo-lil {
  display: inline-block;
  margin-top: 10px; margin-left: .2em;
  font-size: clamp(22px, 3.2vw, 46px);
  color: var(--vhs);
  transform-origin: 50% 100%;
  animation: hop 2.6s ease-in-out infinite;
}
.logo-lil .amp { color: var(--flesh); }
@keyframes hop {
  0%, 70%, 100% { transform: translateY(0) rotate(0); }
  76% { transform: translateY(-12px) rotate(-4deg); }
  82% { transform: translateY(0) rotate(0); }
  88% { transform: translateY(-6px) rotate(3deg); }
  94% { transform: translateY(0); }
}
.hero-tag { margin-top: 18px; font-size: clamp(19px, 2vw, 26px); font-weight: 700; color: var(--vhs); text-shadow: 0 1px 8px rgba(0,0,0,.8); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.ca-chip {
  display: inline-flex; align-items: stretch; min-height: 52px; max-width: 100%;
  padding: 0; border: 2px solid var(--vhs); border-radius: 4px; overflow: hidden;
  background: rgba(10,8,6,.72); text-align: left;
  box-shadow: 0 4px 0 rgba(0,0,0,.6);
  transition: transform .06s, box-shadow .06s;
}
.ca-chip:active { transform: translateY(4px); box-shadow: 0 0 0 transparent; }
.ca-k, .ca-act { display: flex; align-items: center; padding: 0 12px; font-family: var(--f-osd); font-size: 22px; letter-spacing: .08em; }
.ca-k { background: var(--vhs); color: var(--ink); }
.ca-v { display: block; line-height: 48px; padding: 0 12px; font-size: 15px; font-weight: 700; color: var(--vfd); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34ch; }
.ca-act { border-left: 2px dashed rgba(243,242,234,.4); color: var(--vhs); }
.ca-row { display: flex; gap: 10px; max-width: 100%; min-width: 0; }
.ca-row .ca-chip { min-width: 0; }
.x-btn {
  flex: none; width: 52px; height: 52px;
  display: grid; place-items: center;
  color: var(--vhs); background: rgba(10,8,6,.72);
  border: 2px solid var(--vhs); border-radius: 4px;
  box-shadow: 0 4px 0 rgba(0,0,0,.6);
  transition: transform .06s, box-shadow .06s, background .15s, color .15s;
}
.x-btn svg { width: 22px; height: 22px; }
.x-btn:hover { background: var(--vhs); color: var(--ink); }
.x-btn:active { transform: translateY(4px); box-shadow: none; }
.is-copied .ca-act { color: var(--ink); background: var(--vfd); }

/* =========================================================
   CH02 THE PILL
   ========================================================= */
.rx {
  position: relative;
  padding: clamp(80px, 12vw, 160px) var(--gutter);
  background:
    radial-gradient(ellipse 60% 55% at 72% 40%, rgba(255,178,87,.16), transparent 70%),
    var(--ink-2);
}
.rx-grid { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 110px); align-items: center; }

.dose { margin-top: 38px; display: grid; gap: 18px; }
.dose li { display: flex; align-items: center; gap: 18px; font-size: clamp(22px, 2.4vw, 32px); }
.dose b { color: var(--flesh); }
.pill { width: 76px; flex: none; }
.pill-no { opacity: .55; }
.rx-footnote { margin-top: 34px; color: rgba(239,229,207,.6); font-size: 16px; }

.rx-label { position: relative; margin: 0; justify-self: center; width: min(460px, 100%); transform: rotate(1.6deg); }
.rx-paper {
  position: relative;
  padding: 26px 26px 22px;
  background: linear-gradient(#fbf6ea, var(--paper));
  color: #1b1511;
  box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 2px 0 rgba(0,0,0,.2);
  font-size: 15px; line-height: 1.35;
  /* perforated left/right edges */
  -webkit-mask: radial-gradient(circle 5px at 0 12px, transparent 98%, #000) 0 0 / 51% 24px repeat-y,
                radial-gradient(circle 5px at 100% 12px, transparent 98%, #000) 100% 0 / 51% 24px repeat-y;
          mask: radial-gradient(circle 5px at 0 12px, transparent 98%, #000) 0 0 / 51% 24px repeat-y,
                radial-gradient(circle 5px at 100% 12px, transparent 98%, #000) 100% 0 / 51% 24px repeat-y;
}
.rx-head { border-bottom: 3px solid #1b1511; padding-bottom: 10px; margin-bottom: 10px; display: flex; flex-direction: column; }
.rx-store { font-family: var(--f-disp); font-size: 30px; line-height: 1; color: var(--crt); }
.rx-store-sub { font-size: 12px; font-weight: 700; letter-spacing: .08em; margin-top: 4px; }
.rx-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.rx-patient { margin: 14px 0 6px; display: flex; align-items: baseline; gap: 12px; }
.rx-k { font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.rx-name { font-family: var(--f-disp); font-size: 40px; line-height: 1; }
.rx-drug { font-size: 22px; font-weight: 700; border-top: 1px dashed #1b1511; border-bottom: 1px dashed #1b1511; padding: 8px 0; }
.rx-drug span { font-size: 15px; }
.rx-sig { margin: 14px 0; font-size: 19px; font-weight: 700; }
.rx-qty { border-top: 1px solid #1b1511; padding-top: 8px; }
.rx-barcode {
  height: 40px; margin-top: 16px;
  background:
    repeating-linear-gradient(90deg, #1b1511 0 2px, transparent 2px 4px, #1b1511 4px 5px, transparent 5px 9px, #1b1511 9px 12px, transparent 12px 13px),
    repeating-linear-gradient(90deg, transparent 0 7px, var(--paper) 7px 9px, transparent 9px 17px);
  background-blend-mode: normal;
}

.rx-sticker {
  position: absolute; z-index: 2;
  padding: 7px 11px;
  font: 700 11px/1.15 var(--f-mono); letter-spacing: .04em; text-transform: uppercase;
  color: #111; border-radius: 3px;
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
}
.rx-sticker b { font-size: 16px; font-family: var(--f-disp); font-weight: 400; letter-spacing: 0; }
.s-orange { background: #ff8a2b; top: 30%; right: -34px; transform: rotate(8deg); }
.s-yellow { background: var(--yellow); top: 54%; right: -22px; transform: rotate(-5deg); }
.s-blue { background: #7ec4f0; bottom: -22px; left: -18px; transform: rotate(-7deg); }

/* =========================================================
   CH03 MEET THE JOHNS
   ========================================================= */
.johns {
  padding: clamp(80px, 12vw, 160px) var(--gutter);
  /* basement wood paneling */
  background:
    linear-gradient(to bottom, rgba(14,11,9,.2), rgba(14,11,9,.65)),
    repeating-linear-gradient(90deg, #2a1a10 0 86px, #1f130b 86px 88px, #2e1d12 88px 150px, #1f130b 150px 152px);
}
.johns-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: 1.7fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
}
.john { position: relative; }
.john-name { font-family: var(--f-disp); font-weight: 400; line-height: .85; color: var(--flesh); margin-bottom: 16px; }
.john-big .john-name { font-size: clamp(56px, 9vw, 140px); }
.john-lil .john-name { font-size: clamp(26px, 3.2vw, 44px); color: var(--vhs); }
.john-lil { max-width: 360px; }
.john-photo {
  background: #fff; padding: 10px 10px 44px;
  box-shadow: 0 20px 50px rgba(0,0,0,.55);
}
.john-big .john-photo { transform: rotate(-1.2deg); width: 78%; }
.john-lil .john-photo { transform: rotate(2.2deg); }
.john-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }

.facts {
  position: absolute; z-index: 2;
  width: 250px;
  padding: 10px 12px 12px;
  background: #fff; color: #111;
  border: 2px solid #111;
  font: 400 13px/1.25 "Helvetica Neue", Arial, sans-serif;
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
}
.john-big .facts { right: 0; bottom: 8%; transform: rotate(2deg); }
.john-lil .facts { width: 210px; right: -12px; bottom: -28px; transform: rotate(-3deg); }
.facts-title { font: 900 28px/1 "Helvetica Neue", Arial, sans-serif; letter-spacing: -.02em; border-bottom: 8px solid #111; padding-bottom: 6px; margin-bottom: 4px; }
.facts dd { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid #111; }
.facts dd span:first-child { font-weight: 700; }
.facts .facts-serv { border-bottom: 4px solid #111; display: block; font-size: 12px; }
.facts .facts-note { border: 0; display: block; font-size: 11px; padding-top: 6px; }

.johns-line { max-width: var(--max); margin: clamp(70px, 9vw, 120px) auto 0; font-size: clamp(22px, 2.6vw, 34px); font-weight: 700; line-height: 1.3; }
.johns-line span { font-size: .62em; font-weight: 400; color: rgba(239,229,207,.75); }

/* =========================================================
   CH04 HOME TAPES
   ========================================================= */
.tapes { padding: clamp(80px, 12vw, 160px) var(--gutter); background: var(--ink); }
.tv-wrap { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(28px, 5vw, 70px); align-items: center; }

.tv {
  padding: 22px 22px 0;
  background: linear-gradient(145deg, #3b3632, #1d1a17 60%, #141210);
  border-radius: 26px 26px 18px 18px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.12), inset 0 -3px 0 rgba(0,0,0,.6), 0 30px 60px rgba(0,0,0,.6);
}
.tv-screen {
  position: relative; overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 28px / 22px;
  background: #000;
  box-shadow: 0 0 0 6px #0c0a09, 0 0 0 8px #3b3632;
}
.tv-screen video { width: 100%; height: 100%; object-fit: cover; object-position: 30% 50%; filter: saturate(1.1) contrast(1.05); }
.tv-glare {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 30% 18%, rgba(255,255,255,.14), transparent 60%),
    radial-gradient(ellipse at 50% 50%, transparent 58%, rgba(0,0,0,.55) 100%),
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0,0,0,.22) 2px 3px);
}
.tv-osd { position: absolute; top: 12px; right: 18px; z-index: 2; font-family: var(--f-osd); font-size: 30px; color: #7dff7a; text-shadow: 0 0 6px rgba(125,255,122,.7); }
.tv-chin { display: flex; align-items: center; gap: 16px; padding: 14px 6px 16px; }
.tv-brand { font: 700 12px/1 var(--f-mono); letter-spacing: .3em; color: #9d948b; }
.tv-grille { flex: 1; height: 16px; background: radial-gradient(circle, #0a0908 1.6px, transparent 2px) 0 0 / 8px 8px; opacity: .9; }
.tv-power {
  width: 34px; height: 22px; border-radius: 3px; border: 1px solid #000;
  background: linear-gradient(#4b443e, #2b2622); display: grid; place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}
.tv-power i { width: 7px; height: 7px; border-radius: 50%; background: #5a1b17; }
.is-sound .tv-power i { background: #ff4a3b; box-shadow: 0 0 8px #ff4a3b; }

.tv-caption { font-size: clamp(20px, 2.1vw, 28px); line-height: 1.35; font-weight: 700; }
.tv-caption .osd { font-size: 22px; font-weight: 400; color: var(--vfd); margin-bottom: 14px; }
.tv-caption-lil { margin-top: 12px; color: var(--flesh); }

.tapes-head { max-width: var(--max); margin: clamp(90px, 12vw, 150px) auto 34px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 40px; }
.tapes-head p { color: rgba(239,229,207,.7); max-width: 34ch; }

.shelf { max-width: var(--max); margin: 0 auto; display: grid; gap: 28px; }
.shelf-row { display: grid; grid-template-columns: 90px 1fr; gap: 20px; align-items: start; padding-bottom: 28px; border-bottom: 10px solid #2a1b12; box-shadow: 0 1px 0 #3d281a; }
.shelf-year { font-family: var(--f-osd); font-size: 40px; line-height: 1; color: var(--tungsten); padding-top: 4px; }
.shelf-tapes { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 22px; }

.tape {
  position: relative; display: block; width: 100%;
  padding: 8px 8px 0; border: 0; text-align: left;
  background: linear-gradient(#1f1b18, #121010);
  border-radius: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 10px 22px rgba(0,0,0,.5);
  transition: transform .18s ease, box-shadow .18s ease;
}
.tape:hover, .tape:focus-visible { transform: translateY(-6px) rotate(-1deg); box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 18px 30px rgba(0,0,0,.6); }
.tape-img { display: block; position: relative; overflow: hidden; border-radius: 2px; aspect-ratio: 4 / 5; background: #000; }
.tape-img img { width: 100%; height: 100%; object-fit: cover; transition: filter .2s; }
.tape:hover .tape-img img { filter: saturate(1.25) contrast(1.08); animation: jitter .3s steps(2) 2; }
@keyframes jitter { 0% { transform: translateX(0); } 50% { transform: translateX(-3px) skewX(-1deg); } 100% { transform: translateX(2px); } }
.tape-label {
  display: block;
  position: relative;
  margin: -26px -4px 0;
  padding: 16px 10px 10px;
  background: var(--lbl, var(--paper));
  color: var(--ink2, #1a2a7a);
  transform: rotate(var(--rot, -1.2deg));
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
  border-top: 6px solid var(--stripe, var(--flesh));
}
.tape-title { display: block; font-family: var(--f-hand); font-size: 19px; line-height: 1.05; }
.tape-title s { display: block; font-size: 13px; opacity: .6; text-decoration-thickness: 2px; }
.tape-sub { display: block; margin-top: 4px; font-family: var(--f-hand); font-size: 12px; opacity: .8; }
.tape-date { display: block; margin-top: 6px; font: 700 10px/1 var(--f-mono); letter-spacing: .08em; color: #3b332c; }
.tape-motion { position: absolute; top: 8px; left: 8px; font-family: var(--f-osd); font-size: 16px; background: var(--red); color: #fff; padding: 0 6px; }

/* =========================================================
   CH05 MARKET
   ========================================================= */
.market {
  position: relative;
  padding: clamp(80px, 12vw, 150px) var(--gutter) 0;
  background: radial-gradient(ellipse at 50% 20%, #1b3aa8 0%, var(--crt-deep) 65%);
  overflow: hidden;
}
.market .ch-tag { color: rgba(243,242,234,.6); }
.broadcast { max-width: var(--max); margin: 0 auto; }
.bc-top { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid rgba(243,242,234,.3); padding-bottom: 12px; }
.bc-live { font: 700 15px/1 var(--f-mono); letter-spacing: .16em; background: var(--red); color: #fff; padding: 7px 12px; }
.bc-clock { font-size: 26px; color: var(--vhs); }

.pair { margin: clamp(40px, 6vw, 70px) 0; }
.pair-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: .3em;
  font-family: var(--f-disp);
  font-size: clamp(34px, 6.6vw, 96px);
  line-height: 1;
  color: var(--vhs);
  text-shadow: 3px 3px 0 rgba(0,0,0,.4);
}
.pr-l { text-align: right; }
.pr-amp { color: var(--yellow); }
.pr-tag { grid-column: 1 / -1; justify-self: center; margin-top: 10px; font-family: var(--f-osd); font-size: 22px; letter-spacing: .1em; color: var(--crt-deep); background: var(--vhs); padding: 0 10px; text-shadow: none; }
.pair-row--johns { color: var(--flesh); }
.pr-lil { font-size: .42em; align-self: center; }
.pair-link { display: flex; align-items: center; gap: 14px; margin: 26px 0; font-family: var(--f-osd); font-size: 22px; letter-spacing: .12em; color: var(--yellow); }
.pair-link::before, .pair-link::after { content: ""; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--yellow) 0 8px, transparent 8px 14px); }

.explain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: rgba(243,242,234,.18); border: 2px solid rgba(243,242,234,.18); }
.explain li { background: rgba(10,22,56,.92); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.explain .osd { font-size: 34px; color: var(--yellow); line-height: 1; }
.explain p { font-size: 17px; }
.explain b { color: var(--vhs); }

.crawl { margin: clamp(50px, 7vw, 80px) calc(var(--gutter) * -1) 0; background: var(--vhs); color: var(--crt-deep); overflow: hidden; border-top: 4px solid var(--yellow); }
.crawl-track { display: flex; width: max-content; animation: crawl 40s linear infinite; }
.crawl span { padding: 10px 26px; font-family: var(--f-osd); font-size: 24px; white-space: nowrap; border-right: 2px solid rgba(10,22,56,.2); }
.crawl b { font-weight: 400; background: var(--crt-deep); color: var(--vhs); padding: 0 6px; margin-right: 6px; }
.crawl .up { color: #1a8a3a; font-style: normal; }
.crawl .dn { color: var(--red); font-style: normal; }
.crawl .flat { color: #666; font-style: normal; }
@keyframes crawl { to { transform: translateX(-50%); } }
.market-note { text-align: center; font-size: 12px; color: rgba(243,242,234,.55); padding: 12px 0 16px; }

/* =========================================================
   CH06 KWIK STOP
   ========================================================= */
.chaos { position: relative; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; background: #0b0908; }
.chaos-media { position: absolute; inset: 0; }
.chaos-media video { width: 100%; height: 100%; object-fit: cover; }
.chaos-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,9,8,.9) 0%, rgba(11,9,8,.4) 32%, transparent 60%); }
.chaos-copy { position: relative; z-index: 2; padding: 0 var(--gutter) clamp(110px, 14vh, 150px); }
.chaos-copy .ch-tag { color: var(--vhs); margin-bottom: 14px; }
.chaos-h { font-family: var(--f-disp); font-weight: 400; text-transform: uppercase; line-height: .85; font-size: clamp(60px, 11vw, 176px); color: var(--vhs); text-shadow: 0 6px 0 rgba(0,0,0,.5); }
.chaos-h span { display: inline-block; }
.chaos-h span:last-child { color: var(--flesh); transform: rotate(-2deg); }
.chaos-sub { margin: 18px 0 28px; font-size: clamp(19px, 2vw, 26px); font-weight: 700; }

.price-tag {
  position: absolute; z-index: 2; top: calc(var(--deck-h) + 40px); right: clamp(18px, 6vw, 90px);
  padding: 12px 16px 14px;
  font-family: var(--f-disp); font-size: clamp(20px, 2.4vw, 32px); line-height: .95; text-align: center;
  color: var(--ink); background: var(--yellow);
  border-radius: 6px; transform: rotate(7deg);
  box-shadow: 0 10px 24px rgba(0,0,0,.45);
}
.price-tag::before { content: ""; position: absolute; top: 9px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #0b0908; opacity: .7; }
.price-tag small { display: block; margin: 12px 0 4px; font: 700 12px/1 var(--f-mono); letter-spacing: .2em; color: var(--red); }

.hazard { position: absolute; left: -5%; right: -5%; bottom: 26px; z-index: 3; transform: rotate(-2deg); background: repeating-linear-gradient(-45deg, var(--yellow) 0 18px, #111 18px 36px); padding: 6px 0; overflow: hidden; }
.hazard span { display: block; width: max-content; white-space: nowrap; font-family: var(--f-osd); font-size: 24px; letter-spacing: .12em; background: var(--yellow); color: #111; padding: 2px 0; animation: crawl 28s linear infinite reverse; }

/* =========================================================
   CH07 CHECKOUT
   ========================================================= */
.buy {
  padding: clamp(80px, 11vw, 140px) var(--gutter) clamp(90px, 12vw, 160px);
  background:
    radial-gradient(ellipse 45% 60% at 50% 45%, rgba(255,236,190,.14), transparent 70%),
    #0c0a09;
  text-align: center;
}
.receipt { position: relative; display: inline-block; width: min(420px, 100%); transform: rotate(-1deg); text-align: left; }
.rc-paper {
  position: relative;
  padding: 34px 26px 38px;
  background: #fbf8f0;
  color: #1c1a17;
  font-size: 15px; line-height: 1.45;
  box-shadow: 0 30px 70px rgba(0,0,0,.6);
  /* torn zigzag top + bottom */
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%, conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
  -webkit-mask-composite: source-in;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%, conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) 50% / 16px 100%;
          mask-composite: intersect;
}
.rc-paper hr { border: 0; border-top: 2px dashed #1c1a17; margin: 14px 0; opacity: .7; }
.rc-store { font-family: var(--f-disp); font-size: 30px; text-align: center; line-height: 1; }
.rc-small { font-size: 12px; letter-spacing: .06em; text-align: center; margin-top: 6px; }
.rc-center { text-align: center; }
.rc-row { display: flex; justify-content: space-between; gap: 12px; }
.rc-row.rc-small { justify-content: center; gap: 16px; }
.rc-total { font-size: 20px; font-weight: 700; }
.rc-k { margin-top: 12px; font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.rc-ca { margin-top: 4px; padding: 10px; background: #efe9da; font-weight: 700; font-size: 14px; word-break: break-all; }
.rc-copy {
  width: 100%; margin-top: 10px; min-height: 48px;
  font-family: var(--f-osd); font-size: 24px; letter-spacing: .08em;
  color: #1c1a17; background: #e3dccb;
  border: 2px solid #1c1a17; border-radius: 4px;
  box-shadow: 0 4px 0 #1c1a17;
  transition: transform .06s, box-shadow .06s;
}
.rc-copy:active { transform: translateY(4px); box-shadow: none; }
.rc-buy {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 60px;
  font-family: var(--f-osd); font-size: 28px; letter-spacing: .06em; text-decoration: none;
  color: var(--vhs); background: #1c1a17; border-radius: 4px;
  box-shadow: 0 4px 0 var(--flesh-lo);
  transition: transform .06s, box-shadow .06s, background .15s;
}
.rc-buy:hover { background: var(--flesh-lo); }
.rc-buy:active { transform: translateY(4px); box-shadow: none; }
.rc-links { display: flex; gap: 8px; margin-top: 12px; }
.rc-links li { flex: 1; }
.rc-links a { display: block; text-align: center; padding: 10px 4px; border: 2px solid #1c1a17; border-radius: 4px; text-decoration: none; font-family: var(--f-osd); font-size: 20px; letter-spacing: .06em; }
.rc-links a:hover { background: #1c1a17; color: #fbf8f0; }
.rc-barcode {
  height: 48px;
  background:
    repeating-linear-gradient(90deg, #1c1a17 0 3px, transparent 3px 5px, #1c1a17 5px 6px, transparent 6px 10px, #1c1a17 10px 12px, transparent 12px 15px),
    repeating-linear-gradient(90deg, transparent 0 13px, #fbf8f0 13px 15px, transparent 15px 23px);
}
.rc-stamp {
  position: absolute; top: 44%; left: 50%;
  font-family: var(--f-disp); font-size: 44px; letter-spacing: .04em;
  color: rgba(226,55,43,.85); border: 5px solid rgba(226,55,43,.85); border-radius: 8px; padding: 2px 16px;
  transform: translate(-50%, -50%) rotate(-14deg) scale(1.6);
  opacity: 0; pointer-events: none;
  mix-blend-mode: multiply;
  transition: opacity .12s, transform .16s cubic-bezier(.2, 1.6, .4, 1);
}
.receipt.is-stamped .rc-stamp { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(1); }

/* =========================================================
   END OF TAPE
   ========================================================= */
.eot {
  padding: clamp(80px, 12vw, 140px) var(--gutter) 34px;
  background: var(--crt);
  color: var(--vhs);
  text-align: center;
}
.eot-stop { font-size: 26px; text-align: left; max-width: var(--max); margin: 0 auto; }
.eot-big { font-size: clamp(64px, 12vw, 180px); line-height: .9; margin-top: 30px; text-shadow: 4px 4px 0 rgba(0,0,0,.25); }
.eot-kind { font-size: clamp(24px, 3vw, 36px); margin: 14px 0 30px; }
.eot-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 28px; margin: 60px 0 34px; font-size: 24px; }
.eot-links a { text-decoration: none; border-bottom: 2px solid transparent; }
.eot-links a:hover { border-color: var(--vhs); }
.eot-legal { max-width: 760px; margin: 0 auto; font-size: 12px; line-height: 1.6; opacity: .7; }

/* =========================================================
   VCR PLAYBACK DIALOG
   ========================================================= */
.vcr {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: #000; color: var(--vhs);
  display: none;
}
.vcr[open] { display: flex; flex-direction: column; }
.vcr::backdrop { background: #000; }
.vcr-screen { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 16px; overflow: hidden; }
.vcr-screen img { max-width: 100%; max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); width: auto; height: auto; object-fit: contain; box-shadow: 0 0 80px rgba(255,178,87,.08); }
.vcr-static {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px;
}
.vcr-static.is-on { animation: static .28s steps(4) 1; }
@keyframes static { 0% { opacity: 1; background-position: 0 0; } 33% { background-position: -40px 60px; } 66% { opacity: .9; background-position: 70px -20px; } 100% { opacity: 0; background-position: 10px 30px; } }
.vcr-osd { position: absolute; font-size: 28px; text-shadow: 0 0 4px #000, 0 0 10px #000; }
.vcr-osd-tl { top: 18px; left: 22px; }
.vcr-osd-tr { top: 18px; right: 22px; }
.vcr-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: linear-gradient(#1c1612, #0f0c0a); border-top: 1px solid #2a221c; }
.vcr-label { font-family: var(--f-hand); font-size: 22px; color: var(--paper); line-height: 1.1; }
.vcr-label small { display: block; font-family: var(--f-osd); font-size: 18px; color: var(--vfd); letter-spacing: .06em; margin-top: 2px; }
.vcr-btns { display: flex; gap: 8px; flex: none; }
.vcr-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 64px; height: 52px;
  font-size: 18px; color: var(--cream);
  background: linear-gradient(#3a322c, #231d19);
  border: 1px solid #000; border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 3px 0 #000;
}
.vcr-btn small { font-family: var(--f-osd); font-size: 15px; letter-spacing: .1em; opacity: .7; }
.vcr-btn:active { transform: translateY(3px); box-shadow: none; }

/* play fallback for videos that refuse to autoplay */
.play-fallback {
  position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: var(--f-osd); font-size: 26px; letter-spacing: .08em;
  padding: 8px 16px; color: var(--vhs); background: rgba(0,0,0,.7);
  border: 2px solid var(--vhs); border-radius: 4px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1020px) {
  .deck-brand { display: none; }
  .deck-vfd { margin-left: 0; }
  .rx-grid { grid-template-columns: 1fr; }
  .rx-label { margin-top: 20px; }
  .tv-wrap { grid-template-columns: 1fr; }
  .explain { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --deck-h: 50px; }
  body { font-size: 16px; }
  .deck { gap: 10px; }
  .deck-vfd { font-size: 19px; gap: 9px; padding: 3px 9px; }
  .vfd-dim { display: none; }
  .deck-btn { font-size: 18px; padding: 0 10px; }
  .deck-btn-label { display: none; }

  /* hero: square tape up top, words below */
  .hero { flex-direction: column; align-items: stretch; justify-content: flex-start; min-height: 100svh; }
  .hero-media { position: relative; inset: auto; width: 100%; aspect-ratio: 1 / 1; max-height: 62svh; flex: none; }
  .hero-media::after { background: linear-gradient(to top, rgba(18,12,8,1) 0%, rgba(18,12,8,0) 34%); }
  .viewfinder { inset: 12px; }
  .vf-c { width: 22px; height: 22px; border-width: 2px; }
  .vf-rec { top: 8px; right: 64px; font-size: 20px; }
  .vf-rec b { width: 10px; height: 10px; }
  .vf-batt { top: 12px; right: 18px; width: 30px; height: 14px; }
  .vf-date { display: block; font-size: 20px; top: 8px; left: 10px; }
  .sound-hint { right: 12px; bottom: 16px; font-size: 17px; padding: 6px 10px; }
  .hero-copy { padding-top: 0; margin-top: 6px; padding-bottom: 36px; }
  .hero-pair { font-size: 19px; }
  .hide-sm { display: none; }
  .logo-big { font-size: clamp(56px, 17.5vw, 96px); }
  .logo-lil { font-size: 24px; }
  .hero-actions { flex-direction: column; }
  .hero-actions > * { width: 100%; }
  .ca-v { max-width: none; flex: 1; }
  .ca-row { width: 100%; }
  .ca-row .ca-chip { flex: 1; }

  .dose li { font-size: 22px; }
  .pill { width: 58px; }
  .rx-paper { padding: 22px 20px 18px; }
  .rx-name { font-size: 32px; }
  .rx-drug { font-size: 19px; }
  .rx-sig { font-size: 17px; }
  .s-orange { right: -6px; top: -22px; }
  .s-yellow { right: 8px; top: auto; bottom: -24px; }
  .s-blue { left: -4px; bottom: -24px; }

  .johns-grid { grid-template-columns: 1fr; gap: 90px; }
  .john-big .john-photo { width: 86%; }
  .john-big .facts { width: 210px; right: -4px; bottom: -40px; }
  .john-lil { max-width: 70%; justify-self: end; }
  .john-lil .facts { width: 180px; right: auto; left: -46%; bottom: -34px; font-size: 12px; }
  .facts-title { font-size: 23px; }
  .johns-line { margin-top: 80px; }

  .tv { padding: 12px 12px 0; border-radius: 18px 18px 12px 12px; }
  .tv-screen { border-radius: 18px / 14px; }
  .tv-osd { font-size: 22px; top: 6px; right: 12px; }
  .tapes-head { margin-top: 80px; }

  .shelf { gap: 18px; }
  .shelf-row { grid-template-columns: 1fr; gap: 10px; margin: 0 calc(var(--gutter) * -1); padding: 0 0 22px; }
  .shelf-year { padding: 0 var(--gutter); font-size: 34px; }
  .shelf-tapes {
    display: flex; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; padding: 10px var(--gutter) 18px;
    scrollbar-width: none;
  }
  .shelf-tapes::-webkit-scrollbar { display: none; }
  .shelf-tapes .tape { flex: 0 0 46vw; max-width: 220px; scroll-snap-align: start; scroll-margin-left: var(--gutter); }

  .pair-row { font-size: clamp(20px, 6.9vw, 52px); }
  .pair-row > span { white-space: nowrap; }
  .pr-lil { font-size: .6em; }
  .pr-tag { font-size: 18px; }
  .pair-link { font-size: 18px; }
  .bc-live { font-size: 12px; }
  .crawl span { font-size: 20px; }

  /* chaos: 4:3 tape then shouting */
  .chaos { flex-direction: column; align-items: stretch; min-height: 0; }
  .chaos-media { position: relative; inset: auto; aspect-ratio: 4 / 3; }
  .chaos-media::after { background: linear-gradient(to top, #0b0908 0%, transparent 30%); }
  .chaos-copy { padding: 0 var(--gutter) 120px; margin-top: -10px; }
  .price-tag { top: 16px; right: 14px; font-size: 18px; padding: 10px 12px 12px; }
  .price-tag small { font-size: 10px; margin-top: 10px; }
  .btn-big { width: 100%; }

  .rc-paper { padding: 30px 18px 34px; }
  .vcr-screen { padding: 0; }
  .vcr-screen img { max-height: calc(100dvh - 150px); }
  .vcr-osd { font-size: 22px; }
  .vcr-bar { flex-direction: column; align-items: stretch; }
  .vcr-btns { justify-content: space-between; }
  .vcr-btn { flex: 1; width: auto; }
}

@media (max-width: 380px) {
  .vfd-ch { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-grain, .logo-lil, .vf-rec b, .vf-batt i, .crawl-track, .hazard span, .tape:hover .tape-img img { animation: none !important; }
  .fx-track { display: none; }
  .tape, .btn, .rc-stamp { transition: none; }
}
