/* Hallmark · genre: atmospheric · macrostructure: Manifesto (poster-led; replaces the old Photographic) · theme: custom Samurai BLAQUE (black lacquer + BLAQUE RED + bone paper)
 * tone: brutalist / raw riso · anchor hue: 26 (blaque red) · enrichment: Tier A code-drawn world (canvas) · nav: N9 edge-aligned (pill only) · footer: Ft5 statement
 * pre-emit critique: P5 H4 E4 S4 R4 V5
 * One secondary hue exists on purpose: cyan, reserved for the departure bloom and the player's link back to the GMP world.
 * Palette mirrors public/tokens.css (still used by login.html and featured-cut.html). Fonts are self-hosted (OFL): no render-blocking @import.
 * NOTE for mergers: .slash* is the shared "katana slash" language; gmp-transition.mjs on the GMP side must use the same geometry
 * (--cut-y0 / --cut-y1) and timings, only the bloom colour and world card text differ. */

@font-face { font-family: "Anton"; src: url(/assets/fonts/anton-latin.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url(/assets/fonts/familjen-grotesk-latin.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/assets/fonts/jetbrains-mono-latin.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  /* colour: tinted blacks, never #000 / #fff */
  --color-paper: oklch(9.5% 0.022 24);
  --color-paper-2: oklch(13% 0.03 24);
  --color-paper-3: oklch(18% 0.045 25);
  --color-ink: oklch(87% 0.035 78);
  --color-ink-strong: oklch(94.6% 0.013 47.8);
  --color-muted: oklch(72% 0.03 40);
  --color-subtle: oklch(55% 0.03 38);
  --color-rule: oklch(34% 0.06 26);
  --color-bone: oklch(93% 0.032 82);
  --color-bone-2: oklch(86% 0.04 78);
  --color-accent: oklch(56.4% 0.196 26.2);
  --color-accent-bright: oklch(63.4% 0.196 24.7);
  --color-accent-ink: oklch(98% 0.01 80);
  --color-blood: oklch(36% 0.15 26);
  --color-ember: oklch(72% 0.19 46);
  --color-focus: oklch(82% 0.15 85);
  --color-cyan: oklch(86% 0.13 205);
  --color-cover: #1a040b; /* = gmp-worlds.json samurai.cover on the GMP side: the cross-site handoff has no colour seam */
  --color-ok: oklch(80% 0.13 160);

  --font-display: "Anton", Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  --font-body: "Familjen Grotesk", "Trebuchet MS", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --space-xs: 0.5rem; --space-sm: 0.75rem; --space-md: 1rem; --space-lg: 1.5rem;
  --space-xl: 2.5rem; --space-2xl: 4rem; --space-3xl: 6rem;
  --gutter: clamp(1rem, 4.5vw, 4rem);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms; --dur-short: 220ms; --dur-long: 420ms;

  /* the cut: one diagonal shared by every slash (hero split, page transitions) */
  --cut-y0: 82%; --cut-y1: 18%;

  /* player vars, written by gmp-player.mjs on :root while music plays */
  --gmp-bass: 0; --gmp-mid: 0; --gmp-high: 0; --gmp-beat: 0;

  --z-world: 0; --z-hero: 2; --z-front: 3; --z-ui: 4; --z-vignette: 7; --z-grain: 8; --z-pill: 60; --z-slash: 100;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--color-paper); color-scheme: dark; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; min-height: 100svh; overflow-x: clip;
  background: var(--color-paper); color: var(--color-ink-strong);
  font: 400 1rem/1.5 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
::selection { background: var(--color-accent); color: var(--color-accent-ink); }
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 1rem; top: 1rem; z-index: 200; padding: .8rem 1rem; background: var(--color-bone); color: var(--color-paper); font: 600 .8rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; transform: translateY(-200%); }
.skip:focus-visible { transform: none; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }

/* ───────── the world (fixed; everything else scrolls over it) ───────── */
.world { position: fixed; inset: 0; z-index: var(--z-world); overflow: hidden; pointer-events: none; background: var(--color-paper); }
.world__sky { position: absolute; inset: 0;
  background:
    radial-gradient(120% 70% at 30% 78%, oklch(52% 0.2 30 / .55), transparent 62%),
    linear-gradient(180deg, oklch(8% 0.02 20) 0%, oklch(15% 0.06 24) 38%, oklch(30% 0.14 27) 66%, oklch(46% 0.19 30) 80%, oklch(14% 0.05 22) 80.2%, oklch(8% 0.02 22) 100%); }
.world__glow, .world__sun { position: absolute; left: 0; top: 0; aspect-ratio: 1; }
/* Positioned with transform only: the boot script writes --sun-x/y/r before first paint and the scene re-writes the same values,
   so neither can cause a layout shift (CLS 0.53 on the first Lighthouse run came from left/top/margin here). */
.world__glow { width: calc(var(--sun-r, 34vmin) * 5.2); border-radius: 50%; background: radial-gradient(circle, oklch(62% 0.21 32 / .55) 0, oklch(50% 0.19 28 / .22) 34%, transparent 62%);
  opacity: calc(.62 + var(--gmp-bass) * .3); will-change: transform, opacity;
  transform: translate(calc(var(--sun-x, 30vw) - var(--sun-r, 34vmin) * 2.6), calc(var(--sun-y, 52vh) - var(--sun-r, 34vmin) * 2.6)) scale(calc(1 + var(--gmp-bass) * .07)); }
/* CSS sun first (no-JS and first paint); world-scene.mjs upgrades it to an ink-torn canvas sprite */
.world__sun { width: calc(var(--sun-r, 34vmin) * 2); border-radius: 50%; background: radial-gradient(circle at 42% 38%, oklch(66% 0.22 38), var(--color-accent) 52%, oklch(34% 0.15 26) 100%); will-change: transform;
  transform: translate(calc(var(--sun-x, 30vw) - var(--sun-r, 34vmin)), calc(var(--sun-y, 52vh) - var(--sun-r, 34vmin))) scale(calc(1 + var(--gmp-bass) * .045 + var(--gmp-beat) * .02)); }
.world__sun.is-ink { background: none; border-radius: 0; }
.world__sun canvas { width: 100%; height: 100%; }
.world__back, .world__front { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.world__back { z-index: calc(var(--z-world) + 1); }
.world__front { z-index: var(--z-front); }
.js .world__back, .js .world__front { opacity: 0; transition: opacity 600ms var(--ease-out); }
.world-ready .world__back, .world-ready .world__front { opacity: 1; }

/* print texture: bone speckle + black dirt, no blend modes (cheap to composite) */
.grain, .vignette { position: fixed; pointer-events: none; }
.grain { inset: -12%; z-index: var(--z-grain); opacity: .44; animation: grain 1.4s steps(4) infinite;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .96  0 0 0 0 .9  0 0 0 0 .84  0 0 0 1.5 -.82'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='2' seed='7' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.6 -.86'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 160px 160px, 200px 200px; background-position: 0 0, 53px 71px; }
@keyframes grain { 0% { transform: translate(0, 0); } 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -2%); } 100% { transform: translate(0, 0); } }
.vignette { inset: 0; z-index: var(--z-vignette); background: radial-gradient(120% 90% at 50% 45%, transparent 55%, oklch(5% 0.02 22 / .78) 100%); }

/* ───────── buttons ───────── */
.btn, .action, .linkbtn { position: relative; z-index: 2; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 3rem; padding: 0 1.4rem; white-space: nowrap;
  border: 2px solid var(--color-bone); background: var(--color-bone); color: var(--color-paper); cursor: pointer; text-decoration: none;
  font: 400 1.25rem/1 var(--font-display); letter-spacing: .07em; text-transform: uppercase;
  box-shadow: .3rem .3rem 0 var(--color-accent);
  transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out), background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: .45rem .45rem 0 var(--color-accent); }
.btn:active { transform: translate(.3rem, .3rem); box-shadow: 0 0 0 var(--color-accent); transition-duration: 60ms; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: progress; transform: none; box-shadow: .3rem .3rem 0 var(--color-rule); }
.btn[data-state="error"] { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.btn--ghost { background: transparent; color: var(--color-ink-strong); box-shadow: .3rem .3rem 0 var(--color-rule); }
.btn--ghost:hover { background: var(--color-bone); color: var(--color-paper); }
.btn--paper { background: var(--color-paper); color: var(--color-bone); border-color: var(--color-paper); }
.linkbtn { background: none; border: 0; padding: .6rem 0; min-height: 2.75rem; cursor: pointer; color: var(--color-bone-2); font: 500 .72rem/1.2 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: underline; text-underline-offset: .35em; text-decoration-thickness: 1px; }
.linkbtn:hover { color: var(--color-ink-strong); }
.mono { font: 500 .72rem/1.3 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; }

/* ───────── hero / gate ───────── */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; padding: clamp(4.5rem, 12vh, 8rem) var(--gutter) clamp(1.5rem, 5vh, 3.5rem); }
.hero__stack { position: relative; z-index: var(--z-hero); align-self: start; width: max-content; max-width: 100%; font: 400 min(18.5vw, 35vh)/.83 var(--font-display); letter-spacing: -.004em; text-transform: uppercase; }
.hero__title { position: relative; margin: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; width: max-content; max-width: 100%; }
.hero__stack .cut { display: block; }
.hero__stack .cut--b { position: absolute; inset: 0; }
.cut--a { clip-path: polygon(0 0, 100% 0, 100% var(--cut-y1), 0 var(--cut-y0)); transform: translateX(calc(var(--gmp-bass) * -1.1vw - .22vw)); }
.cut--b { clip-path: polygon(0 var(--cut-y0), 100% var(--cut-y1), 100% 100%, 0 100%); transform: translateX(calc(var(--gmp-bass) * 1.1vw + .22vw)); }
.hero__stack .ln { display: block; white-space: nowrap; color: var(--color-bone); text-shadow: .035em .03em 0 var(--color-accent); }
.hero__stack .ln--red { text-shadow: .04em .035em 0 var(--color-paper), .075em .06em 0 var(--color-accent); margin-top: .02em; }
.hero__tag { position: relative; z-index: var(--z-ui); align-self: start; height: max-content; margin: clamp(.8rem, 2vh, 1.4rem) 0 0; max-width: 36rem; width: max-content; padding: .5rem .8rem .45rem; background: var(--color-paper); color: var(--color-bone); border-left: 4px solid var(--color-accent); transform: rotate(-.8deg); }
.hero__ui { position: relative; z-index: var(--z-ui); align-self: end; display: grid; justify-items: start; gap: .9rem; padding-top: 2rem; }
.hero__caption { margin: 0; color: var(--color-bone); max-width: 34rem; text-shadow: 0 0 .5rem var(--color-paper), 0 0 1.2rem var(--color-paper), 0 1px 2px var(--color-paper); }
.hero__nojs { position: relative; z-index: var(--z-ui); align-self: end; display: flex; flex-wrap: wrap; gap: 1rem 1.2rem; padding-top: 2rem; }
.enter { min-height: clamp(4rem, 9vh, 5.4rem); padding: 0 clamp(1.6rem, 4vw, 2.8rem); font-size: clamp(2.1rem, 5.2vh, 3.3rem); gap: 1rem; box-shadow: .45rem .45rem 0 var(--color-accent); }
.enter__arrow { display: inline-block; font-family: var(--font-body); font-weight: 700; transition: transform var(--dur-short) var(--ease-out); }
.enter:hover .enter__arrow { transform: translateX(.3rem); }

@media (max-aspect-ratio: 1/1) { .hero__stack { font-size: min(27vw, 26vh); } }

/* gate state: JS adds .gated before first paint (head script); gate.js removes it on ENTER; a safety timer removes it if gate.js never boots */
html:not(.js) .js-only { display: none; }
html.gated, html.gated body { overflow: hidden; height: 100%; }
html.gated main, html.gated .site-foot { visibility: hidden; }
html.gated .hero__nojs, html.entered .hero__nojs { display: none; }
.js .hero__title, .js .hero__tag, .js .hero__ui { animation: hero-in 520ms var(--ease-out) both; }
.js .hero__tag { animation-delay: 90ms; } .js .hero__ui { animation-delay: 180ms; }
@keyframes hero-in { from { transform: translateY(14px); } to { transform: none; } }
/* arrival from another world: the gate appears AFTER the slash has opened (<=700ms) */
html[data-arrive] .hero__title { animation-delay: 380ms; } html[data-arrive] .hero__tag { animation-delay: 440ms; } html[data-arrive] .hero__ui { animation-delay: 500ms; }

/* the hero split on ENTER (clones live here) */
.cutlayer { position: fixed; inset: 0; z-index: calc(var(--z-slash) - 10); pointer-events: none; overflow: hidden; }
.cutlayer__a, .cutlayer__b { position: absolute; inset: 0; overflow: hidden; will-change: transform, opacity; }
.cutlayer__a { clip-path: polygon(0 0, 100% 0, 100% var(--cut-y1), 0 var(--cut-y0)); animation: cut-a 640ms var(--ease-in-out) both; }
.cutlayer__b { clip-path: polygon(0 var(--cut-y0), 100% var(--cut-y1), 100% 100%, 0 100%); animation: cut-b 640ms var(--ease-in-out) both; }
@keyframes cut-a { 0%, 12% { transform: none; opacity: 1; } 100% { transform: translate(-7vw, -62vh); opacity: 0; } }
@keyframes cut-b { 0%, 12% { transform: none; opacity: 1; } 100% { transform: translate(7vw, 62vh); opacity: 0; } }
.cutlayer .slash__line { z-index: 3; animation: sl-draw-enter 640ms linear both; }
@keyframes sl-draw-enter { 0%, 2% { clip-path: inset(0 0 0 100%); opacity: 1; } 16%, 40% { clip-path: inset(0 0 0 0); opacity: 1; } 78%, 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
.cutlayer .slash__line .l3 { stroke: var(--color-accent-bright); stroke-opacity: .3; }
.cutlayer .slash__line .l2 { stroke: var(--color-accent-bright); stroke-opacity: .65; }
.cutlayer .slash__line .l1 { stroke: var(--color-bone); }
.is-gone { display: none !important; }
.cutlayer__a .hero__title, .cutlayer__a .hero__tag, .cutlayer__a .hero__ui, .cutlayer__b .hero__title, .cutlayer__b .hero__tag, .cutlayer__b .hero__ui { animation: none; }
.cutlayer .hero { position: absolute; inset: 0; }

/* ───────── the katana slash overlay (page transitions) ───────── */
.slash { position: fixed; inset: 0; z-index: var(--z-slash); pointer-events: none; display: none; contain: strict; --bloom: var(--color-accent-bright); }
html[data-arrive] .slash, html[data-leave] .slash { display: block; }
html[data-leave="cyan"] .slash { --bloom: var(--color-cyan); }
.slash__a, .slash__b { position: absolute; inset: 0; background: var(--color-cover); will-change: transform; }
.slash__a { clip-path: polygon(0 0, 100% 0, 100% var(--cut-y1), 0 var(--cut-y0)); }
.slash__b { clip-path: polygon(0 var(--cut-y0), 100% var(--cut-y1), 100% 100%, 0 100%); }
.slash__line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; clip-path: inset(0 0 0 100%); }
.slash__line line { fill: none; stroke-linecap: butt; }
.slash__line .l3 { stroke: var(--bloom); stroke-width: calc(26px + var(--gmp-beat) * 14px); stroke-opacity: .22; }
.slash__line .l2 { stroke: var(--bloom); stroke-width: 7px; stroke-opacity: .6; }
.slash__line .l1 { stroke: var(--color-bone); stroke-width: calc(2px + var(--gmp-beat) * 2px); }
.slash__bloom { position: absolute; left: 50%; top: 50%; width: 130vmax; aspect-ratio: 1; margin: -65vmax 0 0 -65vmax; border-radius: 50%; opacity: 0; transform: scale(.3);
  background: radial-gradient(circle, color-mix(in oklch, var(--bloom) 75%, transparent) 0, color-mix(in oklch, var(--bloom) 30%, transparent) 24%, transparent 58%); will-change: transform, opacity; }
.slash__card { position: absolute; left: 50%; top: 50%; margin: 0; transform: translate(-50%, -50%); opacity: 0; display: flex; flex-direction: column; align-items: center; gap: .8rem; white-space: nowrap; color: var(--color-bone);
  padding: 1.1rem clamp(1.2rem, 4vw, 2.4rem) 1.2rem; background: var(--color-cover); }
.slash__card .k { font: 500 clamp(.66rem, 2.4vw, .82rem)/1 var(--font-mono); letter-spacing: .38em; text-indent: .38em; text-transform: uppercase; color: var(--color-accent-bright); }
.slash__card .l { font: 400 clamp(1.7rem, 6.4vw, 3.2rem)/.95 var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.slash__card::after { content: ""; width: min(7rem, 30vw); height: 3px; background: var(--color-accent); }
html[data-arrive="self"] .slash__card, html[data-arrive="self"] .slash__bloom { display: none; }

/* ARRIVAL (700 ms, pure CSS so a late/failed script can never leave the page covered) */
html[data-arrive] .slash__a { animation: sl-a-in 700ms both; } html[data-arrive] .slash__b { animation: sl-b-in 700ms both; }
html[data-arrive] .slash__line { animation: sl-draw-in 700ms linear both; }
html[data-arrive] .slash__bloom { animation: sl-bloom-in 700ms ease-out both; }
html[data-arrive] .slash__card { animation: sl-card 700ms both; }
html[data-arrive] .slash { animation: sl-gone 1ms linear 700ms both; }
@keyframes sl-a-in { 0%, 20% { transform: none; animation-timing-function: cubic-bezier(.7, 0, .2, 1); } 86%, 100% { transform: translate(-8vw, -112vh); } }
@keyframes sl-b-in { 0%, 20% { transform: none; animation-timing-function: cubic-bezier(.7, 0, .2, 1); } 86%, 100% { transform: translate(8vw, 112vh); } }
@keyframes sl-draw-in { 0%, 8% { clip-path: inset(0 0 0 100%); opacity: 1; } 22%, 46% { clip-path: inset(0 0 0 0); opacity: 1; } 72%, 100% { clip-path: inset(0 0 0 0); opacity: 0; } }
@keyframes sl-bloom-in { 0%, 14% { opacity: 0; transform: scale(.3); } 28% { opacity: .85; } 100% { opacity: 0; transform: scale(1.15); } }
@keyframes sl-card { 0%, 84% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -54%); } }
@keyframes sl-gone { to { visibility: hidden; } }

/* DEPARTURE (560 ms: halves close along the cut, seam flashes, world-coloured bloom, then the page navigates) */
html[data-leave] .slash__a { animation: sl-a-out 560ms both; } html[data-leave] .slash__b { animation: sl-b-out 560ms both; }
html[data-leave] .slash__line { animation: sl-draw-out 560ms linear both; }
html[data-leave] .slash__bloom { animation: sl-bloom-out 560ms ease-out both; }
@keyframes sl-a-out { 0% { transform: translate(-8vw, -112vh); animation-timing-function: cubic-bezier(.2, .8, .25, 1); } 52%, 100% { transform: none; } }
@keyframes sl-b-out { 0% { transform: translate(8vw, 112vh); animation-timing-function: cubic-bezier(.2, .8, .25, 1); } 52%, 100% { transform: none; } }
@keyframes sl-draw-out { 0%, 48% { clip-path: inset(0 0 0 100%); opacity: 1; } 66%, 100% { clip-path: inset(0 0 0 0); opacity: 1; } }
@keyframes sl-bloom-out { 0%, 50% { opacity: 0; transform: scale(.25); } 68% { opacity: .9; } 100% { opacity: .75; transform: scale(1.2); } }

/* ───────── sections after ENTER ───────── */
main { position: relative; z-index: var(--z-ui); }
.sec { position: relative; padding: clamp(3rem, 9vh, 6rem) var(--gutter); }
.label { margin: 0 0 .9rem; color: var(--color-accent-bright); }
.h-xl { margin: 0; font: 400 clamp(3.2rem, 12.5vw, 11rem)/.86 var(--font-display); text-transform: uppercase; letter-spacing: -.004em; overflow-wrap: anywhere; }
.h-lg { margin: 0; font: 400 clamp(2.4rem, 7.4vw, 6.4rem)/.9 var(--font-display); text-transform: uppercase; overflow-wrap: anywhere; }
.riso { color: var(--color-bone); text-shadow: .04em .035em 0 var(--color-accent); }
.lede { position: relative; z-index: 1; margin: 1.2rem 0 0; max-width: 34rem; color: var(--color-ink-strong); font-size: clamp(1rem, 2.4vw, 1.2rem); text-shadow: 0 0 .5rem var(--color-paper), 0 0 1.4rem var(--color-paper), 0 1px 2px var(--color-paper); }

.now { min-height: 100svh; display: grid; align-content: start; padding-top: clamp(5.5rem, 15vh, 9.5rem);
  background: linear-gradient(90deg, oklch(9.5% 0.022 24 / .6) 0, oklch(9.5% 0.022 24 / .22) 55%, transparent 80%); }
/* after ENTER the section content rises in AFTER the halves have started to part */
html.entered .now > * { animation: now-in 560ms var(--ease-out) 320ms both; }
html.entered .now > *:nth-child(2) { animation-delay: 380ms; } html.entered .now > *:nth-child(3) { animation-delay: 440ms; } html.entered .now > *:nth-child(4) { animation-delay: 500ms; } html.entered .now > *:nth-child(5) { animation-delay: 560ms; }
@keyframes now-in { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
html[data-enter="fade"] .now { animation: sl-fade-in 150ms linear both; }
#now-title:focus-visible { outline-offset: 10px; }
.now__row { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem 2rem; margin-top: 1.6rem; }
.meter { display: flex; align-items: flex-end; gap: .35rem; height: 3.4rem; }
.meter i { display: block; width: 1rem; height: 100%; background: var(--color-accent-bright); transform-origin: bottom; transform: scaleY(.08); will-change: transform; }
.meter i:nth-child(1) { transform: scaleY(min(1, calc(.08 + var(--gmp-bass) * .92))); }
.meter i:nth-child(2) { transform: scaleY(min(1, calc(.08 + var(--gmp-mid) * 1.1))); background: var(--color-ember); }
.meter i:nth-child(3) { transform: scaleY(min(1, calc(.08 + var(--gmp-high) * 1.5))); background: var(--color-bone); }
.now__time { color: var(--color-bone); min-width: 9ch; }
.seek { width: min(28rem, 100%); height: 6px; background: var(--color-rule); overflow: hidden; }
.seek i { display: block; width: 100%; height: 100%; background: var(--color-bone); transform-origin: left; transform: scaleX(0); }

/* torn bone paper: the raw contrast against the dark world */
.paper { position: relative; background: var(--color-bone); color: var(--color-paper); transform: rotate(-.7deg); margin: 0 calc(var(--gutter) * -.3);
  padding: clamp(3.5rem, 9vh, 6rem) calc(var(--gutter) * 1.3);
  clip-path: polygon(0 14px, 3% 6px, 6% 13px, 10% 3px, 15% 11px, 19% 4px, 24% 12px, 29% 2px, 33% 10px, 38% 5px, 43% 13px, 48% 3px, 53% 11px, 58% 6px, 63% 14px, 68% 4px, 73% 12px, 78% 2px, 83% 10px, 88% 5px, 93% 13px, 97% 4px, 100% 10px, 100% calc(100% - 12px), 96% calc(100% - 4px), 91% calc(100% - 13px), 86% calc(100% - 3px), 80% calc(100% - 11px), 75% calc(100% - 5px), 69% calc(100% - 14px), 64% calc(100% - 4px), 58% calc(100% - 12px), 52% calc(100% - 2px), 46% calc(100% - 10px), 40% calc(100% - 6px), 34% calc(100% - 13px), 28% calc(100% - 3px), 22% calc(100% - 11px), 17% calc(100% - 5px), 11% calc(100% - 14px), 5% calc(100% - 4px), 0 calc(100% - 9px)); }
.paper .label { color: var(--color-blood); }
.paper .riso { color: var(--color-paper); text-shadow: .04em .035em 0 var(--color-accent); }
.paper p { max-width: 36rem; font-size: clamp(1rem, 2.4vw, 1.15rem); }
.paper__facts { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin: 1.4rem 0 2rem; padding: 0; list-style: none; color: var(--color-blood); }
.paper .btn { background: var(--color-paper); color: var(--color-bone); border-color: var(--color-paper); }
.paper .btn:hover { background: var(--color-blood); border-color: var(--color-blood); }

.rows { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--color-bone); }
.rows a { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .35em .1em; border-bottom: 2px solid var(--color-bone); text-decoration: none;
  font: 400 clamp(2.2rem, 8.5vw, 6rem)/1 var(--font-display); text-transform: uppercase; color: var(--color-ink-strong);
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), padding var(--dur-short) var(--ease-out); }
.rows a:hover, .rows a:focus-visible { background: var(--color-accent); color: var(--color-accent-ink); padding-inline: .3em; }
.rows .arr { font: 700 .45em/1 var(--font-body); }
.contact-line { position: relative; z-index: 1; margin: 1.6rem 0 0; color: var(--color-bone); }
.contact-line a { text-underline-offset: .3em; }

.portal { max-width: 30rem; margin-top: 2rem; padding: 1.6rem; border: 2px solid var(--color-bone); background: oklch(9.5% 0.022 24 / .82); }
.portal h3 { margin: 0 0 .4rem; font: 400 2rem/1 var(--font-display); text-transform: uppercase; }
.portal p { margin: 0 0 1.2rem; color: var(--color-muted); font-size: .95rem; }
.portal label { display: block; margin: 0 0 .5rem; color: var(--color-muted); }
.portal input { width: 100%; min-height: 3rem; padding: .8rem 1rem; background: var(--color-paper); color: var(--color-ink-strong); border: 2px solid var(--color-rule); border-radius: 0; font: 500 1rem/1 var(--font-mono); letter-spacing: .06em; }
.portal input:hover { border-color: var(--color-accent); }
.portal input:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; border-color: var(--color-bone); }
.portal input[aria-invalid="true"] { border-color: var(--color-accent-bright); }
.portal .btn { margin-top: 1.1rem; width: 100%; }
.portal .status { min-height: 1.4rem; margin: .8rem 0 0; font: 500 .82rem/1.45 var(--font-mono); }
.portal .status[data-state="error"] { color: var(--color-accent-bright); } .portal .status[data-state="ok"] { color: var(--color-ok); }

.site-foot { position: relative; z-index: var(--z-ui); padding: clamp(3rem, 8vh, 5rem) var(--gutter) 6rem; }
.site-foot__line { margin: 0; font: 400 clamp(1.8rem, 6vw, 4.2rem)/.95 var(--font-display); text-transform: uppercase; color: var(--color-bone); max-width: 18ch; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; margin-top: 1.6rem; }
.site-foot a { color: var(--color-muted); min-height: 2.75rem; display: inline-flex; align-items: center; }
.site-foot a:hover { color: var(--color-ink-strong); }

/* the catalog <noscript> block: readable plain document on the lacquer */
.agent-catalog { position: relative; z-index: var(--z-ui); max-width: 52rem; margin: 3rem auto; padding: 0 var(--gutter); color: var(--color-ink); }
.agent-catalog h2 { font: 400 clamp(2rem, 6vw, 3.2rem)/1 var(--font-display); text-transform: uppercase; color: var(--color-bone); }
.agent-catalog a { color: var(--color-bone); }

/* ───────── mini player pill (gmp-player.mjs mounts it; link back to the GMP world) ───────── */
.gmp-pill { position: fixed; z-index: var(--z-pill); top: max(.75rem, env(safe-area-inset-top)); right: max(.75rem, env(safe-area-inset-right)); display: flex; align-items: center; gap: .6rem;
  height: 3rem; padding: 0 .75rem 0 .3rem; max-width: calc(100vw - 1.5rem); background: var(--color-paper-2); border: 1px solid var(--color-accent); border-radius: 999px; color: var(--color-ink-strong);
  font: 600 .66rem/1 var(--font-mono); letter-spacing: .13em; text-transform: uppercase; }
.gmp-pill__btn { flex: none; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer; background: var(--color-bone); color: var(--color-paper); }
.gmp-pill__btn:hover { background: var(--color-accent-bright); color: var(--color-accent-ink); }
.gmp-pill__btn svg { width: 1rem; height: 1rem; fill: currentColor; }
.gmp-pill__btn .i-pause, .gmp-pill[data-state="playing"] .gmp-pill__btn .i-play { display: none; }
.gmp-pill[data-state="playing"] .gmp-pill__btn .i-pause { display: block; }
.gmp-pill__title { max-width: 11ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gmp-pill__bars { flex: none; display: flex; align-items: flex-end; gap: 2px; height: 1rem; }
.gmp-pill__bars i { display: block; width: 3px; height: 100%; background: var(--color-accent-bright); transform-origin: bottom; transform: scaleY(.2); }
.gmp-pill[data-state="playing"] .gmp-pill__bars i:nth-child(1) { transform: scaleY(min(1, calc(.2 + var(--gmp-bass) * .8))); }
.gmp-pill[data-state="playing"] .gmp-pill__bars i:nth-child(2) { transform: scaleY(min(1, calc(.2 + var(--gmp-mid) * 1))); }
.gmp-pill[data-state="playing"] .gmp-pill__bars i:nth-child(3) { transform: scaleY(min(1, calc(.2 + var(--gmp-high) * 1.4))); }
.gmp-pill[data-state="playing"] .gmp-pill__bars i:nth-child(4) { transform: scaleY(min(1, calc(.2 + var(--gmp-beat) * .8))); }
.gmp-pill__link { flex: none; display: inline-flex; align-items: center; gap: .35rem; min-height: 2.75rem; padding-left: .7rem; border-left: 1px solid var(--color-rule); color: var(--color-cyan); text-decoration: none; }
.gmp-pill__link:hover { color: var(--color-ink-strong); text-decoration: underline; text-underline-offset: .3em; }
.gmp-pill[data-state="blocked"] .gmp-pill__btn { animation: pill-ask 1.6s var(--ease-out) infinite; }
@keyframes pill-ask { 0% { box-shadow: 0 0 0 0 oklch(63.4% 0.196 24.7 / .8); } 100% { box-shadow: 0 0 0 .8rem oklch(63.4% 0.196 24.7 / 0); } }
.gmp-pill__link .long { display: none; }
@media (min-width: 640px) { .gmp-pill__link .long { display: inline; } .gmp-pill__link .short { display: none; } .gmp-pill__title { max-width: 16ch; } }

/* ───────── /beats ───────── */
body.beats { background: var(--color-paper); }
.beats .world__sky { opacity: .9; }
.beats .scrim { position: fixed; inset: 0; z-index: calc(var(--z-front) + 1); pointer-events: none; background: linear-gradient(180deg, oklch(9.5% 0.022 24 / .18), oklch(9.5% 0.022 24 / .8) 72%); }
.beats main { max-width: 74rem; margin: 0 auto; padding: clamp(5rem, 11vh, 7.5rem) var(--gutter) 9rem; }
/* Anton's content area is 1.5em tall, so display type with tight leading overlaps its neighbours' hit areas: anything clickable next to it gets its own layer */
.crumbs { position: relative; z-index: 2; margin: 0 0 1.4rem; color: var(--color-muted); }
.crumbs a { display: inline-block; padding: .55rem 0; margin: -.55rem 0; }
.crumbs a { color: var(--color-bone); text-decoration: none; }
.crumbs a:hover { color: var(--color-accent-bright); text-decoration: underline; text-underline-offset: .3em; }
.beats h1 { margin: 0; font: 400 clamp(3rem, 11vw, 9rem)/.84 var(--font-display); text-transform: uppercase; color: var(--color-bone); text-shadow: .035em .03em 0 var(--color-accent); }
.beats h1 em { display: block; font-style: normal; color: var(--color-accent-bright); text-shadow: .035em .03em 0 var(--color-paper); }
.beats .lede { max-width: 40rem; }
.trust { position: relative; z-index: 1; margin: 1.6rem 0 2.2rem; padding: .7rem 0; border-block: 2px solid var(--color-rule); color: var(--color-bone); }
.packs { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); align-items: start; }
.pack { position: relative; display: flex; flex-direction: column; gap: .5rem; padding: 1.2rem; background: oklch(9.5% 0.022 24 / .9); border: 2px solid var(--color-bone); box-shadow: .5rem .5rem 0 var(--color-accent); }
.pack:nth-child(2) { transform: translateY(1.2rem); }
.pack .meta { margin: 0; color: var(--color-accent-bright); font: 500 .72rem/1.3 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; }
.pack h2 { margin: 0; font: 400 clamp(2rem, 4.4vw, 2.8rem)/.95 var(--font-display); text-transform: uppercase; color: var(--color-bone); }
.pack .desc { margin: 0; color: var(--color-ink); font-size: .95rem; }
.pack .buyrow { display: flex; align-items: center; gap: .9rem; padding-top: .6rem; }
.pack .price, .trow .p { font: 400 1.9rem/1 var(--font-display); color: var(--color-bone); font-variant-numeric: tabular-nums; }
.buyrow [data-beat-key] { margin-left: auto; }
.lic { margin: 0; color: var(--color-muted); font: 500 .66rem/1.5 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.peek-wrap { margin-top: .4rem; }
.peek-wrap summary { display: flex; align-items: center; min-height: 2.75rem; cursor: pointer; color: var(--color-bone); list-style: none; }
.peek-wrap summary::-webkit-details-marker { display: none; }
.peek-wrap summary::after { content: "+"; margin-left: auto; font: 700 1.2rem/1 var(--font-body); }
.peek-wrap[open] summary::after { content: "–"; }
.plist { list-style: none; margin: .3rem 0 0; padding: 0; max-height: 20rem; overflow: auto; border-top: 1px solid var(--color-rule); }
.trk { width: 100%; min-height: 2.75rem; display: flex; align-items: center; gap: .7rem; padding: .4rem .3rem; border: 0; border-bottom: 1px solid var(--color-rule); background: transparent; color: var(--color-ink); font: 500 .9rem/1.3 var(--font-body); text-align: left; cursor: pointer; }
.trk:hover { background: var(--color-accent); color: var(--color-accent-ink); }
.trk.active { color: var(--color-accent-bright); }
.trk-i { flex: none; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: .6rem; }
.trk-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.play { flex: none; width: 3rem; height: 3rem; display: grid; place-items: center; padding: 0; cursor: pointer; border: 2px solid var(--color-bone); border-radius: 50%; background: transparent; color: var(--color-bone); font-size: .8rem; line-height: 1;
  transition: background-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out); }
.play:hover { background: var(--color-bone); color: var(--color-paper); }
.play:active { transform: scale(.94); }
.play.playing { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-accent-ink); }
.action { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.2rem; white-space: nowrap; cursor: pointer; text-decoration: none;
  border: 2px solid var(--color-bone); background: var(--color-bone); color: var(--color-paper); font: 400 1.1rem/1 var(--font-display); letter-spacing: .07em; text-transform: uppercase; box-shadow: .25rem .25rem 0 var(--color-accent);
  transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out); }
.action:hover { transform: translate(-2px, -2px); box-shadow: .4rem .4rem 0 var(--color-accent); }
.action:active { transform: translate(.25rem, .25rem); box-shadow: 0 0 0 var(--color-accent); }
.action[disabled] { opacity: .55; cursor: progress; transform: none; }
.action.alt { background: transparent; color: var(--color-bone); box-shadow: .25rem .25rem 0 var(--color-rule); }
.action.alt:hover { background: var(--color-bone); color: var(--color-paper); }
.soon { color: var(--color-muted); font: 500 .66rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }

.singles { margin-top: 5rem; }
.singles h2 { margin: 0 0 1rem; font: 400 clamp(2.4rem, 8vw, 5.5rem)/.9 var(--font-display); text-transform: uppercase; color: var(--color-bone); text-shadow: .04em .035em 0 var(--color-accent); }
.tracklist { border-top: 2px solid var(--color-bone); }
.trow { position: relative; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto auto auto auto; align-items: center; gap: .3rem 1rem; padding: .7rem .4rem; border-bottom: 1px solid var(--color-rule);
  transition: background-color var(--dur-micro) var(--ease-out); }
.trow:hover, .trow:focus-within, .trow.is-hot { background: var(--color-accent); }
.trow .n { color: var(--color-muted); font: 500 .72rem/1 var(--font-mono); }
.trow .t { min-width: 0; font: 400 clamp(1.6rem, 4.6vw, 3.2rem)/1 var(--font-display); text-transform: uppercase; color: var(--color-ink-strong); overflow-wrap: anywhere; }
.trow .bpm { color: var(--color-muted); font: 500 .68rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.trow:hover .n, .trow:hover .bpm, .trow.is-hot .n, .trow.is-hot .bpm { color: var(--color-accent-ink); }
.trow:hover .play, .trow.is-hot .play { border-color: var(--color-accent-ink); color: var(--color-accent-ink); }
.trow:hover .play:hover { background: var(--color-accent-ink); color: var(--color-accent); }
.trow + .lic { padding: .25rem .4rem .7rem 3.4rem; border-bottom: 1px solid var(--color-rule); }
.singles .soon { display: block; margin-top: 1rem; }
@media (max-width: 760px) {
  .trow { grid-template-columns: 1.8rem minmax(0, 1fr) auto auto; }
  .trow .bpm { display: none; }
  .trow [data-beat-key] { grid-column: 1 / -1; justify-self: end; }
  .pack:nth-child(2) { transform: none; }
}
.license-panel { margin-top: 5rem; max-width: 44rem; padding: 1.6rem; background: var(--color-bone); color: var(--color-paper); border: 0; transform: rotate(.4deg); }
.license-panel h2 { margin: 0 0 .8rem; font: 400 clamp(2rem, 6vw, 3rem)/1 var(--font-display); text-transform: uppercase; }
.license-panel p { margin: 0 0 .7rem; font-size: .95rem; max-width: none; }
.license-panel strong { color: var(--color-blood); }
.license-panel .action { box-shadow: .25rem .25rem 0 var(--color-blood); background: var(--color-paper); color: var(--color-bone); border-color: var(--color-paper); }

#np-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: calc(var(--z-pill) - 1); display: flex; align-items: center; gap: .9rem; padding: .6rem var(--gutter) max(.6rem, env(safe-area-inset-bottom)); background: var(--color-paper-2); border-top: 2px solid var(--color-accent); }
#np-bar[hidden] { display: none; }
.np-btn { flex: none; width: 3rem; height: 3rem; border: 2px solid var(--color-bone); border-radius: 50%; background: var(--color-bone); color: var(--color-paper); cursor: pointer; font-size: .85rem; }
.np-btn:hover { background: var(--color-accent-bright); border-color: var(--color-accent-bright); color: var(--color-accent-ink); }
.np-meta { flex: 1; min-width: 0; display: grid; gap: .4rem; }
#np-title { font: 400 1.25rem/1 var(--font-display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#np-prog { width: 100%; height: 6px; appearance: none; border: 0; background: var(--color-rule); accent-color: var(--color-bone); }
#np-prog::-webkit-progress-bar { background: var(--color-rule); } #np-prog::-webkit-progress-value { background: var(--color-bone); } #np-prog::-moz-progress-bar { background: var(--color-bone); }
#np-time { color: var(--color-muted); font: 500 .66rem/1 var(--font-mono); letter-spacing: .1em; }
.site-foot--beats { padding-top: 0; }

/* ───────── motion safety ───────── */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .js .hero__title, .js .hero__tag, .js .hero__ui { animation: none; }
  .cut--a, .cut--b { transform: none; }
  .gmp-pill[data-state="blocked"] .gmp-pill__btn { animation: none; }
  .btn, .action, .rows a, .enter__arrow, .play { transition: none; }
  /* slash becomes a plain fade (<=160 ms): no cut line, no halves, no card, no bloom */
  .slash__line, .slash__bloom, .slash__card, .slash__b { display: none; }
  .cutlayer .slash__line { display: none; }
  .slash__a { clip-path: none; }
  html[data-arrive] .slash__a { animation: sl-fade-out 160ms linear both; }
  html[data-leave] .slash__a { animation: sl-fade-in 150ms linear both; }
  html[data-arrive] .slash { animation: sl-gone 1ms linear 160ms both; }
  .cutlayer__a, .cutlayer__b { animation: sl-fade-out 150ms linear both; }
  html.entered .now > * { animation: none; }
}
@keyframes sl-fade-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: none; } }
@keyframes sl-fade-in { from { opacity: 0; transform: none; } to { opacity: 1; transform: none; } }
@media (hover: none) { .btn:hover, .action:hover { transform: none; } }
