/* DEFCON CONSULTING LTD — AI-BORG system presentation. Builds on ../assets/css/main.css (tokens, fonts, header, buttons, HUD).
   Layout: a full-bleed map hero, a strip of headline numbers, then numbered chapters that follow the pipeline in order,
   text on one side and a live animation on the other. No inline styles (strict Content-Security-Policy). */
:root {
  --panel: #07090b;
  --teal: #8fd6c0;
  --violet: #b9a2ff;
  --red: #ff5a3c;
}

.header-inner .header-link {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line-strong); padding: 9px 14px; transition: color .2s, border-color .2s;
}
.header-inner .header-link span { color: var(--signal); }
.header-inner .header-link:hover { color: var(--signal); border-color: var(--signal); }

.chapter-text .mono-note { margin-top: 18px; }
.mono-note { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }

/* ---------- hero ---------- */
.sys-hero { position: relative; min-height: 88vh; min-height: 88svh; display: flex; align-items: flex-end; overflow: hidden;
  padding: calc(var(--header-h) + 40px) 0 clamp(40px, 7vh, 72px); }
.sys-hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sys-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(5, 6, 7, 0.92) 0%, rgba(5, 6, 7, 0.55) 38%, rgba(5, 6, 7, 0) 62%),
              linear-gradient(0deg, rgba(5, 6, 7, 0.9) 0%, rgba(5, 6, 7, 0) 30%); }
.sys-hero-inner { position: relative; z-index: 1; }
.sys-hero .eyebrow { margin-bottom: 18px; color: var(--signal); }
.sys-hero .lead { color: var(--ink); max-width: 620px; }
.hero-date { margin-top: 22px; }
.hero-date span { color: var(--signal); }

/* ---------- strip of numbers ---------- */
.sys-strip { position: relative; z-index: 1; border-block: 1px solid var(--line); background: var(--bg); padding-block: 22px; }
.strip-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.stat { display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--line-strong); padding-left: 14px; }
.stat b { font-family: var(--font-sans); font-weight: 300; font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

/* ---------- chapters ---------- */
.chapter { position: relative; z-index: 1; background: var(--bg); padding-block: clamp(56px, 9vh, 110px); border-bottom: 1px solid var(--line); }
.chapter.alt { background: #040506; }
.chapter-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.chapter.alt .chapter-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.chapter.alt .chapter-text { order: 2; }
.chapter-num { font-family: var(--font-sans); font-weight: 300; font-size: clamp(2.6rem, 4vw, 4rem); line-height: 1; letter-spacing: -0.04em; color: var(--signal); margin-bottom: 14px; }
.chapter .label { margin-bottom: 14px; }
.chapter-title { font-family: var(--font-display); font-stretch: 112%; font-weight: 640; letter-spacing: -0.025em; line-height: 1.02;
  font-size: clamp(1.9rem, 3.4vw, 3.2rem); text-wrap: balance; margin-bottom: 20px; max-width: 18ch; }
.chapter-lead { color: var(--ink); font-size: clamp(1.02rem, 1.3vw, 1.15rem); max-width: 60ch; margin-bottom: 18px; }
.points { display: grid; gap: 10px; max-width: 62ch; }
.points li { position: relative; padding-left: 22px; color: var(--muted); font-size: 0.98rem; }
.points li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 10px; height: 1px; background: var(--signal); }
.points b, .chapter figcaption b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.example { margin-top: 22px; border: 1px solid var(--line); background: var(--panel); padding: 14px 16px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7; color: var(--muted); max-width: 62ch; }
.ex-tag { display: inline-block; margin-right: 10px; padding: 1px 7px; border: 1px solid var(--line-strong); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.example mark { background: rgba(255, 176, 32, 0.2); color: var(--ink); border-bottom: 1px solid var(--signal); }
.example mark.neg { background: rgba(143, 214, 192, 0.18); border-bottom-color: var(--teal); }

.chapter-figure { position: relative; margin: 0; border: 1px solid var(--line); background: var(--panel); padding: 14px; }
.chapter-figure::before, .chapter-figure::after, .map-figure::before, .map-figure::after { content: ""; position: absolute; width: 12px; height: 12px; border-color: var(--line-strong); border-style: solid; pointer-events: none; }
.chapter-figure::before, .map-figure::before { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.chapter-figure::after, .map-figure::after { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.chapter-figure canvas { width: 100%; aspect-ratio: 16 / 10; }
.chapter figcaption { margin-top: 10px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--muted); }

/* ---------- 04 map ---------- */
.wide-head { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(24px, 4vw, 64px); align-items: end; margin-bottom: 26px; }
.wide-head .chapter-title { margin-bottom: 0; }
.wide-head .chapter-lead { margin-bottom: 0; color: var(--muted); }
.map-figure { position: relative; margin: 0; border: 1px solid var(--line); background: var(--panel); }
.map-figure canvas { width: 100%; aspect-ratio: 16 / 9; max-height: 76vh; }
.map-figure figcaption { position: absolute; left: 18px; bottom: 44px; display: flex; flex-direction: column; gap: 4px; max-width: min(520px, 70%); margin: 0; }
.cap-date { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.14em; color: var(--signal); text-transform: uppercase; }
.cap-text { font-family: var(--font-sans); letter-spacing: 0; font-size: clamp(0.95rem, 1.4vw, 1.25rem); color: var(--ink); }

/* ---------- 08 analyst ---------- */
.analyst-figure canvas { aspect-ratio: 16 / 6; }
.answer { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; min-height: 230px; }
.answer-q { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 10px; }
.answer-q::before { content: "Q  "; color: var(--signal); }
.answer-bluf { border-left: 2px solid var(--signal); padding-left: 12px; font-size: 0.98rem; line-height: 1.55; min-height: 4.6em; }
.answer-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.answer-checks li.ok { color: var(--teal); }
.answer-checks li.ok::before { content: "✓ "; }
.answer-rejected { margin-top: 12px; font-size: 0.85rem; color: var(--muted); }
.answer-rejected s { color: var(--red); text-decoration-color: var(--red); }
.answer-rejected b { color: var(--red); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; font-weight: 500; }

/* ---------- 10 principles ---------- */
.principle-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.principle-grid article { border: 1px solid var(--line); background: var(--panel); padding: 20px; }
.principle-grid h4 { margin: 0 0 10px; font-family: var(--font-mono); font-weight: 500; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--signal); }
.principle-grid p { color: var(--muted); font-size: 0.95rem; }

/* ---------- console screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.shots figure { margin: 0; border: 1px solid var(--line); background: var(--panel); padding: 8px; }
.shots img { width: 100%; height: auto; }
.shots figcaption { margin-top: 8px; }

/* ---------- live ---------- */
.panel.live { padding-top: clamp(56px, 9vh, 110px); padding-bottom: clamp(64px, 10vh, 120px); }
.panel.live::before { background: none; }
.panel.live .contact-address { margin-top: 26px; }

@media (max-width: 1180px) {
  .strip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .principle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .chapter-grid, .chapter.alt .chapter-grid, .wide-head { grid-template-columns: minmax(0, 1fr); }
  .chapter.alt .chapter-text { order: 0; }
  .sys-hero::after { background: linear-gradient(0deg, rgba(5, 6, 7, 0.95) 0%, rgba(5, 6, 7, 0.7) 45%, rgba(5, 6, 7, 0.1) 80%); }
  .map-figure canvas { aspect-ratio: 4 / 3; }
  .map-figure figcaption { position: static; padding: 12px 14px; max-width: none; }
  .header-inner .header-link { padding: 7px 10px; font-size: 11px; }
}
@media (max-width: 640px) {
  .strip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .principle-grid, .shots { grid-template-columns: minmax(0, 1fr); }
  .chapter-figure { padding: 10px; }
  .chapter-figure canvas { aspect-ratio: 4 / 3; }
  .analyst-figure canvas { aspect-ratio: 16 / 9; }
  .tall-figure canvas { aspect-ratio: 4 / 5; }
}
