/* ==========================================================================
   HOOD BY HOOD — design system
   One stylesheet, every page. Vanilla CSS, no build step, no dependencies.

   The look is neo-brutalist pixel: 2px ink rules, zero border radius,
   hard unblurred offsets, nothing cropped. Two families only —
   HoodByHood (pixel) carries display and UI, Space Grotesk carries prose.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* colour — five values, nothing else */
  --lime:       #CDF752;
  --ink:        #0B0F0C;
  --cream:      #F7FAEC;
  --olive:      #5a6b1f;
  --ink-hover:  #1E2A13;
  --red:        #ec3013;

  /* derived */
  --rule:       2px solid var(--ink);
  --rule-lime:  2px solid var(--lime);
  --hairline:   1px solid rgba(11, 15, 12, .16);
  --offset:     14px 14px 0 var(--ink);
  --offset-sm:  8px 8px 0 var(--ink);

  /* type */
  --font-display: 'HoodByHood', 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Space Grotesk', system-ui, -apple-system, sans-serif;

  /* fluid type scale */
  --t-display: clamp(56px, 9vw, 132px);
  --t-h2:      clamp(38px, 5.2vw, 68px);
  --t-h3:      clamp(24px, 2.6vw, 34px);
  --t-lead:    clamp(17px, 1.35vw, 21px);
  --t-body:    clamp(15px, 1.05vw, 17px);
  --t-label:   clamp(14px, 1.05vw, 16px);
  --t-micro:   13px;

  /* spacing — 8px base */
  --s-1: 8px;   --s-2: 16px;  --s-3: 24px;  --s-4: 32px;
  --s-5: 48px;  --s-6: 64px;  --s-7: 96px;  --s-8: 128px;

  --pad:     clamp(20px, 4vw, 56px);   /* horizontal gutter */
  --section: clamp(64px, 8vw, 112px);  /* vertical section rhythm */
  --nav-h:   84px;
  --max:     1560px;

  /* motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --fast: .16s var(--ease);
  --med:  .28s var(--ease);
}

@font-face {
  font-family: 'HoodByHood';
  src: url('../../uploads/HoodByHood.ttf') format('truetype');
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.65;
  font-synthesis: none;
  overflow-x: hidden;
}

h1, h2, h3, h4, p, figure, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }

h1, h2, h3, h4,
.display, .ui {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.06;
  text-transform: uppercase;
}

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

img, svg { display: block; max-width: 100%; }
.pixel { image-rendering: pixelated; }

button, input, select {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}
button { cursor: pointer; }

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

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.skip-link {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  padding: 12px 18px;
  background: var(--ink); color: var(--lime);
  font-family: var(--font-display); font-size: var(--t-label);
  letter-spacing: .08em;
  transform: translateY(-200%);
  transition: transform var(--fast);
}
.skip-link:focus { transform: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   3. LAYOUT PRIMITIVES
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* position + overflow are load-bearing: every decorative .floater is absolute,
   and without a positioned ancestor they escape to the top of the document */
.section {
  position: relative;
  overflow: hidden;
  padding-block: var(--section);
  border-bottom: var(--rule);
}
.section--ink   { background: var(--ink);   color: var(--lime); }
.section--cream { background: var(--cream); }
.section--lime  { background: var(--lime); }
.section--flush { padding-block: 0; }

.section--ink a:hover      { color: var(--cream); }
.section--lime a:hover,
.section--cream a:hover    { color: var(--olive); }

.stack   { display: flex; flex-direction: column; gap: var(--s-3); }
.stack-4 { display: flex; flex-direction: column; gap: var(--s-4); }
.stack-6 { display: flex; flex-direction: column; gap: var(--s-6); }
.row     { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); }

.prose {
  font-size: var(--t-lead);
  line-height: 1.7;
  text-wrap: pretty;
  max-width: 62ch;
}
.section--ink .prose { color: var(--cream); }

/* --------------------------------------------------------------------------
   4. DITHER DIVIDER — the signature transition
   A four-step ordered-dither ramp in 8px cells. Sits between a light and a
   dark section so the two grounds interlock instead of butting together.
   -------------------------------------------------------------------------- */
.dither {
  --from: var(--cream);
  --to:   var(--ink);
  height: 48px;
  background-color: var(--from);
  background-repeat: repeat-x;
  /* four rows of 12px cells; each row is one ink block per N cells, so
     coverage steps 1/6 -> 1/3 -> 1/2 -> 3/4 from top to bottom */
  background-image:
    linear-gradient(90deg, var(--to) 12px, transparent 0),
    linear-gradient(90deg, var(--to) 12px, transparent 0),
    linear-gradient(90deg, var(--to) 12px, transparent 0),
    linear-gradient(90deg, var(--to) 12px, transparent 0);
  background-size: 16px 12px, 24px 12px, 36px 12px, 72px 12px;
  background-position: 0 36px, 12px 24px, 0 12px, 24px 0;
}
.dither--lime-ink   { --from: var(--lime);  --to: var(--ink); }
.dither--cream-ink  { --from: var(--cream); --to: var(--ink); }
.dither--ink-lime   { --from: var(--ink);   --to: var(--lime); }
.dither--ink-cream  { --from: var(--ink);   --to: var(--cream); }
.dither--lime-cream { --from: var(--lime);  --to: var(--cream); }
.dither--cream-lime { --from: var(--cream); --to: var(--lime); }

/* --------------------------------------------------------------------------
   5. NAV + SCROLL RAIL
   -------------------------------------------------------------------------- */
.progress {
  position: fixed; top: 0; left: 0; z-index: 60;
  width: 100%; height: 4px;
  background: transparent;
  pointer-events: none;
}
.progress span {
  display: block; height: 100%; width: 0;
  background: var(--ink);
  transform-origin: left;
}

.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--lime);
  border-bottom: var(--rule);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3);
  height: var(--nav-h);
  max-width: var(--max); margin-inline: auto;
  padding-inline: var(--pad);
}
.nav-brand {
  display: flex; align-items: center; gap: 14px;
  flex: none;
  font-family: var(--font-display);
  font-size: clamp(19px, 1.7vw, 25px);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.nav-brand img { width: 42px; height: 42px; }

.nav-links {
  display: flex; align-items: center; gap: clamp(14px, 2vw, 30px);
  font-family: var(--font-display);
  font-size: var(--t-label);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.nav-link {
  position: relative;
  padding-block: 6px;
}
.nav-link::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform var(--med);
}
.nav-link:hover::after      { transform: scaleX(1); transform-origin: left; }
.nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link[aria-current="page"] { color: var(--ink); }

.nav-toggle {
  display: none;
  align-items: center; gap: 10px;
  padding: 12px 16px;
  border: var(--rule);
  font-family: var(--font-display);
  font-size: var(--t-label); letter-spacing: .08em;
  text-transform: uppercase;
}
.nav-toggle:hover { background: var(--cream); }

.nav-sheet {
  position: fixed; inset: 0; z-index: 55;
  display: none;
  flex-direction: column;
  padding: var(--s-3) var(--pad) var(--s-6);
  background: var(--lime);
  overflow-y: auto;
}
.nav-sheet.is-open { display: flex; }
.nav-sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
  margin-bottom: var(--s-4);
  border-bottom: var(--rule);
}
.nav-sheet a {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s-2);
  padding: var(--s-3) 0;
  border-bottom: var(--rule);
  font-family: var(--font-display);
  font-size: clamp(30px, 8vw, 44px);
  text-transform: uppercase;
}
.nav-sheet a span {
  font-size: var(--t-label); letter-spacing: .12em; color: var(--olive);
}
.nav-sheet a[aria-current="page"] { color: var(--olive); }

/* --------------------------------------------------------------------------
   6. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: clamp(16px, 2.5vw, 34px);
  padding: 16px 24px;
  font-family: var(--font-display);
  font-size: var(--t-label);
  letter-spacing: .1em;
  text-transform: uppercase;
  border: 2px solid transparent;
  transition: background var(--fast), color var(--fast),
              transform var(--fast), box-shadow var(--fast);
}
.btn > span:last-child { transition: transform var(--med); }
.btn:hover > span:last-child { transform: translateX(4px); }

.btn--ink  { background: var(--ink); color: var(--lime); }
.btn--ink:hover  { background: var(--ink-hover); color: var(--lime); }

.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: var(--cream); color: var(--ink); }

.btn--out  { border-color: var(--ink); }
.btn--out:hover  { background: var(--cream); color: var(--ink); }

.section--ink .btn--out { border-color: var(--lime); color: var(--lime); }
.section--ink .btn--out:hover { background: var(--lime); color: var(--ink); }

.btn--lift:hover { transform: translate(-3px, -3px); box-shadow: var(--offset-sm); }
.btn--sm { padding: 10px 14px; gap: 10px; font-size: var(--t-micro); }

/* --------------------------------------------------------------------------
   7. SECTION HEADS
   -------------------------------------------------------------------------- */
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-4); flex-wrap: wrap;
  margin-bottom: var(--s-5);
}
.sec-head h2,
.sec-head h1 { font-size: var(--t-h2); text-wrap: balance; }
.sec-head-l { display: flex; flex-direction: column; gap: 14px; flex: 1 1 380px; min-width: 0; }
.sec-head .prose { flex: 1 1 340px; max-width: 46ch; padding-bottom: 6px; }

.kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: var(--t-label);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.kicker--rule::before {
  content: ""; width: clamp(28px, 4vw, 52px); height: 2px;
  background: currentColor; flex: none;
}

.dot {
  width: 9px; height: 9px; flex: none;
  background: currentColor;
  animation: blink 1.2s steps(1) infinite;
}
.dot--red { background: var(--red); }

/* --------------------------------------------------------------------------
   8. HERO
   -------------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--lime);
  border-bottom: var(--rule);
  padding-block: clamp(48px, 6vw, 88px) clamp(56px, 7vw, 104px);
}
.hero-inner {
  display: grid; grid-template-columns: 1.35fr 1fr;
  gap: clamp(32px, 4vw, 64px); align-items: center;
  max-width: var(--max); margin-inline: auto;
  padding-inline: var(--pad);
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); }
.hero h1 {
  font-size: var(--t-display);
  line-height: .98;
  letter-spacing: .01em;
}
.hero h1 .caret {
  display: inline-block;
  width: .2em; height: .76em;
  margin-left: .12em;
  background: var(--ink);
  vertical-align: -.03em;
  animation: caret 1.05s steps(1) infinite;
}
.hero .prose { font-size: clamp(18px, 1.6vw, 23px); max-width: 54ch; }

.hero-art {
  justify-self: center;
  display: flex; align-items: flex-end;
  min-width: 0; max-width: 100%;
}
.hero-char {
  width: clamp(96px, 13vw, 200px);
  margin-right: max(-40px, -4vw);
  position: relative; z-index: 2;
  filter: drop-shadow(8px 6px 0 rgba(11, 15, 12, .18));
}
.hero-card {
  width: clamp(210px, 24vw, 320px);
  background: var(--cream);
  border: var(--rule);
  box-shadow: var(--offset);
}
.hero-card .hood-art { border: none; }
.hero-card-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 15px;
  border-top: var(--rule);
  font-family: var(--font-display);
  font-size: var(--t-label); letter-spacing: .06em;
}
.live { display: flex; align-items: center; gap: 9px; }

.floater { position: absolute; pointer-events: none; z-index: 1; }

/* --------------------------------------------------------------------------
   9. MARQUEE
   -------------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  padding-block: 18px;
  background: var(--ink);
  border-bottom: var(--rule);
}
.marquee-track {
  display: flex; width: max-content; align-items: center; gap: 52px;
  animation: marquee 28s linear infinite;
}
.marquee-item { display: flex; align-items: center; gap: 52px; }
.marquee-item span {
  color: var(--lime);
  font-family: var(--font-display);
  font-size: clamp(17px, 1.8vw, 25px);
  letter-spacing: .1em;
  white-space: nowrap;
}
.marquee-item img { width: 28px; height: 28px; }

/* --------------------------------------------------------------------------
   10. STATS
   -------------------------------------------------------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  background: var(--ink);
  border-bottom: var(--rule);
}
.stat {
  display: flex; flex-direction: column; gap: 4px;
  padding: clamp(20px, 3vw, 34px) var(--pad);
  background: var(--lime);
}
.stat b {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 54px);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat span {
  font-family: var(--font-display);
  font-size: var(--t-label);
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   11. HOOD CARD — the one media contract, used on every page
   -------------------------------------------------------------------------- */
.hood {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  background: var(--cream);
  text-align: left;
  width: 100%;
  transition: transform var(--fast), box-shadow var(--fast);
}
.hood:hover, .hood:focus-visible { transform: translate(-5px, -5px); box-shadow: 9px 9px 0 var(--ink); z-index: 3; }
.section--ink .hood:hover, .section--ink .hood:focus-visible { box-shadow: 9px 9px 0 var(--lime); }

.hood-art {
  position: relative;
  aspect-ratio: 1;
  background: var(--ink);
  overflow: hidden;
}
.hood-img {
  width: 100%; height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  transition: opacity var(--fast);
}
.hood-img.is-swapping { opacity: .12; }

.hood-badge {
  position: absolute; top: 0; right: 0;
  padding: 6px 10px;
  background: var(--lime); color: var(--ink);
  border-left: var(--rule); border-bottom: var(--rule);
  font-family: var(--font-display);
  font-size: var(--t-micro); letter-spacing: .08em;
  transform: translateY(-100%);
  transition: transform var(--med);
}
.hood:hover .hood-badge, .hood:focus-visible .hood-badge { transform: none; }

.hood-meta {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 10px 12px;
  border-top: var(--rule);
  font-family: var(--font-display);
  font-size: var(--t-label);
  letter-spacing: .03em;
}
.hood-meta em { font-style: normal; color: var(--olive); }

.hood-meta--stack {
  flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 12px 14px;
}
.hood-meta--stack b { font-weight: 400; }
.hood-meta--stack span { font-size: var(--t-micro); letter-spacing: .1em; color: var(--olive); }

/* tier colour is carried by a left rule, never by a fill */
.tier-legendary .hood-meta { box-shadow: inset 6px 0 0 var(--ink); }
.tier-epic      .hood-meta { box-shadow: inset 6px 0 0 var(--olive); }
.tier-uncommon  .hood-meta { box-shadow: inset 6px 0 0 rgba(90, 107, 31, .45); }

/* --------------------------------------------------------------------------
   12. GRIDS
   -------------------------------------------------------------------------- */
.grid {
  display: grid; gap: 2px;
  background: var(--ink);
  border: var(--rule);
}
.grid--6 { grid-template-columns: repeat(6, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.note {
  margin-top: var(--s-3);
  font-family: var(--font-display);
  font-size: var(--t-label);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--olive);
}
.section--ink .note { color: var(--cream); }

.empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  padding: var(--s-7) var(--s-3);
  background: var(--cream);
  text-align: center;
}
.empty b { font-family: var(--font-display); font-size: var(--t-h3); font-weight: 400; }

/* --------------------------------------------------------------------------
   13. FILTER BAR (collection)
   -------------------------------------------------------------------------- */
/* Seven stacked fields push the wall off a phone screen, so below 900px the
   panel collapses behind a summary. Above it the summary is hidden and the
   <details> is always open. */
.filter-summary { display: none; }

/* Ink shows through the gaps of a normal grid, which leaves a black slab
   wherever the last row is short. Borders live on the cells instead, so a
   half-empty row just reads as empty. */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: var(--s-3);
  background: var(--cream);
  border-top: var(--rule);
  border-left: var(--rule);
}
.field {
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 16px;
  background: var(--cream);
  border-right: var(--rule);
  border-bottom: var(--rule);
}
.field > label {
  font-family: var(--font-display);
  font-size: var(--t-micro);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--olive);
}
.field select, .field input {
  width: 100%;
  padding: 8px 0;
  border-bottom: var(--rule);
  font-family: var(--font-display);
  font-size: var(--t-label);
  letter-spacing: .04em;
  text-transform: uppercase;
  background: transparent;
  cursor: pointer;
  min-height: 34px;
}
.field input { cursor: text; }
.field input::placeholder { color: rgba(90, 107, 31, .6); }

.field--inline {
  flex-direction: row; align-items: center; gap: 10px;
  padding: 0; background: transparent; border: none;
}
.field--inline select { width: auto; padding: 8px 4px; }

.filter-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-2); flex-wrap: wrap;
  margin-bottom: var(--s-3);
}
.result-count {
  font-family: var(--font-display);
  font-size: var(--t-label); letter-spacing: .12em;
  text-transform: uppercase;
}
.result-count b { font-weight: 400; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px;
  border: var(--rule);
  font-family: var(--font-display);
  font-size: var(--t-micro); letter-spacing: .08em;
  text-transform: uppercase;
}
.section--ink .chip { border-color: var(--lime); }
button.chip:hover { background: var(--ink); color: var(--lime); }
.section--ink button.chip:hover { background: var(--lime); color: var(--ink); }

/* --------------------------------------------------------------------------
   14. RARITY BARS + TABLES
   -------------------------------------------------------------------------- */
.two-col {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px); align-items: start;
}
.two-col--wide { grid-template-columns: 1.1fr 1fr; }

.bars { display: flex; flex-direction: column; gap: 14px; }
.bar { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 20px); }
.bar-name {
  flex: none; width: clamp(96px, 12vw, 168px);
  font-family: var(--font-display);
  font-size: var(--t-label); letter-spacing: .08em;
  text-transform: uppercase;
}
.bar-track {
  flex: 1; min-width: 0; height: 30px; padding: 3px;
  border: 2px solid currentColor;
}
.bar-fill {
  height: 100%; width: 0;
  background: currentColor;
  transition: width 1.1s var(--ease);
}
.bar-pct {
  flex: none; width: 66px; text-align: right;
  font-family: var(--font-display);
  font-size: var(--t-label);
  font-variant-numeric: tabular-nums;
}

.layer-card {
  display: flex; flex-direction: column; gap: 12px;
  padding: var(--s-3);
  background: var(--cream);
}
.layer-card h3 { font-size: var(--t-h3); }
.layer-card .meta {
  font-family: var(--font-display);
  font-size: var(--t-micro); letter-spacing: .12em;
  text-transform: uppercase; color: var(--olive);
}
/* same trailing-row rule as .filters: rules live on the cells, so a short
   last row reads as empty rather than as a black slab */
.layer-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  background: var(--cream);
  border-top: var(--rule); border-left: var(--rule);
}
.layer-card { border-right: var(--rule); border-bottom: var(--rule); }
.dist { display: flex; flex-direction: column; gap: 8px; }
.dist-row {
  display: grid; grid-template-columns: 1fr 52px;
  align-items: center; gap: 12px;
  font-size: var(--t-label);
}
.dist-row .label { display: flex; flex-direction: column; gap: 4px; }
.dist-row .label span { line-height: 1.2; }
.dist-row .meter { height: 6px; background: rgba(11, 15, 12, .12); }
.dist-row .meter i {
  display: block; height: 100%; width: 0; background: var(--ink);
  transition: width .9s var(--ease);
}
.dist-row .n {
  text-align: right;
  font-family: var(--font-display);
  font-size: var(--t-micro);
  font-variant-numeric: tabular-nums;
  color: var(--olive);
}

/* --------------------------------------------------------------------------
   15. VAULT RAIL
   -------------------------------------------------------------------------- */
.vault-rail {
  overflow: hidden;
  background: var(--ink);
  border-block: var(--rule);
}
.vault-track {
  display: flex; width: max-content; gap: 2px;
  animation: marquee 70s linear infinite;
}
.vault-track .hood { flex: none; width: clamp(210px, 22vw, 292px); }

/* --------------------------------------------------------------------------
   16. MODAL / TRAIT VIEWER
   -------------------------------------------------------------------------- */
.backdrop {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: clamp(12px, 3vw, 40px);
  background: rgba(11, 15, 12, .84);
}
.backdrop.is-open { display: flex; animation: fade .2s var(--ease); }

.panel {
  display: flex; flex-direction: column;
  width: min(900px, 100%); max-height: 90vh; overflow: hidden;
  background: var(--cream);
  border: var(--rule);
  box-shadow: 16px 16px 0 rgba(205, 247, 82, .35);
  animation: pop .24s var(--ease);
}
.panel-head {
  flex: none;
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 14px 20px;
  background: var(--lime);
  border-bottom: var(--rule);
}
.panel-title {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: .02em; text-transform: uppercase;
}
.panel-nav { display: flex; align-items: center; gap: 8px; flex: none; }
.panel-body { display: flex; align-items: stretch; flex: 1; min-height: 0; }
.panel-art {
  flex: none; width: min(400px, 44%);
  display: flex; align-items: center;
  background: var(--ink);
  border-right: var(--rule);
}
.panel-art img { width: 100%; image-rendering: pixelated; }
.panel-traits { flex: 1; min-width: 0; overflow: auto; padding: 4px 22px 20px; }

.trait {
  display: flex; justify-content: space-between; align-items: baseline; gap: 18px;
  padding: 11px 0;
  border-bottom: var(--hairline);
}
.trait dt {
  flex: none;
  font-family: var(--font-display);
  font-size: var(--t-micro); letter-spacing: .12em;
  text-transform: uppercase; color: var(--olive);
}
.trait dd {
  text-align: right;
  font-family: var(--font-display);
  font-size: var(--t-label);
}
.trait--hero dd { font-size: var(--t-h3); }

/* --------------------------------------------------------------------------
   17. EDITORIAL BLOCKS (about / faq / manifesto)
   -------------------------------------------------------------------------- */
.manifesto p,
.manifesto h1 {
  max-width: 22ch;
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 86px);
  line-height: 1.14;
  text-transform: uppercase;
  color: var(--lime);
  text-wrap: balance;
}

.lore {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  background: var(--cream);
  border-top: var(--rule); border-left: var(--rule);
}
.lore article {
  display: flex; flex-direction: column; gap: 12px;
  padding: var(--s-4) var(--s-3);
  background: var(--cream);
  border-right: var(--rule); border-bottom: var(--rule);
}
.lore h3 { font-size: var(--t-h3); }
.lore .n {
  font-family: var(--font-display);
  font-size: var(--t-micro); letter-spacing: .18em; color: var(--olive);
}

.faq { border-top: var(--rule); }
.faq details { border-bottom: var(--rule); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-3) 0;
  cursor: pointer; list-style: none;
  font-family: var(--font-display);
  font-size: clamp(19px, 2.2vw, 27px);
  text-transform: uppercase;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  font-size: 1.1em; line-height: 1;
  transition: transform var(--med);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--olive); }
.faq .answer { padding-bottom: var(--s-3); max-width: 68ch; }

/* --------------------------------------------------------------------------
   18. FOOTER
   -------------------------------------------------------------------------- */
.footer { background: var(--lime); }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); flex-wrap: wrap;
  padding-block: var(--s-4);
  font-family: var(--font-display);
  font-size: var(--t-label); letter-spacing: .06em;
  text-transform: uppercase;
}
.footer-brand { display: flex; align-items: center; gap: 11px; }
.footer-brand img { width: 30px; height: 30px; }
.footer-links { display: flex; gap: var(--s-3); flex-wrap: wrap; }

.motion-toggle {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 13px;
  border: var(--rule);
  font-family: var(--font-display);
  font-size: var(--t-micro); letter-spacing: .1em;
  text-transform: uppercase;
}
.motion-toggle:hover { background: var(--cream); }
.motion-toggle i {
  width: 9px; height: 9px; background: var(--ink); flex: none;
  font-style: normal;
}
.motion-toggle[aria-pressed="false"] i { background: transparent; box-shadow: inset 0 0 0 2px var(--ink); }

/* --------------------------------------------------------------------------
   19. MOTION
   -------------------------------------------------------------------------- */
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes blink   { 0%, 100% { opacity: 1; } 50% { opacity: .12; } }
@keyframes caret   { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes float   { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(3deg); } }
@keyframes fade    { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop     { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.float      { animation: float 6.5s ease-in-out infinite; }
.float-fast { animation: float 4.5s ease-in-out infinite; }

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   20. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .grid--6 { grid-template-columns: repeat(4, 1fr); }
  .grid--5 { grid-template-columns: repeat(3, 1fr); }
  .two-col, .two-col--wide { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { justify-self: flex-start; }
}

@media (max-width: 900px) {
  :root { --nav-h: 72px; }
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid--6, .grid--4 { grid-template-columns: repeat(3, 1fr); }
  .panel-body { flex-direction: column; }
  .panel-art {
    width: 100%; max-height: 42vh;
    border-right: none; border-bottom: var(--rule);
    justify-content: center;
  }
  .panel-art img { width: auto; max-height: 42vh; }
  .sec-head { align-items: flex-start; }

  .filter-summary {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
    padding: 15px 16px; margin-bottom: var(--s-2);
    border: var(--rule); cursor: pointer; list-style: none;
    font-family: var(--font-display);
    font-size: var(--t-label); letter-spacing: .12em; text-transform: uppercase;
  }
  .filter-summary::-webkit-details-marker { display: none; }
  .filter-summary span { font-size: 1.2em; line-height: 1; transition: transform var(--med); }
  .filter-panel[open] .filter-summary span { transform: rotate(45deg); }
  .filter-summary:hover { background: var(--cream); }
}

@media (max-width: 640px) {
  .grid--6, .grid--5, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .hero-char { display: none; }
  .hero-card { width: min(320px, 100%); }
  .filters { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: var(--s-2); }
  .marquee-track, .marquee-item { gap: 32px; }
  .hood-meta { font-size: var(--t-micro); padding: 8px 10px; }
  .btn { width: 100%; justify-content: space-between; }
  .btn--sm, .chip, .motion-toggle { width: auto; }
  .panel-head { flex-wrap: wrap; }
}

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

/* motion killed by the footer toggle */
body.no-motion .marquee-track,
body.no-motion .vault-track,
body.no-motion .float,
body.no-motion .float-fast,
body.no-motion .dot,
body.no-motion .caret { animation: none; }

@media print {
  .nav, .progress, .marquee, .backdrop, .floater { display: none !important; }
  body { background: #fff; }
}
