/* JAK Systems — палитра и шрифты из dg_overview_2026.tex: графит и янтарь, IBM Plex */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/ibm-plex-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2"); }

:root {
  --ink: #101e24;
  --ink-card: #1b2f37;
  --ink-line: #36525c;
  --ink-deep: #0b161b;
  --paper: #f4f2ec;
  --sand: #ebe8e0;
  --card: #e8e5dc;
  --rule: #d3cec2;
  --text: #16252c;
  --muted: #4f5d64;
  --light: #eef1ee;
  --light-muted: #a6b7bb;
  --amber: #f2a33a;
  --amber-deep: #db8619;
  --amber-dark: #945700;
  --amber-pale: #f5ddb0;
  /* диаграмма «было → стало»: один тон, два шага; проверено validate_palette.js --ordinal на --paper */
  --viz-before: #d9a441;
  --viz-after: #9a5b00;

  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; text-wrap: balance; }
p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--amber); color: var(--ink); padding: 8px 14px; border-radius: 6px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--amber-dark); margin-bottom: 16px;
}
.ink .eyebrow, .hero .eyebrow { color: var(--amber); }
.lead { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.6; color: var(--muted); max-width: 64ch; text-wrap: pretty; }
.ink .lead, .hero .lead { color: var(--light-muted); }
h2 { font-size: clamp(30px, 4vw, 44px); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font: 600 15.5px/1 var(--font); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: #f7b45a; }
.btn-ghost { background: transparent; color: var(--light); border-color: var(--ink-line); }
.btn-ghost:hover { border-color: var(--amber); color: #fff; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16, 30, 36, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(54, 82, 92, 0.6);
}
.header-inner { display: flex; align-items: center; gap: 32px; height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--light); text-decoration: none; margin-right: auto; }
.logo-mark { width: 26px; height: 26px; }
.lm-a { fill: var(--amber); }
.lm-e { fill: none; stroke: currentColor; stroke-width: 2; opacity: .55; }
.logo-word { font-weight: 600; font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--light-muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--light); }
.header-cta { min-height: 38px; padding: 0 16px; font-size: 14.5px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: var(--light); }
.hero-top { position: relative; }
.hero-inner { position: relative; padding-top: clamp(64px, 10vw, 128px); padding-bottom: clamp(56px, 7vw, 88px); }
.hero h1 { font-size: clamp(38px, 5.2vw, 64px); line-height: 1.06; letter-spacing: -0.02em; max-width: 12em; margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero .lead { max-width: 58ch; margin-bottom: 36px; }
.hero-proof { padding-bottom: clamp(48px, 6vw, 72px); }

/* Узор занимает правую часть первого экрана над полосой с цифрами и уходит за верхний и правый края */
.hero-motif { position: absolute; top: 0; bottom: 0; right: 0; width: min(26vw, 380px); pointer-events: none; }
.motif { position: absolute; top: -10px; left: 0; height: calc(100% - 46px); width: auto; max-width: none; }
.motif .e { fill: none; stroke: var(--ink-line); stroke-width: 1; }
.motif .s { fill: var(--ink-card); }
.motif .a { fill: var(--amber); animation: fill-in .7s ease-out both; animation-delay: calc(var(--d) + 300ms); }
@keyframes fill-in { from { opacity: 0; } to { opacity: 1; } }
.motif-legend {
  position: absolute; left: 0; bottom: 8px; display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 12.5px; color: var(--light-muted);
}
.motif-legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { display: inline-block; width: 18px; height: 9px; border-radius: 2px; }
.sw-e { border: 1px solid var(--ink-line); }
.sw-s { background: var(--ink-card); box-shadow: inset 0 0 0 1px #2a4550; }
.sw-a { background: var(--amber); }

.proof {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--ink-line);
}
.proof li { padding: 24px 24px 0 0; display: flex; flex-direction: column; gap: 8px; }
.proof li + li { padding-left: 24px; border-left: 1px solid var(--ink-line); }
.proof strong { font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; color: var(--light); }
.proof strong::after { content: ""; display: block; width: 28px; height: 2px; background: var(--amber); margin-top: 12px; }
.proof .arr { color: var(--amber); font-weight: 400; }
.proof span:not(.arr) { font-size: 14.5px; line-height: 1.45; color: var(--light-muted); }
.proof-note { margin-top: 28px; font-size: 13.5px; color: var(--light-muted); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }
.paper { background: var(--paper); }
.sand { background: var(--sand); }
.ink { background: var(--ink); color: var(--light); }
.section-head { margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { margin-bottom: 18px; }

/* ---------- Services ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.card { border-top: 3px solid var(--amber); padding-top: 22px; }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card > p { color: var(--muted); font-size: 16px; margin-bottom: 16px; }

.ticks li { position: relative; padding-left: 20px; font-size: 15.5px; line-height: 1.5; }
.ticks li + li { margin-top: 7px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.58em; width: 7px; height: 7px; border-radius: 1.5px; background: var(--amber-deep);
}

/* ---------- Principles ---------- */
.principles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.principles .section-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 32px); }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tile { background: var(--ink-card); border-radius: var(--radius); padding: 26px; }
.tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tile h3 { font-size: 19px; margin: 18px 0 8px; color: var(--light); }
.tile p { color: var(--light-muted); font-size: 15.5px; }
.icon { width: 26px; height: 26px; fill: none; stroke: var(--amber); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Case ---------- */
.panel { background: var(--card); border-radius: var(--radius); padding: 26px; }
.panel h3 { font-size: 18px; margin-bottom: 14px; }
.note { font-size: 13.5px; color: var(--muted); margin-top: 14px; }

.case-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
.case-problem { display: grid; gap: 24px; }
.spellings li {
  font-family: var(--mono); font-size: 14.5px; line-height: 1.4; padding: 9px 12px;
  background: var(--paper); border-radius: 6px; overflow-wrap: anywhere;
}
.spellings li + li { margin-top: 8px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.facts li { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--rule); padding-top: 14px; }
.facts strong { font-size: 28px; font-weight: 600; line-height: 1.1; }
.facts span { font-size: 14px; line-height: 1.4; color: var(--muted); }

/* Dumbbell */
.viz figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 18px; }
.viz figcaption h3 { margin-bottom: 0; }
.viz-legend { display: flex; gap: 18px; font-size: 14px; color: var(--muted); }
.viz-legend span { display: inline-flex; align-items: center; gap: 7px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot-before { background: var(--viz-before); }
.dot-after { background: var(--viz-after); }

.db { position: relative; --label-w: 168px; --val-w: 64px; }
.db-axis {
  position: relative; height: 20px; margin-left: var(--label-w); margin-right: var(--val-w);
  font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.db-axis span { position: absolute; transform: translateX(-50%); }
.db-axis span:nth-child(1) { left: 0; transform: none; }
.db-axis span:nth-child(2) { left: 25%; }
.db-axis span:nth-child(3) { left: 50%; }
.db-axis span:nth-child(4) { left: 75%; }
.db-axis span:nth-child(5) { left: 100%; transform: translateX(-60%); }
.db-row {
  position: relative; display: flex; align-items: center; height: 36px; border-radius: 6px; cursor: default;
}
.db-row:hover, .db-row:focus-visible { background: rgba(255, 255, 255, 0.55); }
.db-row:focus-visible { outline-offset: 0; }
.db-total .db-label { font-weight: 600; }
.db-total { border-bottom: 1px solid var(--rule); margin-bottom: 4px; height: 42px; }
.db-label { flex: 0 0 var(--label-w); padding-right: 12px; font-size: 14.5px; line-height: 1.2; }
.db-plot {
  position: relative; flex: 1 1 auto; height: 100%; margin-right: var(--val-w);
  /* сетка 0/25/50/75/100 — волосяные линии, самый тихий слой */
  background:
    linear-gradient(var(--rule), var(--rule)) 0 0 / 1px 100% no-repeat,
    linear-gradient(var(--rule), var(--rule)) 25% 0 / 1px 100% no-repeat,
    linear-gradient(var(--rule), var(--rule)) 50% 0 / 1px 100% no-repeat,
    linear-gradient(var(--rule), var(--rule)) 75% 0 / 1px 100% no-repeat,
    linear-gradient(var(--rule), var(--rule)) 100% 0 / 1px 100% no-repeat;
}
.db-line {
  position: absolute; top: 50%; height: 2px; transform: translateY(-50%);
  left: calc(var(--b) * 1%); width: calc((var(--a) - var(--b)) * 1%);
  background: linear-gradient(90deg, var(--viz-before), var(--viz-after));
}
.db-dot {
  position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%;
  transform: translate(-50%, -50%); box-shadow: 0 0 0 2px var(--card);
}
.db-b { left: calc(var(--b) * 1%); background: var(--viz-before); }
.db-a { left: calc(var(--a) * 1%); background: var(--viz-after); width: 14px; height: 14px; }
.db-val {
  position: absolute; top: 50%; transform: translateY(-50%); left: calc(var(--a) * 1% + 14px);
  font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.db-val small { font-size: 12px; font-weight: 400; color: var(--muted); }
.db-tip {
  position: absolute; z-index: 5; pointer-events: none;
  background: var(--ink); color: var(--light); border-radius: 8px; padding: 10px 12px;
  font-size: 13.5px; line-height: 1.45; box-shadow: 0 8px 24px rgba(16, 30, 36, .25); white-space: nowrap;
}
.db-tip .k { display: inline-block; width: 12px; height: 2px; vertical-align: middle; margin-right: 8px; }
.db-tip strong { font-weight: 600; }
.viz-table { margin-top: 14px; font-size: 14px; }
.viz-table summary { cursor: pointer; color: var(--amber-dark); font-weight: 500; width: max-content; }
.viz-table table, .pairs { width: 100%; border-collapse: collapse; margin-top: 10px; font-variant-numeric: tabular-nums; }
.viz-table th, .viz-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); font-weight: 400; }
.viz-table thead th { font-weight: 600; }

.streams { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.stream { background: var(--card); border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.stream-tag { font-family: var(--mono); font-size: 13px; color: var(--amber-dark); letter-spacing: .02em; }
.stream h3 { font-size: 21px; }
.stream .ticks li { font-size: 15px; }
.results { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: auto; padding-top: 4px; }
.results > div { border-top: 1px solid var(--rule); padding-top: 12px; }
.results dt { font-size: 26px; font-weight: 600; line-height: 1.1; margin-bottom: 4px; }
.results dd { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--muted); }

.pairs { margin-top: auto; font-size: 14.5px; }
.pairs + .results { margin-top: 0; }
.pairs caption { text-align: left; font-size: 13px; color: var(--muted); padding-bottom: 6px; }
.pairs th, .pairs td { padding: 7px 0; border-bottom: 1px solid var(--rule); text-align: right; font-weight: 400; }
.pairs th:first-child { text-align: left; }
.pairs th + th, .pairs td { padding-left: 14px; }
.pairs thead th { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.pairs td:nth-child(2) { font-weight: 600; }
.pairs td:nth-child(3) { color: var(--muted); }
.pairs tfoot th, .pairs tfoot td { border-bottom: 0; font-weight: 600; padding-top: 10px; }
.pairs tfoot td:nth-child(3) { font-weight: 400; }

.source-note { margin-top: 24px; font-size: 13.5px; color: var(--muted); }

/* ---------- Approach ---------- */
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: phase; }
.phase { counter-increment: phase; }
.phase::before {
  content: counter(phase, decimal-leading-zero);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--amber); color: var(--ink); font: 600 15px/1 var(--mono); margin-bottom: 18px;
}
.phase h3 { font-size: 21px; margin-bottom: 14px; }
.phase .ticks li { font-size: 15px; }

.pilot { margin-top: clamp(56px, 7vw, 88px); }
.pilot > h3 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 24px; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; counter-reset: step; margin-bottom: 24px; }
.steps li {
  counter-increment: step; position: relative; background: var(--ink); color: var(--light);
  padding: 18px 26px 18px 22px; display: flex; flex-direction: column; gap: 6px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%);
}
.steps li:first-child { clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); border-radius: 8px 0 0 8px; }
.steps li:not(:first-child) { padding-left: 30px; }
.steps strong { font-size: 15.5px; font-weight: 600; }
.steps strong::before { content: counter(step); color: var(--amber); margin-right: 8px; font-family: var(--mono); }
.steps span { font-size: 13.5px; line-height: 1.4; color: var(--light-muted); }
.pilot-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.pilot-cols .panel { background: var(--paper); }
.pilot-cols h4 { font-size: 18px; margin-bottom: 14px; }

/* ---------- Contact ---------- */
.contact-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.contact h2 { margin-bottom: 18px; font-size: clamp(34px, 5vw, 56px); }
.contact-box { display: flex; flex-direction: column; gap: 24px; }
.email {
  font-size: clamp(24px, 3.4vw, 40px); font-weight: 600; letter-spacing: -0.01em; color: var(--amber);
  text-decoration: none; overflow-wrap: anywhere; border-bottom: 2px solid transparent; width: max-content; max-width: 100%;
}
.email:hover { border-bottom-color: var(--amber); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-deep); color: var(--light-muted); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-block: 28px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--light); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero-motif { display: none; }
  .phases { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 4px; }
  .steps li, .steps li:first-child, .steps li:not(:first-child) { clip-path: none; border-radius: 8px; padding: 16px 20px; }
  .streams { grid-template-columns: 1fr; }
  .case-top { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .principles { grid-template-columns: 1fr; gap: 32px; }
  .principles .section-head { position: static; }
  .proof { grid-template-columns: repeat(2, 1fr); }
  .proof li:nth-child(3) { padding-left: 0; border-left: 0; }
  .proof li:nth-child(n+3) { margin-top: 8px; }
  .contact-inner { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .header-inner { gap: 16px; }
  .cards, .tiles, .phases, .pilot-cols, .facts { grid-template-columns: 1fr; }
  .tile:last-child:nth-child(odd) { grid-column: auto; }
  .proof li { padding-right: 12px; }
  .proof li + li { padding-left: 12px; }
  .proof li:nth-child(3) { padding-left: 0; }
  .db { --label-w: 112px; --val-w: 58px; }
  .db-label { font-size: 13px; }
  .panel, .stream, .tile { padding: 20px; }
  .actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motif .a { animation: none; }
}
