/* ============================================================================
   R52 — the five candidate home page designs.

   David rejected the previous five, so these are five different PAGE
   STRUCTURES, not five colour schemes over one hero. Each design owns a
   namespace (.wall / .cab / .np / .coll / .term) and nothing here leaks into
   the live site — the file is only loaded by /design/home/{n}.

   Themeing rules this project learned the hard way (CLAUDE.md):
     * every colour comes from a theme variable — --bg --panel --txt --dim
       --accent --line. NEVER --muted: no theme defines it, so it renders as
       invisible text on the variants that do not happen to inherit.
     * a flex item will not shrink below its content without min-width: 0.
   ========================================================================= */

/* ---------------------------------------------------------------- FMV BAND */
/* "a 1/4 above the fold FMV style page that has a bunch of retro consoles and
   retro arcades flash in and out with some of the 'FMV game shots'" */
.fmvband {
  height: 25vh;                 /* the quarter of the fold David asked for */
  min-height: 150px;
  overflow: hidden;
  position: relative;
  background: var(--bg-accent, var(--panel));
  border-bottom: 1px solid var(--line);
}
.fmvband::after {               /* scanline wash, so it reads as a screen */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(0,0,0,.20) 0 1px, transparent 1px 3px);
  opacity: .5;
}
.fmvband-rail {
  display: flex; align-items: center; gap: 18px;
  height: 100%; padding: 0 18px;
  width: max-content;
  animation: fmv-drift 64s linear infinite;
}
.fmvtile {
  flex: 0 0 auto;
  height: 72%;
  display: flex; align-items: center; justify-content: center;
  /* THE FLASH: every tile fades in and out on its own offset, so the band is
     never all-present or all-gone — it reads as hardware and gameplay cutting
     in and out of a signal. */
  animation: fmv-flash 5.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * -0.43s);
}
.fmvtile--hw { width: 132px; color: var(--accent); opacity: .95; }
.fmvtile--hw .hw-svg { width: 100%; height: 100%; filter: drop-shadow(0 0 10px currentColor); }
/* R67.4 — David's console icons (Retro Video Game Information Pages set)
   between the shots. Natural aspect, contained, same glow language. */
.fmvtile--icon { width: auto; display: flex; align-items: center; justify-content: center; }
.fmvtile--icon .fmvtile-icon { height: 100%; width: auto; max-width: 190px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(180, 0, 255, .45)); }
.fmvtile--shot { width: 220px; position: relative; }
.fmvtile--shot a { display: block; height: 100%; text-decoration: none; }
.fmvtile--shot img {
  width: 100%; height: 100%; object-fit: cover;
  border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 0 22px rgba(0,0,0,.5);
}
.fmvtile-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  font: 600 10px/1.6 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  color: var(--txt); background: color-mix(in srgb, var(--bg) 78%, transparent);
  padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@keyframes fmv-flash {
  0%, 100% { opacity: .12; transform: scale(.96); }
  12%      { opacity: 1;   transform: scale(1); }
  46%      { opacity: 1;   transform: scale(1); }
  62%      { opacity: .12; transform: scale(.97); }
}
@keyframes fmv-drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Per-design dressing of the same band. */
.fmvband--marquee { height: 22vh; border-bottom: 4px solid var(--accent); }
.fmvband--strip   { height: 18vh; min-height: 120px; }
.fmvband--slow .fmvband-rail { animation-duration: 130s; }
.fmvband--slow .fmvtile { animation-duration: 9s; }

@media (prefers-reduced-motion: reduce) {
  .fmvband-rail, .fmvtile { animation: none !important; }
  .fmvtile { opacity: 1; }
}
@media (max-width: 760px) {
  .fmvband { height: 22vh; min-height: 120px; }
  .fmvtile--shot { width: 150px; }
  .fmvtile--hw { width: 74px; }
}

/* A game the capture protocol has not reached yet. Deliberately plain: it
   should read as "no screenshot yet", never as a decorative choice. */
.dz-noart {
  display: grid; place-items: center;
  width: 100%; aspect-ratio: 16/9; border-radius: 5px;
  background: var(--panel); border: 1px solid var(--line); color: var(--dim);
  font: 800 20px/1 var(--font-head); letter-spacing: .08em;
}
.coll-list .dz-noart { width: 62px; height: 40px; aspect-ratio: auto; font-size: 12px; flex: 0 0 auto; }
.coll-hero .dz-noart { aspect-ratio: 16/10; border-radius: 0; font-size: 40px; }

/* Shared bits across the five. */
.dz {
  max-width: var(--shell-max); margin: 0 auto; padding: 0 var(--shell-pad);
  background: var(--panel); color: var(--txt);
}
.dz-eyebrow {
  font: 700 11px/1 var(--font-body); letter-spacing: .22em; text-transform: uppercase;
  color: var(--txt); opacity: .85; margin: 0 0 10px;
}
.dz-cta {
  display: inline-block; border: 0; cursor: pointer;
  font: 800 15px/1 var(--font-head); letter-spacing: .06em; text-transform: uppercase;
  padding: 16px 30px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 76%, #000);
  color: #fff; text-decoration: none;
}
.dz-cta--ghost { background: transparent; color: var(--txt); border: 2px solid var(--line); }
.dz-switcher {
  position: sticky; top: 0; z-index: 40;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  padding: 8px 14px; background: var(--panel); border-bottom: 1px solid var(--line);
  font: 600 12px/1 var(--font-body);
}
.dz-switcher a { color: var(--dim); text-decoration: none; padding: 6px 10px; border-radius: 4px; }
.dz-switcher a[aria-current] { background: color-mix(in srgb, var(--accent) 76%, #000); color: #fff; }
.dz-switcher b { color: var(--txt); letter-spacing: .1em; text-transform: uppercase; }

/* ================================================== 1 — THE WALL ========= */
/* No hero. The catalogue IS the pitch: a dense wall of real gameplay with the
   join panel floating over it. */
.wall-grid {
  display: grid; gap: 4px;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  padding: 4px;
}
.wall-cell { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--panel); }
.wall-cell img { width: 100%; height: 100%; object-fit: cover; display: block;
                 transition: transform .35s ease, filter .35s ease; filter: saturate(.75) contrast(1.05); }
.wall-cell:hover img, .wall-cell:focus-within img { transform: scale(1.08); filter: none; }
.wall-cell b {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px;
  font: 700 11px/1.3 var(--font-body); color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
  opacity: 0; transition: opacity .25s ease;
}
.wall-cell:hover b, .wall-cell:focus-within b { opacity: 1; }
.wall-over {
  position: relative; z-index: 2; margin: -110px auto 0; max-width: 720px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 34px 30px; text-align: center; box-shadow: 0 30px 70px rgba(0,0,0,.55);
}
.wall-over h1 { font: 900 clamp(28px, 4.4vw, 50px)/1.03 var(--font-head); margin: 0 0 12px; }
.wall-over p { color: var(--dim); margin: 0 0 20px; }
.wall-count { display: flex; justify-content: center; gap: 30px; margin: 22px 0 0; flex-wrap: wrap; }
.wall-count div { min-width: 0; }
.wall-count b { display: block; font: 900 26px/1 var(--font-head); color: var(--accent); }
.wall-count span { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }

/* ================================================== 2 — THE CABINET ====== */
/* The page is the machine: marquee, CRT, control panel, coin slot. */
/* Same reason as .dz: this shell holds text directly, so it needs the
   --panel surface the themes assume --txt will be read against. */
.cab-shell {
  max-width: 1120px; margin: 0 auto; padding: 26px var(--shell-pad) 60px;
  background: var(--panel); color: var(--txt);
}
.cab-body {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 22px 22px 8px 8px; padding: 22px;
  box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--bg) 60%, transparent), 0 30px 70px rgba(0,0,0,.5);
}
.cab-screen {
  position: relative; border-radius: 14px; overflow: hidden;
  background: #05060a; border: 10px solid color-mix(in srgb, var(--bg) 70%, #000);
  aspect-ratio: 4/3; max-height: 46vh; margin: 0 auto; display: grid; place-items: center;
}
.cab-screen img { width: 100%; height: 100%; object-fit: cover; }
.cab-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,.75) 100%),
              repeating-linear-gradient(180deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
}
.cab-caption {
  position: absolute; left: 14px; bottom: 14px; z-index: 2;
  font: 800 14px/1.3 var(--font-head); color: #fff; text-shadow: 0 2px 10px #000;
}
.cab-panel {
  margin-top: 18px; padding: 20px 18px; border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.cab-buttons { display: flex; gap: 12px; flex-wrap: wrap; min-width: 0; }
.cab-btn {
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  text-decoration: none; color: #fff; background: color-mix(in srgb, var(--accent) 76%, #000);
  font: 800 10px/1.1 var(--font-body); text-align: center; letter-spacing: .04em;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--accent) 55%, #000);
  transition: transform .08s ease, box-shadow .08s ease;
}
.cab-btn:nth-child(2n) { background: var(--txt); color: var(--panel);
                         box-shadow: 0 5px 0 color-mix(in srgb, var(--txt) 45%, #000); }
.cab-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0,0,0,.5); }
.cab-coin {
  border: 2px dashed var(--accent); border-radius: 10px; padding: 14px 18px;
  text-align: center; min-width: 0;
}
.cab-coin b { display: block; color: var(--txt); font: 800 13px/1.4 var(--font-head);
              letter-spacing: .1em; text-transform: uppercase; }
.cab-coin span { font-size: 12px; color: var(--dim); }

/* ================================================== 3 — NOW PLAYING ====== */
/* A broadcast guide: channels per console, an on-air panel, live counts. */
.np-lead { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; padding: 24px 0; }
.np-air { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-width: 0; }
.np-air img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.np-air-meta { padding: 16px 18px; background: var(--panel); }
.np-air-meta h1 { font: 900 clamp(22px, 3vw, 34px)/1.06 var(--font-head); margin: 0 0 6px; }
.np-live {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  background: #d9304a; color: #fff; border-radius: 3px;
  font: 800 11px/1 var(--font-body); letter-spacing: .14em; padding: 6px 9px;
}
.np-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: np-pulse 1.4s infinite; }
@keyframes np-pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }
.np-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.np-row {
  display: flex; gap: 12px; align-items: center; min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px;
  text-decoration: none; color: inherit;
}
.np-row img { width: 92px; height: 56px; object-fit: cover; border-radius: 4px; flex: 0 0 auto; }
.np-row .np-t { min-width: 0; }
.np-row b { display: block; font: 700 13px/1.3 var(--font-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-row span { font-size: 11px; color: var(--dim); }
.np-channels { display: grid; gap: 16px; padding: 8px 0 40px; }
.np-channel { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; min-width: 0; }
.np-chan-name {
  border-left: 4px solid var(--accent); padding-left: 10px; min-width: 0;
}
.np-chan-name b { display: block; font: 800 14px/1.2 var(--font-head); text-transform: uppercase; }
.np-chan-name span { font-size: 11px; color: var(--dim); }
.np-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; min-width: 0; }
.np-strip a { flex: 0 0 auto; width: 168px; text-decoration: none; color: inherit; }
.np-strip img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); }
.np-strip b { display: block; font: 600 11px/1.4 var(--font-body); margin-top: 5px;
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================================================== 4 — THE COLLECTION === */
/* Editorial. Big type, curated shelves, one huge still per collection. */
.coll-intro { padding: 60px 0 40px; max-width: 760px; }
.coll-intro h1 { font: 900 clamp(34px, 6vw, 68px)/0.98 var(--font-head); margin: 0 0 18px; letter-spacing: -.02em; }
.coll-intro p { font-size: 17px; line-height: 1.7; color: var(--dim); margin: 0 0 16px; }
.coll-set { border-top: 1px solid var(--line); padding: 46px 0; }
.coll-head { display: flex; gap: 16px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.coll-head h2 { font: 900 clamp(24px, 3.4vw, 40px)/1 var(--font-head); margin: 0; letter-spacing: -.01em; }
.coll-head span { color: var(--dim); font-size: 13px; }
.coll-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; margin-top: 22px; align-items: start; }
.coll-hero { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); min-width: 0; }
.coll-hero img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.coll-hero figcaption { padding: 12px 14px; background: var(--panel); font-size: 12px; color: var(--dim); }
.coll-list { display: grid; gap: 2px; min-width: 0; }
.coll-list a {
  display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 10px 12px; text-decoration: none; color: inherit; border-radius: 5px;
}
.coll-list a:hover { background: var(--panel); }
.coll-list img { width: 62px; height: 40px; object-fit: cover; border-radius: 3px; flex: 0 0 auto; }
.coll-list b { font: 600 14px/1.3 var(--font-body); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coll-list em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--dim); flex: 0 0 auto; }

/* ================================================== 5 — THE TERMINAL ===== */
/* Search-first. No band: you came for one game, type two letters. */
.term { min-height: 100vh; padding: 40px 0 60px; }
.term-bar { max-width: 860px; margin: 0 auto 12px; }
.term-bar label { display: block; font: 700 11px/1 var(--font-body); letter-spacing: .2em;
                  text-transform: uppercase; color: var(--txt); margin-bottom: 10px; }
.term-input {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  border: 2px solid var(--accent); border-radius: 6px; background: var(--panel); padding: 0 14px;
}
.term-input span { color: var(--accent); font: 800 18px/1 var(--font-head); }
.term-input input {
  flex: 1 1 auto; min-width: 0;                  /* or it will not shrink */
  background: transparent; border: 0; outline: 0; color: var(--txt);
  font: 600 19px/1 var(--font-body); padding: 18px 0;
}
.term-chips { display: flex; gap: 7px; flex-wrap: wrap; max-width: 860px; margin: 14px auto 26px; }
.term-chip {
  border: 1px solid var(--line); background: var(--panel); color: var(--dim);
  border-radius: 999px; padding: 7px 13px; cursor: pointer;
  font: 600 12px/1 var(--font-body);
}
.term-chip[aria-pressed="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.term-meta { max-width: 860px; margin: 0 auto 12px; font-size: 12px; color: var(--dim); }
.term-results { display: grid; gap: 3px; max-width: 860px; margin: 0 auto; }
.term-hit {
  display: flex; align-items: center; gap: 14px; min-width: 0;
  padding: 9px 12px; border-radius: 5px; text-decoration: none; color: inherit;
  border: 1px solid transparent;
}
.term-hit:hover { background: var(--panel); border-color: var(--line); }
.term-hit img { width: 84px; height: 52px; object-fit: cover; border-radius: 3px; flex: 0 0 auto; background: var(--bg-accent, var(--panel)); }
.term-hit .term-t { min-width: 0; }
.term-hit b { display: block; font: 600 14px/1.35 var(--font-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term-hit span { font-size: 11px; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
.term-hit em { margin-left: auto; font-style: normal; color: var(--accent); font: 700 11px/1 var(--font-body);
               letter-spacing: .1em; opacity: 0; flex: 0 0 auto; }
.term-hit:hover em { opacity: 1; }
.term-noart {
  width: 84px; height: 52px; border-radius: 3px; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--panel);
  border: 1px solid var(--line); color: var(--dim);
  font: 800 13px/1 var(--font-head); letter-spacing: .06em;
}
.term-empty { max-width: 860px; margin: 30px auto; color: var(--dim); text-align: center; }

/* ====================================================== R65 — FUSION ===== */
/* David: "fuse Design 1 and Design 4 together" — five structures marrying THE
   WALL's density with THE COLLECTION's editorial calm. Namespace: .fus-* ;
   everything else reuses .wall-* and .coll-* so the two parents stay visible
   in the child. */

/* 6 — THE CURATED WALL: three lead stills side by side, then the wall. */
.fus-leads { display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); }
.fus-leads .coll-hero img, .fus-leads .coll-hero .dz-noart { aspect-ratio: 16/10; }

/* 7 / 9 — shelved wall rows: the wall's cells, one dense row per console. */
.fus-shelfrow {
  display: grid; gap: 4px; margin-top: 16px;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
}
.fus-shelfrow .wall-cell { border-radius: 4px; }
.fus-shelfrow .dz-noart { height: 100%; aspect-ratio: auto; border-radius: 0; font-size: 16px; }
.fus-shelfrow--tight { grid-template-columns: repeat(auto-fill, minmax(122px, 1fr)); }

/* 8 — THE FRONT PAGE: edge-to-edge single-row strip between editorial beats. */
.fus-strip {
  display: grid; gap: 4px; padding: 4px;
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  overflow-x: auto;
}
.fus-strip .wall-cell { aspect-ratio: 4/3; }
.fus-strip .dz-noart { height: 100%; aspect-ratio: auto; border-radius: 0; font-size: 15px; }

/* 9 — THE INDEX: sticky editorial column + the continuous wall. */
.fus-index-wrap { display: grid; grid-template-columns: 280px 1fr; gap: 30px; padding: 40px 0 60px; }
.fus-index { position: sticky; top: 54px; align-self: start; min-width: 0; }
.fus-index h1 { font: 900 clamp(30px, 3.6vw, 46px)/1 var(--font-head); margin: 0 0 12px; letter-spacing: -.02em; }
.fus-index-list { display: grid; gap: 2px; }
.fus-index-list a {
  display: flex; align-items: baseline; gap: 10px; min-width: 0;
  padding: 8px 10px; border-radius: 5px; text-decoration: none; color: inherit;
}
.fus-index-list a:hover { background: var(--panel); }
.fus-index-list b { font: 700 14px/1.2 var(--font-head); }
.fus-index-list em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--dim); flex: 0 0 auto; }
.fus-index-wall { min-width: 0; }
.fus-aisle { padding: 10px 0 26px; scroll-margin-top: 60px; }

/* 10 — THE STILL: one full-bleed frame with the type laid over it. */
.fus-still { position: relative; overflow: hidden; background: #05060a; }
.fus-still > img { width: 100%; height: 62vh; min-height: 340px; object-fit: cover; display: block;
                   filter: saturate(.85) brightness(.75); }
.fus-still-over {
  position: absolute; inset: 0; display: grid; place-content: center; text-align: center;
  padding: 0 20px; background: radial-gradient(90% 80% at 50% 60%, transparent 30%, rgba(0,0,0,.68) 100%);
}
.fus-still-over h1 { font: 900 clamp(30px, 5.4vw, 62px)/1.02 var(--font-head); color: #fff;
                     margin: 0 0 20px; text-shadow: 0 4px 30px rgba(0,0,0,.8); letter-spacing: -.02em; }
.fus-still-over .dz-eyebrow { color: #fff; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .np-lead, .coll-body { grid-template-columns: 1fr; }
  .np-channel { grid-template-columns: 1fr; }
  .wall-over { margin: -60px 16px 0; }
  .fus-leads { grid-template-columns: 1fr; }
  .fus-index-wrap { grid-template-columns: 1fr; }
  .fus-index { position: static; }
  .fus-index-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .fus-strip { grid-template-columns: repeat(4, minmax(110px, 1fr)); }
  .fus-still > img { height: 48vh; }
}

/* ============ R67.3 — THE OFFICIAL SEARCH RESULTS PAGE (Design 9 base) ==== */
/* The one "most direct weighted result": a big editorial lead card. */
.search-lead { display: grid; grid-template-columns: minmax(240px, 460px) 1fr; gap: 22px; align-items: center; text-decoration: none; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 18px; transition: border-color .15s; }
.search-lead:hover { border-color: var(--accent, #8b5cf6); }
.search-lead-art img, .search-lead-art .dz-noart { width: 100%; border-radius: 10px; display: block; }
.search-lead-body { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.search-lead-body > b { font-size: clamp(20px, 2.6vw, 32px); color: #fff; line-height: 1.15; }
.search-lead-meta { color: var(--dim, #9aa); font-size: 14px; }
@media (max-width: 720px) { .search-lead { grid-template-columns: 1fr; } }
.fus-index-wall .wall-cell { text-decoration: none; }
