/* ==========================================================================
   Affiliate Forensics — core stylesheet
   Aesthetic: forensic case file. Ink-dark evidence room, warm report paper,
   monospace exhibit labels, signal-red flags, highlighter marks.
   ========================================================================== */

:root {
  /* Palette */
  --ink: #0d1014;
  --ink-2: #151a20;
  --ink-3: #1e252d;
  --ink-line: #2a323c;
  --paper: #f3efe6;
  --paper-2: #e9e3d6;
  --paper-line: #d6cebd;
  --text: #15181c;
  --text-muted: #5b5f66;
  --text-on-ink: #e9e6df;
  --muted-on-ink: #8e959e;
  --flag: #e4472c;          /* signal red — findings / flags */
  --flag-soft: rgba(228, 71, 44, 0.12);
  --mark: #f3c745;          /* highlighter */
  --ok: #3fb68b;            /* verified / clean */

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* Layout */
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
  --section-y: clamp(72px, 10vw, 128px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

::selection { background: var(--mark); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--flag);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--mark); color: var(--ink); padding: 10px 14px;
  font-family: var(--font-mono); font-size: 13px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  font-variation-settings: "opsz" 144;
}
h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.55rem); line-height: 1.2; font-variation-settings: "opsz" 48; }
h4 { font-size: 1.1rem; font-family: var(--font-sans); font-weight: 600; letter-spacing: 0; }

h1 em, h2 em { font-style: italic; color: var(--flag); }

p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--text-muted); max-width: 46ch; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--flag);
  border-radius: 50%;
  flex: none;
}

.mono { font-family: var(--font-mono); }

mark, .hl {
  background: linear-gradient(transparent 12%, var(--mark) 12%, var(--mark) 88%, transparent 88%);
  color: inherit;
  padding: 0 0.15em;
}

.redact {
  background: var(--ink);
  color: transparent;
  border-radius: 1px;
  user-select: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
@media (max-width: 480px) { .btn { white-space: normal; text-align: center; justify-content: center; } }
.btn:hover { transform: translateY(-1px); }
.btn .arrow { transition: transform .15s ease; }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary { background: var(--flag); color: #fff; }
.btn-primary:hover { background: #cf3b21; }

.btn-ghost { border-color: currentColor; color: inherit; background: transparent; }
.btn-ghost:hover { background: rgba(127,127,127,.08); }

.btn-dark { background: var(--ink); color: var(--text-on-ink); }
.btn-dark:hover { background: var(--ink-3); }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 16, 20, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--ink-line);
  color: var(--text-on-ink);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 24px;
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--text-on-ink);
}
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
}
.brand-name span { color: var(--flag); }

.nav { display: flex; align-items: center; gap: 30px; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none;
  font-size: 15px;
  color: var(--muted-on-ink);
  transition: color .15s ease;
  position: relative;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text-on-ink); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--flag);
}
.nav .btn { padding: 10px 16px; font-size: 13px; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--ink-line); color: var(--text-on-ink);
  width: 44px; height: 44px; border-radius: var(--radius); cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--ink-line);
    padding: 8px var(--gutter) 24px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { display: block; padding: 16px 0; border-bottom: 1px solid var(--ink-line); font-size: 17px; }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav .btn { margin-top: 20px; justify-content: center; padding: 14px; }
}

/* ---------- Sections ---------- */

.section { padding: var(--section-y) 0; position: relative; }
.section-dark { background: var(--ink); color: var(--text-on-ink); }
.section-dark .lead, .section-dark .eyebrow { color: var(--muted-on-ink); }
.section-alt { background: var(--paper-2); }

.section-head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head.split {
  max-width: none;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end;
}
.section-head.split .lead { margin-bottom: 0.5em; }
@media (max-width: 880px) { .section-head.split { grid-template-columns: 1fr; gap: 8px; } }

/* subtle grid texture for dark sections */
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--ink);
  color: var(--text-on-ink);
  padding: clamp(64px, 9vw, 120px) 0 clamp(72px, 9vw, 120px);
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-line), transparent);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}
.hero .eyebrow { color: var(--muted-on-ink); }
.hero h1 { color: #fff; }
.hero .lead { color: var(--muted-on-ink); margin-bottom: 36px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin-top: 44px; padding-top: 24px;
  border-top: 1px solid var(--ink-line);
  font-family: var(--font-mono); font-size: 12.5px; color: var(--muted-on-ink);
  letter-spacing: 0.04em;
}
.hero-meta span::before { content: "■ "; color: var(--flag); font-size: 9px; vertical-align: 2px; }

@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; } }

/* Evidence log (animated terminal) */
.evidence {
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.7;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.02) inset;
  overflow: hidden;
  min-width: 0;
}
.evidence-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ink-line);
  color: var(--muted-on-ink);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}
.evidence-bar .rec { display: inline-flex; align-items: center; gap: 8px; color: var(--flag); }
.evidence-bar .rec::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--flag);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }

.evidence-body {
  padding: 16px;
  height: 340px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 48px);
          mask-image: linear-gradient(to bottom, transparent 0, #000 48px);
  display: flex; flex-direction: column; justify-content: flex-end;
}
.log-line {
  display: grid; grid-template-columns: 62px 58px 1fr; gap: 10px;
  color: var(--muted-on-ink);
  white-space: nowrap;
  animation: logIn .35s ease both;
}
.log-line .msg { overflow: hidden; text-overflow: ellipsis; color: #c6c9ce; }
.log-line .tag { font-weight: 500; }
.tag-flag { color: var(--flag); }
.tag-ok { color: var(--ok); }
.tag-info { color: #7aa7d9; }
.tag-warn { color: var(--mark); }
@keyframes logIn { from { opacity: 0; transform: translateY(6px); } }

.evidence-foot {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink-line);
}
.evidence-foot div { padding: 14px 16px; border-right: 1px solid var(--ink-line); }
.evidence-foot div:last-child { border-right: 0; }
.evidence-foot b { display: block; font-size: 20px; font-weight: 500; color: #fff; }
.evidence-foot b.red { color: var(--flag); }
.evidence-foot small { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-on-ink); }

@media (max-width: 520px) {
  .log-line { grid-template-columns: 54px 1fr; }
  .log-line .time { display: none; }
  .evidence-body { height: 300px; }
}

/* ---------- Ticker strip ---------- */

.strip {
  background: var(--flag);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  overflow: hidden;
  white-space: nowrap;
  padding: 12px 0;
}
.strip-track { display: inline-flex; gap: 48px; animation: ticker 40s linear infinite; padding-left: 48px; }
.strip-track span::after { content: "✕"; margin-left: 48px; opacity: .6; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Dashboard vs forensic comparison ---------- */

.compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border: 1px solid var(--paper-line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.compare-col { padding: clamp(24px, 3.5vw, 44px); }
.compare-col + .compare-col { border-left: 1px solid var(--paper-line); background: #fbf9f4; }
.compare-label {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 18px; display: flex; justify-content: space-between; gap: 12px;
}
.compare-col h3 { margin-bottom: 24px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.kpi {
  border: 1px solid var(--paper-line); border-radius: var(--radius); padding: 14px 16px; background: #fff;
}
.kpi small { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); letter-spacing: .06em; text-transform: uppercase; }
.kpi b { font-family: var(--font-display); font-weight: 500; font-size: 28px; }
.kpi .delta { font-family: var(--font-mono); font-size: 12px; color: var(--ok); margin-left: 6px; }

.findings { list-style: none; margin: 0; padding: 0; }
.findings li {
  display: grid; grid-template-columns: auto 1fr; gap: 14px;
  padding: 14px 0; border-top: 1px dashed var(--paper-line);
  font-size: 15.5px;
}
.findings li:first-child { border-top: 0; padding-top: 0; }
.findings .fid {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--flag);
  background: var(--flag-soft); padding: 3px 7px; border-radius: 3px; height: fit-content; margin-top: 2px;
}
.findings b { font-weight: 600; }
.note-illustrative {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-muted); margin-top: 16px; letter-spacing: .02em;
}

@media (max-width: 820px) {
  .compare { grid-template-columns: 1fr; }
  .compare-col + .compare-col { border-left: 0; border-top: 1px solid var(--paper-line); }
}

/* ---------- Threat catalogue ---------- */

.threats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1px; background: var(--ink-line);
  border: 1px solid var(--ink-line);
  border-radius: 6px; overflow: hidden;
}
.threat {
  background: var(--ink);
  padding: 30px 28px 32px;
  position: relative;
  transition: background-color .2s ease;
}
.threat:hover { background: var(--ink-2); }
.threat-id {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em;
  color: var(--muted-on-ink); display: flex; justify-content: space-between; margin-bottom: 26px;
}
.threat-id .sev { color: var(--flag); }
.threat-id .sev.med { color: var(--mark); }
.threat h3 { color: #fff; font-size: 1.4rem; }
.threat p { color: var(--muted-on-ink); font-size: 15.5px; margin: 0; }
.threat .icon { width: 36px; height: 36px; margin-bottom: 20px; color: var(--flag); }

/* ---------- Process ---------- */

.process {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  counter-reset: step;
  position: relative;
}
.process::before {
  content: ""; position: absolute; top: 19px; left: 20px; right: 20px; height: 1px;
  background: repeating-linear-gradient(90deg, var(--paper-line) 0 6px, transparent 6px 12px);
}
.step { position: relative; }
.step-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--text);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 13px;
  margin-bottom: 24px; position: relative;
}
.step:last-child .step-num { background: var(--flag); border-color: var(--flag); color: #fff; }
.step h3 { font-size: 1.3rem; }
.step p { color: var(--text-muted); font-size: 15.5px; }
.step .deliv {
  font-family: var(--font-mono); font-size: 12px; color: var(--text);
  border-top: 1px solid var(--paper-line); padding-top: 12px; margin-top: 16px;
}
.step .deliv::before { content: "OUTPUT → "; color: var(--flag); }

@media (max-width: 900px) {
  .process { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .process::before { display: none; }
}
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }

/* ---------- Calculator ---------- */

.calc {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--ink-2); border: 1px solid var(--ink-line); border-radius: 6px; overflow: hidden;
}
.calc-inputs { padding: clamp(24px, 4vw, 44px); }
.calc-out {
  padding: clamp(24px, 4vw, 44px);
  border-left: 1px solid var(--ink-line);
  background: var(--ink-3);
  display: flex; flex-direction: column; justify-content: center;
}
.field { margin-bottom: 28px; }
.field:last-child { margin-bottom: 0; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.field label { font-size: 15px; color: var(--text-on-ink); }
.field output { font-family: var(--font-mono); font-size: 15px; color: #fff; }
.field .hint { font-size: 13px; color: var(--muted-on-ink); margin-top: 8px; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; background: var(--ink-line); border-radius: 2px; outline-offset: 6px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--flag); border: 3px solid var(--ink-2); box-shadow: 0 0 0 1px var(--flag); cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--flag); border: 3px solid var(--ink-2); box-shadow: 0 0 0 1px var(--flag); cursor: pointer;
}

.calc-figure small {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-on-ink);
}
.calc-figure .big {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(2.8rem, 6vw, 4.4rem); line-height: 1; color: var(--flag);
  margin: 10px 0 6px; font-variant-numeric: tabular-nums;
}
.calc-figure .sub { color: var(--muted-on-ink); font-size: 15px; }
.calc-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--ink-line);
  margin: 28px 0; border: 1px solid var(--ink-line); border-radius: var(--radius); overflow: hidden;
}
.calc-split div { background: var(--ink-3); padding: 14px 16px; }
.calc-split b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 18px; color: #fff; }
.calc-split small { font-size: 12px; color: var(--muted-on-ink); }
.calc-disclaimer { font-size: 12.5px; color: var(--muted-on-ink); margin: 20px 0 0; line-height: 1.5; }

@media (max-width: 860px) {
  .calc { grid-template-columns: minmax(0, 1fr); }
  .calc-out { border-left: 0; border-top: 1px solid var(--ink-line); }
}

/* ---------- Why us ---------- */

.why {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 96px); align-items: start;
}
.why-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--text); }
.why-list li {
  display: grid; grid-template-columns: 56px 1fr; gap: 16px;
  padding: 26px 0; border-bottom: 1px solid var(--paper-line);
}
.why-list .n { font-family: var(--font-mono); font-size: 13px; color: var(--flag); padding-top: 4px; }
.why-list h3 { font-size: 1.3rem; margin-bottom: 6px; }
.why-list p { margin: 0; color: var(--text-muted); font-size: 15.5px; }

.pullquote {
  font-family: var(--font-display); font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.25;
  font-weight: 400; font-style: italic; margin: 32px 0 0; padding-left: 24px; border-left: 3px solid var(--flag);
}

@media (max-width: 880px) { .why { grid-template-columns: 1fr; } }

/* ---------- Report mock ---------- */

.report-wrap {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 80px); align-items: center;
}
.report {
  background: #fffdf8;
  border: 1px solid var(--paper-line);
  box-shadow: 0 1px 0 var(--paper-line), 0 30px 60px -30px rgba(40, 30, 10, .35);
  padding: clamp(24px, 3.5vw, 40px);
  font-size: 14px;
  position: relative;
  transform: rotate(-1.2deg);
}
.report::before {
  content: ""; position: absolute; inset: 10px -10px -10px 10px; z-index: -1;
  background: #f7f3ea; border: 1px solid var(--paper-line); transform: rotate(2.4deg);
}
.report-head {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  border-bottom: 2px solid var(--text); padding-bottom: 14px; margin-bottom: 18px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
}
.stamp {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; color: var(--flag);
  border: 2px solid var(--flag); padding: 4px 8px; transform: rotate(4deg); font-weight: 600;
}
.report h4 { font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; margin-bottom: 12px; }
.report p { font-size: 13.5px; color: #3b3e44; line-height: 1.6; }
.report table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); font-size: 11.5px; margin: 14px 0 6px; }
.report th, .report td { text-align: left; padding: 7px 6px; border-bottom: 1px solid var(--paper-line); }
.report th { font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-size: 10.5px; }
.report td.r { text-align: right; }
.report td.flagged { color: var(--flag); }
.report-foot { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); margin-top: 14px; }

.deliverables { list-style: none; margin: 28px 0 32px; padding: 0; }
.deliverables li { padding: 12px 0 12px 30px; border-bottom: 1px solid var(--paper-line); position: relative; }
.deliverables li::before {
  content: ""; position: absolute; left: 2px; top: 19px; width: 12px; height: 12px;
  border: 1.5px solid var(--flag); transform: rotate(45deg);
}

@media (max-width: 900px) {
  .report-wrap { grid-template-columns: 1fr; }
  .report { transform: none; }
  .report::before { display: none; }
}
@media (max-width: 480px) {
  .report table th:nth-child(3), .report table td:nth-child(3) { display: none; }
}

/* ---------- CTA band ---------- */

.cta-band { background: var(--ink); color: var(--text-on-ink); padding: clamp(72px, 9vw, 112px) 0; text-align: center; }
.cta-band h2 { color: #fff; max-width: 18ch; margin: 0 auto 20px; }
.cta-band .lead { margin: 0 auto 36px; color: var(--muted-on-ink); }
.cta-band .hero-ctas { justify-content: center; }

/* ---------- Page hero (inner pages) ---------- */

.page-hero { background: var(--ink); color: var(--text-on-ink); padding: clamp(64px, 8vw, 104px) 0 clamp(56px, 7vw, 88px); }
.page-hero h1 { color: #fff; font-size: clamp(2.4rem, 5.4vw, 4.2rem); max-width: 18ch; }
.page-hero .lead { color: var(--muted-on-ink); max-width: 60ch; }
.page-hero .eyebrow { color: var(--muted-on-ink); }

/* ---------- Services detail ---------- */

.service {
  display: grid; grid-template-columns: 220px 1fr 300px; gap: clamp(24px, 4vw, 56px);
  padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid var(--paper-line);
  scroll-margin-top: 90px;
}
.service:first-child { border-top: 1px solid var(--text); }
.service-id { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; color: var(--text-muted); }
.service-id b { display: block; font-size: 30px; font-weight: 400; color: var(--flag); letter-spacing: 0; margin-bottom: 6px; }
.service h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
.service p { color: var(--text-muted); }
.service ul.checks { list-style: none; margin: 20px 0 0; padding: 0; columns: 2; column-gap: 32px; }
.service ul.checks li { padding: 6px 0 6px 22px; position: relative; break-inside: avoid; font-size: 15.5px; }
.service ul.checks li::before { content: "→"; position: absolute; left: 0; color: var(--flag); font-family: var(--font-mono); }
.service-aside {
  background: #fff; border: 1px solid var(--paper-line); border-radius: var(--radius);
  padding: 22px; font-size: 14.5px; height: fit-content;
}
.service-aside dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); }
.service-aside dd { margin: 4px 0 16px; }
.service-aside dd:last-child { margin-bottom: 0; }

@media (max-width: 1000px) {
  .service { grid-template-columns: 1fr; gap: 16px; }
  .service-aside { max-width: 420px; }
}
@media (max-width: 560px) { .service ul.checks { columns: 1; } }

.service-index { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.service-index a {
  font-family: var(--font-mono); font-size: 12.5px; text-decoration: none;
  border: 1px solid var(--ink-line); color: var(--muted-on-ink); padding: 8px 12px; border-radius: 3px;
  transition: color .15s, border-color .15s;
}
.service-index a:hover { color: #fff; border-color: var(--flag); }

/* ---------- Methodology ---------- */

.phase {
  display: grid; grid-template-columns: 120px 1fr 1fr; gap: clamp(24px, 4vw, 56px);
  padding: clamp(36px, 5vw, 56px) 0; border-top: 1px solid var(--paper-line);
}
.phase:first-child { border-top: 1px solid var(--text); }
.phase-num { font-family: var(--font-display); font-size: 64px; line-height: 1; color: var(--flag); font-weight: 400; }
.phase h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
.phase p { color: var(--text-muted); }
.phase .tools { font-family: var(--font-mono); font-size: 13px; }
.phase .tools li { padding: 8px 0; border-bottom: 1px dashed var(--paper-line); list-style: none; }
.phase .tools ul { margin: 0; padding: 0; }
.phase .tools h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; margin-bottom: 8px; }
@media (max-width: 900px) { .phase { grid-template-columns: 1fr; gap: 12px; } }

.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.principle { border-top: 2px solid var(--flag); padding-top: 22px; }
.principle h3 { color: #fff; font-size: 1.3rem; }
.principle p { color: var(--muted-on-ink); font-size: 15.5px; margin: 0; }
@media (max-width: 860px) { .principles { grid-template-columns: 1fr; } }

/* ---------- Case patterns ---------- */

.case {
  background: #fff; border: 1px solid var(--paper-line); border-radius: 6px; overflow: hidden;
  margin-bottom: 32px;
}
.case-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  padding: 16px 28px; background: var(--ink); color: var(--muted-on-ink);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.case-head .type { color: var(--flag); }
.case-body { display: grid; grid-template-columns: 1.3fr 1fr; }
.case-main { padding: clamp(24px, 4vw, 44px); }
.case-main h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.case-main h4 { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; margin: 26px 0 8px; }
.case-main p { color: #3b3e44; }
.case-side { padding: clamp(24px, 4vw, 44px); background: #fbf9f4; border-left: 1px solid var(--paper-line); }
.case-side h4 { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; margin-bottom: 14px; }
.signals { list-style: none; margin: 0 0 24px; padding: 0; font-size: 15px; }
.signals li { padding: 10px 0 10px 24px; border-bottom: 1px dashed var(--paper-line); position: relative; }
.signals li::before { content: "!"; position: absolute; left: 0; top: 11px; width: 15px; height: 15px; border-radius: 50%; background: var(--flag); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; font-family: var(--font-mono); }
.case-side .outcome { border-top: 2px solid var(--text); padding-top: 16px; font-size: 15px; }
@media (max-width: 860px) {
  .case-body { grid-template-columns: 1fr; }
  .case-side { border-left: 0; border-top: 1px solid var(--paper-line); }
}

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(40px, 6vw, 88px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-aside h3 { font-size: 1.4rem; }
.contact-aside ol { padding-left: 0; list-style: none; counter-reset: c; margin: 0 0 32px; }
.contact-aside ol li { counter-increment: c; padding: 16px 0 16px 44px; border-bottom: 1px solid var(--paper-line); position: relative; color: var(--text-muted); font-size: 15.5px; }
.contact-aside ol li::before { content: "0" counter(c); position: absolute; left: 0; top: 17px; font-family: var(--font-mono); font-size: 13px; color: var(--flag); }
.contact-aside ol li b { color: var(--text); display: block; font-weight: 600; }
.contact-direct { background: var(--ink); color: var(--text-on-ink); padding: 24px; border-radius: 6px; font-size: 15px; }
.contact-direct a { color: #fff; }
.contact-direct small { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-on-ink); display: block; margin-bottom: 4px; }

.form { background: #fff; border: 1px solid var(--paper-line); border-radius: 6px; padding: clamp(24px, 4vw, 44px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; gap: 0; } }
.form-field { margin-bottom: 22px; }
.form-field label, .form-field legend {
  display: block; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; padding: 0;
}
.form-field input[type="text"], .form-field input[type="email"], .form-field select, .form-field textarea {
  width: 100%; padding: 13px 14px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--paper); border: 1px solid var(--paper-line); border-radius: var(--radius);
  transition: border-color .15s, background-color .15s;
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: none; border-color: var(--text); background: #fff; }
fieldset.form-field { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 8px 13px; border: 1px solid var(--paper-line); border-radius: 999px;
  font-size: 14px; cursor: pointer; background: var(--paper); transition: all .15s; user-select: none;
}
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--flag); outline-offset: 2px; }
.form-note { font-size: 13px; color: var(--text-muted); margin: 16px 0 0; }
.form-success {
  display: none; border-left: 3px solid var(--ok); background: #eef8f3; padding: 16px 18px; margin-top: 20px; font-size: 15px;
}
.form-success.show { display: block; }

/* ---------- FAQ ---------- */

.faq details { border-top: 1px solid var(--paper-line); padding: 22px 0; }
.faq details:last-child { border-bottom: 1px solid var(--paper-line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 24px;
  font-family: var(--font-display); font-size: 1.3rem; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--flag); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--text-muted); margin: 14px 0 0; max-width: 70ch; }

/* ---------- Footer ---------- */

.site-footer { background: var(--ink); color: var(--muted-on-ink); border-top: 1px solid var(--ink-line); padding: 64px 0 32px; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-grid h4 { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-on-ink); font-weight: 500; margin-bottom: 16px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { text-decoration: none; color: var(--muted-on-ink); transition: color .15s; }
.footer-grid a:hover { color: #fff; }
.footer-grid p { max-width: 36ch; margin-top: 16px; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--ink-line);
  font-family: var(--font-mono); font-size: 12px;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .strip-track { animation: none; }
}
