/* BREAKBONE SHELL, the V5 consistency + per-issue token layer (23 Jul 2026,
   Opus-instance). Loaded AFTER breakbone.css on every carried content page so
   the ~24 longreads, editorials, interviews, reviews and feature pages wear the
   SAME design system as the seven React pages, ending the two-design-system
   split that made the site read vibecoded.

   How it works, in one line: it re-skins the warm-brown V3 palette to the V5
   neutral ink world, restyles the nav and footer chrome to match the React
   HudNav/PageShell, and exposes a small PER-ISSUE token set (accent, grain,
   masthead) so every issue page is visually distinct off ONE shared shell
   rather than a bespoke rebuild. Approach 1 of WEBSITE_PERISSUE_BRAINSTORM_23JUL.md
   for the archive, plus a bespoke flagship hero (approach 3) on part-1.

   Brand note for his later adjustment: the per-issue accents are read as
   risograph spot inks (the classic photocopier-zine device), so the "one red
   held" law is not broken; the brand red #ff0f0f still owns the STORE pill and
   the bill bands. Dial any accent back by editing its [data-issue] block below. */

/* ---- 1. RE-SKIN THE PALETTE TO THE V5 INK WORLD ----------------------------
   breakbone.css ships a warm-brown paper world (--paper #211d18, --ink #ece4d4).
   The React pages use a neutral near-black (--ink #0d0d0d, --bone #e8e4dc). We
   override the V3 token VALUES here so all 24 pages match the React pages with a
   single file. Names stay V3 (--paper* = surfaces, --ink = type) to avoid
   touching 40KB of downstream rules. */
:root {
  --paper-deep: #0d0d0d;   /* page ground, == V5 --ink */
  --paper:      #141414;   /* sheet surface */
  --paper-bright: #1b1b1b; /* bright sheet */
  --ink:        #e8e4dc;   /* body type, == V5 --bone */
  --ink-soft:   #9e9b96;   /* furniture type, neutralised off the warm #b3a996 tan (25 Jul) */
  --red:        #ff0f0f;   /* brand red, unchanged */
  --red-deep:   #9e1015;

  /* the V5 modular type furniture, made available to the shell chrome so the
     nav and footer measure identically to the React pages */
  --fs-1: clamp(12px, 0.85vw, 13px);
  --fs-2: clamp(15px, 1.2vw, 16px);
  --fs-3: clamp(19px, 2vw, 22px);
  --shell-mono: 'IBM Plex Mono', 'Courier New', monospace;

  /* DEFAULT per-issue token set (brand red). Each [data-issue] block overrides. */
  --issue-accent: #ff0f0f;
  --issue-grain: 0.5;
  --issue-mast-ls: -0.05em;
}

/* the neutral wall: strip the warm radial paste-stains, keep a cool grain wash */
body.wall {
  background:
    radial-gradient(900px 480px at 15% 4%, rgba(255,255,255,.05), transparent 60%),
    radial-gradient(700px 520px at 88% 30%, rgba(232,228,220,.04), transparent 55%),
    var(--paper-deep) !important;
}
.grain { opacity: var(--issue-grain) !important; }

/* ---- 2. THE SHARED NAV, matched to the React HudNav ------------------------
   The migration script replaces the old inline nav with <nav class="bbnav">.
   Sticky (no JS), ink-translucent + blur, mono links, the one red STORE pill. */
.bbnav {
  position: sticky; top: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  height: auto; min-height: 60px;
  padding: 10px clamp(16px, 3vw, 40px);
  background: rgba(13,13,13,0.82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(232,228,220,0.08);
}
.bbnav .bbnav-mark {
  font-family: var(--blk); font-size: var(--fs-3); letter-spacing: -0.02em;
  color: var(--ink); text-decoration: none; text-transform: uppercase;
}
.bbnav .bbnav-links {
  display: flex; align-items: center; gap: 9px 16px; flex-wrap: wrap; margin-left: auto;
}
.bbnav .bbnav-links a {
  font-family: var(--shell-mono); font-size: var(--fs-1);
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; opacity: 0.9;
  transition: color 180ms cubic-bezier(.22,1,.36,1), opacity 180ms;
}
.bbnav .bbnav-links a:hover,
.bbnav .bbnav-links a[aria-current] { color: var(--issue-accent); opacity: 1; }
.bbnav .bbnav-links a.bbnav-store {
  font-family: var(--blk); background: var(--red); color: var(--ink);
  border-radius: 999px; padding: 8px 18px; letter-spacing: 0.02em; opacity: 1;
  transition: transform 180ms cubic-bezier(.22,1,.36,1);
}
.bbnav .bbnav-links a.bbnav-store:hover { color: var(--ink); transform: translateY(-2px) rotate(-1deg); }

/* a hairline of the issue accent under the mast, the cheapest per-issue tell */
.bbnav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--issue-accent); opacity: 0.85;
}
.bbnav { position: sticky; } /* keep after the ::after abs context note */

/* ---- 3. PER-ISSUE FURNITURE ACCENTS ----------------------------------------
   The accent recolours secondary furniture only (kickers, spine running-head,
   masthead accent glyph, in-body link underline, date marks). The brand red is
   retained for bill bands and the STORE pill. */
[data-issue] .kick b { color: var(--issue-accent); }
[data-issue] .spine,
[data-issue] .runhead { color: var(--issue-accent); }
[data-issue] .masthead .bone { color: var(--issue-accent); }
[data-issue] .datemark { color: var(--issue-accent); }
[data-issue] .read a:not(.stamp)::after { background: var(--issue-accent); }
[data-issue] .dymo--accent { background: var(--issue-accent); color: var(--paper-bright); }
[data-issue] .stamp--accent { border-color: var(--issue-accent); color: var(--issue-accent); }

/* the issue token sets. Riso spot inks, one per issue, restrained. */
[data-issue="part-1"] { --issue-accent: #ff0f0f; --issue-grain: 0.58; } /* the Saints single, red */
[data-issue="part-2"] { --issue-accent: #1E6FB8; --issue-grain: 0.5; }  /* riso blue, radio silence */
[data-issue="part-3"] { --issue-accent: #0E9C63; --issue-grain: 0.5; }  /* riso green */
[data-issue="part-4"] { --issue-accent: #E8631C; --issue-grain: 0.52; } /* riso orange */
[data-issue="part-5"] { --issue-accent: #E23C7B; --issue-grain: 0.5; }  /* riso fluoro pink, the after */
[data-issue="club-76"] { --issue-accent: #ff0f0f; --issue-grain: 0.58; }
[data-issue="punk-in-the-park"] { --issue-accent: #E8631C; --issue-grain: 0.55; }
[data-issue="where-we-belong"] { --issue-accent: #E23C7B; --issue-grain: 0.52; }
[data-issue="interviews"] { --issue-accent: #2FA7C4; --issue-grain: 0.45; } /* cyan Q&A register */
[data-issue="reviews"] { --issue-accent: #B89B6A; --issue-grain: 0.45; }    /* kraft index register */
[data-issue="editorial"] { --issue-accent: #B89B6A; --issue-grain: 0.5; }   /* shared editorial register */
[data-issue="archive"] { --issue-accent: #ff0f0f; --issue-grain: 0.5; }

/* ---- 4. THE SHARED FOOTER, matched to the React PageShell ------------------
   breakbone.css late-overrides .foot with an art-venue-wall photo ground; we
   pin it back to the flat neutral register-calm the React footer uses. */
.foot {
  background: var(--paper) !important; background-image: none !important;
  color: var(--ink) !important; border-top: 1px solid rgba(232,228,220,0.1);
}
.foot .mono { color: var(--ink-soft) !important; }
.foot a { color: var(--ink) !important; border-bottom: 1.5px solid var(--issue-accent); }
.foot .bb span { color: var(--red) !important; }

/* ---- 5. THE BESPOKE FLAGSHIP HERO (part-1 only, approach 3) -----------------
   A full-bleed cover-art hero that breaks the reading grid for the flagship
   chapter. The masthead sits ON the cover art (surface behind it, never on
   empty black, per the surface law), duotoned to ink+accent. The other parts
   keep the standard torn-sheet opener, so the flagship reads distinct. */
.flaghero {
  position: relative; min-height: min(88svh, 760px);
  display: grid; align-items: end;
  margin: 0 0 clamp(20px, 4vw, 40px);
  overflow: hidden; isolation: isolate;
}
.flaghero-art { position: absolute; inset: 0; z-index: 0; }
.flaghero-art img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(0.62);
}
.flaghero::before { /* accent duotone wash + bottom scrim, keeps the mast legible */
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(13,13,13,0.2) 0%, rgba(13,13,13,0.15) 45%, rgba(13,13,13,0.9) 100%),
    linear-gradient(0deg, color-mix(in srgb, var(--issue-accent) 22%, transparent), transparent 60%);
  mix-blend-mode: normal;
}
.flaghero-copy {
  position: relative; z-index: 2;
  padding: clamp(20px, 5vw, 64px) clamp(16px, 4vw, 56px);
  max-width: min(1240px, 100%); margin: 0 auto; width: 100%;
}
.flaghero-mast {
  font-family: var(--blk); text-transform: lowercase;
  /* capped so the widest line ("stranded") never clips the container edge */
  font-size: clamp(46px, 10.5vw, 132px); line-height: 0.82;
  letter-spacing: var(--issue-mast-ls); color: #faf7ef; margin: 6px 0 10px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.45);
  overflow-wrap: break-word;
}
.flaghero-sub {
  font-family: var(--shell-mono); font-size: var(--fs-2);
  letter-spacing: 0.02em; color: var(--ink); max-width: 52ch; opacity: 0.92;
}
.flaghero-cue {
  display: inline-block; margin-top: clamp(14px, 3vw, 26px);
  font-family: var(--shell-mono); font-size: var(--fs-1); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--issue-accent);
}
.flaghero-cue::before { content: ""; display: inline-block; width: 34px; height: 2px;
  background: var(--issue-accent); vertical-align: middle; margin-right: 10px; }

@media (prefers-reduced-motion: reduce) {
  .bbnav .bbnav-links a, .bbnav .bbnav-links a.bbnav-store { transition: none; }
}

/* ---- 6. FLAGSHIP FULL-BLEED READING FRAME (part-1..5), 25 Jul 2026 ----------
   The V3 parts shipped a ~760px centred reading column on the ink body, so a
   juror clicking /history (a full-bleed V5 page) into /part-1 hit a hard
   letterbox and felt a system change. This block matches the V5 composition
   WITHOUT touching a word of prose: the reading frame widens to the V5 --mx
   frame and picks up the V5 section padding, the prose sheets keep a real
   reading measure, and the hero plus the billboard plates bleed to the true
   viewport edge so the page reads full-bleed like every React page. Scoped to
   part-1..5 only, so no other carried page shifts. Reverse: delete section 6. */
body.wall { overflow-x: clip; } /* guard the edge-bleed against a scrollbar gutter */

[data-issue^="part-"] .read {
  --pad-flag: clamp(20px, 6vw, 96px);
  max-width: min(1240px, 100%); /* == the V5 --mx frame, up from the 760px letterbox */
  width: 100%;
  margin: 0 auto;
  padding: clamp(26px, 5vh, 60px) var(--pad-flag);
}
/* prose sheets keep a comfortable reading measure, centred in the wide frame */
[data-issue^="part-"] .read > .sheet {
  max-width: min(800px, 100%);
  margin-inline: auto;
}
/* the hero and the billboard plates punch out to the full viewport edge; this
   is the move that kills the letterbox and matches the V5 full-bleed rhythm */
[data-issue^="part-"] .read > .flaghero,
[data-issue^="part-"] .read > .bill {
  width: auto;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
