/* ===========================================================
   BAD MANAGEMENT — shared system  (tactical / industrial)
   Matches index.html design. Loaded by all sub-pages with shared.js.
=========================================================== */

/* Self-hosted fonts (latin subset). Source: Google Fonts. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/jetbrains-mono-400.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/jetbrains-mono-500.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/jetbrains-mono-600.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/jetbrains-mono-700.woff2') format('woff2'); }
@font-face { font-family: 'Saira Condensed'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/saira-condensed-500.woff2') format('woff2'); }
@font-face { font-family: 'Saira Condensed'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/saira-condensed-700.woff2') format('woff2'); }
@font-face { font-family: 'Saira Condensed'; font-style: normal; font-weight: 800; font-display: swap; src: url('assets/fonts/saira-condensed-800.woff2') format('woff2'); }
@font-face { font-family: 'Saira Condensed'; font-style: normal; font-weight: 900; font-display: swap; src: url('assets/fonts/saira-condensed-900.woff2') format('woff2'); }

:root {
  --bg: #0A0A0A;
  --bg-2: #111111;
  --bg-3: #161616;
  --panel: #1A1A1A;
  --rule: #262626;
  --rule-2: #333333;
  --ink: #FFFFFF;
  --ink-2: #E8E8E8;
  --ink-dim: #8A8A8A;
  --ink-dimmer: #828282;
  --red: #E63E1E;
  --red-2: #FF5530;
  --red-dim: #7A1F0E;

  --display: 'Saira Condensed', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* legacy aliases — sub-page <style> blocks still reference these */
  --border: var(--rule);
  --border-2: var(--rule-2);
  --surface: var(--bg-2);
  --surface-2: var(--bg-3);
  --text: var(--ink);
  --text-dim: var(--ink-dim);
  --text-faint: var(--ink-dimmer);
  --accent: var(--red);
  --accent-2: var(--red-2);

  --maxw: 1480px;
  --pad-x: clamp(20px, 4vw, 48px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--red); color: var(--ink); }

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 0; z-index: 80;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px var(--pad-x);
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink);
}
.brand-mark {
  width: 38px; height: 38px; flex: none;
  color: var(--ink); display: inline-flex;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-text {
  font-family: var(--display); font-weight: 900;
  font-size: 22px; letter-spacing: 0.005em;
  text-transform: uppercase; line-height: 1;
  color: var(--ink);
}
.brand-text .slash { color: var(--red); margin: 0 1px; font-weight: 700; }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-2); padding: 4px 0;
  position: relative;
  transition: color .15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--red); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -8px;
  height: 2px; background: var(--red);
}

.nav-cta {
  font-family: var(--display); font-weight: 800; font-size: 15px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink); background: var(--red);
  padding: 11px 18px 10px;
  display: inline-flex; align-items: center; gap: 10px;
  white-space: nowrap;
  transition: background .15s, color .15s;
  position: relative;
}
.nav-cta::after { content: "→"; font-family: var(--body); font-weight: 700; }
.nav-cta:hover { background: var(--ink); color: var(--bg); }
.nav-menu-btn { display: none; }

@media (max-width: 1000px) {
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2); border-bottom: 1px solid var(--rule);
    padding: 12px var(--pad-x); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .nav-links a.active::after { display: none; }
  .nav-menu-btn { display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--rule); color: var(--ink);
    font-family: var(--mono); font-size: 18px; }
}

/* ---------- LAYOUT ---------- */
.section {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(64px, 9vw, 120px) var(--pad-x);
  position: relative;
}
.section.tight { padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); }
.section.bleed { max-width: none; padding-left: 0; padding-right: 0; }

/* ---------- TYPE ---------- */
h1, h2, h3, h4 {
  font-family: var(--display); font-weight: 900;
  font-stretch: 75%;
  margin: 0; line-height: 0.88;
  letter-spacing: -0.008em;
  text-transform: uppercase;
  color: var(--ink);
}
h1 { font-size: clamp(48px, 8vw, 132px); }
h2 { font-size: clamp(40px, 6vw, 88px); }
h3 { font-size: clamp(22px, 2.4vw, 32px); }
h4 { font-size: clamp(18px, 1.8vw, 24px); }
p { margin: 0; }
.red { color: var(--red); }

.lead {
  font-family: var(--body);
  font-size: clamp(16px, 1.2vw, 19px);
  color: var(--ink-2);
  max-width: 60ch;
  line-height: 1.6;
  text-wrap: pretty;
}

.eyebrow, .row-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-dim);
}
.eyebrow .tag, .row-eyebrow .num {
  color: var(--red); font-weight: 700;
}
.eyebrow .dot {
  width: 7px; height: 7px; background: var(--red);
  transform: rotate(45deg); display: inline-block;
}
.row-eyebrow {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
}
.row-eyebrow .rule { flex: 1; height: 1px; background: var(--rule); }

/* tactical mark — red bracket label */
.tac {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em;
  color: var(--ink-dim); text-transform: uppercase;
}
.tac::before { content: ""; width: 18px; height: 2px; background: var(--red); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-weight: 700;
  font-size: 17px; letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink); background: transparent;
  border: 1px solid var(--ink);
  padding: 13px 22px;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn .arrow { color: var(--red); font-family: var(--body); font-weight: 700; transition: transform .15s; }
.btn:hover .arrow { transform: translateX(4px); color: var(--bg); }
.btn.primary {
  background: var(--red); border-color: var(--red); color: var(--ink);
  font-weight: 800;
}
.btn.primary .arrow { color: var(--ink); }
.btn.primary:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover .arrow { color: var(--bg); }
.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- CARDS / SURFACES ---------- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  padding: 28px;
  position: relative;
}
.card::before {
  content: ""; position: absolute; top: -1px; left: -1px;
  width: 32px; height: 2px; background: var(--red);
}
.card .card-num {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red);
}
.card h3 { margin-top: 14px; }
.card p { color: var(--ink-2); margin-top: 14px; }

/* corner ticks */
.tick-corners { position: relative; }
.tick-corners::before, .tick-corners::after,
.tick-corners > .tc-a, .tick-corners > .tc-b {
  content: ""; position: absolute;
  width: 12px; height: 12px;
  border: 2px solid var(--red);
}
.tick-corners::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.tick-corners::after  { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.tick-corners > .tc-a { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.tick-corners > .tc-b { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

/* ---------- PAGE HEADER ---------- */
.page-head {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: ""; position: absolute; right: -80px; top: -40px;
  width: 280px; height: 480px; background: var(--red);
  clip-path: polygon(50% 0, 100% 42%, 65% 42%, 80% 100%, 0 55%, 40% 55%);
  opacity: 0.08; pointer-events: none;
}
.page-head::after {
  content: ""; position: absolute; left: 0; bottom: 32px;
  width: 200px; height: 2px; background: var(--red);
}
.page-head-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(60px, 8vw, 110px) var(--pad-x) clamp(40px, 6vw, 72px);
  position: relative; z-index: 1;
}
.page-head .eyebrow { margin-bottom: 24px; }
.page-head h1 { max-width: 16ch; }
.page-head .lead { margin-top: 28px; max-width: 60ch; }
.page-head .btn-row { margin-top: 32px; }

/* ---------- FORM ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-dim);
}
.field input, .field textarea, .field select {
  font: inherit; font-family: var(--body);
  background: var(--bg-2);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
  width: 100%;
  transition: border-color .15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-dimmer); }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--red); }
.field textarea { min-height: 140px; resize: vertical; font-family: var(--body); }

/* ---------- UTIL ---------- */
.hr-mono {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-dimmer);
}
.hr-mono::before, .hr-mono::after {
  content: ""; flex: 1; height: 1px; background: var(--rule);
}

.kbd {
  font-family: var(--mono); font-size: 11px;
  border: 1px solid var(--rule-2);
  background: var(--bg-2);
  padding: 2px 6px;
  color: var(--ink-dim);
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--rule);
  background: var(--bg);
  margin-top: 64px;
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 56px var(--pad-x) 28px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-brand-block .brand { margin-bottom: 18px; }
.footer-brand-block .lead {
  font-family: var(--body); font-size: 13px; line-height: 1.6;
  color: var(--ink-dim); max-width: 36ch;
}
.footer h4 {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red); margin: 0 0 16px;
  font-weight: 600;
  text-transform: uppercase;
}
.footer ul { list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px; }
.footer ul a {
  color: var(--ink-2); font-family: var(--body); font-size: 14px;
  transition: color .15s;
}
.footer ul a:hover { color: var(--red); }
.footer-bottom {
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px var(--pad-x);
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10px;
  color: var(--ink-dimmer);
  letter-spacing: 0.18em; text-transform: uppercase;
  flex-wrap: wrap; gap: 12px;
}
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; padding: 48px var(--pad-x) 24px; gap: 32px; }
  .footer-brand-block { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}
