/* ==========================================================================
   SPINE — after-hours video store
   Dark: the shop at 2am, tungsten light on plastic cases.
   Light: the same shelves in daylight.
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */
:root {
  --amber:    #E8A33D;
  --amber-lo: #A9761F;
  --uranium:  #B3E86B;
  --rose:     #FF5D73;

  --f-display: 'Anton', 'Arial Narrow', sans-serif;
  --f-spine:   'Archivo Narrow', 'Arial Narrow', sans-serif;
  --f-body:    'Inter', system-ui, -apple-system, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --r-sm: 4px;
  --r:    10px;
  --r-lg: 18px;

  --gut: clamp(16px, 4vw, 40px);
  --max: 1280px;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
}

:root, [data-theme='dark'] {
  --bg:        #0A0D13;
  --bg-grad:   radial-gradient(1100px 620px at 78% -12%, #1B2231 0%, transparent 62%);
  --surface:   #131A27;
  --surface-2: #1B2434;
  --surface-3: #232E42;
  --line:      #2A3548;
  --line-soft: #1F2837;
  --ink:       #E9E5DB;
  --ink-2:     #98A2B4;
  --ink-3:     #616D82;
  --shadow:    0 18px 44px rgba(0, 0, 0, .55);
  --shelf:     linear-gradient(180deg, #2E3A4E 0%, #151C29 100%);
  --scrim:     rgba(6, 9, 14, .82);
  --cover-bg:  #0F141E;
}

[data-theme='light'] {
  --bg:        #E7E2D7;
  --bg-grad:   radial-gradient(1100px 620px at 78% -12%, #FFFDF7 0%, transparent 62%);
  --surface:   #FFFFFF;
  --surface-2: #F6F2E9;
  --surface-3: #EAE4D7;
  --line:      #D2CABA;
  --line-soft: #E0D9CB;
  --ink:       #14181F;
  --ink-2:     #4E5867;
  --ink-3:     #838D9C;
  --shadow:    0 14px 34px rgba(45, 38, 25, .16);
  --shelf:     linear-gradient(180deg, #C9C0AE 0%, #A79C86 100%);
  --scrim:     rgba(231, 226, 215, .86);
  --cover-bg:  #DCD5C6;
  --amber:     #9A5F0C;
  --uranium:   #4E8A15;
  --rose:      #C5253E;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-grad), var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 16px/1.6 var(--f-body);
  letter-spacing: -.008em;
  transition: background-color .45s var(--ease), color .45s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0 0 .4em; line-height: 1.06; letter-spacing: -.02em; }

.display {
  font-family: var(--f-display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .002em;
  line-height: .92;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.up { color: var(--uranium); }
.down { color: var(--rose); }
.center { text-align: center; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
.stack > * + * { margin-top: 14px; }

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

::selection { background: var(--amber); color: #0A0D13; }

/* ------------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(16px) saturate(1.3);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line-soft);
}
.nav__in {
  display: flex; align-items: center; gap: 26px;
  height: 62px;
  max-width: var(--max); margin-inline: auto;
  padding-inline: var(--gut);
}
.logo {
  font-family: var(--f-display);
  font-size: 23px; letter-spacing: .13em; text-transform: uppercase;
  display: flex; align-items: center; gap: 9px;
}
.logo__mark {
  width: 7px; height: 24px; border-radius: 1.5px;
  background: var(--amber);
  box-shadow: 11px 0 0 -2px var(--ink-3), 20px 0 0 -3px var(--ink-3);
  animation: shelfIn .7s var(--ease) both;
}
.nav__links { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav__link {
  font-size: 14px; color: var(--ink-2); position: relative;
  padding: 6px 0; transition: color .2s;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1.5px; background: var(--amber);
  transform: scaleX(0); transform-origin: right;
  transition: transform .34s var(--ease);
}
.nav__link:hover, .nav__link[aria-current='page'] { color: var(--ink); }
.nav__link:hover::after, .nav__link[aria-current='page']::after { transform: scaleX(1); transform-origin: left; }

/* theme switch — a little light bulb pull */
.themer {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink-2);
  cursor: pointer; transition: all .3s var(--ease);
}
.themer:hover { color: var(--amber); border-color: var(--amber); transform: rotate(-18deg); }
.themer svg { width: 17px; height: 17px; }
[data-theme='dark'] .themer .i-sun { display: none; }
[data-theme='light'] .themer .i-moon { display: none; }

.burger { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 22px; border-radius: var(--r);
  font: 600 14px/1 var(--f-body); letter-spacing: .01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease), box-shadow .28s var(--ease),
              background-color .2s, border-color .2s, color .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--amber); color: #0A0D13; }
.btn--primary:hover { box-shadow: 0 0 0 4px color-mix(in srgb, var(--amber) 22%, transparent), 0 10px 26px rgba(232,163,61,.28); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink-3); background: var(--surface); }
.btn--danger { border-color: var(--line); color: var(--rose); background: transparent; }
.btn--danger:hover { border-color: var(--rose); }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 30px; font-size: 15px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ----------------------------------------------------------------- fields */
.field { display: block; margin-bottom: 16px; }
.field__label {
  display: block; margin-bottom: 7px;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.input, .select, .textarea {
  width: 100%; padding: 12px 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r);
  font: 400 15px/1.4 var(--f-body);
  transition: border-color .2s, box-shadow .25s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--amber);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 16%, transparent);
}
.textarea { resize: vertical; min-height: 90px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.notice {
  padding: 12px 15px; border-radius: var(--r);
  border-left: 3px solid var(--rose);
  background: color-mix(in srgb, var(--rose) 10%, transparent);
  font-size: 14px; margin-bottom: 18px;
}
.notice--ok { border-left-color: var(--uranium); background: color-mix(in srgb, var(--uranium) 12%, transparent); }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 22px;
}
.card--pad-lg { padding: 30px; }

/* ================================================================= THE HERO
   A shelf of spines that slides in, one at a time, like the lights
   coming on down a row of shelving.
   ========================================================================= */
.hero { padding: clamp(56px, 10vw, 108px) 0 0; overflow: hidden; }
.hero__title {
  font-size: clamp(50px, 11vw, 132px);
  max-width: 15ch;
  margin-bottom: 20px;
}
.hero__title em {
  font-style: normal;
  color: var(--amber);
  -webkit-text-stroke: 0;
}
.hero__lede {
  max-width: 46ch; font-size: clamp(16px, 2.2vw, 19px);
  color: var(--ink-2); margin-bottom: 30px;
}
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 64px; }

.hero__stats { display: flex; gap: 40px; flex-wrap: wrap; margin-bottom: 60px; }
.hero__stat b { display: block; font-family: var(--f-display); font-size: 34px; line-height: 1; }

/* ================================================================ THE SHELF
   ========================================================================= */
.shelf {
  position: relative;
  display: flex; align-items: flex-end; gap: 3px;
  padding: 0 4px 0;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: thin;
  padding-bottom: 26px;
}
.shelf::-webkit-scrollbar { height: 7px; }
.shelf::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.shelf::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 12px;
  height: 9px; background: var(--shelf);
  border-radius: 2px;
  box-shadow: 0 12px 26px rgba(0,0,0,.5);
}
.shelf--tall { min-height: 300px; }
.shelf--wrap {
  flex-wrap: wrap; row-gap: 46px; overflow: visible; padding-bottom: 8px;
}
.shelf--wrap::after { display: none; }
.shelf--wrap .spine { box-shadow: 0 10px 18px -10px rgba(0, 0, 0, .6); }

.spine {
  --spine-w: 44px;
  --spine-h: 250px;
  position: relative; flex: 0 0 auto;
  width: var(--spine-w); height: var(--spine-h);
  background: var(--surface-2);
  background-image: linear-gradient(100deg, rgba(255,255,255,.09) 0%, transparent 26%, transparent 72%, rgba(0,0,0,.28) 100%);
  border: 1px solid var(--line);
  border-radius: 2px 2px 1px 1px;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 0 9px;
  cursor: pointer;
  transform-origin: bottom center;
  transition: transform .38s var(--ease), box-shadow .38s var(--ease), border-color .3s;
  animation: shelfIn .55s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 32ms);
}
.spine:hover, .spine:focus-visible {
  transform: translateY(-22px);
  box-shadow: 0 22px 34px rgba(0,0,0,.5);
  border-color: var(--amber);
  z-index: 3;
}
.spine__no {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .04em;
  color: var(--amber); margin-bottom: 8px;
}
.spine__title {
  writing-mode: vertical-rl;
  font-family: var(--f-spine); font-weight: 600;
  font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1; min-height: 0; color: var(--ink);
}
.spine__fmt {
  margin-top: 8px; font-family: var(--f-mono); font-size: 8px;
  letter-spacing: .08em; color: var(--ink-3);
  writing-mode: horizontal-tb;
}
.spine--wide { --spine-w: 64px; }   /* box sets sit fatter on the shelf */
.spine[data-fmt='VHS'] { --spine-w: 52px; --spine-h: 268px; border-radius: 2px; }
.spine[data-fmt='4K UHD'] { border-top: 3px solid var(--amber); }
.spine[data-fmt='Steelbook'] {
  background-image: linear-gradient(100deg, rgba(255,255,255,.2) 0%, transparent 30%, rgba(255,255,255,.1) 55%, rgba(0,0,0,.3) 100%);
}

/* ------------------------------------------------------------ cover grid */
.covers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
}
.cover {
  position: relative;
  animation: riseIn .5s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 26ms);
}
.cover__art {
  aspect-ratio: 2 / 3;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--cover-bg);
  border: 1px solid var(--line-soft);
  position: relative;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.cover__art img { width: 100%; height: 100%; object-fit: cover; }
.cover:hover .cover__art {
  transform: translateY(-7px) rotate(-.6deg);
  box-shadow: var(--shadow);
}
.cover__art::after {          /* tungsten sheen sweeping across the case */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.16) 50%, transparent 62%);
  transform: translateX(-120%);
  transition: transform .75s var(--ease);
}
.cover:hover .cover__art::after { transform: translateX(120%); }
.cover__empty {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-spine); font-size: 13px; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-3); text-align: center; padding: 14px;
}
.cover__meta { margin-top: 10px; }
.cover__title {
  font-family: var(--f-spine); font-weight: 600; font-size: 15px;
  line-height: 1.24; text-transform: uppercase; letter-spacing: .015em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cover__sub {
  display: flex; justify-content: space-between; gap: 8px;
  font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); margin-top: 4px;
}
.cover__price { color: var(--amber); font-weight: 500; }

.tag {
  position: absolute; top: 9px; left: 9px; z-index: 2;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; padding: 4px 7px; border-radius: var(--r-sm);
  background: var(--scrim); backdrop-filter: blur(6px);
  border: 1px solid var(--line);
}

/* ============================================================ VALUE TICKER
   The number the whole site exists for. It counts up on load and carries
   a hairline sparkline of the last 60 days.
   ========================================================================= */
.ticker {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 28px 30px 22px;
}
.ticker::before {              /* tungsten glow behind the number */
  content: ''; position: absolute; top: -60%; right: -10%;
  width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--amber) 26%, transparent), transparent 68%);
  filter: blur(30px); pointer-events: none;
  animation: breathe 7s var(--ease-in-out) infinite;
}
.ticker__val {
  font-family: var(--f-display);
  font-size: clamp(42px, 8vw, 74px);
  line-height: .95; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}
.ticker__delta { font-family: var(--f-mono); font-size: 13px; margin-top: 8px; }
.ticker__spark { margin-top: 16px; height: 46px; width: 100%; }
.ticker__spark path.line { fill: none; stroke: var(--amber); stroke-width: 1.6; }
.ticker__spark path.fill { fill: url(#sparkGrad); stroke: none; }

.stats {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.stat {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r); padding: 17px 18px;
  transition: border-color .25s, transform .25s var(--ease);
}
.stat:hover { border-color: var(--line); transform: translateY(-2px); }
.stat b {
  display: block; font-family: var(--f-display);
  font-size: 30px; line-height: 1.05; margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

/* format split bar */
.split { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 2px; }
.split span { transition: flex-grow .6s var(--ease); }
.split__key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 14px; font-size: 12.5px; }
.split__key i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; margin-right: 6px; }

/* ================================================================ SCANNER */
.scanner {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #05070B;
  border: 1px solid var(--line);
}
.scanner video { width: 100%; height: 100%; object-fit: cover; }
.scanner__frame {
  position: absolute; inset: 14% 10%;
  border: 2px solid color-mix(in srgb, var(--amber) 70%, transparent);
  border-radius: var(--r);
  box-shadow: 0 0 0 100vmax rgba(3, 5, 9, .58);
}
.scanner__frame::before, .scanner__frame::after {
  content: ''; position: absolute; width: 26px; height: 26px;
  border: 3px solid var(--amber);
}
.scanner__frame::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.scanner__frame::after { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }
.scanner__laser {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber), transparent);
  box-shadow: 0 0 16px 2px color-mix(in srgb, var(--amber) 60%, transparent);
  animation: sweep 2.1s var(--ease-in-out) infinite;
}
.scanner__hint {
  position: absolute; left: 0; right: 0; bottom: 14px; text-align: center;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: #E9E5DB;
}
.scanner--off video, .scanner--off .scanner__laser { display: none; }
.scanner__off {
  position: absolute; inset: 0; display: grid; place-content: center;
  gap: 14px; justify-items: center; text-align: center; padding: 24px; color: #98A2B4;
}

/* barcode chip */
.barcode {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .08em;
  padding: 8px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line);
}
.barcode::before {
  content: ''; width: 22px; height: 15px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 2px, var(--ink) 2px 4px, transparent 4px 6px);
}

/* --------------------------------------------------------------- listings */
.listing {
  display: grid; grid-template-columns: 54px 1fr auto;
  gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line-soft);
}
.listing:last-child { border-bottom: 0; }
.listing__img { width: 54px; height: 54px; border-radius: var(--r-sm); object-fit: cover; background: var(--cover-bg); }
.listing__title { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing__price { font-family: var(--f-mono); font-size: 15px; color: var(--amber); white-space: nowrap; }

/* --------------------------------------------------------------- toolbar */
.toolbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  margin-bottom: 26px;
}
.toolbar .input, .toolbar .select { width: auto; padding: 9px 12px; font-size: 14px; }
.toolbar__search { flex: 1 1 220px; }
.segment { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.segment button {
  background: transparent; border: 0; cursor: pointer;
  padding: 9px 15px; font: 500 13px var(--f-body); color: var(--ink-2);
  transition: background-color .2s, color .2s;
}
.segment button[aria-pressed='true'] { background: var(--surface-3); color: var(--ink); }

/* ------------------------------------------------------------------ empty */
.empty {
  text-align: center; padding: 70px 20px;
  border: 1px dashed var(--line); border-radius: var(--r-lg);
}
.empty h3 { font-family: var(--f-spine); text-transform: uppercase; letter-spacing: .06em; font-size: 21px; }

/* --------------------------------------------------------------- skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: var(--r-sm); color: transparent !important;
}

/* ------------------------------------------------------------------ toast */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 10px; }
.toast {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--r); padding: 13px 17px; box-shadow: var(--shadow);
  font-size: 14px; max-width: 340px;
  animation: toastIn .4s var(--ease) both;
}
.toast--ok { border-left-color: var(--uranium); }
.toast--bad { border-left-color: var(--rose); }

/* ----------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; z-index: 150; display: none; place-items: center; padding: 20px; }
.modal[open], .modal.is-open { display: grid; }
.modal__scrim { position: absolute; inset: 0; background: var(--scrim); backdrop-filter: blur(5px); }
.modal__box {
  position: relative; width: min(560px, 100%);
  max-height: 88vh; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 26px;
  animation: riseIn .32s var(--ease) both;
}

/* ---------------------------------------------------------------- reveals */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

/* --------------------------------------------------------------- sections */
.section { padding: clamp(56px, 9vw, 100px) 0; }
.section__head { max-width: 60ch; margin-bottom: 38px; }
.section__title { font-size: clamp(28px, 5vw, 46px); }

.rule { height: 1px; background: var(--line-soft); border: 0; margin: 0; }

.foot {
  padding: 44px 0; border-top: 1px solid var(--line-soft);
  font-size: 13px; color: var(--ink-3);
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between;
}

/* ------------------------------------------------------------- keyframes */
@keyframes shelfIn {
  from { transform: translateY(26px) rotateX(18deg); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes sweep {
  0%   { top: 16%; opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { top: 82%; opacity: 0; }
}
@keyframes shimmer { to { background-position: -300% 0; } }
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: .85; }
  50%      { transform: scale(1.14); opacity: 1; }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .nav__links {
    position: fixed; inset: 62px 0 auto; flex-direction: column;
    gap: 0; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gut) 20px;
    transform: translateY(-120%); transition: transform .4s var(--ease);
  }
  .nav__links.is-open { transform: none; }
  .nav__link { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
  .burger { display: block; margin-left: auto; order: 2; }
  .themer { order: 1; margin-left: auto; }
  .nav__links .btn { margin-top: 14px; }
  .grid-2 { grid-template-columns: 1fr; }
  .covers { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   PROFILES — a collector is their wall of covers
   ========================================================================== */
.profile-hero {
  position: relative;
  padding: clamp(40px, 7vw, 76px) 0 clamp(30px, 5vw, 48px);
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.profile-hero__wall {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: repeat(12, 1fr);
  opacity: .16; filter: saturate(.7);
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.9) 0%, transparent 88%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9) 0%, transparent 88%);
}
.profile-hero__wall img {
  width: 100%; height: 100%; object-fit: cover; aspect-ratio: 2/3;
  animation: riseIn .6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 24ms);
}
[data-theme='light'] .profile-hero__wall { opacity: .22; }

.profile-hero__in {
  position: relative;
  display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap;
}

.avatar {
  flex: 0 0 auto;
  width: 92px; height: 92px; border-radius: 20px;
  display: grid; place-items: center; overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-family: var(--f-display); font-size: 30px; letter-spacing: .04em;
  color: var(--amber);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 46px; height: 46px; border-radius: 12px; font-size: 16px; box-shadow: none; }

/* collectors directory */
.collectors {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.collector {
  display: block; padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line-soft); border-radius: var(--r-lg);
  transition: transform .3s var(--ease), border-color .25s, box-shadow .3s var(--ease);
}
.collector:hover {
  transform: translateY(-4px);
  border-color: var(--amber);
  box-shadow: var(--shadow);
}
.collector__head { display: flex; gap: 13px; align-items: center; margin-bottom: 12px; }
.collector__name {
  font-family: var(--f-spine); font-weight: 600; font-size: 17px;
  text-transform: uppercase; letter-spacing: .03em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.collector__bio {
  font-size: 13.5px; margin: 0 0 14px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.collector__strip { display: flex; gap: 5px; }
.collector__strip img {
  width: 100%; aspect-ratio: 2/3; object-fit: cover;
  border-radius: 4px; border: 1px solid var(--line-soft);
  transition: transform .3s var(--ease);
}
.collector:hover .collector__strip img:nth-child(odd)  { transform: translateY(-3px); }
.collector:hover .collector__strip img:nth-child(even) { transform: translateY(3px); }

/* ------------------------------------------------------- artwork picker */
.art-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  margin-top: 16px;
}
.art-option {
  border: 2px solid transparent; border-radius: var(--r);
  background: var(--cover-bg); overflow: hidden; cursor: pointer;
  padding: 0; text-align: left;
  transition: border-color .2s, transform .25s var(--ease);
}
.art-option:hover { border-color: var(--amber); transform: translateY(-3px); }
.art-option img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.art-option span {
  display: block; padding: 7px 8px;
  font-family: var(--f-mono); font-size: 10px; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.art-option[aria-pressed='true'] { border-color: var(--uranium); }

/* film synopsis */
.synopsis {
  max-width: 62ch; font-size: 15px; line-height: 1.62; color: var(--ink-2);
  border-left: 2px solid var(--line); padding-left: 16px; margin: 0 0 24px;
}

@media (max-width: 640px) {
  .avatar { width: 68px; height: 68px; border-radius: 16px; font-size: 22px; }
  .profile-hero__wall { grid-template-columns: repeat(6, 1fr); }
}

/* ------------------------------------------------------ scanner controls */
.scan-bar {
  display: flex; gap: 10px; margin-top: 14px;
  flex-wrap: wrap; align-items: center;
}
.scan-bar__pick {
  flex: 1 1 160px; width: auto; min-width: 0;
  padding: 10px 12px; font-size: 13.5px;
}
.scan-bar__icon { padding: 11px 13px; }
.scan-bar__icon[aria-pressed='true'] {
  border-color: var(--amber); color: var(--amber);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 18%, transparent);
}

.scan-zoom {
  display: flex; align-items: center; gap: 12px; margin-top: 12px;
}
.scan-zoom input[type='range'] {
  flex: 1; accent-color: var(--amber); cursor: pointer;
}

/* front-facing cameras read backwards otherwise */
.scanner.is-mirrored video { transform: scaleX(-1); }

/* confirmation flash when a barcode decodes */
.scanner.is-hit .scanner__frame {
  border-color: var(--uranium);
  box-shadow: 0 0 0 100vmax rgba(3, 5, 9, .58), 0 0 34px 6px color-mix(in srgb, var(--uranium) 55%, transparent);
  transition: border-color .12s, box-shadow .12s;
}
.scanner.is-hit .scanner__frame::before,
.scanner.is-hit .scanner__frame::after { border-color: var(--uranium); }

.filedrop {
  display: flex; align-items: center; justify-content: center;
  padding: 18px; border: 1px dashed var(--line); border-radius: var(--r);
  font-size: 14px; color: var(--ink-2); cursor: pointer;
  transition: border-color .2s, color .2s, background-color .2s;
}
.filedrop:hover { border-color: var(--amber); color: var(--ink); background: var(--surface-2); }
.filedrop:focus-within { border-color: var(--amber); }
