/* ═══════════════════════════════════════════════════════════════
   LOADOUT · SHARED STYLESHEET  ·  v0.4.2
   Armorer's dossier aesthetic — refined.
   Designed to work in Chromium, Gecko, WebKit, and Brave
   (including its aggressive font + API fingerprint stripping).
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  /* — surfaces — */
  --void:      #000000;
  --coal:      #070707;
  --carbon:    #0f0f0f;
  --steel:     #161616;
  --iron:      #1e1e1e;
  --line:      #262626;
  --line-dim:  #181818;

  /* — text — */
  --ash:       #6a6a6a;
  --bone:      #c8c8c8;
  --paper:     #ededed;
  --white:     #ffffff;

  /* — signal — */
  --amber:     #FFB300;
  --amber-dim: rgba(255,179,0,0.4);
  --amber-gh:  rgba(255,179,0,0.08);
  --red:       #E63946;
  --red-gh:    rgba(230,57,70,0.08);
  --green:     #5FAD56;
  --green-gh:  rgba(95,173,86,0.08);

  /* — type stacks with Brave-safe fallbacks —
     Brave strips font fingerprinting; the stack has to degrade cleanly
     to system fonts without layout shift. */
  --ff-display: 'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Mono',
                'Consolas', 'Menlo', monospace;
  --ff-body:    'Manrope', ui-sans-serif, system-ui, -apple-system,
                'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --ff-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Mono',
                'Consolas', 'Menlo', monospace;

  /* — layout — */
  --nav-h:     60px;
  --chrome-h:  60px;  /* nav only */

  --ease:      cubic-bezier(0.2, 0.6, 0.2, 1);
}

/* Brave/Firefox may synthesize bold from a single font weight;
   we prefer failing honestly over a muddy synthesized render. */
html { font-synthesis: none; -webkit-text-size-adjust: 100%; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--chrome-h) + 16px); }

body {
  background: var(--void);
  color: var(--paper);
  font-family: var(--ff-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 760px) { .wrap { padding: 0 20px; } }
@media (max-width: 380px) { .wrap { padding: 0 16px; } }

/* ─── FOCUS: visible for keyboard users, invisible for mouse ─── */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}
a:focus-visible, button:focus-visible {
  outline-offset: 4px;
}

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

/* ═══════════ NAV ═══════════ */
nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  background: rgba(0,0,0,0.92); /* opaque-ish fallback if blur drops */
  border-bottom: 1px solid var(--line);
  height: var(--nav-h);
  display: flex; align-items: center;
}
/* Only apply blur+transparency if the browser supports it — Brave can return false */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  nav.site-nav {
    background: rgba(0,0,0,0.78);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
            backdrop-filter: blur(14px) saturate(1.2);
  }
}

.nav-inner {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%;
}
.nav-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 1.08rem;
  letter-spacing: 0.1em;
  color: var(--white);
  text-decoration: none;
  transition: color .18s var(--ease);
}
.nav-logo:hover { color: var(--amber); }
.nav-mark {
  width: 22px; height: 22px;
  border-radius: 5px;
  background: var(--carbon);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--iron);
}
.nav-mark svg { width: 14px; height: 14px; overflow: visible; }

.nav-right {
  display: flex; gap: 28px;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
}
.nav-right a {
  color: var(--ash);
  text-decoration: none;
  transition: color .18s var(--ease);
  position: relative;
  padding-bottom: 4px;
}
.nav-right a::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .22s var(--ease);
}
.nav-right a:hover { color: var(--amber); }
.nav-right a:hover::after { transform: scaleX(1); }

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ff-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: none;
  transition: color .2s var(--ease);
}
.nav-back:hover { color: var(--amber); }
.nav-back svg { transition: transform .2s var(--ease); }
.nav-back:hover svg { transform: translateX(-3px); }
@media (max-width: 480px) {
  .nav-back { font-size: 0.6rem; letter-spacing: 0.14em; gap: 6px; }
}

/* ═══════════ CODE LABEL ═══════════ */
.code {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-mono);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
}
.code::before {
  content: '';
  width: 10px; height: 1px;
  background: currentColor;
  flex-shrink: 0;
}
.code-dim   { color: var(--ash); }
.code-red   { color: var(--red); }
.code-green { color: var(--green); }

/* ═══════════ TYPE PRIMITIVES ═══════════ */
.sec-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 20px;
  text-transform: uppercase;
  text-wrap: balance;
}
.sec-title em { font-style: normal; font-weight: 500; color: var(--amber); }
.sec-sub {
  font-size: 0.975rem;
  font-weight: 300;
  color: var(--ash);
  max-width: 540px;
  line-height: 1.7;
  text-wrap: pretty;
}
.sec-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 72px; gap: 40px; flex-wrap: wrap;
}
.sec-head-left { max-width: 640px; }
.sec-head-left .code { margin-bottom: 20px; }
.sec-meta {
  font-family: var(--ff-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ash);
  text-align: right;
  border: 1px solid var(--line);
  padding: 14px 18px;
  line-height: 1.7;
}
.sec-meta b { color: var(--amber); font-weight: 500; }

section { padding: 120px 0; position: relative; }

/* ═══════════ FOOTER ═══════════ */
footer.site-foot {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  background: var(--coal);
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.foot-brand {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 14px;
}
.foot-mark {
  width: 44px; height: 44px;
  border-radius: 9px;
  background: var(--carbon);
  border: 1px solid var(--iron);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.foot-mark svg { width: 26px; height: 26px; overflow: visible; }
.foot-logo {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -0.04em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
}
.foot-tag {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amber);
}
.foot-col-head {
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 14px;
}
.foot-col a {
  display: block;
  font-size: 0.82rem;
  color: var(--bone);
  text-decoration: none;
  padding: 4px 0;
  transition: color .15s var(--ease);
}
.foot-col a:hover { color: var(--amber); }
.foot-bot {
  display: flex; justify-content: space-between;
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ash);
  padding-top: 24px;
  border-top: 1px dashed var(--line);
  gap: 16px;
}

/* ═══════════ RESPONSIVE — SHARED ═══════════ */
@media (max-width: 960px) {
  section { padding: 80px 0; }
  .classif .classif-left span:nth-child(n+3),
  .classif .classif-right span:nth-child(n+2) { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-right { display: none; }
  .nav-inner { padding-right: 4px; }
}
@media (max-width: 600px) {
  section { padding: 60px 0; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px; }
  .foot-bot { flex-direction: column; gap: 10px; align-items: flex-start; }
}

/* ═══════════ REDUCED MOTION ═══════════ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ═══════════ PRINT ═══════════ */
@media print {
  .classif, nav.site-nav, footer.site-foot { display: none !important; }
  body { background: white; color: black; }
}
