/* =====================================================================
   IRRP - REDLINE
   Paged deck: one scroll gesture swaps the entire viewport to a new page.
   Tokens and recipes in /DESIGN.md.
   irrp.css is shared with Signup/Rules/Profile and is NOT touched here.
   ===================================================================== */

/* ---------------------------------------------------------------
   1. TOKENS
   --------------------------------------------------------------- */
:root {
  --ink-900: #06090c;
  --ink-800: #0a0f14;
  --ink-700: #0f161d;
  --ink-600: #162029;
  --ink-500: #1f2d38;
  --ink-400: #2b3d4a;

  --crm-100: #ffe4e9;
  --crm-200: #ff9fb0;
  --crm-300: #f4657f;
  --crm-400: #e0233f;
  --crm-500: #b81830;
  --crm-600: #8a1024;

  --fg:      #e8eef2;
  --fg-dim:  #9aa9b4;
  --fg-mute: #778892;   /* 5.4:1 on ink-900, 4.7:1 on glass */
  --on-crm:  #ffffff;
  --rail-dot: #5b6c77;  /* non-text UI: 3.7:1 on ink-900 */

  --shadow:    0 24px 60px -20px rgb(3 8 12 / .9);
  --shadow-sm: 0 8px 24px -12px rgb(3 8 12 / .8);

  --r-container: 18px;
  --r-card: 14px;
  --r-chip: 8px;
  --r-btn: 10px;

  --fa:  "Vazirmatn", system-ui, sans-serif;
  /* Chakra Petch carries no Arabic block, so Vazirmatn sits behind it: a
     Persian word inside a latin-styled element renders in Vazirmatn instead
     of falling through to the generic monospace (Courier New on Windows),
     which draws Persian unjoined. --lat is for digits and Latin only;
     anything that can hold Persian prose uses --fa. */
  --lat: "Chakra Petch", "Vazirmatn", ui-monospace, monospace;

  /* Type scale — every font-size is one of these. Steps follow the iOS
     text styles: 12 caption · 13 footnote · 15 subhead · 17 body ·
     20 title3 · 24 title2 · 28 title1 · 34 large title. */
  --fs-caption:  .75rem;
  --fs-footnote: .8125rem;
  --fs-subhead:  .9375rem;
  --fs-body:     1.0625rem;
  --fs-title3:   1.25rem;
  --fs-title2:   1.5rem;
  --fs-title1:   1.75rem;
  --fs-large:    2.125rem;

  --step-display: clamp(2.75rem, 5.6vw, 4.5rem);   /* 44 → 72 */
  --step-h2: clamp(1.75rem, 3.2vw, 2.75rem);       /* 28 → 44 */
  --step-h3: var(--fs-title3);

  /* Spacing — 4px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;

  /* Motion — two durations, one curve */
  --dur-1: 150ms;   /* colour, border, background */
  --dur-2: 250ms;   /* transform, opacity */
  --ease: cubic-bezier(.2,.7,.3,1);

  --z-grain: 80;
  --z-nav: 70;
  --z-rail: 65;
  --z-raised: 10;
  --z-base: 1;

  /* gutter that keeps page content clear of nav + rail */
  --pad-x: clamp(1.25rem, 5vw, 5rem);
  --pad-top: clamp(6rem, 11vh, 8.5rem);
  --pad-bot: clamp(4rem, 9vh, 6.5rem);
}

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

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

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--fg);
  font-family: var(--fa);
  font-size: var(--fs-body);
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* paged mode is opt-in from JS — without it the page is a normal document */
body.is-paged { overflow: hidden; height: 100%; }
html:has(body.is-paged) { height: 100%; overflow: hidden; }

/* The `hidden` attribute must beat class-level display rules — see the same
   note in irrp-inner.css. */
[hidden] { display: none !important; }

h1, h2, h3, h4 { margin: 0; font-weight: 800; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; }
svg { display: block; }

:focus-visible { outline: 2px solid var(--crm-300); outline-offset: 2px; border-radius: 4px; }

/* Caption above a heading. Persian by default — Arabic script is cursive, so
   tracking and uppercase do nothing to it but pull the letters apart. The
   latin-set variant keeps the technical look for ASCII captions. */
.label {
  font-family: var(--fa);
  font-size: var(--fs-caption);
  font-weight: 500;
  line-height: 1.4;
  color: var(--fg-mute);
}
.label--en {
  font-family: var(--lat);
  font-size: var(--fs-caption);
  font-weight: 400;
  letter-spacing: .22em;
  line-height: 1;
  text-transform: uppercase;
}

.lat { font-family: var(--lat); font-variant-numeric: tabular-nums; }

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 100;
  background: var(--crm-400);
  color: var(--on-crm);
  padding: 12px 20px;
  border-radius: 0 0 var(--r-btn) var(--r-btn);
  font-weight: 700;
}
.skip:focus { inset-inline-start: 0; }

/* ---------------------------------------------------------------
   3. ATMOSPHERE
   --------------------------------------------------------------- */
.atmos { position: fixed; inset: 0; pointer-events: none; z-index: var(--z-base); }

.atmos-horizon {
  position: absolute;
  inset-inline: -20%;
  bottom: -30%;
  height: 90vh;
  background:
    radial-gradient(60% 50% at 50% 100%, rgb(31 45 56 / .55), transparent 70%),
    radial-gradient(40% 40% at 20% 90%, rgb(22 32 41 / .5), transparent 70%);
  filter: blur(20px);
}

.atmos-glow {
  position: absolute;
  top: -10%;
  inset-inline-end: -5%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, rgb(138 16 36 / .16), transparent 62%);
  filter: blur(30px);
  /* drifts with the deck (irrp-home.js syncUI); same length as the page wipe */
  transition: transform .45s var(--ease);
}

.grain {
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------
   4. NIGHT GLASS (dark petrol + chrome rim)
   --------------------------------------------------------------- */
.glass {
  background: linear-gradient(160deg, rgb(22 32 41 / .82), rgb(10 15 20 / .92));
  border: 1px solid var(--ink-500);
  box-shadow:
    inset 0 1px 0 rgb(216 226 232 / .10),
    inset 0 -1px 0 rgb(3 8 12 / .6),
    var(--shadow);
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
}
.glass:hover { box-shadow: inset 0 1px 0 rgb(216 226 232 / .18), inset 0 -1px 0 rgb(3 8 12 / .6), var(--shadow); }

/* ---------------------------------------------------------------
   5. BUTTONS
   --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 46px;
  padding: 0 1.5rem;
  border-radius: var(--r-btn);
  font-weight: 700;
  font-size: var(--fs-subhead);
  cursor: pointer;
  transition: background var(--dur-1) ease, color var(--dur-1) ease, border-color var(--dur-1) ease, transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.btn--fill { background: var(--crm-400); color: var(--on-crm); box-shadow: 0 10px 30px -12px rgb(138 16 36 / .8); }
/* Hover keeps the fill and white label — a pastel swap drops the label to 1.9:1. */
.btn--fill:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -12px rgb(138 16 36 / .95); }
.btn--fill:active { background: var(--crm-500); transform: scale(.98); }
.btn--line { background: transparent; color: var(--fg); border: 1px solid var(--ink-400); }
.btn--line:hover { border-color: var(--crm-400); color: var(--crm-300); transform: translateY(-1px); }
.btn--line:active { transform: scale(.98); }
.btn--lg { min-height: 54px; padding: 0 2rem; font-size: var(--fs-body); }

.tlink {
  font-size: var(--fs-subhead);
  font-weight: 600;
  color: var(--fg-dim);
  border-bottom: 1px solid var(--ink-400);
  padding-bottom: var(--s-1);
  cursor: pointer;
  transition: color var(--dur-1) ease, border-color var(--dur-1) ease;
}
.tlink:hover { color: var(--crm-300); border-color: var(--crm-400); }

/* ---------------------------------------------------------------
   6. NAV
   --------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 18px;
  inset-inline: 0;
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100% - 2.5rem, 1500px);
  margin-inline: auto;
  padding: var(--s-2) var(--s-3) var(--s-2) var(--s-5);
  border-radius: 999px;
  background: linear-gradient(160deg, rgb(22 32 41 / .6), rgb(10 15 20 / .72));
  border: 1px solid rgb(31 45 56 / .7);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.brand { display: inline-flex; align-items: center; gap: var(--s-2); flex: none; }

/* the logo is its own wordmark — no text lockup beside it */
.brand-logo {
  width: auto;
  height: 38px;
  display: block;
  /* the chrome half of the mark reads flat on dark glass; a faint
     crimson bloom re-seats it in the page's light */
  filter: drop-shadow(0 2px 6px rgb(3 8 12 / .8))
          drop-shadow(0 0 14px rgb(224 35 63 / .28));
  transition: filter var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.brand:hover .brand-logo {
  transform: translateY(-1px);
  filter: drop-shadow(0 2px 6px rgb(3 8 12 / .8))
          drop-shadow(0 0 20px rgb(224 35 63 / .5));
}


.nav-links { display: flex; align-items: center; gap: var(--s-1); }
.nav-links a, .nav-links button {
  position: relative;
  padding: .5rem var(--s-3);
  border-radius: var(--r-chip);
  font-size: var(--fs-subhead);
  color: var(--fg-dim);
  cursor: pointer;
  transition: color var(--dur-1) ease, background var(--dur-1) ease;
}
.nav-links a:hover, .nav-links button:hover { color: var(--fg); background: rgb(31 45 56 / .5); }
.nav-links .is-current { color: var(--crm-300); }
.nav-links .is-current::after {
  content: "";
  position: absolute;
  inset-inline: .85rem;
  bottom: .28rem;
  height: 1px;
  background: var(--crm-400);
}

.nav-right { display: flex; align-items: center; gap: var(--s-3); }

.pulse {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-radius: 999px;
  background: rgb(15 22 29 / .8);
  border: 1px solid var(--ink-500);
  font-size: var(--fs-footnote);
  color: var(--fg-dim);
}
.pulse b { color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.pulse-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--crm-400);
  box-shadow: 0 0 0 0 rgb(224 35 63 / .7);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 7px rgb(224 35 63 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(224 35 63 / 0); }
}

.burger { display: none; width: 44px; height: 44px; border-radius: var(--r-chip); cursor: pointer; place-items: center; }
.burger span { display: block; width: 18px; height: 1.5px; background: var(--fg); transition: transform var(--dur-2) var(--ease); }
.burger span + span { margin-top: var(--s-1); }
body.menu-open .burger span:first-child { transform: translateY(3.25px) rotate(45deg); }
body.menu-open .burger span:last-child  { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------------------------------------------------------------
   7. THE DECK — full-viewport pages
   --------------------------------------------------------------- */
.deck { position: relative; z-index: var(--z-raised); }

body.is-paged .deck { position: fixed; inset: 0; }

.page {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  padding: var(--pad-top) var(--pad-x) var(--pad-bot);
}

/* in paged mode every page stacks and only the current one shows */
body.is-paged .page {
  position: absolute;
  inset: 0;
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  /* clipped from the leading edge; JS opens it on transition */
  clip-path: inset(0 0 100% 0);
}
body.is-paged .page.is-current {
  visibility: visible;
  opacity: 1;
  clip-path: inset(0 0 0 0);
  z-index: 2;
}
body.is-paged .page.is-leaving { visibility: visible; opacity: 1; z-index: 1; }

.p-in { width: min(100%, 1400px); margin-inline: auto; }

.p-head { max-width: 62ch; }
.p-head h2 {
  font-size: var(--step-h2);
  line-height: 1.12;
  margin-block: var(--s-3) var(--s-4);
}
.p-head p { color: var(--fg-dim); max-width: 54ch; }

/* full-bleed painted backing for a page */
.p-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.p-veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(200deg, rgb(224 35 63 / .09), transparent 45%),
    linear-gradient(0deg, rgb(6 9 12 / .93), rgb(6 9 12 / .45) 55%, rgb(6 9 12 / .7));
}

/* ---------------------------------------------------------------
   8. PAGER RAIL + COUNTER
   --------------------------------------------------------------- */
.rail {
  position: fixed;
  inset-inline-end: clamp(.9rem, 2.2vw, 2rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-rail);
  display: grid;
  gap: var(--s-2);
  justify-items: center;
}
.rail button {
  --dot: 7px;
  position: relative;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border-radius: 50%;
}
.rail button::after {
  content: "";
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: var(--rail-dot);
  transition: background var(--dur-1) ease, transform var(--dur-2) var(--ease);
}
.rail button:hover::after { background: var(--fg-mute); transform: scale(1.2); }
.rail button.is-on::after { background: var(--crm-400); transform: scale(1.35); box-shadow: 0 0 12px rgb(224 35 63 / .6); }

.rail-name {
  position: absolute;
  inset-inline-end: 30px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  white-space: nowrap;
  font-size: var(--fs-caption);
  font-weight: 500;
  color: var(--fg-dim);
  background: rgb(10 15 20 / .9);
  border: 1px solid var(--ink-500);
  border-radius: var(--r-chip);
  padding: var(--s-1) var(--s-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
}
.rail button:hover .rail-name { opacity: 1; transform: translateY(-50%) translateX(0); }

.counter {
  position: fixed;
  inset-inline-start: clamp(1.25rem, 5vw, 5rem);
  bottom: clamp(1.5rem, 4vh, 2.6rem);
  z-index: var(--z-rail);
  display: flex;
  align-items: baseline;
  gap: var(--s-2);
  font-family: var(--lat);
  font-size: var(--fs-caption);
  letter-spacing: .18em;
  color: var(--fg-mute);
}
.counter b { font-size: var(--fs-title2); font-weight: 700; color: var(--fg); }

/* scroll cue — only on the first page */
.cue {
  position: fixed;
  bottom: clamp(1.5rem, 4vh, 2.6rem);
  inset-inline-start: 50%;
  transform: translateX(50%);
  z-index: var(--z-rail);
  display: grid;
  justify-items: center;
  gap: var(--s-2);
  transition: opacity var(--dur-2) var(--ease);
}
.cue.is-hidden { opacity: 0; pointer-events: none; }
.counter { transition: opacity var(--dur-2) var(--ease); }
.counter.is-hidden { opacity: 0; }
.cue-rail { width: 1px; height: 42px; background: linear-gradient(180deg, var(--crm-400), transparent); overflow: hidden; }
.cue-rail::after {
  content: "";
  display: block;
  width: 1px; height: 14px;
  background: var(--crm-300);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue {
  0%   { transform: translateY(-14px); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: translateY(42px); opacity: 0; }
}

/* ---------------------------------------------------------------
   9. PAGE 0 — HERO
   Layered: glow → skyline canvas → light shafts → haze → vignette
   --------------------------------------------------------------- */
/* Content sits ABOVE the skyline, not on top of it — extra bottom padding
   lifts the block into the sky so the buildings read as a horizon rather
   than as a busy backdrop behind the type. */
.hero {
  align-content: center;
  padding-bottom: calc(var(--pad-bot) + 14vh);
}

/* asymmetric: hugs the inline-start edge, never centred */
.hero-in {
  max-width: 44rem;
  margin-inline: 0 auto;
}

.hero-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

/* The lit sky the skyline is silhouetted AGAINST.
   This must sit at the horizon line (~66% down), not at the page bottom —
   anchored lower it hides behind the towers and the buildings then read as
   pale blocks on black instead of dark shapes against light. */
.hero-glow {
  position: absolute;
  inset-inline: -12%;
  top: 22%;
  height: 62%;
  background:
    radial-gradient(64% 62% at 50% 78%, rgb(224 35 63 / .30), transparent 66%),
    radial-gradient(38% 46% at 76% 84%, rgb(184 24 48 / .26), transparent 68%),
    radial-gradient(44% 52% at 20% 88%, rgb(120 40 58 / .22), transparent 70%),
    radial-gradient(70% 44% at 50% 96%, rgb(60 78 92 / .40), transparent 72%);
  filter: blur(34px);
}

.hero-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Single soft key light. Physical `right`, NOT inset-inline-end — in RTL
   the logical property flips to the left and renders as a grey smudge in
   the corner. Banded "god ray" gradients read as banding at this scale,
   so this is one diffuse source instead. */
.hero-shafts {
  position: absolute;
  top: -20%;
  right: -14%;
  width: 62%;
  height: 96%;
  background: radial-gradient(closest-side, rgb(224 35 63 / .16), transparent 72%);
  filter: blur(40px);
  /* Opacity only. Animating transform on a blur(40px) layer this large makes
     the compositor re-rasterise the blur every frame — a measurable chunk of
     the GPU load. Opacity animates on the existing texture for free. */
  will-change: opacity;
  animation: keylight 20s ease-in-out infinite;
}
@keyframes keylight {
  0%, 100% { opacity: .68; }
  50%      { opacity: 1; }
}

/* Horizon fog — the band the skyline base dissolves into.
   Without this the buildings end on a hard line and read as cut paper. */
.hero-fog {
  position: absolute;
  inset-inline: -10%;
  bottom: 0;
  height: 46%;
  /* Kept deliberately lighter at the base than a pure ground fog would be —
     the traffic lanes live at 80–92% of viewport height and headlights have
     to punch through this without looking like they are floating. */
  background:
    linear-gradient(0deg,
      rgb(6 9 12 / .78) 0%,
      rgb(11 18 25 / .56) 26%,
      rgb(31 45 56 / .26) 58%,
      transparent 100%);
}

/* a thin warm scatter right at the base, like light caught in low haze */
.hero-fog::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(0deg, rgb(184 24 48 / .12), transparent 78%);
  filter: blur(18px);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(84% 70% at 50% 46%, transparent 38%, rgb(6 9 12 / .82) 100%),
    linear-gradient(180deg, rgb(6 9 12 / .88) 0%, transparent 26%);
}

.hero-in { position: relative; z-index: var(--z-raised); }

/* HUD strip — status, place, clock.
   Anchored by a rule that runs into it, so the block reads as pinned to
   the frame rather than floating loose in the middle of it. */
.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-inline-start: var(--s-4);
  position: relative;
}
.hero-meta::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 26px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--crm-400), rgb(224 35 63 / .1));
}
.hero-meta-x { width: 14px; height: 1px; background: var(--ink-400); }
.hero-live {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-caption);
  font-weight: 600;
  color: var(--crm-300);
}
.hero-live i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--crm-400);
  box-shadow: 0 0 0 0 rgb(224 35 63 / .7);
  animation: pulse 2.4s ease-out infinite;
}

/* masked line-by-line reveal */
.hero-title {
  max-width: 18ch;
  font-size: var(--step-display);
  font-weight: 900;
  /* Persian needs more leading than a Latin display line */
  line-height: 1.16;
  margin-block: 0 1.5rem;
}
/* the mask box is grown past the glyph box, then pulled back with a
   matching negative margin — otherwise overflow:hidden shears the
   descenders on ج چ ر ز and the tail of ی */
.hero-title .hl {
  display: block;
  overflow: hidden;
  padding-block: .14em .22em;
  margin-block: -.14em -.22em;
}
.hero-title .hl i { display: block; font-style: normal; will-change: transform; }
.hero-title em {
  font-style: normal;
  color: var(--crm-400);
  text-shadow: 0 0 50px rgb(224 35 63 / .45), 0 0 14px rgb(224 35 63 / .25);
}

.hero-sub { max-width: 48ch; color: var(--fg-dim); font-size: var(--fs-body); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: var(--s-10); }

/* ---- dispatch ticker — radio chatter, the city talking ---- */
.dispatch {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: var(--z-raised);
  display: flex;
  align-items: stretch;
  gap: 0;
  height: 42px;
  border-top: 1px solid var(--ink-500);
  background: linear-gradient(180deg, rgb(10 15 20 / .55), rgb(6 9 12 / .9));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.dispatch-tag {
  display: grid;
  place-items: center;
  padding-inline: 1rem;
  /* a quiet label, not a second crimson block competing with the hero CTA */
  background: var(--ink-700);
  border-inline-end: 1px solid var(--ink-500);
  color: var(--crm-300);
  font-family: var(--lat);
  font-size: var(--fs-caption);
  font-weight: 700;
  letter-spacing: .2em;
  flex: none;
}
.dispatch-track { position: relative; flex: 1; overflow: hidden; }
.dispatch-run {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 3rem;
  white-space: nowrap;
  will-change: transform;
  animation: ticker 46s linear infinite;
}
.dispatch-run span {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-footnote);
  color: var(--fg-dim);
}
.dispatch-run span::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--crm-500);
  flex: none;
}
.dispatch-run b { color: var(--fg-mute); font-weight: 600; font-size: var(--fs-footnote); }
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(50%); }
}
.dispatch:hover .dispatch-run { animation-play-state: paused; }

/* ---------------------------------------------------------------
   10. CHAPTER PAGES — varied layouts, never the same twice
   --------------------------------------------------------------- */
.p-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
/* the plate comes first in the markup, which mirrors the split in RTL */

.p-plate {
  position: relative;
  aspect-ratio: 4 / 3.2;
  border-radius: var(--r-container);
  overflow: hidden;
  border: 1px solid var(--ink-500);
  box-shadow: inset 0 1px 0 rgb(216 226 232 / .10), var(--shadow);
}
/* plates are painted by irrp-skyline.js, not fetched */
.p-plate canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.p-plate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgb(224 35 63 / .10), transparent 48%), linear-gradient(0deg, rgb(6 9 12 / .6), transparent 55%);
}

.facts { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-8); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-chip);
  background: rgb(15 22 29 / .75);
  border: 1px solid var(--ink-500);
  font-size: var(--fs-footnote);
  color: var(--fg-dim);
}
.chip b { color: var(--crm-300); font-weight: 700; font-variant-numeric: tabular-nums; }

/* big number that anchors a chapter */
.bignum {
  font-family: var(--fa);
  font-size: clamp(2.75rem, 6vw, 4.5rem);   /* 44 → 72: supports the heading, never outranks it */
  font-weight: 900;
  line-height: .9;
  color: var(--crm-400);
}
.bignum-lbl { color: var(--fg-dim); font-size: var(--fs-subhead); margin-top: var(--s-2); }

/* three-across feature row used on the economy page */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin-top: var(--s-10); }
.trio > div { padding: 1.5rem; border-radius: var(--r-card); display: grid; gap: .5rem; align-content: start; }
.trio h3 { font-size: var(--step-h3); font-weight: 800; }
.trio p { color: var(--fg-dim); font-size: var(--fs-subhead); }

.cell-icon {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-chip);
  background: rgb(31 45 56 / .7);
  border: 1px solid var(--ink-500);
  color: var(--crm-300);
  margin-bottom: var(--s-1);
}
.cell-icon svg { width: 20px; height: 20px; }

/* ---------------------------------------------------------------
   11. JOBS PAGE
   --------------------------------------------------------------- */
.jobs-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(1.5rem, 3.5vw, 3rem);
  align-items: stretch;
}

.jobs-panel {
  position: relative;
  border-radius: var(--r-container);
  overflow: hidden;
  min-height: 24rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--s-8);
  border: 1px solid var(--ink-500);
  box-shadow: inset 0 1px 0 rgb(216 226 232 / .10), var(--shadow);
}
.jobs-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: -2;
}
.jobs-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(200deg, rgb(224 35 63 / .10), transparent 50%), linear-gradient(0deg, rgb(6 9 12 / .93), transparent 62%);
}
.jobs-copy { transition: opacity var(--dur-1) var(--ease), transform var(--dur-1) var(--ease); }   /* matches the 150ms swap in irrp-home.js */
.jobs-copy.is-swapping { opacity: 0; transform: translateY(8px); }
.jobs-copy h3 { font-size: clamp(1.5rem, 2.4vw, var(--fs-large)); font-weight: 800; margin-block: var(--s-2); }
.jobs-copy p { color: var(--fg-dim); max-width: 44ch; font-size: var(--fs-subhead); }

.jobs-meta { display: flex; flex-wrap: wrap; gap: var(--s-6); margin-top: var(--s-6); }
.jobs-meta div { display: grid; gap: 2px; }
.jm-k { font-size: var(--fs-caption); color: var(--fg-mute); }
.jm-v { font-weight: 700; color: var(--fg); }

.jobs-list { display: grid; gap: var(--s-2); align-content: start; }

.jobrow {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  min-height: 52px;
  padding: 0 1rem;
  border-radius: var(--r-card);
  border: 1px solid transparent;
  color: var(--fg-dim);
  cursor: pointer;
  text-align: start;
  transition: background var(--dur-1) ease, color var(--dur-1) ease, border-color var(--dur-1) ease;
}
.jobrow:hover { background: rgb(22 32 41 / .6); color: var(--fg); }
.jobrow.is-on {
  background: linear-gradient(160deg, rgb(22 32 41 / .85), rgb(10 15 20 / .92));
  border-color: var(--ink-500);
  color: var(--fg);
  box-shadow: inset 0 1px 0 rgb(216 226 232 / .14);
}
.jobrow.is-on::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block: 13px;
  width: 2px;
  border-radius: 2px;
  background: var(--crm-400);
}
.jobrow svg { width: 19px; height: 19px; flex: none; color: var(--fg-mute); transition: color var(--dur-1) ease; }
.jobrow.is-on svg, .jobrow:hover svg { color: var(--crm-300); }
.jobrow-name { flex: 1; font-weight: 600; font-size: var(--fs-subhead); }
.jobrow-pay { font-size: var(--fs-footnote); color: var(--fg-mute); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------
   12. PULSE PAGE
   --------------------------------------------------------------- */
.pulse-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.pstat { padding: var(--s-6); border-radius: var(--r-card); display: grid; gap: var(--s-1); }
.pstat-num {
  font-size: clamp(var(--fs-large), 3.4vw, 2.75rem);
  font-weight: 900;
  line-height: 1;
  color: var(--fg);
}
/* one figure leads: "online now" carries the accent, the rest stay white */
.pstat:first-child .pstat-num { color: var(--crm-400); }
.pstat-lbl { font-size: var(--fs-subhead); color: var(--fg-dim); }

.activity { margin-top: var(--s-4); padding: var(--s-8); border-radius: var(--r-card); }
.activity-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: var(--s-6); }
.activity-top h3 { font-size: var(--fs-subhead); font-weight: 700; }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: var(--s-3); align-items: end; height: clamp(90px, 16vh, 140px); }
.bars span {
  display: block;
  height: 0;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--crm-400), rgb(138 16 36 / .25));
  transition: height .3s var(--ease);
}
/* no recorded week yet: a line of text in place of an empty chart */
.activity-empty { display: none; color: var(--fg-mute); font-size: var(--fs-subhead); }
.activity.is-empty .activity-empty { display: block; }
.activity.is-empty .bars,
.activity.is-empty #barsPeak { display: none; }

/* ---------------------------------------------------------------
   13. JOIN / FINAL PAGE
   --------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin: 0 0 2.5rem; padding: 0; list-style: none; }
.step { display: flex; flex-direction: column; gap: var(--s-2); padding: var(--s-8) var(--s-6); border-radius: var(--r-card); }
.step h3 { font-size: var(--step-h3); font-weight: 800; }
.step p { color: var(--fg-dim); font-size: var(--fs-subhead); flex: 1; }
.step-no { font-size: var(--fs-footnote); font-weight: 600; color: var(--crm-300); }
.step .tlink { align-self: flex-start; margin-top: .5rem; }

.final-cta { display: grid; justify-items: center; text-align: center; gap: var(--s-5); }
.final-cta h2 { font-size: var(--step-h2); font-weight: 900; max-width: 18ch; }
.final-cta p { color: var(--fg-dim); max-width: 46ch; }

.foot-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: var(--s-6);
  border-top: 1px solid var(--ink-500);
  color: var(--fg-mute);
  font-size: var(--fs-footnote);
}
.foot-links { display: flex; gap: var(--s-5); flex-wrap: wrap; }
.foot-links a { transition: color var(--dur-1) ease; }
.foot-links a:hover { color: var(--crm-300); }

.notice {
  display: none;
  margin-top: 1rem;
  padding: var(--s-3) 1rem;
  border-radius: var(--r-chip);
  border: 1px solid var(--ink-500);
  background: var(--ink-700);
  color: var(--fg-dim);
  font-size: var(--fs-subhead);
}
.notice.is-on { display: block; }

/* ---------------------------------------------------------------
   14. RESPONSIVE
   --------------------------------------------------------------- */
@media (max-width: 1100px) {
  .p-split, .p-split--flip { grid-template-columns: 1fr; gap: var(--s-6); }
  .p-plate { aspect-ratio: 16 / 9; max-height: 30vh; }
  .trio { grid-template-columns: 1fr; }
  .jobs-grid { grid-template-columns: 1fr; }
  .jobs-panel { min-height: 17rem; }
  .pulse-strip { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {   /* below this the full nav wraps to two rows */
  .nav-links {
    position: fixed;
    inset: 78px 1.25rem auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s-2);
    border-radius: var(--r-container);
    background: linear-gradient(160deg, rgb(22 32 41 / .97), rgb(10 15 20 / .98));
    border: 1px solid var(--ink-500);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: none;
  }
  body.menu-open .nav-links { display: flex; }
  .nav-links a, .nav-links button { padding: var(--s-4) 1rem; text-align: start; }
  .burger { display: grid; }
  .pulse, .nav .btn[data-discord] { display: none; }
  .rail { inset-inline-end: .6rem; }
  .rail-name { display: none; }
  .counter { display: none; }
}

@media (max-width: 640px) {
  .pulse-strip { grid-template-columns: 1fr 1fr; }
  .jobs-meta { gap: var(--s-4); }
  .p-plate { display: none; }
  .cue { display: none; }
}

/* short viewports: let a dense page scroll inside itself rather than clip */
@media (max-height: 700px) {
  body.is-paged .page { overflow-y: auto; overscroll-behavior: contain; }
}

/* ---------------------------------------------------------------
   15. REDUCED MOTION — paging is disabled in JS; document scrolls
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .pulse-dot, .cue-rail::after { animation: none; }
}

/* ---- server offline state (toggled by irrp-live.js) ------------------ */
.hero-live.is-off { opacity: .8; }
.hero-live.is-off i {
  background: #7d8794;
  box-shadow: none;
  animation: none;
}
