/* ==========================================================================
   EXCLAVE: site styles
   ========================================================================== */

:root {
  --bg:        #0c0e0b;
  --bg-2:      #121510;
  --surface:   #171a14;
  --line:      #2b2f26;
  --line-2:    #3b4034;
  --text:      #ddd8cb;
  --muted:     #8f8d80;
  --concrete:  #b3a68e;   /* pulled from the logo */
  --concrete-2:#7d7466;
  --hazard:    #e0702a;
  --signal:    #a3b86c;

  --f-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --f-body:    "Barlow", system-ui, sans-serif;
  --f-mono:    "JetBrains Mono", ui-monospace, monospace;

  --wrap: 1180px;
  --cut: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; overflow-x: clip; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* film grain over everything */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); text-transform: uppercase; line-height: 1; margin: 0; letter-spacing: .01em; }
h2 { font-size: clamp(2.2rem, 5.2vw, 4.2rem); font-weight: 800; }
h3 { font-size: 1.5rem; font-weight: 700; letter-spacing: .03em; }
p  { margin: 0 0 1em; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.wrap--narrow { max-width: 820px; }
.hl { color: var(--concrete); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--hazard); color: #000; padding: 8px 12px; z-index: 200; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--hazard); outline-offset: 3px; }

.eyebrow {
  font: 600 .78rem/1 var(--f-mono);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--hazard);
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.lede { color: var(--muted); margin-top: 18px; }

/* ---------- Buttons ---------- */
.btn {
  --c: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 28px;
  font: 700 1rem/1 var(--f-display);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--hazard); color: #120a04; }
.btn--primary:hover { background: #f08440; }
.btn--ghost { background: rgba(221, 216, 203, .08); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn--ghost:hover { background: rgba(221, 216, 203, .16); }
.btn--sm { padding: 10px 18px; font-size: .88rem; --cut: 8px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(12, 14, 11, .88); backdrop-filter: blur(10px); border-color: var(--line); }
.nav__inner { width: min(100% - 32px, var(--wrap)); margin: auto; height: 68px; display: flex; align-items: center; justify-content: space-between; }
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.35rem/1 var(--f-display); letter-spacing: .22em; }
.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a:not(.btn) {
  font: 600 .95rem/1 var(--f-display); letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); transition: color .2s;
}
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: 0; width: 44px; height: 44px; padding: 10px; cursor: pointer; }
.nav__toggle span { display: block; height: 2px; background: var(--text); margin: 7px 0; transition: transform .25s var(--ease); }
.nav__toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child  { transform: translateY(-4.5px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 68px 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(12, 14, 11, .97); border-bottom: 1px solid var(--line);
    padding: 8px 16px 20px;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .2s, transform .2s var(--ease);
  }
  .nav__links.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav__links a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .nav__links .btn { margin-top: 16px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 120px 16px 120px;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__topo {
  position: absolute; inset: -10%;
  opacity: .22;
  background:
    repeating-radial-gradient(ellipse at 30% 60%, transparent 0 22px, var(--line-2) 23px 24px),
    repeating-radial-gradient(ellipse at 78% 30%, transparent 0 30px, var(--line) 31px 32px);
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
  animation: drift 60s linear infinite alternate;
}
@keyframes drift { to { transform: translate3d(-3%, 2%, 0) scale(1.05); } }
.hero__glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 45% at 50% 48%, rgba(179, 166, 142, .14), transparent 70%),
    radial-gradient(ellipse 80% 40% at 50% 110%, rgba(224, 112, 42, .16), transparent 70%),
    linear-gradient(180deg, transparent 60%, var(--bg));
}
.hero__scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
}
.hero__content { text-align: center; max-width: 860px; }
.hero__logo {
  width: min(760px, 92vw); height: auto; margin: 0 auto 28px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.7));
  animation: rise 1.2s var(--ease) both;
}
.hero__tag {
  font: 800 clamp(1.6rem, 3.6vw, 2.6rem)/1.1 var(--f-display);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 14px;
  animation: rise 1.2s .15s var(--ease) both;
}
.hero__tag em { font-style: normal; color: var(--hazard); }
.hero__sub {
  color: var(--muted); max-width: 640px; margin: 0 auto 34px;
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  animation: rise 1.2s .3s var(--ease) both;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; animation: rise 1.2s .45s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.hud {
  position: absolute; top: 92px;
  display: flex; flex-direction: column; gap: 6px;
  font: 400 .72rem/1 var(--f-mono); letter-spacing: .14em; color: var(--muted);
}
.hud b { color: var(--hazard); font-weight: 600; }
.hud--tl { left: max(16px, calc((100vw - var(--wrap)) / 2)); }
.hud--tr { right: max(16px, calc((100vw - var(--wrap)) / 2)); text-align: right; }
.blink { animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
@media (max-width: 640px) { .hud { display: none; } }

.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font: 400 .68rem/1 var(--f-mono); letter-spacing: .3em; color: var(--muted); text-decoration: none;
}
.hero__scroll i { width: 1px; height: 40px; background: linear-gradient(var(--muted), transparent); animation: drop 2s var(--ease) infinite; transform-origin: top; }
@keyframes drop { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { opacity: 0; } }

/* ---------- Ticker ---------- */
.ticker {
  background: var(--hazard); color: #120a04;
  overflow: hidden; white-space: nowrap;
  transform: rotate(-1.2deg) scale(1.03);
  margin: -12px 0;
  position: relative; z-index: 2;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.ticker__track { display: inline-flex; animation: ticker 40s linear infinite; }
.ticker span {
  font: 800 1.15rem/1 var(--f-display); letter-spacing: .16em; text-transform: uppercase;
  padding: 16px 26px;
  display: inline-flex; align-items: center; gap: 26px;
}
.ticker span::after { content: ""; width: 10px; height: 10px; background: currentColor; transform: rotate(45deg); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 12vw, 150px) 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }

/* briefing */
.briefing__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: end; }
.briefing__body p { color: var(--muted); font-size: 1.08rem; }
.briefing__body p:first-child { color: var(--text); }
@media (max-width: 900px) { .briefing__grid { grid-template-columns: 1fr; } }

/* area of operations */
.islands { background: radial-gradient(ellipse 50% 60% at 30% 50%, rgba(179, 166, 142, .06), transparent 70%), var(--bg); }
.ao { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.ao__map { width: 100%; height: auto; display: block; }
.ao__grid path { stroke: var(--line); stroke-width: 1; fill: none; }
.ao__ring { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 2 8; }
.ao__zone { fill: rgba(224, 112, 42, .05); stroke: var(--hazard); stroke-width: 1.5; stroke-dasharray: 10 6; animation: spin 80s linear infinite; transform-origin: 300px 300px; }
@keyframes spin { to { transform: rotate(360deg); } }
.isle__land { fill: #2a2e22; stroke: var(--signal); stroke-width: 1.5; }
.isle__contour { fill: none; stroke: #4a5236; stroke-width: 1; }
.isle text { font: 600 12px var(--f-mono); letter-spacing: .16em; fill: var(--muted); }
.isle--core .isle__land { fill: #2e231a; stroke: var(--hazard); stroke-width: 2; }
.isle--core .isle__contour { stroke: #5a3d26; }
.ao__nodig { pointer-events: none; }
.nodig-line { stroke: rgba(224, 112, 42, .28); stroke-width: 2; }
.ao__core-label { font: 800 22px var(--f-display); letter-spacing: .14em; fill: var(--text); paint-order: stroke; stroke: #1c140e; stroke-width: 5px; }
.ao__core-sub { font: 600 11px var(--f-mono); letter-spacing: .14em; fill: var(--hazard); paint-order: stroke; stroke: #1c140e; stroke-width: 4px; }
.ao__legend { display: grid; gap: 20px; }
.ao__item { border: 1px solid var(--line); background: var(--bg-2); padding: 28px 26px; }
.ao__item:last-child { border-color: rgba(224, 112, 42, .45); }
.ao__code { font: 600 .74rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.sw { width: 12px; height: 12px; display: inline-block; }
.sw--outer { background: #2a2e22; box-shadow: inset 0 0 0 2px var(--signal); }
.sw--core { background: repeating-linear-gradient(45deg, #2e231a 0 3px, rgba(224, 112, 42, .6) 3px 5px); box-shadow: inset 0 0 0 2px var(--hazard); }
.ao__item h3 { margin-bottom: 10px; }
.ao__item p:last-child { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .ao { grid-template-columns: 1fr; } .ao__map { max-width: 520px; margin-inline: auto; } }

/* features */
.features { background: linear-gradient(180deg, var(--bg-2), var(--bg)); }
.cards {
  margin-top: 56px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--line); border: 1px solid var(--line);
}
.card {
  background: var(--bg-2);
  padding: 36px 32px 32px;
  position: relative;
  transition: background .3s;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 0;
  background: var(--hazard); transition: width .4s var(--ease);
}
.card:hover { background: var(--surface); }
.card:hover::before { width: 100%; }
.card__icon { width: 44px; height: 44px; fill: none; stroke: var(--concrete); stroke-width: 2; stroke-linecap: square; margin-bottom: 26px; }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--muted); margin: 0; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } .card { padding: 28px 22px; } }

/* underground cross-section */
.underground { background: var(--bg); overflow: hidden; }
.xsec {
  margin-top: 40px;
  display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: stretch;
}
.xsec__svg { width: 100%; height: auto; display: block; background: linear-gradient(180deg, #161a14 0%, #0f120d 25%); border: 1px solid var(--line); }
.strata--soil { fill: #2a2519; }
.strata--clay { fill: #221d15; }
.strata--rock { fill: #18171a; }
.soil-dots { fill: #3a3324; }
.rock-lines { fill: none; stroke: #26252a; stroke-width: 1.5; }
.surface { fill: none; stroke: var(--signal); stroke-width: 2; opacity: .8; }
.trees path { fill: #2f3a24; }
.patrol { fill: #3a3f33; stroke: #3a3f33; stroke-width: 3; }
.tunnels path { fill: none; stroke: #0a0a09; stroke-width: 16; stroke-linejoin: round; }
.hatch { fill: var(--hazard); }
.room { cursor: pointer; outline: none; }
.room rect { fill: #0b0c0a; stroke: var(--concrete-2); stroke-width: 2; transition: stroke .2s, fill .2s; }
.room__art { fill: none; stroke: var(--concrete-2); stroke-width: 2.5; transition: stroke .2s; }
.room text { font: 600 13px var(--f-mono); letter-spacing: .14em; fill: var(--muted); transition: fill .2s; }
.room:hover rect, .room:focus-visible rect, .room.is-active rect { stroke: var(--hazard); fill: #17110b; }
.room:hover .room__art, .room:focus-visible .room__art, .room.is-active .room__art { stroke: var(--concrete); }
.room:hover text, .room:focus-visible text, .room.is-active text { fill: var(--hazard); }
.room.is-active rect { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { stroke-opacity: .45; } }
.depth path { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.depth text { font: 400 12px var(--f-mono); fill: var(--muted); }

.xsec__panel {
  border: 1px solid var(--line); background: var(--bg-2);
  padding: 28px 24px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative;
}
.xsec__panel::before, .xsec__panel::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--hazard);
}
.xsec__panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.xsec__panel::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.xsec__code { font: 600 .72rem/1 var(--f-mono); letter-spacing: .18em; color: var(--hazard); margin-bottom: 14px; }
.xsec__panel h3 { margin-bottom: 12px; }
.xsec__panel p:last-child { color: var(--muted); margin: 0; }
@media (max-width: 960px) { .xsec { grid-template-columns: 1fr; } }

/* PMC tiers */
.pmc { background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(163, 184, 108, .07), transparent 70%), var(--bg-2); }
.tiers { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tier {
  border: 1px solid var(--line); background: var(--bg);
  padding: 34px 28px;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  transition: transform .3s var(--ease), border-color .3s;
}
.tier:hover { transform: translateY(-4px); border-color: var(--line-2); }
.tier--mid { background: linear-gradient(180deg, #1c1a14, var(--bg)); border-color: var(--concrete-2); }
.tier__code { font: 600 .72rem/1 var(--f-mono); letter-spacing: .16em; color: var(--signal); margin-bottom: 20px; }
.tier h3 { font-size: 2rem; margin-bottom: 14px; }
.tier p:last-child { color: var(--muted); margin: 0; }
@media (max-width: 900px) { .tiers { grid-template-columns: 1fr; } }

/* production chain */
.chain {
  list-style: none; padding: 0; margin: 56px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  counter-reset: step;
}
.chain li { padding: 0 28px 0 0; position: relative; }
.chain li::before {
  content: ""; display: block; height: 2px; margin-bottom: 26px;
  background: linear-gradient(90deg, var(--hazard) 0 12px, var(--line-2) 12px);
}
.chain li::after {
  content: ""; position: absolute; top: -5px; right: 22px;
  width: 10px; height: 10px; border-top: 2px solid var(--line-2); border-right: 2px solid var(--line-2);
  transform: rotate(45deg);
}
.chain li:last-child::after { display: none; }
.chain__n { font: 800 3.4rem/1 var(--f-display); color: var(--line-2); display: block; margin-bottom: 8px; }
.chain h3 { margin-bottom: 10px; color: var(--concrete); }
.chain p { color: var(--muted); margin: 0; }
@media (max-width: 900px) {
  .chain { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .chain li::after { display: none; }
}
@media (max-width: 520px) { .chain { grid-template-columns: 1fr; } }

/* FAQ */
.faq h2 { margin-bottom: 40px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  padding: 24px 40px 24px 0; position: relative;
  font: 700 1.35rem/1.2 var(--f-display); text-transform: uppercase; letter-spacing: .04em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font: 400 1.6rem/1 var(--f-mono); color: var(--hazard); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-right: 40px; margin: -6px 0 24px; }

/* enlist */
.enlist {
  text-align: center; overflow: hidden;
  background:
    radial-gradient(ellipse 60% 70% at 50% 100%, rgba(224, 112, 42, .18), transparent 70%),
    var(--bg);
}
.enlist__inner { display: flex; flex-direction: column; align-items: center; }
.enlist__logo { width: min(320px, 70vw); height: auto; opacity: .9; margin-bottom: 30px; }
.enlist h2 { font-size: clamp(2.8rem, 8vw, 6rem); margin-bottom: 18px; }
.enlist p { color: var(--muted); max-width: 540px; margin-bottom: 34px; }
.enlist .hero__cta { animation: none; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 30px 0; font-size: .9rem; color: var(--muted); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer .nav__brand { font-size: 1.1rem; color: var(--text); }
.footer__top { text-decoration: none; font: 600 .8rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; }
.footer__top:hover { color: var(--text); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
