/* ==========================================================================
   Sentient — лендинг интегратора корпоративного ИИ

   Визуальный язык: монтажная схема. Глубина строится плотностью поверхностей
   и весом линий, а не размытыми пятнами. Акцент выдаётся по бюджету:
   не больше трёх бирюзовых объектов на экран.

   Две темы. Светлая — по умолчанию: в российском корпоративном сегменте
   светлые сайты читаются как «серьёзный поставщик» (шесть из семи изученных).
   Тёмная включается переключателем в шапке и запоминается.
   ========================================================================== */

:root {
  /* ---- Светлая тема (по умолчанию) ---- */
  --s0: #f2f5f9;   /* дно страницы: холодный светло-серый, не чистый белый */
  --s1: #ffffff;   /* панель, карточка */
  --s2: #eaeef5;   /* панель внутри панели */
  --s3: #ffffff;   /* секция-контраст */
  --s4: #0a1c3f;   /* глубокий синий: несущий цвет, одинаков в обеих темах */

  --text: #0a0e16;
  --muted: rgba(10, 14, 22, 0.66);   /* 6.12:1 */
  --faint: rgba(10, 14, 22, 0.60);   /* 4.95:1 — AA; 0.52 давало 3.8 и не проходило */

  --rule-hair: rgba(10, 14, 22, 0.10);    /* декоративный разделитель */
  --rule-base: rgba(10, 14, 22, 0.20);    /* граница панели */
  --rule-strong: rgba(10, 14, 22, 0.45);  /* 3.05:1 — границы контролов, SC 1.4.11 */

  /* Бирюза #2fe3ce на белом даёт ~1.5:1 — для текста и линий берём
     затемнённый тон того же оттенка, для заливки кнопки — исходный. */
  --accent: #0c7a6d;         /* 4.83:1 — текст и ссылки */
  --accent-line: #159889;    /* 3.30:1 — иконки, границы, крупный текст */
  --accent-fill: #2fe3ce;    /* только заливка: на белом даёт 1.5:1 */
  --accent-on-fill: #04211d; /* 10.5:1 поверх заливки */
  --accent-2: #1d4fd8;       /* 6.14:1 — синий текст */
  --blue: #1d4fd8;
  --focus: #0c7a6d;
  --danger: #b3261e;      /* 5.9:1 на белом */
  --warn-text: #7a4b00;   /* 6.4:1 на белом */

  /* Поверхности внутри синей секции — одинаковы в обеих темах */
  --on-deep: #eef2f7;
  --on-deep-muted: rgba(238, 242, 247, 0.78);
  --on-deep-rule: rgba(255, 255, 255, 0.18);
  --on-deep-accent: #2fe3ce;

  --shot-bg: #f7f8fa;  /* подложка под скриншоты продукта */

  /* ---- Гарнитуры ---- */
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Geologica", "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* ---- Шкала кеглей: семь ступеней ---- */
  --t-hero: clamp(38px, 4.6vw, 64px);
  --t-h2: clamp(30px, 3.6vw, 44px);
  --t-h3: 24px;
  --t-lede: 20px;
  --t-body: 16px;
  --t-sm: 14px;
  --t-label: 11px;

  /* ---- Ритм: шаг 8px ---- */
  --u: 8px;
  --gap-xs: 8px;
  --gap-sm: 16px;
  --gap-md: 32px;
  --gap-lg: 56px;
  --section-y: clamp(72px, 8vw, 112px);
  --section-y-wide: clamp(96px, 10vw, 152px);

  --gutter: clamp(20px, 4vw, 40px);
  --max: 1200px;

  --r-s: 6px;
  --r: 10px;
  --r-l: 16px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

:root[data-theme="dark"] {
  --s0: #060911;
  --s1: #0b1220;
  --s2: #131c2e;
  --s3: #0b1220;
  --s4: #0a1c3f;

  --text: #eef2f7;
  --muted: rgba(238, 242, 247, 0.62);   /* 6.86:1 */
  --faint: rgba(238, 242, 247, 0.56);   /* 5.79:1 */

  --rule-hair: rgba(255, 255, 255, 0.10);
  --rule-base: rgba(255, 255, 255, 0.20);
  --rule-strong: rgba(238, 242, 247, 0.38);  /* 3.30:1 */

  --accent: #2fe3ce;         /* 11.6:1 */
  --accent-line: #2fe3ce;
  --accent-fill: #2fe3ce;
  --accent-on-fill: #04211d;
  --accent-2: #4aa8ff;       /* 7.43:1; #1d4fd8 как текст даёт 2.8 — только заливка */
  --blue: #4aa8ff;
  --focus: #2fe3ce;
  --danger: #ff8f8f;
  --warn-text: #ffd9a1;

  --shot-bg: #f7f8fa;

  color-scheme: dark;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--s0);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

/* ---------- Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  position: relative;
  padding-block: var(--section-y);
}

/* фиксированный хедер не должен перекрывать заголовок при переходе по анкору */
section[id], main[id] { scroll-margin-top: 84px; }

.section--hairline { border-top: 1px solid var(--rule-hair); }

/* Секция-контраст: в светлой теме белая на сером фоне, в тёмной — светлее дна */
.section--light { background: var(--s3); }

/* ---------- Type ---------- */
.eyebrow {
  display: block;  margin: 0 0 22px;
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}


h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--display);
}

/* Отрицательный трекинг — только от 28px: на мелкой кириллице он съедает просветы */
h1 {
  font-size: var(--t-hero);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
h2 {
  font-size: var(--t-h2);
  font-weight: 600;
  line-height: 1.12;
  text-wrap: balance;
}
h3 {
  font-size: var(--t-h3);
  font-weight: 500;
  line-height: 1.25;
}

.lede {
  max-width: 52ch;
  margin: 20px 0 0;
  font-size: var(--t-lede);
  line-height: 1.45;
  color: var(--muted);
  text-wrap: pretty;
}

.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

.section-head { max-width: 760px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lede { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--r-s);
  font-size: var(--t-body);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease),
    border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--text);
  color: var(--s0);
}
.btn--primary:hover { opacity: 0.88; }

.btn--ghost {
  background: var(--s2);
  border-color: var(--rule-base);
  color: var(--text);
}
.btn--ghost:hover { background: var(--s2); border-color: var(--rule-base); }

.btn--accent {
  background: var(--accent-fill);
  border-color: var(--accent-line);
  color: var(--accent-on-fill);
  font-weight: 600;
}
.btn--accent:hover { background: #4ff0dc; }

.btn--sm { height: 40px; padding: 0 17px; font-size: var(--t-sm); }
.btn--block { width: 100%; }

.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.header.is-scrolled {
  background: color-mix(in srgb, var(--s0) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--rule-hair);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: var(--t-body);
  font-weight: 500;
  flex: none;
}

.brand svg { width: 26px; height: 26px; }
.brand__core { fill: var(--accent); }
.brand__net { stroke: var(--text); }
.brand__dot { fill: var(--text); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
}

.nav a {
  padding: 8px 13px;
  border-radius: var(--r-s);
  font-size: var(--t-sm);
  font-weight: 450;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav a:hover { color: var(--text); background: var(--s2); }

.header__cta { display: flex; align-items: center; gap: 10px; flex: none; }

.burger {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  background: var(--s2);
  border: 1px solid var(--rule-base);
  border-radius: 11px;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.burger span + span { margin-top: 4px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-nav {
  display: none;
  padding: 8px var(--gutter) 26px;
  background: var(--s0);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule-hair);
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  padding: 13px 0;
  font-size: var(--t-body);
  font-weight: 500;
  border-bottom: 1px solid var(--rule-hair);
}
.mobile-nav .btn { margin-top: 20px; }

/* ==========================================================================
   HERO — тезис слева, живой журнал агента справа.
   Журнал (аудит-трейл) — главный инструмент доверия в enterprise, поэтому
   он и стоит на месте «геройской картинки».
   ========================================================================== */
.hero {
  position: relative;
  padding-top: clamp(104px, 13vh, 146px);
  padding-bottom: clamp(50px, 6vw, 78px);
  overflow: hidden;
}


/* инженерные направляющие: колонки чертежа, а не «клетка» */
.hero__rules {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    var(--rule-hair) 0 1px,
    transparent 1px 12.5%
  );
  mask-image: linear-gradient(180deg, #000 0 8%, rgba(0, 0, 0, 0.5) 55%, transparent 88%);
  -webkit-mask-image: linear-gradient(180deg, #000 0 8%, rgba(0, 0, 0, 0.5) 55%, transparent 88%);
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(34px, 4.5vw, 68px);
  align-items: center;
}

.hero__thesis h1 { max-width: 15ch; }
.hero__thesis .lede { max-width: 44ch; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__note {
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.03em;
  color: var(--faint);
}

/* ---------- Журнал агента ---------- */
.trace {
  position: relative;
  padding: 20px 20px 18px;
  border: 1px solid var(--rule-base);
  border-radius: var(--r-l);
  background: var(--s1);
}

/* световая кромка сверху — «система под напряжением» */

.trace__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule-hair);
}

.trace__title,
.trace__tasklabel,
.trace__resultlabel {
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
}

.trace__status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}

.trace__status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: beat 1.5s ease-in-out infinite;
}
@keyframes beat { 45% { opacity: 0.22; transform: scale(0.72); } }
.trace.is-complete .trace__status i { animation: none; }

.trace__task { padding: 17px 0 3px; }
.trace__task p {
  margin: 9px 0 0;
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--text);
}

.trace__steps { margin: 15px 0 0; padding: 0; list-style: none; }

.trace__step {
  display: grid;
  grid-template-columns: 19px 88px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--rule-hair);
  opacity: 0.22;
  transition: opacity 0.5s var(--ease);
}
.trace__step.is-done { opacity: 1; }

.trace__check {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid var(--rule-base);
  border-radius: 4px;
  background: var(--s2);
  color: var(--accent);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease);
}
.trace__check svg {
  width: 12px;
  height: 12px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.trace__step.is-done .trace__check {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}
.trace__step.is-done .trace__check svg { opacity: 1; }

.trace__tool {
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 7px;
  border: 1px solid var(--rule-hair);
  border-radius: 5px;
  background: var(--s2);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}

.trace__text {
  font-size: var(--t-sm);
  line-height: 1.45;
  color: var(--muted);
}

.trace__result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 15px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--r);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  opacity: 0;
  transform: translateY(7px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.trace.is-complete .trace__result { opacity: 1; transform: none; }

.trace__file { display: grid; place-items: center; width: 22px; height: 22px; color: var(--accent); }
.trace__file svg { width: 18px; height: 18px; }

.trace__resulttext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.trace__resulttext b {
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.trace__resulttext em {
  font-family: var(--mono);
  font-style: normal;
  font-size: var(--t-label);
  color: var(--muted);
}

.trace__foot {
  margin: 15px 0 0;
  font-size: var(--t-label);
  line-height: 1.5;
  color: var(--faint);
}

/* ---------- Реальный интерфейс платформы ---------- */
.showcase {
  position: relative;
  z-index: 1;
  margin-top: clamp(54px, 6.5vw, 92px);
}

.showcase__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 0 2px 12px;
  border-bottom: 1px solid var(--rule-hair);
}

.showcase__label {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--faint);
}
.showcase__url {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.02em;
  color: var(--faint);
}


.frame {
  position: relative;
  border: 1px solid var(--rule-base);
  border-radius: var(--r-l);
  background: var(--s1);
  padding: 8px;
}

.frame__screen {
  position: relative;
  container-type: inline-size;
  border-radius: 13px;
  overflow: hidden;
  background: var(--shot-bg);
}

.frame__screen img { width: 100%; height: auto; }

/* Sentient wordmark stamped over the app sidebar */
.frame__stamp {
  position: absolute;
  top: 1.05%;
  left: 1.3%;
  display: flex;
  align-items: center;
  gap: 0.42em;
  font-size: clamp(8px, 0.95vw, 13px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #22262e;
}

/* Точная привязка к ширине скриншота, чтобы штамп совпадал с масштабом UI */
@supports (font-size: 1cqw) {
  .frame__stamp { font-size: 1.22cqw; }
}
.frame__stamp svg { width: 1.15em; height: 1.15em; }
.frame__stamp .brand__net { stroke: #22262e; }
.frame__stamp .brand__dot { fill: #22262e; }
.frame__stamp .brand__core { fill: #12b8a4; }

/* ---------- Logo strip ---------- */
.trust {
  margin-top: clamp(44px, 5vw, 68px);
  padding-top: 30px;
  border-top: 1px solid var(--rule-hair);
  text-align: center;
  position: relative;
  z-index: 1;
}

.trust__label {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

.trust__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 14px;
  margin-top: 20px;
}

.logo-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--rule-hair);
  border-radius: var(--r-s);
  background: var(--s2);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--muted);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.logo-chip:hover { color: var(--text); border-color: var(--rule-base); background: var(--s2); }

.logo-chip__mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--s2);
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text);
}

/* ---------- Cards ---------- */
.grid {
  display: grid;
  gap: 16px;
  margin-top: clamp(40px, 5vw, 58px);
}
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px;
  border: 1px solid var(--rule-hair);
  border-radius: var(--r-l);
  background: var(--s1);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}


.card:hover { background: var(--s2); }

.card h3 { margin-bottom: 10px; }
.card p { margin: 0; font-size: var(--t-body); color: var(--muted); }

.card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  border: 1px solid var(--rule-base);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  color: var(--accent);
}
.card__icon svg { width: 20px; height: 20px; }

/* Value cards (block 2) */
.value {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 24px;
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--rule-hair);
}
.stat__num {
  font-family: var(--display);
  font-variant-numeric: tabular-nums;
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.stat__num em { font-style: normal; color: var(--accent); }
.stat__label { font-size: var(--t-sm); color: var(--faint); }

/* ---------- Agent cards (block 3) ---------- */
.agent { padding: 26px 26px 22px; }

.agent__role {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.agent__role h3 { margin: 0; }

.agent__avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 22%, transparent), rgba(29, 79, 216, 0.24));
  border: 1px solid var(--rule-base);
  color: var(--text);
}
.agent__avatar svg { width: 19px; height: 19px; }

.agent p { flex: 1; }

.agent__prompt {
  margin-top: 20px;
  padding: 13px 14px;
  border-left: 2px solid var(--rule-base);
  border-radius: var(--r-s);
  background: var(--s2);
  font-family: var(--mono);
  font-size: var(--t-label);
  line-height: 1.55;
  color: var(--muted);
  letter-spacing: 0;
}
.agent__prompt b {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Flow diagram (block 4) ---------- */
.flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(40px, 5vw, 56px);
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--rule-hair);
  border-radius: var(--r-l);
  background: var(--s1);
}

.flow__col { position: relative; display: flex; flex-direction: column; gap: 10px; }

.flow__col > .flow__label {
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  padding-left: 2px;
}

/* connector */
.flow__col:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -15px;
  width: 15px;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 15%, transparent), color-mix(in srgb, var(--accent) 80%, transparent));
}

.flow__col:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -7px;
  width: 5px;
  height: 5px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 80%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--accent) 80%, transparent);
  transform: translateY(-50%) rotate(45deg);
}

.flow__node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--rule-hair);
  border-radius: var(--r);
  background: var(--s2);
  font-size: var(--t-sm);
  font-weight: 450;
  line-height: 1.35;
}

.flow__node--in { border-color: var(--rule-base); background: var(--s2); }
.flow__node--out {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: #d3fff8;
}
.flow__node--gate { border-color: rgba(74, 168, 255, 0.34); background: rgba(74, 168, 255, 0.08); }

.flow__node i {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.flow__node--gate i { background: var(--accent-2); box-shadow: 0 0 10px rgba(74, 168, 255, 0.9); }
.flow__node--in i { background: var(--faint); box-shadow: none; }

.flow__spacer { flex: 1; }

/* Feature cards with screenshots */
.feature { padding: 0; overflow: hidden; }
.feature__text { padding: 26px 26px 22px; }
.feature__text h3 { margin-bottom: 9px; }

.feature__shot {
  position: relative;
  margin: 0 22px;
  border: 1px solid var(--rule-hair);
  border-top-left-radius: var(--r);
  border-top-right-radius: var(--r);
  border-bottom: 0;
  background: var(--shot-bg);
  overflow: hidden;
  order: -1;
  padding-top: 14px;
  aspect-ratio: 16 / 10;
}
.feature__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s var(--ease);
}
.feature:hover .feature__shot img { transform: scale(1.025); }

.skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}
.pill {
  padding: 5px 11px;
  border: 1px solid var(--rule-hair);
  border-radius: var(--r-s);
  background: var(--s2);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.01em;
  color: var(--muted);
}
.pill--accent { border-color: color-mix(in srgb, var(--accent) 30%, transparent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* ---------- Integrations (light section) ---------- */






/* ---------- Security ---------- */
.sec-card { padding: 26px; }
.sec-card__badge {
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 4px 10px;
  border: 1px solid rgba(74, 168, 255, 0.3);
  border-radius: var(--r-s);
  background: rgba(74, 168, 255, 0.09);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
}

/* ---------- Methodology timeline ---------- */

.step { position: relative; padding-top: 46px; }

/* соединительные отрезки между шагами — от точки к точке */
.step:not(:last-child)::before,
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 13px;
  right: -17px;
  height: 1px;
}
.step:not(:last-child)::before { background: var(--rule-hair); }

.step:not(:last-child)::after {
  background: linear-gradient(90deg, var(--accent), rgba(74, 168, 255, 0.85));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.6s var(--ease) calc(var(--i, 0) * 0.18s + 0.15s);
}
.timeline.is-visible .step::after { transform: scaleX(1); }

.step__dot {
  position: absolute;
  top: 11px;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1px solid var(--rule-base);
  background: var(--s0);
}
.step__dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.4s var(--ease) calc(var(--i, 0) * 0.22s);
}
.timeline.is-visible .step__dot::after { opacity: 1; }

.step__num {
  position: absolute;
  top: 0;
  left: 26px;
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.1em;
  color: var(--faint);
}

.step h3 { font-size: var(--t-body); margin-bottom: 8px; }
.step p { margin: 0; font-size: var(--t-sm); color: var(--muted); }

.method__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

/* ---------- CTA + form ---------- */
.cta {
  position: relative;
  overflow: hidden;
}


.cta__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(34px, 5vw, 76px);
  align-items: start;
}

.cta__points { margin-top: 32px; display: grid; gap: 13px; }
.cta__points li {
  display: flex;
  gap: 11px;
  font-size: var(--t-body);
  color: var(--muted);
}
.cta__points svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--accent); }

.form {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--rule-base);
  border-radius: var(--r-l);
  background: var(--s1);
}

.field { margin-bottom: 15px; }
.field label {
  display: block;
  margin-bottom: 7px;
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.field label span { color: var(--accent); }

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-s);
  background: var(--s0);
  font-size: var(--t-body);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 92px; resize: vertical; }

.field input::placeholder,
.field textarea::placeholder { color: var(--faint); }

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 11%, transparent);
}

.field.has-error input,
.field.has-error textarea { border-color: var(--danger); }

.field__error {
  display: none;
  margin-top: 6px;
  font-size: var(--t-label);
  color: var(--danger);
}
.field.has-error .field__error { display: block; }

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* honeypot: вне потока и вне доступности, но не display:none — боты такое пропускают */
.form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__consent {
  display: flex;
  gap: 10px;
  margin: 4px 0 18px;
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--faint);
}
.form__consent input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form__consent.has-error { color: var(--danger); }
.form__consent.has-error input { outline: 2px solid var(--danger); outline-offset: 2px; border-radius: 3px; }
.form__consent a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }

.form__foot {
  margin: 14px 0 0;
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.02em;
  color: var(--faint);
  text-align: center;
}

.form__status {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r);
  font-size: var(--t-sm);
  line-height: 1.5;
}
.form__status.is-shown { display: block; }
.form__status--ok {
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: var(--accent);
}
.form__status--warn {
  border: 1px solid rgba(255, 190, 92, 0.4);
  background: rgba(255, 190, 92, 0.09);
  color: var(--warn-text);
}
.form__status code {
  font-family: var(--mono);
  font-size: var(--t-label);
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.35);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--rule-hair);
  padding-block: 54px 34px;
}

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--rule-hair);
}

.footer__about { max-width: 44ch; margin: 16px 0 0; font-size: var(--t-sm); color: var(--faint); }

.footer h4 {
  margin-bottom: 14px;
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.footer__links { display: grid; gap: 9px; }
.footer__links a { font-size: var(--t-sm); color: var(--muted); transition: color 0.2s; }
.footer__links a:hover { color: var(--text); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  padding-top: 26px;
  font-size: var(--t-sm);
  color: var(--faint);
}
.footer__bottom a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* шаги задержки появления — классами, а не инлайновым style (его режет CSP) */
.d1 { --i: 1; }
.d2 { --i: 2; }
.d3 { --i: 3; }
.d4 { --i: 4; }
.d5 { --i: 5; }
.lede--flush { margin-top: 0; }

/* пошаговая задержка появления для детей сеток (индексы задаём в CSS, не в разметке) */
.grid > *:nth-child(2),
.int-groups > *:nth-child(2),
.timeline > *:nth-child(2),
.cta__points > *:nth-child(2) { --i: 1; }
.grid > *:nth-child(3),
.int-groups > *:nth-child(3),
.timeline > *:nth-child(3),
.cta__points > *:nth-child(3) { --i: 2; }
.grid > *:nth-child(4),
.int-groups > *:nth-child(4),
.timeline > *:nth-child(4),
.cta__points > *:nth-child(4) { --i: 3; }
.grid > *:nth-child(5),
.int-groups > *:nth-child(5),
.timeline > *:nth-child(5),
.cta__points > *:nth-child(5) { --i: 4; }
.grid > *:nth-child(6),
.int-groups > *:nth-child(6),
.timeline > *:nth-child(6),
.cta__points > *:nth-child(6) { --i: 5; }
.grid > *:nth-child(7),
.int-groups > *:nth-child(7),
.timeline > *:nth-child(7),
.cta__points > *:nth-child(7) { --i: 6; }
.grid > *:nth-child(8),
.int-groups > *:nth-child(8),
.timeline > *:nth-child(8),
.cta__points > *:nth-child(8) { --i: 7; }


/* ---------- Адаптив ---------- */
@media (max-width: 1080px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 30px; }
  .flow__col:not(:last-child)::after,
  .flow__col:not(:last-child)::before { display: none; }
}

@media (max-width: 1000px) {
  .hero__grid { grid-template-columns: 1fr; gap: 38px; }
  .hero__thesis h1 { max-width: 20ch; }
  .hero__thesis .lede { max-width: 58ch; }
}

@media (max-width: 900px) {
  .nav { display: none; }
  .burger { display: flex; }
  .header__cta .btn--primary { display: none; }
  .value { grid-template-columns: 1fr; }
  .cta__inner { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .grid--4, .grid--2 { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .frame { padding: 6px; }
  .showcase__url { display: none; }
  .stats { gap: 18px 26px; }
  .trace { padding: 17px 16px 16px; }
  .trace__step { grid-template-columns: 19px minmax(0, 1fr); }
  .trace__tool { grid-column: 2; justify-self: start; margin-bottom: 4px; }
  .trace__text { grid-column: 2; }
  .trace__result { grid-template-columns: auto minmax(0, 1fr); }
  .trace__resultlabel { display: none; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .timeline.is-visible .step::after { transform: scaleX(1); }
}

/* подсказка под полем формы — объясняет, зачем поле нужно */
.field__hint {
  margin: 6px 0 0;
  font-size: var(--t-label);
  line-height: 1.45;
  color: var(--faint);
}

/* ==========================================================================
   ПОДПИСЬ СТРАНИЦЫ — язык монтажной схемы

   Секции соединяются «швом»: волосяная линия во всю ширину и жёсткий
   бирюзовый отвод длиной 40px у левого края контента. Это тот же жест,
   которым на схемах обозначают точку подключения. Он заменяет собой
   размытые градиентные пятна и светящиеся точки.
   ========================================================================== */

.section--seam {
  border-top: 1px solid var(--rule-hair);
}

.section--seam::before {
  content: "";
  position: absolute;
  top: -1px;
  left: var(--gutter);
  width: 40px;
  height: 2px;
  background: var(--accent);
}

/* На широких экранах контент центрирован — отвод идёт по его краю, не по краю окна */
@media (min-width: 1281px) {
  .section--seam::before {
    left: calc((100vw - var(--max)) / 2 + var(--gutter));
  }
}

/* Номер секции вместо светящейся точки у надзаголовка */
.eyebrow {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.eyebrow__num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.section--light .eyebrow__num { color: var(--blue); }

/* ---------- Секция безопасности: плотный синий ----------
   Единственная большая цветная плоскость на странице. Глубокий синий из
   брифа получает несущую роль, а граница между секциями размечается
   значением, а не отсутствием линии. */
.section--deep {
  background: var(--s4);
  color: var(--on-deep);
}




/* ---------- Терминалы: квадратные, без гало ----------
   Круглая светящаяся точка — самый узнаваемый декоративный жест.
   На схеме соединения обозначаются квадратными терминалами. */
.flow__node i,
.trace__status i {
  border-radius: 1px;
}

.step__dot {
  border-radius: 2px;
}
.step__dot::after {
  border-radius: 0;
}

/* Дек под заголовком: контраст 64/22 вместо одного слипшегося предложения */
.hero__deck {
  margin: 14px 0 0;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--muted);
}
.hero__deck::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 1px;
  margin: 0 12px 6px 0;
  background: var(--accent);
  vertical-align: middle;
}

/* ==========================================================================
   КОМПОЗИЦИИ СЕКЦИЙ

   Каждая секция получает форму по содержанию, а не общую сетку карточек:
   услуги — нумерованный список, агенты — штатное расписание,
   безопасность — спецификация. Так страница перестаёт быть метрономом.
   ========================================================================== */

/* ---------- Услуги: нумерованный редакторский список ---------- */
.ledger {
  margin-top: var(--gap-lg);
  border-top: 1px solid var(--rule-hair);
}

.ledger__row {
  display: grid;
  grid-template-columns: 64px minmax(0, 4fr) minmax(0, 6fr);
  align-items: start;
  gap: var(--gap-md);
  padding: var(--gap-md) 0;
  border-bottom: 1px solid var(--rule-hair);
}

.ledger__num {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.ledger__title { margin: 0; }

.ledger__text {
  margin: 0;
  max-width: 52ch;
  color: var(--muted);
}

/* ---------- Агенты: штатное расписание ---------- */
.roster {
  margin-top: var(--gap-lg);
  border-top: 1px solid var(--rule-base);
}

.roster__head,
.roster__row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr);
  gap: var(--gap-md);
}

.roster__head {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-hair);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.roster__row {
  align-items: start;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule-hair);
  transition: background 0.2s var(--ease);
}
.roster__row:hover { background: var(--s2); }

.roster__role {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Монограмма должности вместо иконки из типового набора */
.roster__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border: 1px solid var(--rule-base);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.roster__role h3 { font-size: 21px; }

.roster__text {
  margin: 0;
  color: var(--muted);
}

.roster__prompt {
  margin: 0;
  padding-left: 16px;
  border-left: 2px solid var(--rule-base);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--faint);
}

/* ---------- Безопасность: спецификация ---------- */
.spec {
  margin: var(--gap-lg) 0 0;
  border-top: 1px solid var(--on-deep-rule);
}

.spec__row {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: var(--gap-md);
  padding: 28px 0;
  border-bottom: 1px solid var(--on-deep-rule);
}

.spec__key {
  color: var(--on-deep-muted);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.spec__val { margin: 0; max-width: 62ch; }
.spec__val h3 { margin-bottom: 10px; }
.spec__val p { margin: 0; color: var(--on-deep-muted); }

@media (max-width: 900px) {
  .ledger__row { grid-template-columns: 48px minmax(0, 1fr); gap: var(--gap-sm); }
  .ledger__text { grid-column: 2; }
  .ledger__num { font-size: 22px; }

  .roster__head { display: none; }
  .roster__row { grid-template-columns: minmax(0, 1fr); gap: var(--gap-sm); }

  .spec__row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}

/* ---------- Методология: линейка недель ----------
   Колонки неравной ширины — по длительности этапа. Заголовок обещает
   «за 4–6 недель», и композиция теперь говорит о сроке, а не просто
   раскладывает пять одинаковых плиток. */
.ruler { margin-top: var(--gap-lg); }

.ruler__scale {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule-hair);
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 0.8fr 2fr 1.2fr 1fr;
  gap: var(--gap-sm);
  padding-top: 30px;
}

.step { position: relative; padding-right: var(--gap-sm); }

.step__dot {
  position: absolute;
  top: -30px;
  left: 0;
  width: 9px;
  height: 9px;
  border: 1px solid var(--rule-base);
  background: var(--s0);
}
.step__dot::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.35s var(--ease) calc(var(--i, 0) * 0.12s);
}
.timeline.is-visible .step__dot::after { opacity: 1; }

/* отрезок шкалы между этапами — ось линейки, а не светящаяся полоса */
.step:not(:last-child)::before,
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: -26px;
  left: 9px;
  right: 7px;
  height: 1px;
}
.step:not(:last-child)::before { background: var(--rule-hair); }
.step:not(:last-child)::after {
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease) calc(var(--i, 0) * 0.12s);
}
.timeline.is-visible .step::after { transform: scaleX(1); }

.step__num {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.1em;
  color: var(--faint);
}
.step h3 { font-size: 19px; margin-bottom: 8px; }
.step p { margin: 0; font-size: var(--t-sm); color: var(--muted); }

.step__dur {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: var(--t-label);
  color: var(--accent);
}

/* ---------- Интеграции: матрица совместимости ---------- */
.matrix {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: var(--gap-lg);
  border-top: 1px solid var(--rule-base);
}

.matrix__col {
  padding: 26px var(--gap-md) 8px 0;
  border-right: 1px solid var(--rule-hair);
}
.matrix__col:last-child { border-right: 0; padding-right: 0; }

.matrix__title { font-size: 19px; margin-bottom: 4px; }

.matrix__sub {
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: var(--t-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

.matrix__list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: var(--t-body);
  border-bottom: 1px solid var(--rule-hair);
}
.matrix__list li:last-child { border-bottom: 0; }

.matrix__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border: 1px solid var(--rule-base);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

.matrix__more {
  margin: var(--gap-md) 0 0;
  padding-top: var(--gap-sm);
  border-top: 1px solid var(--rule-hair);
  font-size: var(--t-sm);
  color: var(--muted);
}
.matrix__extra:not(:last-child)::after { content: " · "; }

@media (max-width: 900px) {
  .ruler__scale { display: none; }
  .timeline { grid-template-columns: 1fr; gap: 26px; padding-top: 8px; }
  .step__dot { position: static; display: block; margin-bottom: 10px; }
  .step::before, .step::after { display: none; }

  .matrix { grid-template-columns: 1fr; }
  .matrix__col { border-right: 0; border-bottom: 1px solid var(--rule-hair); padding-right: 0; }
}

/* ---------- Переключатель темы ----------
   Иконка меняется по теме: в светлой показываем луну (что будет),
   в тёмной — солнце. Это понятнее, чем показывать текущее состояние. */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border: 1px solid var(--rule-base);
  border-radius: var(--r-s);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.theme-toggle:hover { color: var(--text); background: var(--s2); border-color: var(--rule-base); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Плавная смена темы, но без анимации при первой отрисовке */
.theme-ready body,
.theme-ready .header,
.theme-ready .section,
.theme-ready .card,
.theme-ready .trace,
.theme-ready .form {
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}
