/* ============================================================
   TRIPWIRE — design system v3 "Night Shift"
   Пульт ночного мониторинга: фосфорный сигнал на глубоком
   зелёно-чёрном. Tektur — дисплей, Golos Text — текст,
   JetBrains Mono — телеметрия.
   ============================================================ */

:root {
  /* signal accent — the "tripwire" */
  --signal: #45e08a;
  --signal-dim: #2fae67;
  --signal-glow: rgba(69, 224, 138, 0.16);
  --alarm: #ff5238;
  --ok: #45e08a;
  --warn: #ffc857;

  /* dark (default) — green-black control room */
  --bg: #0a0f0c;
  --bg-2: #0e1511;
  --bg-3: #131c16;
  --fg: #eaf2e9;
  --fg-2: #b9c7b8;
  --muted: #7d8d7d;
  --muted-2: #506050;
  --line: rgba(234, 242, 233, 0.09);
  --line-strong: rgba(234, 242, 233, 0.18);
  --hairline: rgba(234, 242, 233, 0.045);
  --btn-ink: #06130b;

  /* type */
  --f-display: "Tektur", "Arial Narrow", sans-serif;
  --f-body: "Golos Text", "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* metrics */
  --gutter: 24px;
  --pad-x: clamp(24px, 4vw, 72px);
  --maxw: 1440px;
}

[data-theme="light"] {
  /* инженерная распечатка: бумага + глубокая зелень */
  --signal: #0c8a4d;
  --signal-dim: #0a6e3e;
  --signal-glow: rgba(12, 138, 77, 0.12);
  --ok: #0c8a4d;
  --bg: #f2f3ec;
  --bg-2: #e9ebe1;
  --bg-3: #dfe2d5;
  --fg: #0d1510;
  --fg-2: #2c372f;
  --muted: #66705f;
  --muted-2: #99a290;
  --line: rgba(13, 21, 16, 0.11);
  --line-strong: rgba(13, 21, 16, 0.22);
  --hairline: rgba(13, 21, 16, 0.05);
  --btn-ink: #f2f3ec;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  background:
    radial-gradient(1100px 540px at 78% -120px, var(--signal-glow), transparent 70%),
    var(--bg);
  color: var(--fg);
  font-size: clamp(15px, 0.95vw + 0.4rem, 17px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}
/* фоновая миллиметровка */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.25) 480px, rgba(0,0,0,0.18));
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(0,0,0,0.25) 480px, rgba(0,0,0,0.18));
}
body > * { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--signal); color: var(--btn-ink); }

/* ---------- LAYOUT ---------- */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.hairline { border-top: 1px solid var(--line); }
.hairline-b { border-bottom: 1px solid var(--line); }

/* ---------- TYPE ---------- */
.mono, .label, .kbd, .code {
  font-family: var(--f-mono);
  font-feature-settings: "ss01";
  letter-spacing: 0.02em;
}
.label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 4px var(--signal-glow), 0 0 12px var(--signal);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--signal-glow), 0 0 10px var(--signal); }
  50%      { box-shadow: 0 0 0 9px rgba(69, 224, 138, 0.03), 0 0 4px var(--signal); }
}

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.05;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 6.2vw, 100px); font-weight: 500; }
h2 { font-size: clamp(30px, 3.8vw, 56px); }
h3 { font-size: clamp(21px, 1.9vw, 26px); font-weight: 500; }
h4 { font-size: 18px; font-weight: 500; }
p { margin: 0; color: var(--fg-2); }
p.lead { font-size: 19px; line-height: 1.6; color: var(--fg-2); max-width: 56ch; }

/* ---------- TOP STATUS STRIP ---------- */
.statusbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.statusbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 28px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.statusbar-inner .center { justify-self: center; }
.statusbar-inner .right { justify-self: end; display: flex; gap: 18px; }
.statusbar-inner .left { display: flex; gap: 18px; }
.statusbar .ok { color: var(--signal); }
.statusbar .ok::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok); margin-right: 8px;
  vertical-align: 1px;
  box-shadow: 0 0 0 3px var(--signal-glow), 0 0 8px var(--ok);
  animation: pulse 2.4s ease-in-out infinite;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky; top: 28px; z-index: 49;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.15) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 64px;
  gap: 32px;
}
.nav-links {
  display: flex; gap: 28px;
  font-size: 14px;
  justify-self: center;
}
.nav-links a {
  color: var(--fg-2);
  transition: color 0.15s;
  position: relative;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--signal); }
.nav-links a.active { color: var(--fg); }
.nav-links a.active::after {
  content: ""; position: absolute;
  left: 0; right: 0; bottom: -22px; height: 2px; background: var(--signal);
  box-shadow: 0 0 8px var(--signal);
}
.nav-actions {
  display: flex; align-items: center; gap: 8px;
  position: relative; z-index: 10;
}
.nav-actions .btn { pointer-events: auto; }
.nav-actions .seg {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  font-family: var(--f-mono);
  font-size: 11px;
}
.nav-actions .seg button {
  padding: 6px 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
  transition: color 0.15s, background 0.15s;
}
.nav-actions .seg button:hover { color: var(--fg); }
.nav-actions .seg button.on {
  background: var(--fg); color: var(--bg);
}

/* ---------- WORDMARK ---------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 16px;
  color: var(--fg);
}
.wordmark .wm-mark {
  width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
}
/* Wordmark variant: wire-through (default) */
.wordmark[data-variant="wire"] .wm-mark { display: none; }
.wordmark[data-variant="wire"] .wm-text { position: relative; }
.wordmark[data-variant="wire"] .wm-text::after {
  content: ""; position: absolute;
  left: -6px; right: -6px; top: 50%;
  height: 1px; background: var(--signal);
  box-shadow: 0 0 6px var(--signal);
  transform: translateY(-0.5px);
}
/* Wordmark variant: dot */
.wordmark[data-variant="dot"] .wm-mark {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-glow);
}
/* Wordmark variant: bracket */
.wordmark[data-variant="bracket"] .wm-mark { display: none; }
.wordmark[data-variant="bracket"] .wm-text::before { content: "["; color: var(--signal); margin-right: 1px; }
.wordmark[data-variant="bracket"] .wm-text::after  { content: "]"; color: var(--signal); margin-left: 1px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px;
  border-radius: 2px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--fg);
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
  position: relative;
}
.btn:hover {
  border-color: var(--signal);
  color: var(--signal);
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--signal) 35%, transparent), 0 0 18px var(--signal-glow);
}
.btn-primary {
  background: var(--signal);
  color: var(--btn-ink);
  border-color: var(--signal);
  box-shadow: 0 0 22px var(--signal-glow);
}
.btn-primary:hover {
  background: var(--signal-dim);
  border-color: var(--signal-dim);
  color: var(--btn-ink);
  box-shadow: 0 0 30px var(--signal-glow);
}
.btn-arrow::after {
  content: "→";
  font-family: var(--f-mono);
  display: inline-block;
  transition: transform 0.2s;
}
.btn:hover .btn-arrow::after, .btn-arrow:hover::after { transform: translateX(4px); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 88px 0 96px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: -40% -20% auto;
  height: 130%;
  pointer-events: none;
  background: radial-gradient(820px 460px at 72% 18%, var(--signal-glow), transparent 68%);
}
.hero .container { position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: end;
}
.hero h1 .accent { color: var(--signal); text-shadow: 0 0 28px var(--signal-glow); }
.hero h1 .line {
  display: inline-block;
  width: 1.6ch;
  height: 1px;
  background: var(--signal);
  vertical-align: 0.34em;
  margin: 0 0.1em;
}
/* каскадное появление при загрузке */
.hero .eyebrow,
.hero h1,
.hero p.lead,
.hero .hero-cta,
.hero .hero-meta,
.hero .tripwire-line {
  animation: rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.hero h1            { animation-delay: 0.08s; }
.hero p.lead        { animation-delay: 0.18s; }
.hero .hero-cta     { animation-delay: 0.28s; }
.hero .hero-meta    { animation-delay: 0.38s; }
.hero .tripwire-line{ animation-delay: 0.5s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-meta {
  display: flex; flex-direction: column; gap: 24px;
  padding-bottom: 8px;
}
.hero-meta .ledger {
  border: 1px solid var(--line);
  background: color-mix(in oklab, var(--bg-2) 86%, transparent);
  padding: 20px;
  font-family: var(--f-mono);
  font-size: 12px;
  line-height: 1.7;
  position: relative;
}
/* консольные уголки */
.hero-meta .ledger::before,
.hero-meta .ledger::after {
  content: ""; position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--signal);
}
.hero-meta .ledger::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.hero-meta .ledger::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.hero-meta .ledger .row {
  display: grid; grid-template-columns: 1fr auto; gap: 12px;
}
.hero-meta .ledger .row + .row { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 8px; }
.hero-meta .ledger .lbl { color: var(--muted); }
.hero-meta .ledger .val { color: var(--fg); }
.hero-meta .ledger .val.signal { color: var(--signal); text-shadow: 0 0 12px var(--signal-glow); }
.hero-cta { display: flex; gap: 12px; margin-top: 36px; flex-wrap: wrap; }

/* Tripwire decorative line */
.tripwire-line {
  position: relative;
  height: 64px;
  margin-top: 64px;
  border-top: 1px solid var(--line);
}
.tripwire-line::before {
  content: ""; position: absolute;
  left: 0; top: -1px; height: 1px;
  width: 38%;
  background: linear-gradient(90deg, transparent, var(--signal) 40%, var(--signal) 60%, transparent);
  box-shadow: 0 0 10px var(--signal);
  animation: scan 6s linear infinite;
}
@keyframes scan {
  0%   { transform: translateX(-20%); width: 10%; opacity: 0.4; }
  50%  { transform: translateX(50%); width: 40%; opacity: 1; }
  100% { transform: translateX(120%); width: 10%; opacity: 0.4; }
}
.tripwire-line .node {
  position: absolute; top: -6px;
  width: 11px; height: 11px;
  background: var(--bg); border: 1px solid var(--fg);
}
.tripwire-line .node.sig {
  background: var(--signal); border-color: var(--signal);
  box-shadow: 0 0 14px var(--signal-glow);
}
.tripwire-line .lbl {
  position: absolute; top: 14px;
  font-family: var(--f-mono); font-size: 10px;
  color: var(--muted); letter-spacing: 0.08em;
  transform: translateX(-50%);
  text-transform: uppercase;
}
.tripwire-line .node.a, .tripwire-line .lbl.a { left: 18%; }
.tripwire-line .node.b, .tripwire-line .lbl.b { left: 46%; }
.tripwire-line .node.c, .tripwire-line .lbl.c { left: 74%; }
.tripwire-line .lbl.b { color: var(--signal); }

/* ---------- SECTION CHROME ---------- */
.section {
  padding: 96px 0;
  position: relative;
  border-top: 1px solid var(--line);
}
.section-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  margin-bottom: 64px;
  align-items: end;
}
.section-head .num {
  font-family: var(--f-mono); font-size: 11px; color: var(--signal);
  letter-spacing: 0.12em;
}
.section-head h2 { max-width: 16ch; }
.section-head .lede { color: var(--fg-2); font-size: 17px; line-height: 1.6; max-width: 52ch; }

/* ---------- SCROLL REVEAL ---------- */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0s);
}
.rv.in { opacity: 1; transform: none; }

/* ---------- SERVICES ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: 1fr;
}
.svc-row {
  display: grid;
  grid-template-columns: 80px 1.1fr 1.5fr 1fr;
  gap: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  position: relative;
  transition: background 0.25s, padding-left 0.25s;
}
.svc-row::before {
  content: "";
  position: absolute; left: 0; top: -1px; bottom: -1px;
  width: 2px; background: var(--signal);
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top;
}
.svc-row:hover::before { transform: scaleY(1); }
.svc-row:last-child { border-bottom: 1px solid var(--line); }
.svc-row:hover { background: color-mix(in oklab, var(--signal) 4%, transparent); padding-left: 16px; }
.svc-row .num { font-family: var(--f-mono); font-size: 13px; color: var(--signal); padding-top: 8px; }
.svc-row h3 { font-size: clamp(24px, 2.2vw, 31px); font-weight: 500; transition: color 0.2s; }
.svc-row:hover h3 { color: var(--signal); }
.svc-row p { color: var(--fg-2); font-size: 15px; line-height: 1.6; }
.svc-row .meta {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
  letter-spacing: 0.04em;
}
.svc-row .meta .k { color: var(--fg-2); }
.svc-row .meta .row { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.svc-row .meta .row:last-child { border-bottom: 0; }
.svc-row .arrow { position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--muted); font-family: var(--f-mono); transition: color 0.2s, transform 0.25s; }
.svc-row:hover .arrow { color: var(--signal); transform: translateY(-50%) translateX(6px); }

/* ---------- METRICS ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.metric {
  padding: 36px 28px;
  border-right: 1px solid var(--line);
  position: relative;
  transition: background 0.25s;
}
.metric:hover { background: color-mix(in oklab, var(--signal) 3%, transparent); }
.metric:last-child { border-right: 0; }
.metric .num { font-family: var(--f-display); font-size: clamp(40px, 4.4vw, 62px); font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.metric .num .unit { color: var(--signal); font-size: 0.38em; vertical-align: 0.6em; margin-left: 4px; font-family: var(--f-mono); }
.metric .lbl { font-family: var(--f-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 16px; }

/* ---------- CASES ---------- */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.case {
  grid-column: span 6;
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 320px;
  position: relative;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.case::after {
  content: "→";
  position: absolute; right: 22px; bottom: 20px;
  font-family: var(--f-mono); color: var(--muted-2);
  transition: color 0.2s, transform 0.25s;
}
.case:hover {
  border-color: color-mix(in oklab, var(--signal) 45%, var(--line-strong));
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28), 0 0 0 1px var(--signal-glow);
}
.case:hover::after { color: var(--signal); transform: translateX(4px); }
.case.span-4 { grid-column: span 4; }
.case.span-8 { grid-column: span 8; }
.case .tag {
  font-family: var(--f-mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.08em; text-transform: uppercase;
  display: flex; gap: 12px; flex-wrap: wrap;
}
.case .tag span:first-child { color: var(--signal); }
.case h3 { font-size: 23px; max-width: 24ch; }
.case .result {
  margin-top: auto;
  display: flex; gap: 28px;
}
.case .result .r { display: flex; flex-direction: column; }
.case .result .r .v { font-family: var(--f-display); font-size: 30px; line-height: 1; letter-spacing: -0.01em; }
.case .result .r .v.signal { color: var(--signal); }
.case .result .r .l { font-family: var(--f-mono); font-size: 10px; color: var(--muted); margin-top: 8px; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- CLIENT LOGO WALL ---------- */
.clients {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border-top: 1px solid var(--line);
}
.client {
  height: 110px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  font-family: var(--f-mono); font-size: 13px; color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
  position: relative;
  overflow: hidden;
}
.client:hover { color: var(--fg); background: color-mix(in oklab, var(--signal) 3%, transparent); }
.client svg { display: block; flex-shrink: 0; }
.client .nda {
  position: absolute; top: 8px; right: 10px;
  font-family: var(--f-mono); font-size: 9px;
  color: var(--muted-2); letter-spacing: 0.1em;
}
.client:nth-child(6n) { border-right: 0; }

/* ---------- TESTIMONIAL ---------- */
.quote {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 64px;
  align-items: start;
}
.quote .who { font-family: var(--f-mono); font-size: 12px; color: var(--muted); line-height: 1.7; }
.quote .who strong { color: var(--fg); font-weight: 400; display: block; font-size: 13px; }
.quote blockquote {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 400;
  color: var(--fg);
  text-wrap: pretty;
}
.quote blockquote::before { content: "“"; color: var(--signal); margin-right: 4px; }
.quote blockquote::after  { content: "”"; color: var(--signal); margin-left: 4px; }

/* ---------- CTA BLOCK ---------- */
.cta-block {
  border: 1px solid var(--line);
  background:
    radial-gradient(600px 300px at 85% 110%, var(--signal-glow), transparent 70%),
    var(--bg-2);
  padding: 64px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
  position: relative;
}
.cta-block::before, .cta-block::after {
  content: ""; position: absolute;
  width: 12px; height: 12px;
  border: 1px solid var(--signal);
}
.cta-block::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.cta-block::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.cta-block h2 { font-size: clamp(30px, 3.6vw, 50px); max-width: 18ch; }
.cta-block .actions { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 24px;
  font-size: 14px;
  color: var(--fg-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}
.footer .col h5 { font-family: var(--f-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin: 0 0 16px; font-weight: 400; }
.footer .col a { display: block; padding: 4px 0; color: var(--fg-2); transition: color 0.15s; }
.footer .col a:hover { color: var(--signal); }
.footer .brand p { color: var(--muted); margin-top: 12px; max-width: 28ch; }
.footer .legal {
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  font-family: var(--f-mono); font-size: 11px; color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---------- PAGE HEADER (inner pages) ---------- */
.page-head {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute; inset: -60% -10% auto;
  height: 160%;
  pointer-events: none;
  background: radial-gradient(700px 380px at 80% 0%, var(--signal-glow), transparent 70%);
}
.page-head > .container { position: relative; }
.page-head .crumbs {
  font-family: var(--f-mono); font-size: 12px; color: var(--muted);
  letter-spacing: 0.06em; margin-bottom: 24px;
}
.page-head .crumbs a:hover { color: var(--signal); }
.page-head h1 {
  font-size: clamp(36px, 4.8vw, 72px);
  max-width: 20ch;
}
.page-head .meta {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.page-head .meta .label { display: block; margin-bottom: 6px; }
.page-head .meta .val { font-family: var(--f-mono); font-size: 13px; }

/* ---------- FORM ---------- */
.form { display: grid; gap: 18px; }
.form .field { display: grid; gap: 6px; }
.form label { font-family: var(--f-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.form input, .form textarea, .form select {
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--fg);
  padding: 14px 16px;
  font: inherit;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.form input:focus, .form textarea:focus, .form select:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-glow);
}
.form textarea { min-height: 140px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form .submit { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; }

/* ---------- UTIL ---------- */
.spacer-sm { height: 24px; }
.spacer-md { height: 48px; }
.spacer-lg { height: 96px; }
.muted { color: var(--muted); }
.signal { color: var(--signal); }
.center { text-align: center; }

/* ---------- WHY TRIPWIRE ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.why-cell {
  padding: 32px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
  transition: background 0.25s;
}
.why-cell:hover { background: color-mix(in oklab, var(--signal) 3%, transparent); }
.why-cell:last-child { border-right: 0; }
.why-cell .why-num {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--signal); text-transform: uppercase;
}
.why-cell h3 { font-size: 21px; line-height: 1.2; }
.why-cell p { color: var(--fg-2); font-size: 14.5px; line-height: 1.6; }
.why-cell .why-foot {
  margin-top: auto;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--muted); letter-spacing: 0.06em;
  padding-top: 18px; border-top: 1px dashed var(--line);
}
@media (max-width: 960px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .why-cell:nth-child(2n) { border-right: 0; }
}
@media (max-width: 640px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-cell { border-right: 0; padding: 26px 22px; }
}

/* ---------- FAQ (collapsible) ---------- */
.faq-grid { display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; padding: 28px 0; display: grid; grid-template-columns: 80px 1fr 40px; gap: 32px; align-items: center; transition: background 0.15s; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: color-mix(in oklab, var(--signal) 3%, transparent); }
.faq-item .faq-num { font-family: var(--f-mono); font-size: 13px; color: var(--signal); letter-spacing: 0.08em; }
.faq-item .faq-q { font-family: var(--f-display); font-size: 21px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.3; color: var(--fg); }
.faq-item .faq-plus { width: 22px; height: 22px; position: relative; justify-self: end; color: var(--muted); transition: color 0.15s; }
.faq-item .faq-plus::before, .faq-item .faq-plus::after { content: ""; position: absolute; background: currentColor; }
.faq-item .faq-plus::before { left: 0; right: 0; top: 50%; height: 1.5px; transform: translateY(-0.75px); }
.faq-item .faq-plus::after  { top: 0; bottom: 0; left: 50%; width: 1.5px; transform: translateX(-0.75px); transition: transform 0.2s; }
.faq-item[open] .faq-plus { color: var(--signal); }
.faq-item[open] .faq-plus::after { transform: translateX(-0.75px) scaleY(0); }
.faq-item .faq-a { padding: 0 0 28px 112px; color: var(--fg-2); font-size: 15.5px; line-height: 1.65; max-width: 72ch; }
@media (max-width: 640px) {
  .faq-item summary { grid-template-columns: 40px 1fr 24px; gap: 14px; padding: 22px 0; }
  .faq-item .faq-q { font-size: 17px; }
  .faq-item .faq-num { font-size: 11px; }
  .faq-item .faq-a { padding: 0 0 22px 54px; font-size: 14.5px; }
}

/* ---------- COMPACT SERVICE PAGE BLOCKS ---------- */
.svc-overview { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
.svc-overview aside { display: grid; gap: 16px; }
.svc-overview .panel { border: 1px solid var(--line); background: var(--bg-2); padding: 22px 22px; }
.svc-overview .panel h4 { font-family: var(--f-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; margin: 0 0 14px; font-weight: 400; }
.svc-overview .panel .stack { display: flex; flex-wrap: wrap; gap: 8px; }
.svc-overview .panel .stack span { font-family: var(--f-mono); font-size: 12px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 2px; color: var(--fg-2); transition: border-color 0.18s, color 0.18s; }
.svc-overview .panel .stack span:hover { border-color: var(--signal); color: var(--signal); }
@media (max-width: 960px) { .svc-overview { grid-template-columns: 1fr; gap: 28px; } }

.svc-steps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.svc-steps .step { padding: 26px 22px 30px; border-right: 1px solid var(--line); transition: background 0.2s; }
.svc-steps .step:hover { background: color-mix(in oklab, var(--signal) 3%, transparent); }
.svc-steps .step:last-child { border-right: 0; }
.svc-steps .step .n { font-family: var(--f-mono); font-size: 11px; color: var(--signal); letter-spacing: 0.1em; }
.svc-steps .step h4 { font-family: var(--f-display); font-weight: 500; font-size: 17px; margin: 12px 0 8px; }
.svc-steps .step p { font-size: 13px; color: var(--fg-2); }
.svc-steps .step .dur { font-family: var(--f-mono); font-size: 10px; color: var(--muted); margin-top: 14px; letter-spacing: 0.1em; text-transform: uppercase; }
@media (max-width: 960px) {
  .svc-steps { grid-template-columns: repeat(2, 1fr); }
  .svc-steps .step:nth-child(2n) { border-right: 0; }
  .svc-steps .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 640px) { .svc-steps { grid-template-columns: 1fr; } .svc-steps .step { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---------- ARTICLE / BLOG POST ---------- */
.article {
  padding: 72px 0 96px;
  border-top: 1px solid var(--line);
}
.article-wrap {
  display: grid;
  grid-template-columns: 1fr minmax(0, 720px) 1fr;
}
.article-wrap > * { grid-column: 2; }
.article-lede {
  font-family: var(--f-display);
  font-size: clamp(20px, 2.1vw, 25px);
  line-height: 1.45;
  font-weight: 400;
  color: var(--fg);
  letter-spacing: -0.005em;
  margin: 0 0 8px;
  text-wrap: pretty;
}
.article-byline {
  font-family: var(--f-mono); font-size: 12px; color: var(--muted);
  letter-spacing: 0.04em; display: flex; gap: 18px; flex-wrap: wrap;
  padding: 20px 0; margin-bottom: 24px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.article-byline .signal { color: var(--signal); }
.prose { color: var(--fg-2); font-size: 17px; line-height: 1.75; }
.prose > * + * { margin-top: 22px; }
.prose h2 {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(25px, 2.5vw, 32px); line-height: 1.2;
  letter-spacing: -0.01em; color: var(--fg);
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line);
}
.prose h2 .ix { font-family: var(--f-mono); font-size: 12px; color: var(--signal); display: block; margin-bottom: 10px; letter-spacing: 0.12em; }
.prose h3 {
  font-family: var(--f-display); font-weight: 500;
  font-size: 20px; color: var(--fg); margin-top: 36px;
}
.prose p { margin: 0; }
.prose a { color: var(--signal); text-decoration: none; border-bottom: 1px solid color-mix(in oklab, var(--signal) 40%, transparent); transition: border-bottom-color 0.15s; }
.prose a:hover { border-bottom-color: var(--signal); }
.prose strong { color: var(--fg); font-weight: 600; }
.prose ul, .prose ol { margin: 22px 0; padding-left: 0; list-style: none; display: grid; gap: 12px; }
.prose ul li, .prose ol li { position: relative; padding-left: 30px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 10px; height: 1px; background: var(--signal); }
.prose ol { counter-reset: pr; }
.prose ol li { counter-increment: pr; }
.prose ol li::before { content: counter(pr, decimal-leading-zero); position: absolute; left: 0; top: 1px; font-family: var(--f-mono); font-size: 12px; color: var(--signal); }
.prose blockquote {
  margin: 32px 0; padding: 24px 28px;
  background: var(--bg-2); border-left: 2px solid var(--signal);
  font-family: var(--f-display); font-size: 20px; line-height: 1.45;
  color: var(--fg); font-weight: 400;
}
.prose .callout {
  margin: 32px 0; padding: 22px 24px;
  border: 1px solid var(--line); background: var(--bg-2);
  position: relative;
}
.prose .callout::before {
  content: ""; position: absolute; top: -1px; left: -1px;
  width: 10px; height: 10px;
  border-top: 1px solid var(--signal); border-left: 1px solid var(--signal);
}
.prose .callout .ct-label { font-family: var(--f-mono); font-size: 11px; color: var(--signal); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.prose .callout p { font-size: 15px; }
.prose figure.data {
  margin: 32px 0; border: 1px solid var(--line);
}
.prose figure.data table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose figure.data th, .prose figure.data td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.prose figure.data th { font-family: var(--f-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 400; background: var(--bg-2); }
.prose figure.data td { color: var(--fg-2); }
.prose figure.data td:first-child { color: var(--fg); }
.prose figure.data tr:last-child td { border-bottom: 0; }
.prose figure.data figcaption { font-family: var(--f-mono); font-size: 11px; color: var(--muted); padding: 12px 16px; border-top: 1px solid var(--line); letter-spacing: 0.04em; }
.prose .kv { font-family: var(--f-mono); font-size: 14px; }

.article-toc {
  margin: 0 0 8px; padding: 22px 24px;
  border: 1px solid var(--line); background: var(--bg-2);
}
.article-toc .toc-label { font-family: var(--f-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px; }
.article-toc ol { counter-reset: toc; list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.article-toc li { counter-increment: toc; }
.article-toc a { color: var(--fg-2); font-size: 15px; display: flex; gap: 14px; transition: color 0.15s; }
.article-toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--f-mono); font-size: 12px; color: var(--signal); }
.article-toc a:hover { color: var(--signal); }

.article-cta {
  margin-top: 64px; padding: 40px;
  border: 1px solid var(--line); background: var(--bg-2);
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  position: relative;
}
.article-cta::before, .article-cta::after {
  content: ""; position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--signal);
}
.article-cta::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.article-cta::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.article-cta h3 { font-family: var(--f-display); font-weight: 500; font-size: 24px; max-width: 20ch; }
.article-cta p { font-size: 14px; color: var(--muted); margin-top: 8px; }

.article-related { border-top: 1px solid var(--line); padding-top: 28px; margin-top: 64px; }
.article-related .rl-label { font-family: var(--f-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 18px; }
.article-related .rl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.article-related a { background: var(--bg); padding: 22px; display: block; transition: background 0.15s; }
.article-related a:hover { background: var(--bg-2); }
.article-related a .rl-tag { font-family: var(--f-mono); font-size: 10px; color: var(--signal); letter-spacing: 0.1em; text-transform: uppercase; }
.article-related a h4 { font-family: var(--f-display); font-weight: 500; font-size: 17px; margin-top: 10px; line-height: 1.3; color: var(--fg); }

/* ---------- BLOG INDEX LIST ---------- */
.post-list { border-top: 1px solid var(--line); }
.post-row {
  display: grid; grid-template-columns: 130px 1fr 200px 40px; gap: 32px;
  padding: 32px 0; border-bottom: 1px solid var(--line);
  align-items: center; transition: background 0.18s, padding-left 0.25s; position: relative;
}
.post-row::before {
  content: "";
  position: absolute; left: 0; top: -1px; bottom: -1px;
  width: 2px; background: var(--signal);
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top;
}
.post-row:hover::before { transform: scaleY(1); }
.post-row:hover { background: color-mix(in oklab, var(--signal) 4%, transparent); padding-left: 14px; }
.post-row .p-meta { font-family: var(--f-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.06em; line-height: 1.8; }
.post-row .p-meta .tag { color: var(--signal); }
.post-row h3 { font-family: var(--f-display); font-weight: 500; font-size: clamp(20px, 1.8vw, 24px); line-height: 1.25; color: var(--fg); max-width: 28ch; }
.post-row p { font-size: 14px; color: var(--fg-2); line-height: 1.6; }
.post-row .arr { justify-self: end; color: var(--muted); font-family: var(--f-mono); transition: color 0.2s, transform 0.25s; }
.post-row:hover .arr { color: var(--signal); transform: translateX(5px); }
@media (max-width: 960px) {
  .article-wrap { grid-template-columns: 1fr; }
  .article-wrap > * { grid-column: 1; }
  .post-row { grid-template-columns: 100px 1fr 40px; gap: 8px 20px; }
  .post-row p { grid-column: 2; }
  .post-row .p-third { display: none; }
}
@media (max-width: 640px) {
  .article { padding: 48px 0 64px; }
  .prose { font-size: 16px; }
  .article-related .rl-grid { grid-template-columns: 1fr; }
  .article-cta { padding: 28px; flex-direction: column; align-items: flex-start; }
  .post-row { grid-template-columns: 1fr; gap: 10px; padding: 26px 0; }
  .post-row .arr { display: none; }
  .post-row p { grid-column: 1; }
}

/* ---------- BURGER ---------- */
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  cursor: pointer;
}
.nav-burger span {
  display: block; width: 16px; height: 1.5px;
  background: var(--fg);
  transition: transform 0.2s, opacity 0.2s;
}
[data-nav-open="true"] .nav-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
[data-nav-open="true"] .nav-burger span:nth-child(2) { opacity: 0; }
[data-nav-open="true"] .nav-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- RESPONSIVE ---------- */

/* Density tier — laptop, just before things get tight (≤1440) */
@media (max-width: 1440px) {
  .nav-inner { gap: 20px; }
  .nav-links { gap: 22px; font-size: 13.5px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn { padding: 10px 14px; font-size: 12px; }
}

/* Density tier — hide non-critical toggles before they push CTA off-screen (≤1300) */
@media (max-width: 1300px) {
  .nav-actions .seg { display: none; }   /* RU/EN + DARK/LIGHT прячем — доступны через бургер */
  .nav-links { gap: 18px; font-size: 13px; }
}

/* Tablet landscape & small laptop (≤1100) */
@media (max-width: 1100px) {
  :root { --pad-x: clamp(20px, 4vw, 56px); }
  .nav-links { gap: 14px; font-size: 12.5px; }
  .nav-actions .btn { padding: 9px 12px; font-size: 11.5px; }
  .wordmark { font-size: 15px; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
  .footer-grid .col:nth-child(5) { display: none; }
  .clients { grid-template-columns: repeat(4, 1fr); }
  .client:nth-child(6n) { border-right: 1px solid var(--line); }
  .client:nth-child(4n) { border-right: 0; }
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .person:nth-child(4n) { border-right: 1px solid var(--line); }
  .person:nth-child(3n) { border-right: 0; }
  .certs { grid-template-columns: repeat(2, 1fr); }
  .case-row { grid-template-columns: 60px 1.4fr 1fr 1.2fr 40px; gap: 24px; }
  .featured-case { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
}

/* Tablet portrait (≤960) */
@media (max-width: 960px) {
  .statusbar-inner { font-size: 10px; }
  .statusbar-inner .left span:nth-child(n+2),
  .statusbar-inner .right span:nth-child(2) { display: none; }

  .nav { top: 28px; }
  .nav-inner { grid-template-columns: auto 1fr auto; height: 60px; gap: 12px; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none;
    flex-direction: column; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--pad-x) 16px;
    justify-self: stretch;
  }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links a.active::after { display: none; }
  .nav-actions { gap: 6px; }
  .nav-actions .seg { display: none; }
  .nav-burger { display: inline-flex; }
  [data-nav-open="true"] .nav-links { display: flex; }

  .hero { padding: 56px 0 72px; }
  .hero-grid, .section-head, .quote, .cta-block {
    grid-template-columns: 1fr; gap: 32px;
  }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 40px; }

  .svc-row {
    grid-template-columns: 44px 1fr;
    gap: 16px;
    padding: 32px 0;
  }
  .svc-row:hover { padding-left: 0; }
  .svc-row > div:nth-child(2) { grid-column: 2; }
  .svc-row .meta { grid-column: 2; padding-top: 4px; }
  .svc-row .arrow { display: none; }

  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric { padding: 28px 24px; }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .case, .case.span-4, .case.span-8 { grid-column: span 12; }
  .case { min-height: auto; padding: 24px; }

  .clients { grid-template-columns: repeat(3, 1fr); }
  .client:nth-child(6n), .client:nth-child(4n) { border-right: 1px solid var(--line); }
  .client:nth-child(3n) { border-right: 0; }

  .cta-block { padding: 40px 28px; }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer .legal { flex-direction: column; gap: 8px; align-items: flex-start; margin-top: 48px; }

  .page-head { padding: 48px 0 36px; }
  .page-head .meta { grid-template-columns: repeat(2, 1fr); }

  /* about.html blocks */
  .principles { grid-template-columns: 1fr; }
  .principle { border-right: 0; }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .person:nth-child(3n) { border-right: 1px solid var(--line); }
  .person:nth-child(2n) { border-right: 0; }
  .person { min-height: auto; padding: 24px; }
  .certs { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: 1fr; }
  .yr { grid-template-columns: 80px 1fr; gap: 24px; padding: 24px 0; }
  .yr .y { font-size: 32px; }

  /* cases.html */
  .case-row {
    grid-template-columns: 40px 1fr;
    gap: 12px 16px;
    padding: 28px 0;
  }
  .case-row > *:not(.idx):not(.arr) { grid-column: 2; }
  .case-row .arr { display: none; }
  .case-row .results { flex-wrap: wrap; gap: 16px; }
  .featured-case { padding: 40px 0; }
  .featured-case .results-row { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .filters { padding: 16px 0; }
}

/* Mobile (≤640) */
@media (max-width: 640px) {
  :root { --pad-x: 18px; }
  body { font-size: 15px; }
  h1 { font-size: clamp(32px, 10vw, 54px); }
  h2 { font-size: clamp(24px, 6.4vw, 36px); }
  h3 { font-size: 20px; }
  p.lead { font-size: 16px; line-height: 1.6; }

  .statusbar-inner { height: 26px; }
  .statusbar-inner .center { display: none; }

  .nav { top: 26px; }
  .nav-inner { height: 56px; }
  .nav-actions .btn { padding: 9px 12px; font-size: 11px; gap: 6px; }
  .wordmark { font-size: 14px; }

  .hero { padding: 32px 0 48px; }
  .hero-cta { gap: 8px; }
  .hero-cta .btn { font-size: 12px; padding: 11px 14px; flex: 1 1 auto; justify-content: center; }
  .hero-meta .ledger { padding: 14px; font-size: 11px; }
  .tripwire-line { margin-top: 36px; height: 56px; }
  .tripwire-line .lbl { font-size: 9px; }

  .section { padding: 48px 0; }
  .section-head { margin-bottom: 28px; gap: 16px; }
  .section-head .lede { font-size: 15px; }

  .svc-row { padding: 24px 0; gap: 12px 14px; grid-template-columns: 36px 1fr; }
  .svc-row h3 { font-size: 19px; }
  .svc-row .num { font-size: 11px; padding-top: 4px; }
  .svc-row .meta { font-size: 10.5px; }
  .svc-row p { font-size: 14px; }

  .metrics { grid-template-columns: 1fr; }
  .metric { padding: 24px 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metric:last-child { border-bottom: 0; }
  .metric .num { font-size: 44px; }

  .cases-grid { gap: 14px; }
  .case { padding: 20px; gap: 14px; }
  .case h3 { font-size: 19px; }
  .case .result { gap: 16px; flex-wrap: wrap; }
  .case .result .r .v { font-size: 22px; }

  .clients { grid-template-columns: repeat(2, 1fr); }
  .client { height: 84px; font-size: 11px; letter-spacing: 0.04em; }
  .client:nth-child(n) { border-right: 1px solid var(--line); }
  .client:nth-child(2n) { border-right: 0; }

  .quote { gap: 20px; }
  .quote blockquote { font-size: 20px; line-height: 1.35; }

  .cta-block { padding: 28px 20px; gap: 24px; }
  .cta-block .actions { width: 100%; }
  .cta-block .actions .btn { width: 100%; justify-content: space-between; }

  .footer { padding: 40px 0 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer .col h5 { margin-bottom: 10px; }
  .footer .legal { font-size: 10px; margin-top: 36px; }

  .page-head { padding: 40px 0 28px; }
  .page-head h1 { font-size: clamp(28px, 8vw, 46px); }
  .page-head .meta { grid-template-columns: 1fr; gap: 14px; padding-top: 18px; margin-top: 22px; }

  /* about */
  .principle { padding: 28px 22px; }
  .principle h3 { font-size: 22px; }
  .team-grid { grid-template-columns: 1fr; }
  .person { border-right: 0 !important; }
  .person .avatar { aspect-ratio: 16/9; }
  .certs { grid-template-columns: 1fr; }
  .yr { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; }
  .yr .y { font-size: 28px; }

  /* cases */
  .case-row { padding: 22px 0; grid-template-columns: 32px 1fr; gap: 8px 12px; }
  .case-row h3 { font-size: 18px; }
  .case-row .tags span { font-size: 9px; padding: 2px 6px; }
  .case-row .results .r .v { font-size: 20px; }
  .featured-case h2 { font-size: clamp(24px, 6.4vw, 34px); }
  .featured-case .results-row { grid-template-columns: 1fr 1fr; gap: 12px; }
  .featured-case .results-row .v { font-size: 28px; }
  .filters { gap: 6px; padding: 14px 0; }
  .filter { font-size: 11px; padding: 6px 10px; }

  /* form */
  .form .row { grid-template-columns: 1fr; gap: 14px; }
  .form input, .form textarea, .form select { padding: 12px 14px; font-size: 15px; }
  .form .submit { flex-direction: column; align-items: stretch; gap: 12px; }
  .form .submit .btn { width: 100%; justify-content: space-between; }

  /* tweaks */
  .tweaks-host { right: 12px; bottom: 12px; }
  .tweaks-host > div { width: calc(100vw - 24px); max-width: 300px; }
}

/* Touch — neutralize hover */
@media (hover: none) {
  .svc-row:hover { background: transparent; padding-left: 0; }
  .case:hover { border-color: var(--line); transform: none; box-shadow: none; }
  .client:hover { color: var(--muted); background: transparent; }
  .case-row:hover { background: transparent; }
  .post-row:hover { background: transparent; padding-left: 0; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .eyebrow, .hero h1, .hero p.lead, .hero .hero-cta, .hero .hero-meta, .hero .tripwire-line {
    animation: none;
  }
  .rv { opacity: 1; transform: none; transition: none; }
  .tripwire-line::before { animation: none; }
  .eyebrow .dot, .statusbar .ok::before { animation: none; }
}

/* ---------- TWEAKS PANEL ---------- */
.tweaks-host { position: fixed; bottom: 24px; right: 24px; z-index: 200; }

/* ---------- ULTRA-WIDE (≥1600) — cap max width but breathe horizontal padding ---------- */
@media (min-width: 1600px) {
  :root { --maxw: 1560px; --pad-x: clamp(48px, 5vw, 96px); }
}
@media (min-width: 2000px) {
  :root { --maxw: 1720px; }
  body { font-size: 17.5px; }
}

/* ---------- SMALL MOBILE (≤380) — squeeze without overflow ---------- */
@media (max-width: 380px) {
  :root { --pad-x: 14px; }
  body { font-size: 14.5px; }
  h1 { font-size: clamp(26px, 9vw, 38px); }
  h2 { font-size: clamp(22px, 7vw, 30px); }
  .statusbar-inner { font-size: 9px; height: 24px; }
  .nav-actions .btn { padding: 8px 10px; font-size: 10.5px; }
  .wordmark { font-size: 13px; }
  .featured-case .results-row { grid-template-columns: 1fr; }
  .filters { gap: 4px; }
  .filter { padding: 5px 8px; font-size: 10px; }
}

/* ---------- General overflow protection ---------- */
img, svg, video { max-width: 100%; height: auto; }
.container { width: 100%; }
pre, code { overflow-wrap: anywhere; }
