/* SAKRAM — корневая страница sakram.kz. Бренд-система SAKRAM: Inter, Graphite / Light Neutral, акценты подразделений.
   Шапка и подвал — общий кит SAKRAM (assets/sakram-chrome, не редактировать; источник — ../sakram-shared).
   При правке файла поменяйте ?v= в ссылках на него (index.html, 404.html): CSS кэшируется на год. */

/* ---------- Inter (self-hosted, @fontsource-variable/inter 5.3.0, OFL) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-cyrillic-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Метрики системного шрифта подогнаны под Inter — меньше сдвига текста при загрузке */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

/* ---------- Токены ---------- */
:root {
  --graphite: #1F2933;
  --graphite-850: #26313C;   /* приподнятая поверхность на тёмном */
  --neutral: #F6F8FA;        /* Light Neutral */
  --white: #FFFFFF;
  --surface-2: #EEF2F5;      /* очень светлый графит */
  --line: #DCE2E8;
  --line-strong: #C3CCD5;
  --muted: #52606D;          /* 6:1 на Light Neutral */

  --teal: #0BB3A7;           /* SAKRAM Teal / Security */
  --teal-ink: #067068;       /* бирюзовый для текста и фокуса на светлом: 5,6:1 */
  --gold: #F4B400;           /* SAKRAM Edu */
  --blue: #3B82F6;           /* SAKRAM Industry */

  --night-fg: #F6F8FA;
  --night-muted: #A9B4BF;    /* 7:1 на Graphite */
  --night-line: rgb(246 248 250 / 0.14);
  --night-line-strong: rgb(246 248 250 / 0.26);

  /* тема по умолчанию — светлая */
  --fg: var(--graphite);
  --fg-muted: var(--muted);
  --rule: var(--line);
  --rule-strong: var(--line-strong);
  --accent: var(--teal-ink);
  --accent-ui: var(--teal);
  --surface: var(--white);

  --font: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --gap: 24px;
  --section: clamp(72px, 9vw, 128px);
  --header-h: var(--sk-header-h); /* высота общей шапки SAKRAM (кит sakram-chrome) */

  /* Общие шапка и подвал (assets/sakram-chrome) выравниваются по сетке этой страницы и её шрифту */
  --sk-site-container: var(--container);
  --sk-site-gutter: var(--gutter);
  --sk-site-font: var(--font);
  --r-xs: 3px;
  --r-s: 4px;
  --r-m: 6px;
  --cut: 14px;               /* срезанный угол — мотив знака */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 0.2s;
}

[data-theme="dark"] {
  --fg: var(--night-fg);
  --fg-muted: var(--night-muted);
  --rule: var(--night-line);
  --rule-strong: var(--night-line-strong);
  --accent: var(--teal);
  --accent-ui: var(--teal);
  --surface: var(--graphite-850);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--graphite);
  background: var(--neutral);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
}
p { text-wrap: pretty; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 8px;
  z-index: 100;
  padding: 12px 16px;
  font-weight: 500;
  color: var(--white);
  background: var(--graphite);
  border-radius: var(--r-m);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Кнопки и ссылки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  border: 1px solid transparent;
  border-radius: var(--r-m);
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), transform 0.15s var(--ease);
}
.btn:active { transform: translateY(1px); }

/* Graphite на Teal — 5,6:1 (белый на Teal не проходит AA) */
.btn-primary { color: var(--graphite); background: var(--teal); }
.btn-primary:hover { background: #0AA196; }

.btn-secondary { color: var(--fg); border-color: var(--rule-strong); }
.btn-secondary:hover { border-color: currentColor; }

.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 0.9375rem; }

.link-quiet {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 6px;
  transition: text-decoration-color var(--dur-fast);
}
.link-quiet:hover { text-decoration-color: currentColor; }

/* Маркер подразделения: квадрат со срезанным углом */
.marker {
  flex: none;
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--division, var(--teal));
  clip-path: polygon(0 0, 60% 0, 100% 40%, 100% 100%, 0 100%);
}

/* ---------- Первый экран ---------- */
.hero { padding-top: clamp(40px, 6vw, 88px); }

.hero-grid {
  display: grid;
  gap: clamp(48px, 6vw, 64px);
  align-items: center;
}

.hero h1 {
  max-width: 13em;
  font-size: clamp(2.375rem, 1.35rem + 3.4vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.lead {
  max-width: 34em;
  margin-top: 24px;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 36px;
}

/* ---------- Схема экосистемы ---------- */
.eco {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
  aspect-ratio: 560 / 600;
  container-type: inline-size;
}

.eco-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.eco-loop { fill: none; stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 5; }
.eco-panel { fill: var(--white); stroke: var(--line-strong); stroke-width: 1.1; stroke-linejoin: round; }
.eco-hub { fill: var(--white); stroke: var(--line-strong); stroke-width: 1.1; stroke-linejoin: round; }
.eco-link { fill: none; stroke: var(--graphite); stroke-width: 1.2; stroke-linejoin: round; }
.eco-pulse { fill: none; stroke: var(--teal); stroke-width: 2.4; stroke-linecap: square; stroke-dasharray: 0 1; opacity: 0; }
.eco-node-dot { fill: var(--white); stroke: var(--graphite); stroke-width: 1.2; }
.eco-port { fill: var(--teal); }

.eco-symbol {
  position: absolute;
  left: 38.93%;
  top: 37.78%;
  width: 22.14%;
  height: auto;
}

.eco-node {
  position: absolute;
  width: 40%;
  height: 19.33%;
  display: flex;
  flex-direction: column;
  gap: 0.35em;
  padding: 3.2cqi 3.6cqi;
}

.eco-node--a { left: 2.14%; top: 6%; }
.eco-node--b { left: 57.86%; top: 6%; }
.eco-node--c { left: 30%; top: 79.33%; }

.eco-node strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(14px, 3cqi, 17px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.eco-node strong::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  background: var(--teal);
  clip-path: polygon(0 0, 60% 0, 100% 40%, 100% 100%, 0 100%);
}

.eco-node span {
  font-size: clamp(12.5px, 2.45cqi, 14px);
  line-height: 1.4;
  color: var(--muted);
}

/* ---------- Указатель направлений под первым экраном ---------- */
.division-index {
  display: grid;
  margin-top: clamp(48px, 6vw, 80px);
  border-top: 1px solid var(--line);
}

.division-index a {
  display: grid;
  align-content: start;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 12px;
  row-gap: 4px;
  height: 100%;
  padding: 22px 0 26px;
  transition: background-color var(--dur-fast);
}

.division-index strong { font-size: 1rem; font-weight: 600; }
.division-index a > span:last-child { grid-column: 2; font-size: 0.9375rem; color: var(--muted); }
.division-index a:hover strong { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* ---------- Секции ---------- */
.section { padding-block: var(--section); }

.section-head {
  display: grid;
  gap: 16px var(--gap);
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head h2 {
  font-size: clamp(1.875rem, 1.25rem + 2vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.section-head p {
  max-width: 38em;
  font-size: 1.125rem;
  color: var(--fg-muted);
}

/* ---------- Направления ---------- */
.division {
  position: relative;
  display: grid;
  gap: 32px var(--gap);
  padding-block: clamp(32px, 4vw, 44px) clamp(56px, 7vw, 88px);
  border-top: 1px solid var(--line);
}

.division:last-child { padding-bottom: 0; }

/* Отрезок цвета подразделения на общей линии */
.division::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 64px;
  height: 2px;
  background: var(--division);
}

.division-name {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.division-intro h3 {
  margin-bottom: 16px;
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.division-intro h3 a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 6px;
  transition: text-decoration-color var(--dur-fast);
}

.division-intro h3 a:hover { text-decoration-color: currentColor; }

.division-intro > p { color: var(--muted); }
.division-intro > .btn { margin-top: 28px; }

/* Карточки продуктов */
.products {
  display: grid;
  gap: var(--gap);
}

.product {
  --tile-line: var(--line);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--tile-line);
  border-radius: var(--r-m);
  transition: border-color var(--dur-fast) var(--ease), box-shadow 0.3s var(--ease);
}

/* срезанный угол: треугольник цвета фона + диагональная линия */
.product::before {
  content: "";
  position: absolute;
  top: -1px;
  right: -1px;
  z-index: 2;
  width: calc(var(--cut) + 1px);
  height: calc(var(--cut) + 1px);
  background: linear-gradient(to bottom left, var(--neutral) calc(50% - 0.5px), var(--tile-line) calc(50% - 0.5px), var(--tile-line) calc(50% + 0.5px), transparent calc(50% + 0.5px));
  pointer-events: none;
}

.product:hover {
  --tile-line: var(--line-strong);
  box-shadow: 0 1px 2px rgb(31 41 51 / 0.04), 0 12px 32px -20px rgb(31 41 51 / 0.28);
}

.product:focus-within { outline: 2px solid var(--teal-ink); outline-offset: 3px; }
.product-title a:focus-visible { outline: none; }

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-2);
  border-bottom: 1px solid var(--tile-line);
  border-radius: var(--r-m) var(--r-m) 0 0;
  transition: border-color var(--dur-fast) var(--ease);
}

.product-media > picture,
.product-media > img {
  position: absolute;
  inset: 24px;
  width: calc(100% - 48px);
  height: calc(100% - 48px);
}

.product-media picture img {
  width: 100%;
  height: 100%;
}

.product-media img {
  object-fit: contain;
  transition: transform 0.6s var(--ease-out);
}

.product:hover .product-media img { transform: scale(1.025); }

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px 20px;
}

.product-title {
  font-size: 1.1875rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* вся карточка кликабельна, ссылка остаётся одной и с понятным текстом */
.product-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.product:hover .product-title a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.product-lead { font-size: 0.9375rem; color: var(--muted); }

.facts {
  display: grid;
  gap: 8px;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.facts li {
  position: relative;
  padding-left: 18px;
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  background: var(--division);
}

.product-url {
  margin-top: auto;
  padding-top: 16px;
  font-size: 0.8125rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* Sakshy */
.sakshy {
  display: grid;
  gap: 12px 32px;
  margin-top: var(--gap);
  padding: 24px 28px;
  color: var(--night-fg);
  background: var(--graphite);
  border-radius: var(--r-m);
}

.sakshy-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--teal);
}

.sakshy-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--teal);
}

.sakshy h4 { margin-top: 4px; font-size: 1.375rem; letter-spacing: -0.02em; }
.sakshy p:last-child { color: var(--night-muted); font-size: 0.9375rem; }

/* Edu */
.figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px var(--gap);
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.figures div { display: flex; flex-direction: column; gap: 6px; }

.figures dd {
  order: -1;
  font-size: clamp(2rem, 1.6rem + 1.2vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.figures dd::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 12px;
  background: var(--division);
}

.figures dt { font-size: 0.875rem; line-height: 1.4; color: var(--muted); }

.sublinks {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.sublinks a {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
  transition: text-decoration-color var(--dur-fast);
}

.sublinks a:hover { text-decoration-color: currentColor; }

.division-media { align-self: start; }

.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-m);
}

.media-frame::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  width: calc(var(--cut) + 6px);
  height: calc(var(--cut) + 6px);
  background: linear-gradient(to bottom left, var(--neutral) 50%, transparent 50%);
}

.media-frame img {
  width: 100%;
  aspect-ratio: 1400 / 850;
  object-fit: cover;
}

.division-media figcaption {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* Industry */
.industry-body {
  display: grid;
  gap: var(--gap);
  align-content: start;
}

.scope { border-top: 1px solid var(--line); }

.scope li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

.scope li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--division);
}

.note {
  align-self: start;
  padding: 22px 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
}

.note-title { margin-bottom: 8px; font-weight: 600; }
.note p:last-child { font-size: 0.9375rem; color: var(--muted); }

.note a {
  font-weight: 500;
  color: var(--graphite);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
}

.note a:hover { text-decoration-color: currentColor; }

/* ---------- Подход (тёмная секция) ---------- */
.approach {
  color: var(--night-fg);
  background: var(--graphite);
}

.layers {
  display: grid;
  gap: 40px var(--gap);
}

.layer {
  position: relative;
  padding-top: 24px;
  border-top: 1px solid var(--night-line);
}

.layer::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 40px;
  height: 2px;
  background: var(--teal);
}

.layer h3 { margin-bottom: 12px; font-size: 1.375rem; letter-spacing: -0.02em; }
.layer p { font-size: 0.9875rem; color: var(--night-muted); }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.tags li {
  padding: 5px 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--night-fg);
  border: 1px solid var(--night-line-strong);
  border-radius: var(--r-xs);
}

.steps-title {
  margin-top: clamp(64px, 8vw, 96px);
  margin-bottom: 24px;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}

.steps { display: grid; }

.steps li {
  position: relative;
  display: grid;
  align-content: start;
  grid-template-columns: 36px 1fr;
  column-gap: 12px;
  row-gap: 6px;
  padding: 20px 24px 24px 0;
  border-top: 1px solid var(--night-line);
}

.step-num {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--graphite);
  background: var(--teal);
  clip-path: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%);
}

.steps strong { font-weight: 600; }
.steps li > span:last-child { font-size: 0.9375rem; color: var(--night-muted); }

/* ---------- Контакты и списки-ссылки ---------- */
.contacts-grid { display: grid; gap: 40px var(--gap); }

.contacts-intro p {
  max-width: 30em;
  margin-top: 16px;
  font-size: 1.125rem;
  color: var(--muted);
}

.contacts-intro h2 {
  font-size: clamp(1.875rem, 1.25rem + 2vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.rows { border-top: 1px solid var(--line); }

.rows a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 20px;
  row-gap: 2px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.row-label { grid-column: 1; font-size: 0.875rem; color: var(--muted); }

.row-value {
  grid-column: 1;
  font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.row-note { grid-column: 1; font-size: 0.875rem; color: var(--muted); }

.row-icon {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-m);
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}

.row-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rows a:hover .row-icon {
  color: var(--graphite);
  background: var(--teal);
  border-color: var(--teal);
}

.rows a:hover .row-value {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

/* ---------- Страница 404 ---------- */
.notfound { padding-block: clamp(56px, 9vw, 120px) var(--section); }

.notfound-grid { display: grid; gap: 40px var(--gap); }

.notfound h1 {
  font-size: clamp(2.25rem, 1.4rem + 3vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.notfound-code {
  margin-bottom: 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--teal-ink);
  font-variant-numeric: tabular-nums;
}

.notfound .lead { margin-top: 20px; }

.rows .row-icon--go svg { stroke-width: 1.6; }

/* ---------- Адаптив ---------- */
@media (min-width: 640px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .industry-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .division-index { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .division-index li + li a { padding-left: 24px; border-left: 1px solid var(--line); }
  .division-index a { padding-right: 16px; }
}

@media (min-width: 900px) {
  .section-head { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
  .section-head h2 { grid-column: 1 / span 5; }
  .section-head p { grid-column: 6 / span 7; }

  .division { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .division-intro { grid-column: 1 / span 4; }
  .division-body,
  .division-media { grid-column: 5 / span 8; }
  .division-intro { padding-right: 16px; }

  .sakshy { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; }

  .layers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .contacts-grid,
  .notfound-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .contacts-intro { grid-column: 1 / span 5; }
  .contacts-grid .rows { grid-column: 6 / span 7; }
  .notfound-copy { grid-column: 1 / span 5; }
  .notfound-grid .rows { grid-column: 7 / span 6; align-self: end; }
}

@media (min-width: 1100px) {
  .hero-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
  .products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-copy { grid-column: 1 / span 6; }
  .eco { grid-column: 7 / span 6; margin-inline: 0 0; justify-self: end; }
}

@media (max-width: 639px) {
  /* Схема — вертикальная шина: знак, от него три узла */
  .eco {
    aspect-ratio: auto;
    max-width: none;
    container-type: normal;
    padding-left: 4px;
  }

  .eco-lines { display: none; }

  .eco-symbol {
    position: static;
    width: 72px;
    margin-left: -6px;
  }

  .eco-nodes {
    position: relative;
    display: grid;
    gap: 12px;
    margin-top: 4px;
    padding-left: 40px;
  }

  .eco-nodes::before {
    content: "";
    position: absolute;
    left: 24px;
    top: -6px;
    bottom: 32px;
    width: 1px;
    background: var(--graphite);
  }

  .eco-node {
    position: relative;
    inset: auto;
    width: auto;
    height: auto;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-s);
  }

  .eco-node::before {
    content: "";
    position: absolute;
    left: -17px;
    top: 50%;
    width: 16px;
    height: 1px;
    background: var(--graphite);
  }

  .eco-node strong { font-size: 16px; }
  .eco-node span { font-size: 14px; }

  .division-index li + li a { border-top: 1px solid var(--line); }
  .division-index a { padding: 18px 0; }

  .sakshy { padding: 22px 20px; }
  .row-icon { width: 44px; height: 44px; }
}

/* ---------- Движение: одно согласованное появление схемы, далее — только ответы на действия ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  .eco-link {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: eco-draw 0.9s var(--ease-out) 0.25s forwards;
  }
  .eco-link--b { animation-delay: 0.37s; }
  .eco-link--c { animation-delay: 0.49s; }

  .eco-panel, .eco-node, .eco-node-dot, .eco-port, .eco-loop {
    animation: eco-fade 0.7s var(--ease-out) both;
  }
  .eco-loop { animation-delay: 0.9s; }
  .eco-panel, .eco-node--a { animation-delay: 0.1s; }
  .eco-panel--b, .eco-node--b { animation-delay: 0.18s; }
  .eco-panel--c, .eco-node--c { animation-delay: 0.26s; }
  .eco-node-dot, .eco-port { animation-delay: 0.8s; }

  .eco-symbol { animation: eco-symbol 0.8s var(--ease-out) both; }

  /* данные идут от узлов к центру системы */
  .eco-pulse {
    stroke-dasharray: 0.07 1.2;
    stroke-dashoffset: 0.07;
    animation: eco-pulse 5.4s var(--ease) 1.6s infinite;
  }
  .eco-pulse--b { animation-delay: 2.4s; }
  .eco-pulse--c { animation-delay: 3.2s; }
  .eco.is-paused .eco-pulse { animation-play-state: paused; }
}

@keyframes eco-draw { to { stroke-dashoffset: 0; } }
@keyframes eco-fade { from { opacity: 0; transform: translateY(6px); } }
@keyframes eco-symbol { from { opacity: 0; transform: scale(0.94); } }
@keyframes eco-pulse {
  0% { stroke-dashoffset: 0.07; opacity: 0; }
  6% { opacity: 1; }
  34% { opacity: 1; }
  40% { stroke-dashoffset: -1; opacity: 0; }
  100% { stroke-dashoffset: -1; opacity: 0; }
}

@media (max-width: 639px) {
  .eco-node { animation: none; }
}

@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;
  }
}
