/* ============================================================
   PRAY KINGDOM — TACTICAL DESIGN SYSTEM
   ============================================================ */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  /* Field */
  --void:        #04070F;
  --deep:        #070C1A;
  --panel:       #0C1426;
  --panel-2:     #111C33;
  --line:        #1C2B4A;
  --line-hot:    #2A4370;

  /* Signal */
  --gold:        #F5B942;
  --gold-hi:     #FFD873;
  --gold-dim:    #A87E28;
  --alert:       #E23A3A;
  --lock:        #3DDC84;
  --scan:        #4AC8F5;

  /* Type */
  --ink:         #E9EFFA;
  --ink-2:       #A9BAD4;
  --ink-3:       #6B7F9E;

  /* Motion */
  --ease:        cubic-bezier(.22,.61,.36,1);
  --ease-sharp:  cubic-bezier(.65,0,.35,1);

  /* Metrics */
  --gut:         clamp(1.25rem, 4vw, 3rem);
  --max:         1340px;
  /* Sized around the lockup, not the other way round: the logo is a
     fixed 2.32:1, so width only grows with height. See --hdr overrides
     further down for the narrower breakpoints. */
  --hdr:         100px;

  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --disp: 'Oswald', 'Inter', Impact, sans-serif;
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

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

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }

::selection { background: var(--gold); color: var(--void); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Boot sequence ──────────────────────────────────────────
   Grid → aperture → Louisiana draws → 64 parish lights ignite →
   everything collapses into the mark. The fade-out is driven by CSS,
   not JS, so a script failure can never leave the overlay stuck over
   the site. JS only adds the lights.
   ------------------------------------------------------------------ */
.boot {
  position: fixed; inset: 0; z-index: 999;
  background: var(--void);
  display: grid; place-items: center;
  overflow: hidden;
  animation: boot-out .7s var(--ease) 2.55s forwards;
}
@keyframes boot-out {
  to { opacity: 0; visibility: hidden; pointer-events: none; }
}
html.booting, html.booting body { overflow: hidden; }

/* grid rushing in */
.boot-grid {
  position: absolute; inset: -20%;
  background-image:
    linear-gradient(rgba(62,93,145,.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62,93,145,.45) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 50%, #000 15%, transparent 62%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 15%, transparent 62%);
  opacity: 0;
  animation: boot-grid 2.5s var(--ease) forwards;
}
@keyframes boot-grid {
  0%   { opacity: 0; transform: scale(1.35); }
  22%  { opacity: 1; }
  72%  { opacity: .9; transform: scale(1); }
  100% { opacity: 0; transform: scale(.9); }
}

/* the bloom behind everything */
.boot-glow {
  position: absolute; width: 70vmin; height: 70vmin; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,.30), transparent 62%);
  opacity: 0;
  animation: boot-glow 2.6s var(--ease) forwards;
}
@keyframes boot-glow {
  0%   { opacity: 0;  transform: scale(.4); }
  45%  { opacity: .55; }
  78%  { opacity: 1;   transform: scale(1); }
  100% { opacity: 0;  transform: scale(1.5); }
}

/* the aperture / target eye */
.boot-eye { position: absolute; width: 78vmin; height: 78vmin; overflow: visible; }
.boot-eye .bring { fill: none; stroke: var(--gold); transform-origin: 300px 300px; }
.boot-eye .b1 { stroke-width: 1.6; opacity: .55; stroke-dasharray: 10 16;
                animation: spin 7s linear infinite, boot-collapse 2.6s var(--ease) forwards; }
.boot-eye .b2 { stroke-width: 1.2; opacity: .4;  stroke-dasharray: 4 22;
                animation: spin-r 9s linear infinite, boot-collapse 2.6s var(--ease) .06s forwards; }
.boot-eye .b3 { stroke-width: 2.2; opacity: .8;
                animation: boot-collapse 2.6s var(--ease) .12s forwards; }
@keyframes spin   { to { transform: rotate(360deg); } }
@keyframes spin-r { to { transform: rotate(-360deg); } }

/* rings tighten, then snap shut around the mark */
@keyframes boot-collapse {
  0%   { opacity: 0; stroke-dashoffset: 0; transform: scale(1.6) rotate(0deg); }
  18%  { opacity: 1; }
  62%  { transform: scale(1) rotate(0deg); }
  86%  { opacity: .9; transform: scale(.42) rotate(0deg); }
  100% { opacity: 0; transform: scale(.28) rotate(0deg); }
}

.boot-cross { stroke: var(--gold); stroke-width: 1.4; opacity: 0; fill: none;
              transform-origin: 300px 300px;
              animation: boot-collapse 2.6s var(--ease) .1s forwards; }

/* Louisiana drawing itself in */
.boot-la {
  fill: none; stroke: var(--gold-hi); stroke-width: 2.2;
  stroke-linejoin: round; stroke-linecap: round;
  transform-origin: 300px 300px;
  animation: boot-draw 2.6s var(--ease) forwards;
}
@keyframes boot-draw {
  0%   { stroke-dashoffset: var(--len); opacity: 0; transform: scale(1); }
  10%  { opacity: 1; }
  52%  { stroke-dashoffset: 0; opacity: 1; transform: scale(1); }
  84%  { opacity: .5; transform: scale(.42); }
  100% { opacity: 0; transform: scale(.28); }
}

/* the 64 parish lights — the group collapses with the rings and the state
   outline, so no stragglers are left behind when the mark takes over */
#boot-lights {
  transform-origin: 300px 300px;
  animation: boot-gather 2.6s var(--ease) forwards;
}
@keyframes boot-gather {
  0%, 58% { transform: scale(1);   opacity: 1; }
  86%     { transform: scale(.42); opacity: .55; }
  100%    { transform: scale(.28); opacity: 0; }
}
.boot-light { transform-box: fill-box; transform-origin: center; opacity: 0; }
.boot-light .lcore { fill: var(--gold-hi); }
.boot-light .lhalo { fill: var(--gold); opacity: .28; }
@keyframes boot-spark {
  0%   { opacity: 0; transform: scale(.2); }
  30%  { opacity: 1; transform: scale(1.5); }
  60%  { opacity: .85; transform: scale(1); }
  100% { opacity: 0; transform: scale(.3); }
}

/* the mark blooms out of the collapse */
.boot-logo {
  position: absolute; width: 26vmin; max-width: 200px; height: auto;
  opacity: 0; transform: scale(.55);
  animation: boot-logo 1.5s var(--ease) 1.65s forwards;
}
@keyframes boot-logo {
  0%   { opacity: 0; transform: scale(.55); filter: blur(6px); }
  45%  { opacity: 1; transform: scale(1.06); filter: blur(0); }
  70%  { transform: scale(1); }
  100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

/* Motion off: never show the overlay at all. */
@media (prefers-reduced-motion: reduce) {
  .boot { display: none !important; }
  html.booting, html.booting body { overflow: auto; }
}

/* ── Ambient field: grid + vignette + scanlines ─────────── */
.field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.field::before {
  content: '';
  position: absolute;
  inset: -10%;
  background-image:
    linear-gradient(rgba(42,67,112,.30) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,67,112,.30) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 30%, #000 0%, transparent 78%);
  animation: drift 60s linear infinite;
}
.field::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%,   rgba(245,185,66,.10), transparent 60%),
    radial-gradient(ellipse 60% 45% at 12% 78%,  rgba(74,200,245,.07), transparent 62%),
    radial-gradient(ellipse 55% 45% at 88% 90%,  rgba(226,58,58,.06),  transparent 62%);
}
@keyframes drift {
  to { transform: translate3d(62px, 62px, 0); }
}

.scanlines {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom, rgba(0,0,0,.16) 0 1px, transparent 1px 3px);
  opacity: .38;
  mix-blend-mode: multiply;
}

/* ── Layout ─────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gut); }
main  { position: relative; z-index: 2; }
section { padding-block: clamp(4rem, 9vw, 7.5rem); position: relative; }

/* ── Typographic scale ──────────────────────────────────── */
.kicker {
  font-family: var(--mono);
  font-size: .688rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.1rem;
}
.kicker::before {
  content: '';
  width: 26px; height: 1px;
  background: currentColor;
  flex: none;
}
.kicker.k-alert { color: var(--alert); }
.kicker.k-lock  { color: var(--lock); }
.kicker.k-scan  { color: var(--scan); }

h1, h2, h3, h4 {
  font-family: var(--disp);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.015em;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.6rem, 7.4vw, 6rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.5rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.75rem); }
h4 { font-size: 1.0625rem; letter-spacing: .02em; }

.lede {
  font-size: clamp(1.0625rem, 1.55vw, 1.3125rem);
  color: var(--ink-2);
  line-height: 1.72;
  max-width: 62ch;
}
.muted { color: var(--ink-3); }
.gold  { color: var(--gold); }
.data  { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.sec-head { margin-bottom: clamp(2.25rem, 4.5vw, 3.5rem); max-width: 74ch; }
.sec-head p { margin-top: 1.1rem; }

/* ── Header / nav ───────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 60;
  height: var(--hdr);
  display: flex; align-items: center;
  background: rgba(4,7,15,.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.hdr.stuck { background: rgba(4,7,15,.94); border-color: var(--line-hot); }
.hdr .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

/* The v2 horizontal lockup carries the medallion and the wordmark in one
   file, so the brand is a single image. */
.brand { display: flex; align-items: center; flex: none; }
/* Height-locked, width auto — the logo files carry width/height attributes
   that disagree with their own viewBox, so let the aspect ratio win. */
.brand img.brand-lockup { height: 72px; width: auto; display: block; }

/* Header height and lockup step down together, so the logo keeps roughly
   the same breathing room inside the bar at every width. */
@media (max-width: 980px) {
  :root { --hdr: 90px; }
  .brand img.brand-lockup { height: 64px; }
}
@media (max-width: 620px) {
  :root { --hdr: 82px; }
  .brand img.brand-lockup { height: 58px; }
}
@media (max-width: 420px) {
  :root { --hdr: 76px; }
  .brand img.brand-lockup { height: 52px; }
}

.nav { display: flex; align-items: center; gap: .25rem; }
.nav a {
  font-family: var(--mono);
  font-size: .7188rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-2);
  padding: .55rem .7rem;
  position: relative;
  transition: color .2s var(--ease);
  white-space: nowrap;
}
.nav a::after {
  content: '';
  position: absolute; left: .7rem; right: .7rem; bottom: .28rem;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--gold); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-tail { display: flex; align-items: center; gap: .9rem; flex: none; }

.burger { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; }
.burger span {
  display: block; width: 19px; height: 1.5px; background: var(--ink);
  position: relative; transition: background .2s;
}
.burger span::before, .burger span::after {
  content: ''; position: absolute; left: 0; width: 19px; height: 1.5px;
  background: var(--ink); transition: transform .3s var(--ease);
}
.burger span::before { top: -6px; }
.burger span::after  { top:  6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after  { transform: translateY(-6px) rotate(-45deg); }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--mono); font-size: .75rem;
  letter-spacing: .16em; text-transform: uppercase;
  padding: .95rem 1.6rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  position: relative; overflow: hidden;
  transition: color .28s var(--ease), border-color .28s var(--ease);
  white-space: nowrap;
}
.btn::before {
  content: ''; position: absolute; inset: 0; background: var(--gold);
  transform: translateY(101%); transition: transform .34s var(--ease-sharp); z-index: -1;
}
.btn > * { position: relative; z-index: 1; }
.btn:hover { color: var(--void); }
.btn:hover::before { transform: translateY(0); }
.btn.solid { background: var(--gold); color: var(--void); }
.btn.solid::before { background: var(--gold-hi); }
.btn.ghost { border-color: var(--line-hot); color: var(--ink-2); }
.btn.ghost::before { background: var(--ink); }
.btn.ghost:hover { border-color: var(--ink); color: var(--void); }
.btn.sm { padding: .68rem 1.15rem; font-size: .688rem; }

/* Corner brackets — the recurring targeting motif */
.brackets { position: relative; }
.brackets::before, .brackets::after {
  content: ''; position: absolute; width: 13px; height: 13px;
  border: 1px solid var(--gold); pointer-events: none;
  opacity: .55; transition: opacity .3s var(--ease);
}
.brackets::before { top: -1px; left: -1px;  border-right: 0; border-bottom: 0; }
.brackets::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.brackets:hover::before, .brackets:hover::after { opacity: 1; }

/* ── Panels ─────────────────────────────────────────────── */
.panel {
  background: linear-gradient(160deg, var(--panel), var(--deep));
  border: 1px solid var(--line);
  padding: clamp(1.4rem, 2.6vw, 2rem);
  position: relative;
  transition: border-color .35s var(--ease), transform .35s var(--ease);
}
.panel:hover { border-color: var(--line-hot); }

.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.grid > * { background: var(--deep); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  min-height: calc(100svh - var(--hdr));
  display: grid; align-items: center;
  padding-block: clamp(3rem, 7vw, 6rem);
  position: relative; overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.hero h1 { margin-bottom: 1.5rem; }
.hero h1 .l1 { display: block; color: var(--ink); }
.hero h1 .l2 {
  display: block;
  background: linear-gradient(100deg, var(--gold-hi), var(--gold) 42%, var(--gold-dim));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { margin-bottom: 2.25rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .85rem; margin-bottom: 3rem; }

/* Hero stat strip */
.stat-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  padding-top: 1.6rem; gap: 1.25rem;
}
.stat b {
  display: block;
  font-family: var(--disp); font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  line-height: 1; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-family: var(--mono); font-size: .625rem;
  letter-spacing: .19em; text-transform: uppercase;
  color: var(--ink-3); margin-top: .5rem; display: block;
}

/* ── Radar / hero visual ────────────────────────────────── */
.radar { position: relative; aspect-ratio: 1; width: 100%; max-width: 540px; margin-inline: auto; }
.radar svg { width: 100%; height: 100%; overflow: visible; }

.r-ring   { fill: none; stroke: var(--line-hot); stroke-width: 1; }
.r-ring.f { stroke: rgba(245,185,66,.28); }
.r-cross  { stroke: var(--line-hot); stroke-width: 1; }
.r-tick   { stroke: var(--gold); stroke-width: 1.5; opacity: .6; }

.sweep { transform-origin: 50% 50%; animation: sweep 4.5s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }

.r-state { fill: rgba(245,185,66,.07); stroke: var(--gold); stroke-width: 1.5; }

.blip { fill: var(--gold); opacity: 0; animation: blip 4.5s linear infinite; }
@keyframes blip {
  0%, 4%   { opacity: 1; r: 4; }
  40%      { opacity: .28; r: 2.5; }
  100%     { opacity: .06; r: 2.5; }
}

/* ── Reticle that tracks the cursor ─────────────────────── */
.reticle {
  position: fixed; z-index: 55; pointer-events: none;
  width: 42px; height: 42px; margin: -21px 0 0 -21px;
  opacity: 0; transition: opacity .35s var(--ease);
  mix-blend-mode: screen;
}
.reticle.on { opacity: .85; }
.reticle svg { width: 100%; height: 100%; }
.reticle .rr { fill: none; stroke: var(--gold); stroke-width: 1; }

/* ── Section: mission cards ─────────────────────────────── */
.mission-card { padding: clamp(1.75rem, 3vw, 2.5rem); position: relative; overflow: hidden; }
.mission-card .num {
  font-family: var(--mono); font-size: .688rem;
  letter-spacing: .2em; color: var(--gold); display: block; margin-bottom: 1.1rem;
}
.mission-card h3 { margin-bottom: .85rem; }
.mission-card p  { color: var(--ink-2); font-size: .9375rem; }
.mission-card::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.mission-card:hover::after { transform: scaleX(1); }

/* ── Region list ────────────────────────────────────────── */
.regions { display: flex; flex-direction: column; }
.region-row {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) 130px 92px 44px;
  align-items: center; gap: 1.25rem;
  padding: 1.35rem 1.25rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer; position: relative;
  transition: background .3s var(--ease), padding-left .3s var(--ease);
}
.region-row:first-child { border-top: 1px solid var(--line); }
.region-row::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--rc, var(--gold));
  transform: scaleY(0); transition: transform .35s var(--ease);
}
.region-row:hover { background: rgba(28,43,74,.28); padding-left: 1.75rem; }
.region-row:hover::before { transform: scaleY(1); }
.region-row.active { background: rgba(28,43,74,.42); }
.region-row.active::before { transform: scaleY(1); }

.r-id {
  font-family: var(--disp); font-size: 1.6rem; font-weight: 600;
  color: var(--rc, var(--gold)); line-height: 1;
}
.r-name { font-family: var(--disp); font-size: 1.1875rem; letter-spacing: .01em; text-transform: uppercase; }
.r-code {
  font-family: var(--mono); font-size: .625rem; letter-spacing: .2em;
  color: var(--ink-3); text-transform: uppercase; margin-top: .28rem; display: block;
}
.r-pop  { font-family: var(--mono); font-size: .9375rem; text-align: right; font-variant-numeric: tabular-nums; }
.r-par  { font-family: var(--mono); font-size: .75rem; color: var(--ink-3); text-align: right; }
.r-go   { color: var(--ink-3); justify-self: end; transition: transform .3s var(--ease), color .3s; }
.region-row:hover .r-go { transform: translateX(4px); color: var(--gold); }

.r-bar { grid-column: 1 / -1; height: 2px; background: var(--line); margin-top: .9rem; }
.r-bar i { display: block; height: 100%; background: var(--rc); width: 0; transition: width 1.1s var(--ease); }

/* ── The field (map) ────────────────────────────────────────── */
.field-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
.map-stage {
  background: linear-gradient(165deg, var(--panel), var(--void));
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
  /* Matches the map viewBox, so the box reserves exactly the space the SVG
     will fill — no dead gap on narrow screens, no shift when JS injects it. */
  aspect-ratio: 760 / 700;
}
.map-stage svg { width: 100%; height: auto; display: block; }

.map-hud {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 1rem 1.15rem; pointer-events: none;
  font-family: var(--mono); font-size: .625rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3);
}
.map-hud b { color: var(--gold); font-weight: 400; }

.la-outline {
  fill: rgba(16,27,50,.66);
  stroke: #3E5D91;
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.p-node {
  cursor: pointer;
  transition: opacity .3s var(--ease);
}
.p-dot {
  transition: r .3s var(--ease), fill-opacity .3s var(--ease), stroke-width .2s;
  stroke-width: 1;
}
.p-node:hover .p-dot, .p-node.hot .p-dot { stroke-width: 2; fill-opacity: .95; }
.p-node.dim { opacity: .16; }
.p-ring { fill: none; stroke-width: 1; opacity: 0; transition: opacity .3s, r .5s var(--ease); }
.p-node:hover .p-ring, .p-node.hot .p-ring { opacity: .8; }

.map-tip {
  position: absolute; pointer-events: none; z-index: 12;
  background: rgba(4,7,15,.96);
  border: 1px solid var(--line-hot);
  padding: .7rem .9rem; min-width: 168px;
  opacity: 0; transform: translateY(4px);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.map-tip.on { opacity: 1; transform: translateY(0); }
.map-tip b {
  font-family: var(--disp); font-size: .9375rem; text-transform: uppercase;
  display: block; letter-spacing: .02em;
}
.map-tip .tp {
  font-family: var(--mono); font-size: 1.0625rem; color: var(--gold);
  display: block; margin: .3rem 0; font-variant-numeric: tabular-nums;
}
.map-tip .tr {
  font-family: var(--mono); font-size: .5938rem; letter-spacing: .17em;
  text-transform: uppercase; color: var(--ink-3);
}

.legend { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.legend button {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .625rem;
  letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--line); padding: .45rem .7rem;
  color: var(--ink-2);
  transition: border-color .25s, color .25s, background .25s;
}
.legend button i { width: 8px; height: 8px; flex: none; }
.legend button:hover { border-color: var(--lc); color: var(--ink); }
.legend button.off { opacity: .35; }

/* Parish detail rail */
.rail { border: 1px solid var(--line); background: var(--deep); }
.rail-hd { padding: 1.25rem 1.35rem; border-bottom: 1px solid var(--line); }
.rail-hd h3 { color: var(--rc, var(--gold)); }
.rail-body { max-height: 560px; overflow-y: auto; }
.rail-body::-webkit-scrollbar { width: 5px; }
.rail-body::-webkit-scrollbar-track { background: var(--deep); }
.rail-body::-webkit-scrollbar-thumb { background: var(--line-hot); }

.p-row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .8rem 1.35rem; border-bottom: 1px solid rgba(28,43,74,.5);
  font-size: .875rem; cursor: default;
  transition: background .2s, padding-left .2s var(--ease);
}
.p-row:hover { background: rgba(28,43,74,.35); padding-left: 1.6rem; }
.p-row .pn { color: var(--ink); }
/* Not scoped to .p-row: the rail's region stat block uses .ps too, and
   without block display the label ran straight into the number
   ("889,945souls"). */
.ps { font-family: var(--mono); font-size: .625rem; color: var(--ink-3); display: block; margin-top: .15rem; }
.p-row .pp { font-family: var(--mono); color: var(--gold); font-variant-numeric: tabular-nums; flex: none; }

/* ── Leaders ────────────────────────────────────────────── */
.leaders { border-top: 1px solid var(--line); }
.leader {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; padding: .8rem 0;
  border-bottom: 1px solid rgba(28,43,74,.5);
}
.leader:last-child { border-bottom: 0; }
.leader .lo {
  font-family: var(--mono); font-size: .625rem; letter-spacing: .17em;
  text-transform: uppercase; color: var(--ink-3); flex: none;
}
/* Police-jury presidencies turn over every January, not every four
   years — worth saying so next to the office. */
.leader .lo em {
  display: block; font-style: normal; font-size: .5625rem;
  letter-spacing: .12em; color: var(--gold-dim); margin-top: .2rem;
}
.leader .ln {
  font-family: var(--disp); font-size: 1.0625rem; letter-spacing: .01em;
  text-transform: none; color: var(--ink); text-align: right;
}
.leader.blank .ln { color: var(--ink-3); font-style: italic; font-family: var(--sans); font-size: .875rem; }

/* Verification badge — staleness is shown, never hidden */
.vstamp {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .5938rem;
  letter-spacing: .16em; text-transform: uppercase;
  border: 1px solid var(--line-hot); padding: .3rem .55rem;
  color: var(--ink-3);
}
.vstamp i { width: 6px; height: 6px; border-radius: 50%; background: var(--lock); flex: none; }
.vstamp.ageing { border-color: rgba(245,198,60,.5); color: var(--gold); }
.vstamp.ageing i { background: var(--gold); }
.vstamp.stale  { border-color: rgba(226,58,58,.55); color: var(--alert); }
.vstamp.stale i { background: var(--alert); }

.rail-back {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .625rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .9rem;
  transition: color .2s var(--ease);
}
.rail-back:hover { color: var(--gold); }

.p-row.picked { background: rgba(28,43,74,.55); }
.p-row .pgo {
  color: var(--ink-3); font-size: .75rem; margin-left: .5rem;
  opacity: 0; transition: opacity .2s var(--ease), transform .2s var(--ease);
  display: inline-block;
}
.p-row:hover .pgo, .p-row:focus-visible .pgo { opacity: 1; transform: translateX(3px); }

/* Region rows in the rail carry their region colour on hover */
.p-row[data-region] { cursor: pointer; }
.p-row[data-region]::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--rc); transform: scaleY(0); transform-origin: center;
  transition: transform .28s var(--ease);
}
.p-row[data-region] { position: relative; }
.p-row[data-region]:hover::before,
.p-row[data-region]:focus-visible::before { transform: scaleY(1); }

/* Who runs this parish, inside the region card */
.pwho {
  display: block; font-size: .8125rem; color: var(--ink-2);
  margin-top: .3rem; line-height: 1.4;
}
.pwho b {
  font-family: var(--mono); font-weight: 400; font-size: .5938rem;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink-3);
  display: block; margin-bottom: .1rem;
}
.pwho.blank { color: var(--ink-3); font-style: italic; }

/* Roster page */
.roster { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.roster-region { background: var(--deep); padding: 1.5rem 1.35rem; }
.roster-region > h3 {
  color: var(--rc); padding-bottom: .8rem; margin-bottom: .3rem;
  border-bottom: 1px solid var(--line);
}
.roster-p { padding: .95rem 0; border-bottom: 1px solid rgba(28,43,74,.45); }
.roster-p:last-child { border-bottom: 0; }
.roster-p > b {
  font-family: var(--disp); font-size: 1rem; letter-spacing: .02em;
  text-transform: uppercase; display: block; margin-bottom: .45rem;
}
.roster-p .pc { font-family: var(--mono); font-size: .625rem; color: var(--ink-3); }

@media (max-width: 720px) {
  .leader { flex-direction: column; gap: .25rem; }
  .leader .ln { text-align: left; }
}

/* ── Schedule ───────────────────────────────────────────── */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.day { background: var(--deep); padding: 1.1rem .85rem; min-height: 190px; display: flex; flex-direction: column; }
.day > h4 {
  font-family: var(--mono); font-size: .625rem; font-weight: 400;
  letter-spacing: .22em; color: var(--ink-3); text-transform: uppercase;
  padding-bottom: .8rem; margin-bottom: .9rem;
  border-bottom: 1px solid var(--line);
}
.day.rest > h4 { color: var(--line-hot); }
.slot {
  border-left: 2px solid var(--sc); padding: .55rem .7rem; margin-bottom: .6rem;
  background: rgba(28,43,74,.3);
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.slot:hover { background: rgba(28,43,74,.6); transform: translateX(2px); }
.slot b { display: block; font-size: .8125rem; font-family: var(--disp); text-transform: uppercase; letter-spacing: .02em; }
.slot span { font-family: var(--mono); font-size: .625rem; color: var(--sc); display: block; margin-top: .25rem; }

/* Program blocks */
.prog {
  display: grid; grid-template-columns: 92px minmax(0,1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding: clamp(1.6rem, 3vw, 2.4rem) 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.prog:last-child { border-bottom: 0; }
.prog-icon {
  width: 66px; height: 66px; border: 1px solid var(--pc);
  display: grid; place-items: center; color: var(--pc);
  position: relative;
}
.prog-icon::before, .prog-icon::after {
  content: ''; position: absolute; width: 9px; height: 9px; border: 1px solid var(--pc);
}
.prog-icon::before { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
.prog-icon::after  { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }
.prog h3 { margin-bottom: .3rem; }
.prog .tag { font-family: var(--mono); font-size: .688rem; letter-spacing: .16em; text-transform: uppercase; color: var(--pc); }
.prog p { color: var(--ink-2); margin-top: 1rem; max-width: 66ch; }
.prog-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.15rem; }
.chip {
  font-family: var(--mono); font-size: .625rem; letter-spacing: .15em;
  text-transform: uppercase; border: 1px solid var(--line-hot);
  padding: .35rem .65rem; color: var(--ink-2);
}
.chip.hot { border-color: var(--pc); color: var(--pc); }

/* ── Leadership card ────────────────────────────────────── */
.leader-card {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.75rem);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
.leader-photo { margin: 0; position: relative; }
.leader-photo img {
  width: 100%;
  /* Must be auto: the width/height attributes (kept so the browser can reserve
     space and avoid layout shift) would otherwise pin the height and make
     aspect-ratio a no-op. */
  height: auto;
  aspect-ratio: 4 / 5;
  /* Frame on the face rather than cropping the source file. */
  object-fit: cover;
  object-position: 50% 18%;
  border: 1px solid var(--line-hot);
  /* Black and white, with a touch of contrast so it doesn't go flat on the
     dark field. Done in CSS, so the colour original stays intact. */
  filter: grayscale(1) contrast(1.08) brightness(1.03);
}
/* Gold corner ticks, echoing the reticle motif */
.leader-photo::before, .leader-photo::after {
  content: ''; position: absolute; width: 20px; height: 20px;
  border: 2px solid var(--gold); pointer-events: none;
}
.leader-photo::before { top: -5px; left: -5px;  border-right: 0; border-bottom: 0; }
.leader-photo::after  { bottom: -5px; right: -5px; border-left: 0; border-top: 0; }

@media (max-width: 760px) {
  .leader-card { grid-template-columns: 1fr; }
  .leader-photo img { aspect-ratio: 3 / 2; object-position: 50% 15%; }
}

/* ── Verse blocks ───────────────────────────────────────── */
.verse {
  border-left: 2px solid var(--gold);
  padding: .35rem 0 .35rem 1.15rem;
  font-style: italic; color: var(--ink-2);
  font-size: .9375rem; line-height: 1.7;
}
.verse cite {
  display: block; font-style: normal; font-family: var(--mono);
  font-size: .625rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-top: .55rem;
}

/* Arsenal */
.arsenal { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.ars-col { background: var(--deep); padding: 1.5rem 1.35rem; }
.ars-col > h4 {
  color: var(--ac); font-family: var(--disp); font-size: 1.1875rem;
  letter-spacing: .06em; padding-bottom: .75rem; margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.ars-v { padding: .65rem 0; border-bottom: 1px solid rgba(28,43,74,.45); }
.ars-v:last-child { border-bottom: 0; }
.ars-v b { font-family: var(--mono); font-size: .688rem; letter-spacing: .1em; color: var(--ac); display: block; }
.ars-v p { font-size: .8125rem; color: var(--ink-3); margin-top: .35rem; line-height: 1.6; }

/* Declaration ticker */
.decl {
  border: 1px solid var(--line); background: var(--deep);
  padding: clamp(2rem, 5vw, 3.5rem); text-align: center;
  position: relative; overflow: hidden; min-height: 220px;
  display: grid; place-items: center;
}
.decl-txt {
  font-family: var(--disp); font-size: clamp(1.375rem, 3.4vw, 2.375rem);
  line-height: 1.22; letter-spacing: .005em; max-width: 26ch; margin-inline: auto;
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.decl-ref {
  font-family: var(--mono); font-size: .688rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold); margin-top: 1.35rem; display: block;
  transition: opacity .5s var(--ease);
}
.decl.swap .decl-txt { opacity: 0; transform: translateY(-10px); }
.decl.swap .decl-ref { opacity: 0; }
.decl-dots { display: flex; gap: 5px; justify-content: center; margin-top: 1.75rem; }
.decl-dots i { width: 16px; height: 2px; background: var(--line-hot); transition: background .3s; }
.decl-dots i.on { background: var(--gold); }

/* ── Forms ──────────────────────────────────────────────── */
.form { display: grid; gap: 1.15rem; }
.f-row { display: grid; gap: 1.15rem; grid-template-columns: 1fr 1fr; }
label {
  display: block; font-family: var(--mono); font-size: .625rem;
  letter-spacing: .19em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .5rem;
}
input, select, textarea {
  width: 100%; background: var(--deep);
  border: 1px solid var(--line); color: var(--ink);
  padding: .82rem .95rem; font-family: var(--sans); font-size: .9375rem;
  transition: border-color .25s var(--ease), background .25s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold); background: var(--panel);
}
textarea { resize: vertical; min-height: 132px; }
select { appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: right 1.05rem center, right .8rem center;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.f-note { font-family: var(--mono); font-size: .688rem; color: var(--ink-3); line-height: 1.7; }
.f-ok, .f-err {
  padding: 1rem 1.15rem;
  font-family: var(--mono); font-size: .75rem; letter-spacing: .1em;
  line-height: 1.6; display: none;
}
.f-ok  { border: 1px solid var(--lock);  background: rgba(61,220,132,.08); color: var(--lock); }
.f-err { border: 1px solid var(--alert); background: rgba(226,58,58,.08);  color: var(--alert); }
.f-ok.on, .f-err.on { display: block; }

/* ── Footer ─────────────────────────────────────────────── */
.ftr { border-top: 1px solid var(--line); background: var(--deep); position: relative; z-index: 2; margin-top: 3rem; }

/* The footer lockup runs much larger than the header's — it is a sign-off,
   not a nav bar, and it has a whole column to fill. Outranks the header
   sizing rules by specificity, so their breakpoints don't fight it. */
.ftr .brand img.brand-lockup { height: 130px; }
@media (max-width: 1080px) { .ftr .brand img.brand-lockup { height: 108px; } }
@media (max-width: 720px)  { .ftr .brand img.brand-lockup { height: 88px;  } }
.ftr-top {
  display: grid; grid-template-columns: minmax(0,1.6fr) repeat(3, minmax(0,1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}
.ftr h4 {
  font-family: var(--mono); font-size: .625rem; font-weight: 400;
  letter-spacing: .22em; color: var(--gold); margin-bottom: 1.15rem;
}
.ftr ul li { margin-bottom: .65rem; }
.ftr ul a { font-size: .875rem; color: var(--ink-2); transition: color .2s, padding-left .2s var(--ease); display: inline-block; }
.ftr ul a:hover { color: var(--gold); padding-left: 5px; }

/* Giving link — set apart from the plain nav links so it reads as an
   action, not another destination. */
.ftr ul a.give {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .5rem; padding: .5rem .8rem;
  border: 1px solid rgba(245,185,66,.4);
  color: var(--gold);
  font-family: var(--mono); font-size: .625rem;
  letter-spacing: .12em; text-transform: uppercase;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.ftr ul a.give:hover {
  background: var(--gold); color: var(--void);
  border-color: var(--gold); padding-left: .8rem;
}
.ftr-btm {
  border-top: 1px solid var(--line); padding-block: 1.6rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-family: var(--mono); font-size: .688rem; color: var(--ink-3);
  letter-spacing: .08em;
}

/* ── Reveal-on-scroll ───────────────────────────────────── */
[data-rise] { opacity: 0; transform: translateY(26px); }
[data-rise].seen {
  opacity: 1; transform: none;
  transition: opacity .82s var(--ease), transform .82s var(--ease);
  transition-delay: var(--d, 0ms);
}

/* Decrypt text */
.decrypt { display: inline-block; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .radar { max-width: 400px; order: -1; }
  .field-grid { grid-template-columns: 1fr; }
  .ftr-top { grid-template-columns: 1fr 1fr; }
  .week { grid-template-columns: repeat(4, 1fr); }
}

/* 980, not 880: six nav items + the CTA + the larger lockup collide before
   that. Below this the nav collapses into the burger. */
@media (max-width: 980px) {
  .burger { display: flex; }
  .nav {
    position: fixed; inset: var(--hdr) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(4,7,15,.985);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--gut) 1.75rem;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: transform .3s var(--ease), opacity .3s var(--ease);
    max-height: calc(100svh - var(--hdr)); overflow-y: auto;
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: .95rem .25rem; font-size: .8125rem; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .nav-tail .btn { display: none; }
  .g3, .g4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .region-row { grid-template-columns: 40px minmax(0,1fr) auto; gap: .9rem; padding: 1.1rem .9rem; }
  .r-par, .r-go { display: none; }
  .stat-strip { grid-template-columns: 1fr; gap: 1.1rem; }
  .week { grid-template-columns: repeat(2, 1fr); }
  .prog { grid-template-columns: 1fr; }
  .f-row { grid-template-columns: 1fr; }
  .ftr-top { grid-template-columns: 1fr; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .reticle { display: none; }
}

/* ── Motion safety ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  [data-rise] { opacity: 1; transform: none; }
  .field::before { animation: none; }
  .reticle { display: none; }
}

@media print {
  .field, .scanlines, .hdr, .reticle { display: none; }
  body { background: #fff; color: #000; }
}
