/* ==========================================================================
   site-kravtsov — Engineering Editorial v4 (debut)
   Paradigm: oxide.computer engineering doc × LRB editorial × singer-vehicle artisan
   Палитра: Архивная Бумага (warm paper + ink + oxidized rust + blueprint navy)
   Шрифты (локально, woff2): Onest (display) · Inter (body) · Fraunces italic (эмфаз)
                              Geist Mono (specs/numbers)
   Premium without cliche: zero glassmorphism, zero cyan, zero stock-photos.
   ========================================================================== */

/* -------------------- @font-face : locally hosted -------------------- */
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/onest/onest-cyrillic-wght-normal.woff2') format('woff2-variations'),
       url('../fonts/onest/onest-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-cyrillic-wght-normal.woff2') format('woff2-variations'),
       url('../fonts/inter/inter-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter/inter-cyrillic-wght-italic.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/fraunces/fraunces-latin-wght-italic.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/fraunces/fraunces-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/geist-mono/geist-mono-cyrillic-wght-normal.woff2') format('woff2-variations'),
       url('../fonts/geist-mono/geist-mono-latin-wght-normal.woff2') format('woff2-variations');
}

/* -------------------- TOKENS (Архивная Бумага, OKLCH) -------------------- */
:root {
  /* Paper tiers */
  --paper:        oklch(0.97 0.013 85);
  --paper-warm:   oklch(0.94 0.014 85);
  --paper-shade:  oklch(0.91 0.015 85);
  --paper-rule:   oklch(0.88 0.014 85);

  /* Ink */
  --ink:          oklch(0.20 0.013 60);
  --ink-soft:     oklch(0.40 0.012 60);
  --ink-muted:    oklch(0.55 0.010 60);
  --ink-faint:    oklch(0.70 0.008 60);

  /* Inverted carbon (для §05 evidence) */
  --carbon:       oklch(0.18 0.005 60);
  --carbon-soft:  oklch(0.24 0.006 60);
  --bone:         oklch(0.95 0.012 85);
  --bone-muted:   oklch(0.65 0.010 60);

  /* Single ACCENT — oxidized workshop rust */
  --rust:         oklch(0.55 0.18 30);
  --rust-deep:    oklch(0.45 0.17 30);
  --rust-soft:    oklch(0.78 0.10 30);

  /* Engineering BLUEPRINT (technical lines, anchors) */
  --blueprint:    oklch(0.30 0.05 250);
  --blueprint-line: color-mix(in oklch, var(--blueprint) 35%, var(--paper));

  /* Borders / rules */
  --rule:         color-mix(in oklch, var(--ink) 100%, transparent);
  --rule-soft:    color-mix(in oklch, var(--ink) 18%, transparent);
  --rule-faint:   color-mix(in oklch, var(--ink) 8%, transparent);
  --rule-bone:    color-mix(in oklch, var(--bone) 18%, transparent);

  /* Type families */
  --font-display: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-italic:  'Fraunces', Georgia, 'Times New Roman', serif;
  --font-mono:    'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Fluid type scale */
  --fs-xs:   clamp(11px, 0.55vw + 9px,  13px);
  --fs-sm:   clamp(13px, 0.65vw + 11px, 15px);
  --fs-base: clamp(15px, 0.7vw + 12px,  17px);
  --fs-lg:   clamp(17px, 0.9vw + 14px,  20px);
  --fs-xl:   clamp(20px, 1.4vw + 14px,  26px);
  --fs-2xl:  clamp(24px, 2vw + 14px,    34px);
  --fs-3xl:  clamp(30px, 3vw + 16px,    52px);
  --fs-4xl:  clamp(40px, 5vw + 16px,    78px);
  --fs-5xl:  clamp(56px, 7vw + 18px,    108px);

  /* Spacing (8px baseline) */
  --s-1: 4px;  --s-2: 8px;   --s-3: 12px;  --s-4: 16px;  --s-5: 24px;
  --s-6: 32px; --s-7: 48px;  --s-8: 64px;  --s-9: 96px;  --s-10: 128px;
  --section: clamp(96px, 12vw, 160px);
  --section-sm: clamp(56px, 8vw, 96px);

  /* Layout */
  --wrap: 1280px;
  --gutter: clamp(20px, 2vw, 32px);

  /* Motion */
  --ease:        cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-snap:   cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:    180ms;
  --dur-base:    280ms;
  --dur-slow:    480ms;
}

/* -------------------- RESET & BASE -------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01", "cv11", "cv02";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

/* SVG noise texture — едва заметная */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: 0.045;
  mix-blend-mode: multiply;
}
body > * { position: relative; z-index: 1; }

img, svg { max-width: 100%; display: block; }
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--rule-soft);
  transition: color var(--dur-fast) var(--ease), text-decoration-color var(--dur-fast) var(--ease);
}
a:hover { color: var(--rust); text-decoration-color: var(--rust); }

::selection { background: var(--rust); color: var(--paper); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--ink);
  text-wrap: balance;
}
p { text-wrap: pretty; }

em, .em-italic {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.mono, code, kbd, samp {
  font-family: var(--font-mono);
  font-feature-settings: "ss01", "ss02", "ss03", "zero";
}

/* -------------------- LAYOUT PRIMITIVES -------------------- */
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-narrow {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* -------------------- SCROLL PROGRESS -------------------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  background: var(--rust);
  z-index: 1000;
  transform-origin: 0 50%;
  transform: scaleX(0);
  animation: progress linear forwards;
  animation-timeline: scroll(root);
}
@keyframes progress { to { transform: scaleX(1); } }

/* -------------------- HEADER (masthead) -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-soft);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--s-6);
  padding: 18px 0;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  color: var(--ink);
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  border-radius: 2px;
  align-self: center;
}
.brand-name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.015em;
}
.brand-name em {
  font-family: var(--font-italic);
  font-weight: 400;
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  margin-left: 4px;
  color: var(--ink-muted);
}

.nav {
  display: flex;
  gap: var(--s-6);
  justify-self: center;
}
.nav a {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color var(--dur-fast) var(--ease);
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--rust);
  transition: right var(--dur-base) var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { right: 0; }

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  padding: 8px 14px;
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.phone-link:hover { border-color: var(--rust); color: var(--rust); }
.phone-num { letter-spacing: -0.01em; }

/* -------------------- MASTHEAD META -------------------- */
.masthead-meta {
  border-bottom: 1px solid var(--rule-soft);
  background: var(--paper);
}
.masthead-meta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* -------------------- HERO (§ 01) -------------------- */
.hero {
  padding: clamp(80px, 12vw, 160px) 0 clamp(64px, 9vw, 120px);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 80px);
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: var(--s-5);
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow::before {
  content: '§ 01';
  color: var(--ink-muted);
  font-weight: 400;
}
.hero-title {
  font-size: var(--fs-5xl);
  line-height: 0.96;
  font-weight: 800;
  letter-spacing: -0.04em;
  max-width: 16ch;
  text-wrap: balance;
}
.hero-title em {
  font-family: var(--font-italic);
  font-weight: 400;
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  letter-spacing: -0.045em;
  color: var(--rust);
  font-size: 1.05em;
}
.hero-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  max-width: 720px;
  margin-left: auto;
}
.hero-lede {
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 400;
  text-wrap: pretty;
}
.hero-lede::first-letter {
  font-family: var(--font-italic);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  font-weight: 500;
  font-size: 4.2em;
  float: left;
  line-height: 0.85;
  margin: 0.05em 0.12em -0.05em -0.04em;
  color: var(--ink);
}

.hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-3);
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: end;
    gap: clamp(40px, 6vw, 96px);
  }
  .hero-bottom { margin-left: 0; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 14px 22px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--rust); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* -------------------- BRAND TICKER -------------------- */
.ticker {
  border-bottom: 1px solid var(--rule-soft);
  border-top: 1px solid var(--rule-soft);
  background: var(--paper-warm);
  overflow: hidden;
  padding: 18px 0;
  position: relative;
  mask-image: linear-gradient(to right, transparent, black 60px, black calc(100% - 60px), transparent);
}
.ticker-track {
  display: inline-flex;
  gap: 48px;
  white-space: nowrap;
  animation: tick 60s linear infinite;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.ticker-track span { display: inline-block; }
.ticker-track span::after {
  content: '·';
  margin-left: 48px;
  color: var(--ink-faint);
}
@keyframes tick { to { transform: translateX(-50%); } }

/* -------------------- ARTICLE generic -------------------- */
.article {
  padding: var(--section) 0;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
}
.article-head {
  display: grid;
  gap: var(--s-5);
  margin-bottom: clamp(48px, 6vw, 72px);
  max-width: 880px;
}
.article-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.article-num::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--rust);
}
.article-title {
  font-size: var(--fs-3xl);
  font-weight: 750;
  line-height: 1.04;
  letter-spacing: -0.03em;
  max-width: 18ch;
}
.article-title em {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  letter-spacing: -0.035em;
}
.article-lede {
  font-size: var(--fs-lg);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
  text-wrap: pretty;
}

@media (min-width: 980px) {
  .article-head {
    grid-template-columns: 220px 1fr;
    align-items: start;
    gap: clamp(40px, 6vw, 80px);
  }
  .article-num {
    position: sticky;
    top: 96px;
    align-self: start;
  }
}

/* -------------------- § 02 — SCOPE GRID (asymmetric) -------------------- */
.scope-grid {
  display: grid;
  gap: 1px;
  background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
}
.scope-cell {
  background: var(--paper);
  padding: clamp(28px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  position: relative;
  transition: background var(--dur-base) var(--ease);
}
.scope-cell:hover { background: var(--paper-warm); }
.scope-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.scope-cell h3 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: var(--s-2) 0 var(--s-3);
  text-wrap: balance;
}
.scope-list {
  list-style: none;
  padding: 0;
  margin: var(--s-3) 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.scope-list li {
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--ink-soft);
  padding-left: 18px;
  position: relative;
}
.scope-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.7em;
  width: 8px; height: 1px;
  background: var(--rust);
}
.scope-spec {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-transform: uppercase;
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule-soft);
  margin-top: auto;
}
@media (min-width: 720px) {
  .scope-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  .scope-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .scope-cell-major   { grid-column: 1 / 2; grid-row: 1 / 3; }
  .scope-cell-minor   { grid-column: 2 / 4; grid-row: 1 / 2; }
  .scope-cell-medium:nth-of-type(3) { grid-column: 2 / 3; grid-row: 2 / 3; }
  .scope-cell-medium:nth-of-type(4) { grid-column: 3 / 4; grid-row: 2 / 3; }
}

/* -------------------- § 03 — DIAGRAM (изометрическая SVG WOW) -------------------- */
.diagram {
  padding: var(--section) 0;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--paper-warm);
  position: relative;
  overflow: hidden;
}
.diagram::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--blueprint-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--blueprint-line) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.18;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
}
.diagram-wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}
.diagram-head {
  margin-bottom: clamp(48px, 6vw, 72px);
  max-width: 760px;
}
.diagram-head .article-num { display: inline-flex; }
.diagram-head h2 {
  font-size: var(--fs-3xl);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin: var(--s-4) 0 var(--s-4);
  max-width: 22ch;
}
.diagram-head h2 em {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
}
.diagram-head p {
  font-size: var(--fs-lg);
  color: var(--ink-soft);
  max-width: 58ch;
  text-wrap: pretty;
}
.diagram-svg {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto clamp(32px, 4vw, 56px);
  max-width: 1080px;
}
.diagram-svg .iso-link {
  fill: none;
  stroke: var(--blueprint);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: draw-line linear forwards;
  animation-timeline: view();
  animation-range: entry 5% cover 35%;
}
@keyframes draw-line { to { stroke-dashoffset: 0; } }
.diagram-svg .iso-cable {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
  stroke-dasharray: 4 3;
  opacity: 0.6;
}
.diagram-svg .iso-node {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.25;
  stroke-linejoin: round;
  transition: fill var(--dur-base) var(--ease);
}
.diagram-svg .iso-node-shadow { fill: var(--ink); opacity: 0.08; }
.diagram-svg .iso-node-accent { fill: var(--rust); }
.diagram-svg .iso-node-blueprint { fill: var(--blueprint); }
.diagram-svg .node-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  fill: var(--ink);
  text-transform: uppercase;
}
.diagram-svg .node-label-num {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  fill: var(--rust);
  letter-spacing: 0.06em;
}
.diagram-svg .iso-group {
  cursor: default;
  transition: opacity var(--dur-base) var(--ease);
}
.diagram-svg:hover .iso-group { opacity: 0.4; }
.diagram-svg .iso-group:hover { opacity: 1; }
.diagram-svg .iso-group:hover .iso-node { stroke: var(--rust); }

.diagram-caption {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.diagram-caption em {
  font-family: var(--font-italic);
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.diagram-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-5);
  border-top: 1px solid var(--rule-soft);
  padding-top: var(--s-6);
}
.diagram-legend-item {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.5;
}
.diagram-legend-item strong {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}

/* -------------------- § 04 — REMOTE (case archive entries) -------------------- */
.remote-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule-soft);
}
.case {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--s-5);
  padding: clamp(28px, 3.5vw, 40px) 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: start;
  transition: background var(--dur-base) var(--ease);
}
.case:hover { background: linear-gradient(to right, transparent, color-mix(in oklch, var(--rust) 5%, transparent), transparent); }
.case-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--rust);
  text-transform: uppercase;
  padding-top: 6px;
}
.case h3 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--s-3);
  text-wrap: balance;
}
.case p {
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 70ch;
  text-wrap: pretty;
}
@media (max-width: 640px) {
  .case { grid-template-columns: 1fr; gap: var(--s-2); }
}

/* -------------------- § 05 — EVIDENCE (inverted dark) -------------------- */
.evidence {
  background: var(--carbon);
  color: var(--bone);
  padding: var(--section) 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  position: relative;
  overflow: hidden;
}
.evidence::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in oklch, var(--bone) 6%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklch, var(--bone) 6%, transparent) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
}
.evidence-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (min-width: 920px) {
  .evidence-grid { grid-template-columns: 1.05fr 0.95fr; }
}
.evidence-text { display: grid; gap: var(--s-5); }
.evidence-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust-soft);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.evidence-num::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--rust-soft);
}
.evidence-statement {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--bone);
  text-wrap: balance;
  max-width: 18ch;
}
.evidence-statement em {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  color: var(--rust-soft);
  letter-spacing: -0.035em;
}
.evidence-meta {
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--bone-muted);
  max-width: 50ch;
}
.evidence-figure {
  position: relative;
  background: color-mix(in oklch, var(--carbon) 92%, var(--bone));
  border: 1px solid color-mix(in oklch, var(--bone) 12%, transparent);
  padding: clamp(20px, 3vw, 36px);
  border-radius: 2px;
  aspect-ratio: 5 / 4;
}
.evidence-svg { width: 100%; height: 100%; display: block; }
.evidence-svg .ws-stroke { stroke: var(--bone); stroke-width: 1.25; fill: none; stroke-linejoin: round; }
.evidence-svg .ws-stroke-soft { stroke: color-mix(in oklch, var(--bone) 50%, transparent); stroke-width: 1; fill: none; }
.evidence-svg .ws-fill { fill: color-mix(in oklch, var(--bone) 6%, var(--carbon)); }
.evidence-svg .ws-accent { fill: var(--rust); }
.evidence-svg .ws-blueprint { fill: var(--blueprint); }
.evidence-svg .ws-label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  fill: var(--bone-muted);
  text-transform: uppercase;
}
.evidence-figure-caption {
  position: absolute;
  bottom: clamp(20px, 3vw, 36px);
  left: clamp(20px, 3vw, 36px);
  right: clamp(20px, 3vw, 36px);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--bone-muted);
  text-transform: uppercase;
}

/* -------------------- § 06 — PROCESS -------------------- */
.process-list {
  list-style: none;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--rule-soft);
}
.process-step {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--s-6);
  padding: clamp(32px, 4vw, 48px) 0;
  border-bottom: 1px solid var(--rule-soft);
  align-items: start;
}
.process-num {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  letter-spacing: -0.03em;
  color: var(--ink-faint);
  line-height: 1;
}
.process-step h3 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--s-3);
  max-width: 28ch;
}
.process-step p {
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
  text-wrap: pretty;
}
@media (max-width: 640px) {
  .process-step { grid-template-columns: 1fr; gap: var(--s-3); }
  .process-num { font-size: 24px; }
}

/* -------------------- § 07 — ORDER FORM -------------------- */
.order-grid {
  display: grid;
  gap: clamp(40px, 6vw, 80px);
  grid-template-columns: 1fr;
}
@media (min-width: 920px) {
  .order-grid { grid-template-columns: 0.85fr 1.15fr; }
}
.legal-card {
  background: var(--paper-warm);
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
  padding: var(--s-6);
  display: grid;
  gap: var(--s-2);
  align-self: start;
}
.legal-card-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--s-3);
}
.legal-card-row {
  font-size: var(--fs-lg);
  font-weight: 500;
  color: var(--ink);
}
.legal-card-mono {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: -0.005em;
  color: var(--ink-soft);
}
.phone-inline {
  font-family: var(--font-mono);
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 1px solid var(--rust);
  text-decoration: none;
  color: var(--ink);
}
.phone-inline:hover { color: var(--rust); }

.form { display: grid; gap: var(--s-6); }
.field { display: grid; gap: var(--s-2); position: relative; }
.field-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.form input,
.form select,
.form textarea {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-soft);
  padding: 12px 0;
  outline: none;
  border-radius: 0;
  resize: none;
  transition: border-color var(--dur-fast) var(--ease);
  appearance: none;
}
.form textarea {
  field-sizing: content;
  min-block-size: 5lh;
  line-height: 1.5;
}
.form select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%231A1714' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 12px 8px;
  padding-right: 28px;
}
.form input:focus,
.form select:focus,
.form textarea:focus { border-bottom-color: var(--rust); }
.form input::placeholder,
.form textarea::placeholder {
  color: var(--ink-faint);
  font-style: italic;
  font-family: var(--font-italic);
}

.field-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: var(--s-3);
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.5;
  align-items: start;
}
.field-check input { margin-top: 4px; accent-color: var(--rust); }
.field-check a { color: var(--ink); border-bottom: 1px solid var(--rule-soft); text-decoration: none; }
.field-check a:hover { border-bottom-color: var(--rust); color: var(--rust); }

.btn-submit {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  padding: 16px 28px;
  border-radius: 2px;
  cursor: pointer;
  letter-spacing: -0.01em;
  justify-self: start;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.btn-submit:hover { background: var(--rust); }
.btn-submit:active { transform: translateY(1px); }

/* -------------------- FOOTER (colophon) -------------------- */
.footer {
  background: var(--paper-warm);
  padding: clamp(48px, 7vw, 96px) 0;
  border-top: 1px solid var(--rule);
}
.footer-inner {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
  align-items: end;
}
.footer-name {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.footer-format {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 38ch;
  margin: 4px 0 8px;
}
.footer-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-transform: uppercase;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-5);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.footer-links a {
  text-decoration: none;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule-soft);
  padding-bottom: 2px;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.footer-links a:hover { color: var(--rust); border-bottom-color: var(--rust); }

.footer-colophon {
  margin-top: var(--s-7);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule-soft);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-3);
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1fr auto; }
}

/* -------------------- PAGE-HERO (services / oferta / privacy) -------------------- */
.page-hero {
  padding: clamp(80px, 10vw, 140px) 0 clamp(56px, 8vw, 96px);
  border-bottom: 1px solid var(--rule);
}
.page-hero h1 {
  font-size: var(--fs-4xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.98;
  margin: var(--s-4) 0 var(--s-5);
  max-width: 16ch;
}
.page-hero h1 em {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  color: var(--rust);
  letter-spacing: -0.045em;
}
.page-hero p {
  font-size: var(--fs-lg);
  color: var(--ink-soft);
  max-width: 60ch;
  text-wrap: pretty;
}

/* -------------------- SPEC-SHEET (services.html) -------------------- */
.spec-sheet {
  padding: clamp(64px, 9vw, 120px) 0;
}
.spec-group {
  margin-bottom: clamp(56px, 7vw, 96px);
}
.spec-group:last-child { margin-bottom: 0; }
.spec-group-head {
  display: grid;
  gap: var(--s-3);
  margin-bottom: var(--s-7);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--ink);
}
.spec-group-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
}
.spec-group-title {
  font-family: var(--font-display);
  font-size: var(--fs-2xl);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 18ch;
}
.spec-group-title em {
  font-family: var(--font-italic);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
}
.spec-group-desc {
  font-size: var(--fs-base);
  color: var(--ink-soft);
  max-width: 64ch;
  margin-top: var(--s-2);
  text-wrap: pretty;
}
@media (min-width: 900px) {
  .spec-group-head {
    grid-template-columns: 220px 1fr;
    gap: var(--s-7);
    align-items: baseline;
  }
}
.spec-row {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--s-4);
  padding: clamp(18px, 2.2vw, 24px) 0;
  border-bottom: 1px dotted var(--rule-soft);
  align-items: baseline;
  transition: background var(--dur-fast) var(--ease);
  position: relative;
}
.spec-row:hover {
  background: linear-gradient(to right, transparent 0%, color-mix(in oklch, var(--rust) 5%, transparent) 50%, transparent 100%);
}
.spec-row:hover .spec-row-price { color: var(--rust); }
.spec-row-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}
.spec-row-title {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--ink);
}
.spec-row-meta {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 64ch;
}
.spec-row-price {
  font-family: var(--font-mono);
  font-size: var(--fs-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease);
}
@media (max-width: 640px) {
  .spec-row {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
  }
  .spec-row-price { grid-column: 2 / 3; padding-top: 4px; font-size: var(--fs-base); }
}

/* spec-sheet footer + CTA */
.spec-foot {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 78ch;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule-soft);
}
.spec-foot a { color: var(--ink); border-bottom: 1px solid var(--rust); text-decoration: none; }
.spec-foot a:hover { color: var(--rust); }
.spec-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-7);
  padding-top: var(--s-6);
  border-top: 1px solid var(--rule-soft);
}

/* -------------------- LONG-FORM (oferta / privacy) -------------------- */
/* alias: .legal — старая разметка использует main.legal с h1+h2+p — рендерим как longform */
.legal {
  padding: clamp(80px, 10vw, 140px) 0 clamp(80px, 10vw, 140px);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 920px;
  margin: 0 auto;
}
.legal h1 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.0;
  color: var(--ink);
  margin: var(--s-4) 0 var(--s-6);
  max-width: 22ch;
  text-wrap: balance;
}
.legal h2 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: clamp(40px, 5vw, 64px) 0 var(--s-4);
  color: var(--ink);
}
.legal h3 {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  margin: var(--s-6) 0 var(--s-3);
  color: var(--ink);
}
.legal p { margin-bottom: var(--s-4); max-width: 78ch; }
.legal ul, .legal ol { margin: var(--s-4) 0 var(--s-4) var(--s-5); }
.legal li { margin-bottom: var(--s-2); max-width: 76ch; }
.legal a { color: var(--ink); border-bottom: 1px solid var(--rust); text-decoration: none; }
.legal a:hover { color: var(--rust); }

.section-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rust);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.section-kicker::before {
  content: '';
  display: inline-block;
  width: 24px; height: 1px;
  background: var(--rust);
}

.longform {
  padding: clamp(48px, 7vw, 96px) 0 var(--section);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--ink-soft);
}
.longform h2 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: clamp(40px, 5vw, 64px) 0 var(--s-4);
  color: var(--ink);
}
.longform h3 {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  margin: var(--s-6) 0 var(--s-3);
  color: var(--ink);
}
.longform p { margin-bottom: var(--s-4); max-width: 78ch; }
.longform ul, .longform ol { margin: var(--s-4) 0 var(--s-4) var(--s-5); }
.longform li { margin-bottom: var(--s-2); max-width: 76ch; }

/* -------------------- ACCESSIBILITY -------------------- */
:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ticker-track, .scroll-progress { animation: none !important; }
  .scroll-progress { transform: scaleX(0); }
  .diagram-svg .iso-link { stroke-dashoffset: 0 !important; }
}
@media (prefers-contrast: more) {
  :root {
    --rust: oklch(0.42 0.22 30);
    --ink-soft: var(--ink);
    --ink-muted: var(--ink);
  }
}

/* -------------------- RESPONSIVE TWEAKS -------------------- */
@media (max-width: 640px) {
  .nav { display: none; }
  .header-inner { grid-template-columns: 1fr auto; }
  .masthead-meta-inner { font-size: 10px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}

/* Reveal-on-scroll utility */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: reveal linear forwards;
  animation-timeline: view();
  animation-range: entry 0% cover 25%;
}
@keyframes reveal { to { opacity: 1; transform: none; } }
