/* =========================================================
   Life on the Block — site.css
   One stylesheet for every page. Plain CSS, no build step.
   ========================================================= */

/* ---------- Tokens ---------- */
:root {
  --navy: #13243A;        /* harbor navy — main background */
  --navy-deep: #0B1624;   /* deepest areas */
  --navy-2: #1A2F4A;      /* raised surfaces */
  --line: rgba(238, 241, 240, .12);
  --fog: #EEF1F0;
  --fog-dim: #B9C3CC;
  --buoy: #B8322A;        /* the single CTA color */
  --buoy-hover: #A02920;
  --amber: #E0A23B;       /* lamp amber — beams, eyebrows, labels */
  --seaglass: #2F6B57;    /* success, civilian, trades */
  --seaglass-lt: #6FB59A; /* seaglass for text on navy (contrast-safe) */
  --error: #F2A39B;

  /* Lightbar colors (overridden per department) */
  --lb-a: 60, 120, 255;   /* left wash (rgb) */
  --lb-b: 235, 242, 255;  /* right wash (rgb) */

  --f-display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --f-body: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  --nav-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

body[data-lights="fire"] { --lb-a: 230, 40, 30;  --lb-b: 255, 240, 235; }
body[data-lights="cg"]   { --lb-a: 255, 120, 20; --lb-b: 255, 246, 236; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--navy);
  color: var(--fog);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--fog); text-decoration-color: var(--amber); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 800; line-height: 1.02; margin: 0 0 .4em; text-transform: uppercase; letter-spacing: .01em; }
h1 { font-size: clamp(3rem, 9vw, 7rem); }
h2 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h3 { font-size: 1.7rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fog); color: var(--navy); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.eyebrow, .label {
  font-family: var(--f-mono);
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 .9em;
}
.lede { font-size: 1.15rem; color: var(--fog-dim); max-width: 62ch; }
.muted { color: var(--fog-dim); }
.draft-tag { display: inline-block; font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; border: 1px dashed var(--amber); color: var(--amber); padding: 2px 8px; border-radius: 3px; vertical-align: middle; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 1.4em;
  font-family: var(--f-body); font-weight: 700; font-size: .95rem; letter-spacing: .06em; text-transform: uppercase;
  border-radius: var(--radius); border: 2px solid transparent;
  text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-cta { background: var(--buoy); color: #fff; }
.btn-cta:hover { background: var(--buoy-hover); color: #fff; }
.btn-outline { background: transparent; color: var(--fog); border-color: rgba(238,241,240,.55); }
.btn-outline:hover { border-color: var(--fog); background: rgba(238,241,240,.06); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.link-arrow { font-weight: 700; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--fog); }
.link-arrow::after { content: " →"; color: var(--amber); }
.link-arrow:hover { color: var(--amber); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 22, 36, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.home .site-header { position: fixed; left: 0; right: 0; background: linear-gradient(rgba(11,22,36,.85), rgba(11,22,36,0)); border-bottom: 0; backdrop-filter: none; -webkit-backdrop-filter: none; transition: background .3s; }
.home .site-header.scrolled { background: rgba(11, 22, 36, .94); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 24px; height: var(--nav-h); max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fog); flex-shrink: 0; }
.brand svg { width: 34px; height: 34px; }
.brand-name { font-family: var(--f-display); font-weight: 800; font-size: 1.35rem; letter-spacing: .03em; text-transform: uppercase; line-height: 1; }
.nav-links { display: flex; align-items: center; gap: 4px; margin: 0 0 0 auto; padding: 0; list-style: none; }
.nav-links a { display: block; padding: 8px 10px; font-size: .82rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--fog-dim); border-radius: 4px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--fog); }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--amber); border-radius: 0; }
.nav .btn-cta { min-height: 42px; padding: 0 1.1em; font-size: .82rem; }
.menu-btn { display: none; margin-left: auto; width: 48px; height: 48px; background: none; border: 1px solid var(--line); border-radius: var(--radius); color: var(--fog); cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto; position: relative; transition: transform .25s; content: ""; }
.menu-btn span::before { position: absolute; top: -6px; }
.menu-btn span::after { position: absolute; top: 6px; }
.menu-btn[aria-expanded="true"] span { background: transparent; }
.menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1080px) {
  .menu-btn { display: block; }
  .nav-panel {
    position: fixed; inset: var(--nav-h) 0 auto 0; background: var(--navy-deep);
    border-bottom: 1px solid var(--line); padding: 12px var(--gutter) 24px;
    display: none; flex-direction: column; align-items: stretch; gap: 12px;
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .nav-panel.open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; margin: 0; }
  .nav-links a { padding: 14px 4px; font-size: .95rem; border-bottom: 1px solid var(--line); }
  .nav-links a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--amber); padding-left: 12px; }
}
@media (min-width: 1081px) { .nav-panel { display: flex; align-items: center; gap: 16px; margin-left: auto; } }

/* ---------- Thin lightbar strip (all pages except home) ---------- */
.strip { height: 3px; position: relative; overflow: hidden; background: var(--navy-deep); }
.strip::before {
  content: ""; position: absolute; inset: 0; width: 200%;
  background: repeating-linear-gradient(90deg,
    rgb(var(--lb-a)) 0 60px, transparent 60px 72px,
    rgb(var(--lb-b)) 72px 132px, transparent 132px 144px);
  animation: strip-slide 6s linear infinite;
  opacity: .9;
}
@keyframes strip-slide { to { transform: translateX(-144px); } }
/* Calm pages: slow amber lighthouse sweep */
.strip.beam::before {
  width: 40%;
  background: linear-gradient(90deg, transparent, rgba(224,162,59,.25) 30%, var(--amber) 50%, rgba(224,162,59,.25) 70%, transparent);
  animation: beam-strip 9s var(--ease) infinite;
}
@keyframes beam-strip { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* ---------- Home hero + lightbar ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding: calc(var(--nav-h) + 80px) 0 clamp(48px, 10vh, 110px);
  overflow: hidden; isolation: isolate;
  background: var(--navy-deep);
}
.hero-bg { position: absolute; inset: 0; z-index: -3; }
.hero-bg img, .hero-bg video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; filter: saturate(1) brightness(1.15) contrast(1.05); }
.hero::after { /* night grade + legibility */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11,22,36,.55) 0%, rgba(11,22,36,.1) 35%, rgba(11,22,36,.55) 70%, var(--navy) 100%),
    radial-gradient(ellipse at 50% 120%, rgba(11,22,36,.0), rgba(11,22,36,.45));
}
.hero-content { position: relative; z-index: 2; width: 100%; }
.hero h1 { margin-bottom: .1em; text-shadow: 0 4px 30px rgba(0,0,0,.5); }
.tagline { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.3rem, 2.8vw, 2rem); letter-spacing: .04em; text-transform: uppercase; color: var(--fog); margin-bottom: 1.4em; }
.hero-note { font-size: .92rem; color: var(--fog-dim); margin-top: 18px; }
.hero-note strong { color: var(--amber); font-weight: 600; }

/* The two light washes: reflected light, not a strobe */
.wash { position: absolute; inset: -10%; z-index: -2; pointer-events: none; opacity: 0; mix-blend-mode: screen; will-change: opacity; }
.wash-a { background: radial-gradient(ellipse 55% 70% at 0% 62%, rgba(var(--lb-a), .55), rgba(var(--lb-a), .18) 45%, transparent 72%); }
.wash-b { background: radial-gradient(ellipse 55% 70% at 100% 62%, rgba(var(--lb-b), .42), rgba(var(--lb-b), .12) 45%, transparent 72%); }
/* 1.6s cycle: blue-blue, then white-white. 4 pulses / 1.6s = 2.5 per second (< 3, WCAG 2.3.1) */
.lights-on .wash-a { animation: pulse-a 1.6s linear infinite; }
.lights-on .wash-b { animation: pulse-b 1.6s linear infinite; }
@keyframes pulse-a {
  0% { opacity: 0; } 3% { opacity: 1; } 10% { opacity: .15; } 15% { opacity: 1; } 22% { opacity: 0; } 100% { opacity: 0; }
}
@keyframes pulse-b {
  0%, 50% { opacity: 0; } 53% { opacity: 1; } 60% { opacity: .15; } 65% { opacity: 1; } 72% { opacity: 0; } 100% { opacity: 0; }
}

/* Lightbar graphic */
.lightbar { position: absolute; top: calc(var(--nav-h) + 18px); left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; gap: 4px; padding: 5px; background: #05090f; border-radius: 6px; box-shadow: 0 6px 24px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,255,255,.08); }
.lightbar i { display: block; width: clamp(18px, 3vw, 30px); height: 10px; border-radius: 2px; background: #1a2230; }
.lightbar .seg-a { background: rgba(var(--lb-a), .18); }
.lightbar .seg-b { background: rgba(var(--lb-b), .14); }
.lights-on .lightbar .seg-a { animation: seg-a 1.6s linear infinite; }
.lights-on .lightbar .seg-b { animation: seg-b 1.6s linear infinite; }
@keyframes seg-a {
  0% { background: rgba(var(--lb-a), .18); box-shadow: none; }
  3%, 9% { background: rgb(var(--lb-a)); box-shadow: 0 0 18px 4px rgba(var(--lb-a), .8); }
  11% { background: rgba(var(--lb-a), .18); box-shadow: none; }
  15%, 20% { background: rgb(var(--lb-a)); box-shadow: 0 0 18px 4px rgba(var(--lb-a), .8); }
  23%, 100% { background: rgba(var(--lb-a), .18); box-shadow: none; }
}
@keyframes seg-b {
  0%, 50% { background: rgba(var(--lb-b), .14); box-shadow: none; }
  53%, 59% { background: rgb(var(--lb-b)); box-shadow: 0 0 18px 4px rgba(var(--lb-b), .75); }
  61% { background: rgba(var(--lb-b), .14); box-shadow: none; }
  65%, 70% { background: rgb(var(--lb-b)); box-shadow: 0 0 18px 4px rgba(var(--lb-b), .75); }
  73%, 100% { background: rgba(var(--lb-b), .14); box-shadow: none; }
}
/* Paused or reduced motion: one still frame with a soft static glow */
.lights-off .wash-a, .lights-off .wash-b { animation: none; opacity: .38; }
.lights-off .lightbar .seg-a { animation: none; background: rgba(var(--lb-a), .75); }
.lights-off .lightbar .seg-b { animation: none; background: rgba(var(--lb-b), .6); }
@media (prefers-reduced-motion: reduce) {
  .wash-a, .wash-b, .lights-on .wash-a, .lights-on .wash-b { animation: none !important; opacity: .38; }
  .lightbar .seg-a, .lights-on .lightbar .seg-a { animation: none !important; background: rgba(var(--lb-a), .75); }
  .lightbar .seg-b, .lights-on .lightbar .seg-b { animation: none !important; background: rgba(var(--lb-b), .6); }
  .strip::before { animation: none !important; transform: none; }
  .strip.beam::before { width: 100%; background: linear-gradient(90deg, transparent, rgba(224,162,59,.6), transparent); }
  .beam-sweep::before { animation: none !important; opacity: .5; }
}
.lights-toggle {
  position: absolute; right: var(--gutter); bottom: 20px; z-index: 4;
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  font-family: var(--f-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--fog); background: rgba(11,22,36,.7); border: 1px solid var(--line); border-radius: 20px; cursor: pointer;
}
.lights-toggle:hover { border-color: var(--fog-dim); }
.lights-toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--lb-a)); }
.lights-off .lights-toggle .dot { background: var(--fog-dim); }
@media (prefers-reduced-motion: reduce) { .lights-toggle { display: none; } }

/* ---------- Status strip ---------- */
.status { background: var(--navy-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.status ul { list-style: none; margin: 0 auto; padding: 14px var(--gutter); max-width: var(--wrap); display: flex; flex-wrap: wrap; gap: 10px 36px; justify-content: space-between; }
.status li { display: flex; align-items: center; gap: 10px; color: var(--fog-dim); }
.status b { color: var(--fog); font-weight: 500; }
.pip { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(224,162,59,.2); }
.pip.ok { background: var(--seaglass-lt); box-shadow: 0 0 0 3px rgba(47,107,87,.35); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 120px) 0; }
.section.alt { background: var(--navy-deep); }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.page-head { padding: clamp(56px, 9vw, 110px) 0 clamp(32px, 5vw, 56px); position: relative; overflow: hidden; }
.page-head .lede { margin-top: .6em; }
.beam-sweep { position: relative; overflow: hidden; isolation: isolate; }
.beam-sweep::before { /* lighthouse beam on calm pages */
  content: ""; position: absolute; z-index: -1; top: -40%; left: -30%; width: 60%; height: 180%;
  background: linear-gradient(100deg, transparent 20%, rgba(224,162,59,.10) 45%, rgba(224,162,59,.16) 50%, rgba(224,162,59,.10) 55%, transparent 80%);
  transform: rotate(8deg); animation: beam-sweep 12s ease-in-out infinite;
}
@keyframes beam-sweep { 0% { transform: translateX(-20%) rotate(8deg); opacity: 0; } 15% { opacity: 1; } 60% { opacity: 1; } 75%, 100% { transform: translateX(230%) rotate(8deg); opacity: 0; } }

/* ---------- Color-graded screenshots ---------- */
.shot { position: relative; overflow: hidden; background: var(--navy-deep); border-radius: var(--radius); }
.shot img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.82) contrast(1.06) brightness(.86); transition: transform .6s var(--ease); }
.shot::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(19,36,58,.05), rgba(19,36,58,.35)); mix-blend-mode: multiply; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.card { display: flex; flex-direction: column; background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--fog); text-decoration: none; transition: border-color .25s, transform .25s var(--ease); }
a.card:hover, .card:has(a:hover) { border-color: rgba(238,241,240,.3); transform: translateY(-3px); }
a.card:hover .shot img { transform: scale(1.04); }
.card .shot { aspect-ratio: 16 / 9; border-radius: 0; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: .3em; }
.card-body p { color: var(--fog-dim); font-size: .97rem; flex: 1; }
.card .tag { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 8px; }
.card[data-dept="police"] { box-shadow: inset 0 3px 0 rgb(60,120,255); }
.card[data-dept="fire"]   { box-shadow: inset 0 3px 0 rgb(230,40,30); }
.card[data-dept="cg"]     { box-shadow: inset 0 3px 0 rgb(255,120,20); }
.card[data-dept="civ"]    { box-shadow: inset 0 3px 0 var(--seaglass); }
.card[data-dept="crime"]  { box-shadow: inset 0 3px 0 #6b6f7a; }
.feature { background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature h3 { font-size: 1.35rem; margin-bottom: .35em; }
.feature p { color: var(--fog-dim); font-size: .95rem; margin: 0; }
.feature .icon { width: 36px; height: 36px; margin-bottom: 14px; color: var(--amber); }
.feature.civ .icon { color: var(--seaglass-lt); }

/* Big department cards */
.dept-card .shot { aspect-ratio: 16 / 8; }
.dept-card h3 { font-size: 2.2rem; }
.dept-card .bar { display: flex; gap: 3px; margin-bottom: 14px; }
.dept-card .bar i { width: 22px; height: 6px; border-radius: 2px; }

/* ---------- Alternating rows ---------- */
.rows { display: grid; gap: clamp(48px, 8vw, 96px); }
.row { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.row:nth-child(even) .shot { order: 2; }
.row .shot { aspect-ratio: 16 / 10; }
@media (max-width: 820px) { .row { grid-template-columns: 1fr; } .row:nth-child(even) .shot { order: 0; } }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding-left: 26px; position: relative; margin-bottom: 8px; color: var(--fog-dim); }
.checks li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 2px; background: var(--amber); }

/* ---------- Gallery + lightbox ---------- */
.gallery { display: grid; grid-auto-flow: dense; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 12px; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; }
.gallery .shot { width: 100%; height: 100%; }
.gallery button:hover img { transform: scale(1.04); }
.gallery .wide { grid-column: span 2; }
.gallery .tall { grid-row: span 2; }
.trailer { grid-column: span 2; grid-row: span 2; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--navy-deep); border: 1px solid var(--line); display: grid; place-items: center; text-align: center; }
.trailer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer .soon { font-family: var(--f-display); font-size: 2rem; font-weight: 800; text-transform: uppercase; }
.trailer .play { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--fog-dim); display: grid; place-items: center; margin: 0 auto 14px; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; grid-auto-rows: 200px; } .gallery .wide, .gallery .tall, .trailer { grid-column: auto; grid-row: auto; } .trailer { min-height: 220px; } }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1400px, 94vw); width: 100%; color: var(--fog); }
.lightbox::backdrop { background: rgba(5, 10, 18, .92); }
.lightbox img { width: 100%; max-height: 82vh; object-fit: contain; border-radius: var(--radius); }
.lightbox p { font-family: var(--f-mono); font-size: .8rem; text-align: center; color: var(--fog-dim); margin-top: 12px; }
.lightbox .close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(11,22,36,.85); color: var(--fog); font-size: 1.4rem; cursor: pointer; }

/* ---------- Updates / changelog ---------- */
.updates { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.update { background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.update time { font-family: var(--f-mono); font-size: .78rem; color: var(--fog-dim); letter-spacing: .06em; }
.update h3 { font-size: 1.4rem; margin: .4em 0 .3em; }
.update p { color: var(--fog-dim); font-size: .95rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; border: 1px solid var(--line); color: var(--fog-dim); }
.chip-feature { border-color: var(--amber); color: var(--amber); }
.chip-fix { border-color: var(--seaglass-lt); color: var(--seaglass-lt); }
.chip-map { border-color: #8fb3dd; color: #8fb3dd; }
.chip-vehicles { border-color: #d7a7f0; color: #d7a7f0; }
.log { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.log > li { position: relative; padding: 0 0 40px 28px; }
.log > li::before { content: ""; position: absolute; left: -7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--amber); }
.log h2 { font-size: 2rem; margin: .2em 0 .3em; }
.log ul { color: var(--fog-dim); padding-left: 20px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter-row button { min-height: 40px; padding: 0 14px; font-family: var(--f-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; background: transparent; color: var(--fog-dim); border: 1px solid var(--line); border-radius: 20px; cursor: pointer; }
.filter-row button[aria-pressed="true"] { color: var(--navy); background: var(--fog); border-color: var(--fog); }

/* ---------- Final CTA ---------- */
.cta-band { position: relative; text-align: center; padding: clamp(80px, 12vw, 140px) 0; background: var(--navy-deep); overflow: hidden; isolation: isolate; }
.cta-band .btn-row { justify-content: center; }
.cta-band .lede { margin: 0 auto 1.6em; }
.cta-band .mark { width: 64px; height: 64px; margin: 0 auto 20px; }

/* ---------- Department sub-page hero ---------- */
.dept-hero { position: relative; min-height: 64vh; display: flex; align-items: flex-end; padding: 120px 0 56px; overflow: hidden; isolation: isolate; background: var(--navy-deep); }
.dept-hero .hero-bg img { filter: saturate(.75) brightness(.55) contrast(1.08); }
.dept-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(11,22,36,.3), rgba(11,22,36,.25) 40%, var(--navy) 100%); }
.dept-hero .lightbar { top: 24px; }
.dept-hero .lights-toggle { bottom: 16px; }
.placeholder-box { border: 1px dashed rgba(224,162,59,.6); border-radius: var(--radius); padding: 24px; color: var(--fog-dim); background: rgba(224,162,59,.04); }
.ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ranks li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--navy-2); border: 1px solid var(--line); border-radius: 4px; }
.ranks span { font-family: var(--f-mono); font-size: .75rem; color: var(--fog-dim); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } }

/* ---------- Island map ---------- */
.map { aspect-ratio: 1 / 1; max-height: 640px; width: 100%; }
.map-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 900px) { .map-wrap { grid-template-columns: 1fr; } }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.facts div { background: var(--navy-2); border: 1px solid var(--line); border-radius: 4px; padding: 14px; }
.facts b { display: block; font-family: var(--f-display); font-size: 2rem; line-height: 1; }
.facts span { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fog-dim); }

/* ---------- Rules ---------- */
.rules-layout { display: grid; grid-template-columns: 260px 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 24px); max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 8px 14px; font-size: .9rem; text-decoration: none; color: var(--fog-dim); border-left: 2px solid transparent; margin-left: -1px; }
.toc a:hover { color: var(--fog); }
.toc a.active { color: var(--fog); border-left-color: var(--amber); }
.rule-section { margin-bottom: 56px; scroll-margin-top: calc(var(--nav-h) + 20px); }
.rule-section h2 { font-size: 2.2rem; }
.rule-section h2 small { font-family: var(--f-mono); font-size: 1rem; color: var(--amber); margin-right: 10px; }
.rule { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 20px); }
.rule:target { background: rgba(224,162,59,.08); }
.rule a.num { font-family: var(--f-mono); font-size: .9rem; color: var(--amber); text-decoration: none; padding-top: 2px; }
.rule a.num:hover { text-decoration: underline; }
.rule p { margin: 0; }
.rule strong { display: block; margin-bottom: 2px; }
@media (max-width: 860px) {
  .rules-layout { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 6px; border: 0; }
  .toc a { border: 1px solid var(--line); border-radius: 20px; padding: 6px 12px; margin: 0; font-size: .82rem; }
}

/* ---------- Forms / Apply ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.tabs button { min-height: 48px; padding: 0 18px; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--fog-dim); font-family: var(--f-body); font-weight: 700; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--fog); border-bottom-color: var(--amber); }
.form { max-width: 760px; }
.form fieldset { border: 0; padding: 0; margin: 0 0 32px; }
.form legend { font-family: var(--f-display); font-weight: 700; font-size: 1.5rem; text-transform: uppercase; margin-bottom: 16px; padding: 0; }
.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.field label, .field .q { display: block; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: .85rem; color: var(--fog-dim); margin: -2px 0 8px; }
.field input[type="text"], .field input[type="number"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; font: inherit; color: var(--fog);
  background: var(--navy-deep); border: 1px solid rgba(238,241,240,.25); border-radius: var(--radius);
}
.field textarea { min-height: 150px; resize: vertical; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--fog-dim) 50%), linear-gradient(135deg, var(--fog-dim) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(224,162,59,.25); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.err { display: none; color: var(--error); font-size: .88rem; margin-top: 6px; }
.field.invalid .err { display: block; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 500 !important; cursor: pointer; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--buoy); flex-shrink: 0; }
.counter { font-family: var(--f-mono); font-size: .78rem; color: var(--fog-dim); text-align: right; margin-top: 6px; }
.counter.ok { color: var(--seaglass-lt); }
.form-note { font-size: .9rem; color: var(--fog-dim); margin-top: 16px; }
.alert { border-radius: var(--radius); padding: 16px 18px; margin: 0 0 24px; border: 1px solid; }
.alert-warn { border-color: var(--amber); background: rgba(224,162,59,.08); }
.alert-err { border-color: var(--error); background: rgba(242,163,155,.08); }
.confirm { text-align: center; padding: 48px 24px; border: 1px solid var(--seaglass); background: rgba(47,107,87,.12); border-radius: var(--radius); max-width: 640px; }
.confirm .tick { width: 56px; height: 56px; border-radius: 50%; background: var(--seaglass); display: grid; place-items: center; margin: 0 auto 16px; }

/* ---------- Guides ---------- */
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; background: var(--navy-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps li::before { content: counter(s, decimal-leading-zero); font-family: var(--f-mono); font-size: 1.6rem; color: var(--amber); line-height: 1; }
.steps h3 { font-size: 1.4rem; margin-bottom: .2em; }
.steps p { color: var(--fog-dim); margin: 0; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-weight: 700; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-family: var(--f-mono); font-size: 1.5rem; color: var(--amber); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--fog-dim); padding-bottom: 12px; margin: 0; max-width: 70ch; }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); border-top: 1px solid var(--line); padding: 56px 0 32px; font-size: .92rem; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h4 { font-family: var(--f-mono); font-size: .75rem; letter-spacing: .14em; color: var(--amber); font-weight: 500; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--fog-dim); text-decoration: none; }
.site-footer a:hover { color: var(--fog); }
.legal { border-top: 1px solid var(--line); padding-top: 24px; font-size: .8rem; color: var(--fog-dim); max-width: 90ch; }

/* keep focused fields clear of the sticky header */
.field input, .field select, .field textarea, .alert { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* Home hero uses the real cruiser video: its own lights replace the CSS washes */
.hero.has-video .wash { display: none; }
