/* ============================================================
   ШРИФТЫ (лежат в ../fonts, без Google)
   ============================================================ */
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/playfair-italic-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/playfair-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 400; font-display: swap;
  src: url(../fonts/playfair-italic-latin.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; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/manrope-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/manrope-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(../fonts/manrope-latin.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; }

/* ============================================================
   ТОКЕНЫ
   ============================================================ */
:root {
  /* Шрифты — меняйте здесь */
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Manrope', 'Segoe UI', system-ui, sans-serif;

  /* Цвета: тема «газовое пламя» */
  --night: #060A14;   /* фон */
  --deep:  #0C1424;   /* фон блоков */
  --raise: #111C31;   /* поля, чипы */
  --line:  #1A2740;   /* линии, границы */
  --line-2:#263756;   /* линии ярче */
  --field-line: #5B6E94; /* рамки полей и чипов, контраст ≥ 3:1 */
  --text:  #E6EEFB;
  --muted: #8592AD;
  --flame: #3FD0FF;   /* акцент */
  --flame-deep: #1E7BFF;
  --core:  #C8F4FF;   /* белая серединка пламени */
  --on-flame: #04101F;
  --danger: #FF7A8A;
  --flame-rgb: 63, 208, 255;

  --radius-xl: 32px;
  --radius-l: 22px;
  --radius-m: 14px;
  --pill: 999px;
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1180px;

  /* transitions.dev: общие токены движения */
  --duration-stagger: 40ms;
  --duration-quick: 150ms;
  --duration-fast: 250ms;
  --duration-slow: 400ms;
  --duration-very-slow: 500ms;
  --ease-smooth-out: cubic-bezier(0.22, 1, 0.36, 1);

  /* tabs sliding (RU/EN) */
  --tabs-dur: 250ms;
  --tabs-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --tabs-text-muted: var(--muted);
  --tabs-text-active: var(--on-flame);
  --tabs-bar-bg: transparent;
  --tabs-pill-bg: var(--flame);

  /* number subtle change (счётчик) */
  --subtle-dur: 455ms;
  --subtle-distance: 0.14em;
  --subtle-blur: 0.042em;
  --subtle-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* texts reveal (заголовок хиро) */
  --stagger-dur: 500ms;
  --stagger-distance: 12px;
  --stagger-stagger: 90ms;
  --stagger-blur: 3px;
  --stagger-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* error state shake (форма) */
  --shake-distance: 6px;
  --shake-overshoot: 4px;
  --shake-dur-a: 80ms;
  --shake-dur-b: 60ms;
  --shake-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --revert-hold: 4000ms;
  --revert-dur: 280ms;

  /* toast (статус отправки) */
  --toast-open: 350ms;
  --toast-close: 250ms;
  --toast-distance: 16px;
  --toast-blur: 2px;
  --toast-scale: 0.97;
  --toast-ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

/* Запасная тема: чёрно-белая. Включается в js/config.js → theme: 'mono' */
:root[data-theme="mono"] {
  --night: #000000;
  --deep:  #0D0D0D;
  --raise: #161616;
  --line:  #262626;
  --line-2:#3A3A3A;
  --field-line: #7A7A7A;
  --text:  #F5F5F5;
  --muted: #9A9A9A;
  --flame: #FFFFFF;
  --flame-deep: #BDBDBD;
  --core:  #FFFFFF;
  --on-flame: #000000;
  --flame-rgb: 255, 255, 255;
}

/* ============================================================
   БАЗА
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  background: var(--flame); color: var(--on-flame);
  padding: 10px 16px; border-radius: var(--pill); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap { width: min(var(--wrap), 100% - var(--gutter) * 2); margin-inline: auto; }
.section { padding-block: clamp(52px, 9vw, 120px); }
.section-title {
  font-weight: 600;
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin-bottom: clamp(28px, 4vw, 48px);
}

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: var(--pill);
  font-weight: 600; font-size: 16px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color var(--duration-quick) ease-out, border-color var(--duration-quick) ease-out, box-shadow var(--duration-fast) ease-out;
}
.btn--flame {
  background: var(--flame); color: var(--on-flame);
  box-shadow: 0 0 0 0 rgba(var(--flame-rgb), 0);
}
.btn--flame:hover { background: var(--core); box-shadow: 0 0 32px -4px rgba(var(--flame-rgb), .55); }
.btn--ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--flame); }

/* ============================================================
   ШАПКА-ПИЛЮЛЯ
   ============================================================ */
.pill-bar {
  position: fixed; z-index: 50;
  top: 16px; left: 50%;
  translate: -50% 0;
  width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: clamp(8px, 2vw, 20px);
  padding: 6px 6px 6px 10px;
  border-radius: var(--pill);
  background: rgba(12, 20, 36, .72);
  border: 1px solid rgba(var(--flame-rgb), .14);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  /* появление при загрузке */
  transition:
    opacity var(--duration-very-slow) var(--ease-smooth-out),
    transform var(--duration-very-slow) var(--ease-smooth-out),
    filter var(--duration-very-slow) var(--ease-smooth-out);
}
.js .pill-bar:not(.is-shown) { opacity: 0; transform: translateY(-14px) scale(.97); filter: blur(3px); }
:root[data-theme="mono"] .pill-bar { background: rgba(13,13,13,.75); border-color: var(--line); }

.pill-nav ul { display: flex; gap: 2px; }
.pill-nav a {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--pill);
  font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none;
  transition: color var(--duration-quick) ease-out, background-color var(--duration-quick) ease-out;
}
.pill-nav a:hover, .pill-nav a[aria-current="page"] { color: var(--text); background: rgba(255,255,255,.05); }

/* Переключатель языка — transitions.dev «Tabs sliding» */
.t-tabs {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border-radius: 48px;
  background: var(--tabs-bar-bg);
  border: 1px solid var(--line-2);
}
.t-tab {
  position: relative;
  appearance: none;
  border: 0;
  background: transparent;
  height: 36px;
  padding: 4px 13px;
  color: var(--tabs-text-muted);
  cursor: pointer;
  border-radius: 48px;
  z-index: 1;
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  transition: color var(--tabs-dur) var(--tabs-ease);
}
.t-tab:not([aria-pressed="true"]):hover { color: var(--text); }
.t-tab[aria-pressed="true"] { color: var(--tabs-text-active); }
.t-tabs-pill {
  position: absolute;
  top: 3px;
  left: 0;
  height: 36px;
  width: 0;
  background: var(--tabs-pill-bg);
  border-radius: 48px;
  transform: translateX(0);
  transition:
    transform var(--tabs-dur) var(--tabs-ease),
    width     var(--tabs-dur) var(--tabs-ease);
  will-change: transform, width;
  z-index: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .t-tabs-pill, .t-tab { transition: none !important; }
}

/* ============================================================
   ХИРО
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 128px var(--gutter) 72px;
  overflow: hidden;
  isolation: isolate;
}
.hero::before { /* мягкое свечение снизу, за ящиком */
  content: ''; position: absolute; z-index: -2;
  left: 50%; bottom: -30%; width: 120vmax; height: 70vmax; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(30,123,255,.16), transparent 70%);
  pointer-events: none;
}
.hero::after { /* мягкий переход в следующий блок, без «шва» */
  content: ''; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 140px;
  background: linear-gradient(180deg, transparent, var(--night));
  pointer-events: none;
}
.hero-canvas { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.hero-inner {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  max-width: 980px;
  pointer-events: none;
}
.hero-inner a, .hero-inner button { pointer-events: auto; }

.hero-title {
  font-weight: 400;
  margin-bottom: clamp(32px, 5vh, 48px);
}
.hero-title .l1 {
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(46px, 8.6vw, 120px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.hero-title .l2 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(28px, 4.6vw, 64px);
  line-height: 1.1;
  margin-top: 0.12em;
  letter-spacing: -0.03em;
  color: #C9D5EA;
}

/* transitions.dev «Texts reveal» */
.t-stagger-line {
  display: block;
  transition:
    opacity   var(--stagger-dur) var(--stagger-ease),
    transform var(--stagger-dur) var(--stagger-ease),
    filter    var(--stagger-dur) var(--stagger-ease);
  will-change: transform, opacity, filter;
}
.t-stagger-line--2 { transition-delay: var(--stagger-stagger); }
.t-stagger-line--3 { transition-delay: calc(var(--stagger-stagger) * 2); }
.js .t-stagger:not(.is-shown) .t-stagger-line {
  opacity: 0;
  transform: translateY(var(--stagger-distance));
  filter: blur(var(--stagger-blur));
}
.t-stagger.is-shown .t-stagger-line {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
@media (prefers-reduced-motion: reduce) {
  .t-stagger-line { transition: none !important; }
}

/* Большая кнопка хиро: пилюля + круг со стрелкой, слегка тянется за курсором */
.btn-hero {
  position: relative;
  display: inline-flex; align-items: center; gap: 20px;
  min-height: 80px; padding: 8px 8px 8px 38px;
  border-radius: var(--pill);
  background: var(--flame); color: var(--on-flame);
  font-size: 20px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none;
  box-shadow: 0 0 0 8px rgba(var(--flame-rgb), .1), 0 18px 60px -18px rgba(var(--flame-rgb), .8);
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition:
    transform var(--duration-slow) var(--ease-smooth-out),
    box-shadow var(--duration-fast) ease-out,
    background-color var(--duration-quick) ease-out;
}
.btn-hero.is-magnet { transition-duration: 120ms, var(--duration-fast), var(--duration-quick); }
.btn-hero:hover { background: var(--core); box-shadow: 0 0 0 10px rgba(var(--flame-rgb), .16), 0 22px 70px -16px rgba(var(--flame-rgb), .95); }
.btn-hero-ico {
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--on-flame); color: var(--flame);
  overflow: hidden;
}
.btn-hero-ico svg { width: 22px; height: 22px; transition: transform var(--duration-fast) var(--ease-smooth-out); }
.btn-hero:hover .btn-hero-ico svg { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .btn-hero, .btn-hero-ico svg { transition: none !important; transform: none !important; }
}

/* ============================================================
   РАЗДЕЛЕНИЕ БЛОКОВ: светлые панели
   ============================================================ */
.panel {
  position: relative;
  width: min(1300px, 100% - 16px);
  margin-inline: auto;
  padding-block: clamp(56px, 8vw, 104px);
  border-radius: clamp(28px, 4vw, 48px);
  background: linear-gradient(180deg, #0D1628 0%, #0A1222 100%);
  border: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;
}
.panel::before { /* светящаяся кромка сверху */
  content: ''; position: absolute; z-index: -1; top: 0; left: 50%; translate: -50% 0;
  width: min(720px, 80%); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--flame-rgb), .7), transparent);
}
.panel::after { /* мягкое свечение под кромкой */
  content: ''; position: absolute; z-index: -1; top: -120px; left: 50%; translate: -50% 0;
  width: min(900px, 120%); height: 240px;
  background: radial-gradient(closest-side, rgba(var(--flame-rgb), .09), transparent);
  pointer-events: none;
}
:root[data-theme="mono"] .panel { background: #0D0D0D; }
.section--panel { padding-block: clamp(10px, 2vw, 20px); }

/* ============================================================
   УСЛУГИ
   ============================================================ */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(240px, auto);
  gap: 14px;
}
.svc {
  position: relative;
  display: flex; flex-direction: column; gap: 18px;
  padding: clamp(22px, 2.6vw, 32px);
  border-radius: var(--radius-xl);
  background: rgba(6, 10, 20, .72);
  border: 1px solid var(--line);
}
.svc--landing   { grid-column: 1 / 5; }
.svc--corporate { grid-column: 5 / 7; }
.svc--catalog   { grid-column: 1 / 3; }
.svc--quiz      { grid-column: 3 / 5; }
.svc--bot       { grid-column: 5 / 7; }
/* Интеграции — широкая полоса во всю ширину */
.svc--integration { grid-column: 1 / -1; }
.svc--integration .svc-text { display: grid; gap: 10px; }
.svc--integration .svc-desc { margin-top: 0; }

.svc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.svc-ico {
  flex: none; width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center;
  background: rgba(var(--flame-rgb), .1); color: var(--flame);
  border: 1px solid rgba(var(--flame-rgb), .25);
}
.svc-ico svg { width: 26px; height: 26px; }
.svc-price { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; color: var(--muted); font-size: 15px; }
.svc-price b { color: var(--text); font-weight: 700; font-size: clamp(28px, 2.8vw, 38px); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.svc-price.is-ask b { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.svc--landing .svc-price b { font-size: clamp(36px, 4.4vw, 60px); }
.svc-name { font-size: clamp(22px, 2.3vw, 30px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; }
.svc-desc { color: var(--muted); font-size: 16px; margin-top: -8px; }

/* Мини-схема потока */
.flow { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.flow::before {
  content: ''; position: absolute; left: 12px; right: 12px; top: 50%; height: 1px;
  background: linear-gradient(90deg, var(--line-2), rgba(var(--flame-rgb), .7));
}
.flow::after {
  content: ''; position: absolute; top: calc(50% - 3px); left: 12px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--core); box-shadow: 0 0 10px 2px rgba(var(--flame-rgb), .8);
  opacity: 0;
}
.flow li {
  position: relative; z-index: 1;
  padding: 8px 14px; border-radius: var(--pill);
  background: var(--raise); border: 1px solid var(--line-2);
  font-size: 14px; font-weight: 500; color: var(--text); white-space: nowrap;
}
.flow li:last-child { border-color: rgba(var(--flame-rgb), .55); color: var(--flame); }
.svc--landing .flow li { padding: 11px 20px; font-size: 15px; }
.flow--v { flex-direction: column; align-items: flex-start; gap: 30px; }
.flow--v::before { left: 22px; right: auto; top: 12px; bottom: 12px; width: 1px; height: auto;
  background: linear-gradient(180deg, var(--line-2), rgba(var(--flame-rgb), .7)); }
.flow--v::after { left: 19px; top: 12px; }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .svc:hover .flow::after { animation: flow-run 1.6s var(--ease-smooth-out) infinite; }
  .svc:hover .flow--v::after { animation-name: flow-run-v; }
}
@keyframes flow-run {
  0% { opacity: 0; left: 12px; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; left: calc(100% - 18px); }
}
@keyframes flow-run-v {
  0% { opacity: 0; top: 12px; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; top: calc(100% - 18px); }
}

/* ============================================================
   КАК Я РАБОТАЮ
   ============================================================ */
.steps {
  position: relative;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
}
.steps::before {
  content: ''; position: absolute; left: 21px; right: calc(20% - 21px - 13px); top: 21px; height: 1px;
  background: linear-gradient(90deg, var(--line-2) 0%, var(--line-2) 60%, rgba(var(--flame-rgb), .8) 100%);
}
.step { position: relative; display: grid; gap: 6px; justify-items: start; }
.step-dot {
  width: 43px; height: 43px; border-radius: 50%; margin-bottom: 12px;
  display: grid; place-items: center;
  background: var(--night); border: 1px solid var(--line-2);
  font-weight: 600; font-size: 15px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.step:last-child .step-dot { border-color: var(--flame); color: var(--flame); box-shadow: 0 0 24px -6px rgba(var(--flame-rgb), .7); }
.step-name { font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; letter-spacing: -0.015em; }
.step-note { color: var(--muted); font-size: 15px; }

/* ============================================================
   КЕЙСЫ (превью на главной)
   ============================================================ */
.cases-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 48px); }
.cases-head .section-title { margin-bottom: 0; }
.previews { display: grid; grid-template-columns: 1.25fr 1fr; gap: 14px; }
.preview {
  position: relative;
  border-radius: var(--radius-xl);
  background: rgba(6, 10, 20, .72);
  border: 1px solid var(--line);
  padding: clamp(18px, 2.4vw, 28px);
  display: grid; gap: 20px;
}
.preview-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.preview-kind { font-weight: 600; font-size: 17px; }
.soon {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: var(--pill);
  background: rgba(var(--flame-rgb), .1); color: var(--flame);
  font-size: 13px; font-weight: 600; white-space: nowrap;
}
.soon::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

.sketch {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-l);
  background: var(--night);
  border: 1px solid var(--line);
  padding: 7% 8%;
  display: grid; align-content: start; gap: 6%;
  overflow: hidden;
}
.sketch i { display: block; height: 9px; border-radius: 6px; background: var(--line); }
.sketch .s-pill { width: 46%; height: 14px; justify-self: center; border-radius: 99px; background: var(--raise); }
.sketch .s-h { width: 72%; height: 18px; background: var(--line-2); }
.sketch .s-h2 { width: 48%; height: 18px; background: var(--line-2); }
.sketch .s-btn { width: 24%; height: 16px; border-radius: 99px; background: rgba(var(--flame-rgb), .55); }
.sketch .s-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6%; }
.sketch .s-row i { height: 46px; border-radius: 10px; background: var(--deep); border: 1px solid var(--line); }
.sketch--b { grid-template-columns: 1fr 1fr; gap: 8%; align-content: stretch; }
.sketch--b .s-col { display: grid; gap: 10px; align-content: start; }
.sketch--b .s-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sketch--b .s-grid i { height: 38px; border-radius: 8px; background: var(--deep); border: 1px solid var(--line); }

/* ============================================================
   ЗАЯВКА — одна колонка по центру
   ============================================================ */
.request {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px); align-items: start;
}
.request-head { position: sticky; top: 120px; padding-top: 8px; }
.request-title {
  font-size: clamp(34px, 4.6vw, 64px); font-weight: 600;
  line-height: 1.04; letter-spacing: -0.04em;
  margin-bottom: 20px;
}
.request-lead { color: var(--muted); font-size: 18px; max-width: 30ch; }
.form {
  display: grid; gap: 22px;
  padding: clamp(20px, 3.4vw, 40px);
  border-radius: var(--radius-xl);
  background: var(--deep);
  border: 1px solid var(--line);
  box-shadow: 0 0 0 1px rgba(var(--flame-rgb), .03), 0 40px 120px -60px rgba(var(--flame-rgb), .35);
}
.field { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field-label { font-size: 14px; font-weight: 600; color: var(--muted); padding: 0; }
legend.field-label { margin-bottom: 10px; }
.field-label small { font-weight: 500; color: #6B7894; font-size: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* Плитки выбора 2×2 */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tile-body {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 10px 12px;
  border-radius: var(--radius-m);
  background: var(--raise); border: 1px solid var(--field-line);
  font-size: 15px; font-weight: 600; line-height: 1.2;
  transition: background-color var(--duration-quick) ease-out, border-color var(--duration-quick) ease-out, color var(--duration-quick) ease-out;
}
.tile-ico {
  flex: none; width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(var(--flame-rgb), .08); color: var(--flame);
  transition: background-color var(--duration-quick) ease-out, color var(--duration-quick) ease-out;
}
.tile-ico svg { width: 20px; height: 20px; }
.tile-check {
  display: none;
  margin-left: auto; flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--field-line);
  display: grid; place-items: center; color: var(--on-flame);
  transition: background-color var(--duration-quick) ease-out, border-color var(--duration-quick) ease-out;
}
.tile-check svg { width: 13px; height: 13px; opacity: 0; transform: scale(.6); transition: opacity var(--duration-quick) ease-out, transform var(--duration-fast) var(--ease-smooth-out); }
.tiles .tile-check { display: none; }
.tile--wide { grid-column: 1 / -1; }
.tile:hover .tile-body { border-color: var(--muted); }
.tile input:checked + .tile-body { border-color: var(--flame); background: rgba(var(--flame-rgb), .08); }
.tile input:checked + .tile-body .tile-ico { background: var(--flame); color: var(--on-flame); }
.tile input:checked + .tile-body .tile-check { background: var(--flame); border-color: var(--flame); }
.tile input:checked + .tile-body .tile-check svg { opacity: 1; transform: none; }
.tile input:focus-visible + .tile-body { outline: 2px solid var(--flame); outline-offset: 3px; }

.input {
  width: 100%; min-height: 56px; padding: 0 18px;
  border-radius: var(--radius-m);
  background: var(--raise);
  border: 1px solid var(--field-line);
  font-size: 17px;
}
textarea.input { min-height: 104px; padding: 15px 18px; resize: vertical; line-height: 1.5; }
.input::placeholder { color: #7A88A6; }
.input:focus { outline: none; border-color: var(--flame); box-shadow: 0 0 0 3px rgba(var(--flame-rgb), .18); }
.form-foot { display: grid; gap: 12px; justify-items: center; margin-top: 4px; }
.form-foot .btn { width: 100%; min-height: 60px; font-size: 17px; }
.form-note { color: var(--muted); font-size: 14px; text-align: center; }

/* transitions.dev «Error state shake» */
.t-input {
  transition: border-color 150ms ease-out;
  will-change: transform;
}
.t-input.is-error {
  transition: border-color var(--revert-dur, 280ms) ease-out;
  border-color: var(--danger);
}
.t-error-msg {
  color: var(--danger); font-size: 14px; font-weight: 500; margin: 0;
  opacity: 0;
  visibility: hidden;
  height: 0; overflow: hidden;
  transition:
    opacity    var(--revert-dur, 280ms) ease-out,
    visibility 0s linear var(--revert-dur, 280ms);
}
.t-input-wrap.is-error .t-error-msg {
  opacity: 1;
  visibility: visible;
  height: auto;
  transition:
    opacity    var(--revert-dur, 280ms) ease-out,
    visibility 0s linear 0s;
}
.t-input.is-shaking {
  animation: t-input-shake calc(
      var(--shake-dur-a) * 2 + var(--shake-dur-b) * 2
    ) linear;
}
@keyframes t-input-shake {
  0%      { transform: translateX(0);                                 animation-timing-function: var(--shake-ease); }
  28.57%  { transform: translateX(var(--shake-distance));             animation-timing-function: var(--shake-ease); }
  57.14%  { transform: translateX(calc(var(--shake-distance) * -1)); animation-timing-function: var(--shake-ease); }
  78.57%  { transform: translateX(var(--shake-overshoot));            animation-timing-function: var(--shake-ease); }
  100%    { transform: translateX(0); }
}
.tiles.is-error .tile-body { border-color: var(--danger); }
@media (prefers-reduced-motion: reduce) {
  .t-input { animation: none !important; transform: none !important; }
}

/* transitions.dev «Toast» */
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: 20px; translate: -50% 0;
  width: min(460px, calc(100% - 32px));
  padding: 14px 18px; border-radius: var(--radius-l);
  background: var(--raise); border: 1px solid rgba(var(--flame-rgb), .35);
  font-size: 15px; pointer-events: none;
}
.t-toast {
  opacity: 0;
  transform: translateY(var(--toast-distance)) scale(var(--toast-scale));
  filter: blur(var(--toast-blur));
  will-change: transform, opacity, filter;
  transition:
    opacity var(--toast-close) var(--toast-ease),
    transform var(--toast-close) var(--toast-ease),
    filter var(--toast-close) var(--toast-ease);
}
.t-toast.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  transition:
    opacity var(--toast-open) var(--toast-ease),
    transform var(--toast-open) var(--toast-ease),
    filter var(--toast-open) var(--toast-ease);
}
@media (prefers-reduced-motion: reduce) {
  .t-toast { transition: none !important; }
}

/* ============================================================
   ПОДВАЛ С КОНТАКТАМИ
   ============================================================ */
.site-footer { padding: 0 0 8px; }
.site-footer .panel { padding-block: clamp(56px, 8vw, 104px) 0; }
.foot-title {
  font-size: clamp(44px, 6.4vw, 88px);
  font-weight: 600; line-height: 1.02; letter-spacing: -0.045em;
  max-width: 12ch;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.foot-contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.foot-link {
  display: flex; align-items: center; gap: 18px;
  min-height: 104px; padding: 16px 24px 16px 16px;
  border-radius: var(--radius-l);
  text-decoration: none;
  border: 1px solid var(--line-2);
  background: rgba(6, 10, 20, .6);
  transition: border-color var(--duration-quick) ease-out, background-color var(--duration-quick) ease-out;
}
.foot-link:hover { border-color: var(--flame); }
.foot-link--tg { background: var(--flame); color: var(--on-flame); border-color: var(--flame); }
.foot-link--tg:hover { background: var(--core); border-color: var(--core); }
.foot-ico {
  flex: none; width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(var(--flame-rgb), .12); color: var(--flame);
}
.foot-link--tg .foot-ico { background: var(--on-flame); color: var(--flame); }
.foot-ico svg { width: 28px; height: 28px; }
.foot-text { display: grid; gap: 2px; min-width: 0; }
.foot-label { font-size: 15px; opacity: .75; }
.foot-value { font-size: clamp(20px, 2.4vw, 30px); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.foot-arrow { margin-left: auto; flex: none; width: 24px; height: 24px; transition: transform var(--duration-fast) var(--ease-smooth-out); }
.foot-link:hover .foot-arrow { transform: translate(3px, -3px); }
.foot-bottom {
  margin-top: clamp(40px, 6vw, 72px);
  padding-block: 24px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap;
  color: var(--muted); font-size: 15px;
}
.foot-nav ul { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot-nav a { text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.foot-nav a:hover { color: var(--text); }
.foot-meta { display: flex; align-items: center; gap: 18px; }
.to-top {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--text);
  transition: border-color var(--duration-quick) ease-out, color var(--duration-quick) ease-out;
}
.to-top:hover { border-color: var(--flame); color: var(--flame); }
.to-top svg { width: 20px; height: 20px; }

/* ============================================================
   СТРАНИЦА КЕЙСОВ
   ============================================================ */
.page-head { padding: clamp(140px, 18vw, 200px) 0 clamp(36px, 5vw, 56px); }
.page-title { font-weight: 600; font-size: clamp(44px, 7.6vw, 96px); line-height: 1; letter-spacing: -0.045em; margin-bottom: 18px; }
.page-lead { color: var(--muted); font-size: 18px; max-width: 40ch; }
.case-list { display: grid; gap: 18px; padding-bottom: clamp(56px, 8vw, 96px); }
.case {
  border-radius: var(--radius-xl);
  background: var(--deep);
  border: 1px solid var(--line);
  padding: clamp(22px, 3vw, 40px);
  display: grid; gap: 28px;
}
.case-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.case-kind { font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; letter-spacing: -0.015em; }
.case-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 10px; }
.case-step {
  display: grid; gap: 10px; align-content: start;
  padding: 20px; border-radius: var(--radius-l);
  background: var(--night); border: 1px solid var(--line);
  min-height: 150px;
}
.case-step:last-child { border-color: rgba(var(--flame-rgb), .4); }
.case-step h3 { font-size: 14px; font-weight: 600; color: var(--muted); }
.case-step:last-child h3 { color: var(--flame); }
.case-step p { font-size: 16px; }
.case-step .bars { display: grid; gap: 8px; margin-top: 4px; }
.case-step .bars i { display: block; height: 9px; border-radius: 6px; background: var(--line); }
.case-step .bars i:nth-child(2) { width: 78%; }
.case-step .bars i:nth-child(3) { width: 54%; }
.case-arrow { align-self: center; width: 28px; height: 28px; color: var(--line-2); }
.case-review {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.case-review svg { width: 30px; height: 30px; color: var(--flame); }
.case-review blockquote { margin: 0; font-size: clamp(17px, 1.8vw, 21px); line-height: 1.5; color: var(--text); }
.case-review.is-soon blockquote { color: var(--muted); }
.case-review figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; }

/* ============================================================
   АДАПТИВ
   ============================================================ */
@media (max-width: 960px) {
  .bento { grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(210px, auto); }
  .svc--landing { grid-column: 1 / -1; }
  .svc--corporate, .svc--catalog, .svc--quiz, .svc--bot { grid-column: auto; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps::before { left: 21px; right: auto; top: 36px; bottom: 36px; width: 1px; height: auto;
    background: linear-gradient(180deg, var(--line-2) 0%, var(--line-2) 70%, rgba(var(--flame-rgb), .8) 100%); }
  .step {
    grid-template-columns: 43px minmax(0, 220px) minmax(0, 1fr);
    column-gap: 24px; align-items: center;
    padding: 14px 0;
  }
  .step + .step .step-name, .step + .step .step-note { border-top: 0; }
  .step-dot { margin-bottom: 0; }
  .step-note { font-size: 16px; }
  .svc--integration { grid-column: 1 / -1; }
  .request { grid-template-columns: 1fr; }
  .request-head { position: static; }
  /* колонки плиток считаются от ширины формы, см. «ПЛИТКИ: ПОД ШИРИНУ ФОРМЫ» */
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .panel { width: calc(100% - 12px); }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .svc--landing, .svc--corporate, .svc--catalog, .svc--quiz, .svc--bot { grid-column: 1; }
  .svc { gap: 16px; }
  .flow--v { flex-direction: row; align-items: center; gap: 10px; }
  .flow--v::before { left: 12px; right: 12px; top: 50%; bottom: auto; width: auto; height: 1px;
    background: linear-gradient(90deg, var(--line-2), rgba(var(--flame-rgb), .7)); }
  .flow { margin-top: 8px; }
  .flow li, .svc--landing .flow li { padding: 8px 11px; font-size: 13px; }
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .step { padding: 0; }
  .steps::before { top: 10px; bottom: 10px; }
  .steps::before { display: block; left: 21px; right: auto; top: 10px; bottom: 10px; width: 1px; height: auto;
    background: linear-gradient(180deg, var(--line-2) 0%, var(--line-2) 60%, rgba(var(--flame-rgb), .8) 100%); }
  .step { grid-template-columns: 43px 1fr; column-gap: 18px; row-gap: 0; align-items: center; }
  .step-dot { grid-row: span 2; margin-bottom: 0; }
  .previews { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  /* см. «ПЛИТКИ: ПОД ШИРИНУ ФОРМЫ» */
  .foot-contacts { grid-template-columns: 1fr; }
  .foot-link { min-height: 92px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
  .foot-meta { width: 100%; justify-content: space-between; }
  .case-flow { grid-template-columns: 1fr; }
  .case-arrow { justify-self: center; rotate: 90deg; width: 22px; height: 22px; }
  .case-step { min-height: 0; }
}
@media (max-width: 560px) {
  .nav-extra { display: none; }
  .pill-nav a { padding: 0 11px; font-size: 14px; }
  .pill-bar { padding-left: 6px; gap: 6px; }
  .btn-hero { min-height: 64px; font-size: 17px; gap: 16px; padding-left: 28px; }
  .btn-hero-ico { width: 48px; height: 48px; }
  .btn { width: 100%; }
  .cases-head .btn { width: auto; min-height: 44px; padding: 0 18px; font-size: 15px; }
  /* размеры плиток — см. «ПЛИТКИ: ПОД ШИРИНУ ФОРМЫ» */

  .tile-check { display: none; }
  .foot-ico { width: 56px; height: 56px; }
  .foot-link { padding: 14px 18px 14px 14px; gap: 14px; }
}
@media (max-width: 380px) {
  .pill-nav a { padding: 0 8px; }
  .t-tab { padding: 4px 9px; }
}

/* ============================================================
   ЦЕНА В СУМАХ
   ============================================================ */
.svc-price .svc-unit { color: var(--muted); font-size: 15px; font-weight: 500; }

/* ============================================================
   «НЕТ ТЗ?» ВОЗЛЕ ФОРМЫ
   ============================================================ */
.request-note {
  margin-top: 28px;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 12px;
  border-radius: var(--radius-l);
  background: rgba(var(--flame-rgb), .07);
  border: 1px solid rgba(var(--flame-rgb), .22);
  font-size: 15px; font-weight: 500; color: var(--text);
  max-width: 34ch;
}
.request-note-ico {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(var(--flame-rgb), .14); color: var(--flame);
}
.request-note-ico svg { width: 18px; height: 18px; }

/* ============================================================
   БЕСПЛАТНЫЙ РАЗБОР
   ============================================================ */
.audit {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px); align-items: start;
}
.audit-title {
  font-size: clamp(32px, 4.2vw, 56px); font-weight: 600;
  line-height: 1.05; letter-spacing: -0.04em;
  margin-bottom: 14px;
}
.audit-sub { color: var(--muted); font-size: 18px; margin-bottom: 28px; }

/* большие вкладки на основе transitions.dev «Tabs sliding» */
.t-tabs--lg { padding: 4px; }
.t-tabs--lg .t-tab { height: 46px; padding: 4px 20px; font-size: 15px; font-weight: 600; letter-spacing: 0; }
.t-tabs--lg .t-tabs-pill { top: 4px; height: 46px; }
.t-tab[aria-selected="true"] { color: var(--tabs-text-active); }
.t-tab[role="tab"]:not([aria-selected="true"]):hover { color: var(--text); }

.audit-card {
  padding: clamp(22px, 3.2vw, 36px);
  border-radius: var(--radius-xl);
  background: rgba(6, 10, 20, .72);
  border: 1px solid var(--line);
}
.audit-panel { display: grid; gap: 22px; }
.audit-panel[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .audit-panel:not([hidden]) { animation: audit-in var(--duration-slow) var(--ease-smooth-out); }
}
@keyframes audit-in { from { opacity: 0; transform: translateY(6px); filter: blur(2px); } }
.audit-head { font-size: clamp(22px, 2.3vw, 28px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.audit-list { display: grid; gap: 10px; }
.audit-list li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.audit-list svg {
  flex: none; width: 24px; height: 24px; padding: 5px; border-radius: 50%;
  background: rgba(var(--flame-rgb), .14); color: var(--flame);
}
.audit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; align-items: start; padding-top: 6px; border-top: 1px solid var(--line); padding-top: 22px; }
.audit-form .btn { grid-column: 1 / -1; min-height: 58px; font-size: 16px; }

@media (max-width: 960px) {
  .audit { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .audit-form { grid-template-columns: 1fr; }
  .t-tabs--lg { display: flex; width: 100%; }
  .t-tabs--lg .t-tab { flex: 1; padding: 4px 10px; font-size: 14px; }
  .request-note { max-width: none; }
}

/* ============================================================
   ЛОГОТИП PYRA
   ============================================================ */
/* Логотип — отдельно, в левом верхнем углу (уезжает при прокрутке) */
.site-logo {
  position: absolute; z-index: 51;
  top: 16px; left: var(--gutter);
  height: 58px;
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.site-logo-star { width: 32px; height: 32px; }
.site-logo-word { width: auto; height: 26px; }
@media (max-width: 960px) {
  /* шапку прижимаем вправо, чтобы не наезжала на логотип */
  .pill-bar { left: auto; right: var(--gutter); translate: none; }
}
@media (max-width: 560px) {
  .site-logo { left: 16px; gap: 8px; height: 56px; }
  .site-logo-star { width: 24px; height: 24px; }
  .site-logo-word { height: 18px; }
  .pill-bar { right: 16px; max-width: calc(100% - 150px); }
}
.foot-logo { display: flex; align-items: center; gap: 12px; margin-bottom: clamp(28px, 4vw, 44px); }
.foot-logo img:first-child { width: 40px; height: 40px; }
.foot-logo img:last-child { width: auto; height: 32px; }
@media (max-width: 560px) {
  .nav-mid { display: none; }
  .pill-bar { gap: 4px; }
}

/* ============================================================
   МОБИЛЬНАЯ ШАПКА: глобус + меню (вместо пилюли)
   ============================================================ */
.m-actions, .m-menu { display: none; }
.m-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 48px; height: 48px; padding: 0 14px;
  border-radius: var(--pill);
  background: rgba(12, 20, 36, .72);
  border: 1px solid rgba(var(--flame-rgb), .16);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: var(--text); cursor: pointer;
  font-size: 14px; font-weight: 700; letter-spacing: .02em;
  transition: border-color var(--duration-quick) ease-out, background-color var(--duration-quick) ease-out;
}
.m-btn:hover { border-color: var(--flame); }
.m-btn svg { width: 20px; height: 20px; }
.m-burger, .m-close { padding: 0; width: 48px; }
.burger { position: relative; display: block; width: 20px; height: 14px; }
.burger i {
  position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform var(--duration-slow) var(--ease-smooth-out), opacity var(--duration-quick) ease-out, width var(--duration-slow) var(--ease-smooth-out);
}
.burger i:nth-child(1) { top: 0; }
.burger i:nth-child(2) { top: 6px; left: auto; width: 70%; }
.burger i:nth-child(3) { top: 12px; }

@media (max-width: 960px) {
  .pill-bar { display: none; }
  .site-logo { position: absolute; top: 16px; left: 16px; height: 48px; }
  .m-actions {
    position: absolute; z-index: 51; top: 16px; right: 16px;
    display: flex; gap: 8px;
  }

}
@media (max-width: 960px) {
  /* на телефоне шапка не липкая — отступ при переходе к разделу меньше */
  html { scroll-padding-top: 16px; }
}

/* ============================================================
   МЕНЮ НА ТЕЛЕФОНЕ: лист вырастает из кнопки (transitions.dev «Plus to menu morph»)
   ============================================================ */
:root {
  --morph-open-dur: 560ms;
  --morph-close-dur: 320ms;
  --morph-close-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (max-width: 960px) {
  .m-menu {
    position: fixed; inset: 0;
    width: 100%; max-width: none; height: 100%; max-height: none;
    margin: 0; padding: 8px;
    border: 0; background: transparent; color: var(--text);
    overflow: hidden;
  }
  .m-menu[open] { display: block; }
  .m-menu::backdrop { background: rgba(3, 6, 12, 0); transition: background-color var(--morph-close-dur) ease-out; }
  .m-menu.is-open::backdrop { background: rgba(3, 6, 12, .55); }

  /* сам лист: из круга кнопки в большую карточку */
  .m-sheet {
    position: relative; isolation: isolate;
    height: 100%;
    display: flex; flex-direction: column;
    padding: 8px 8px max(16px, env(safe-area-inset-bottom));
    border-radius: 32px;
    background: linear-gradient(180deg, #0D1628 0%, #0A1222 100%);
    border: 1px solid var(--line);
    overflow: hidden;
    clip-path: circle(24px at calc(100% - 32px) 32px);
    transition: clip-path var(--morph-close-dur) var(--morph-close-ease);
  }
  .m-menu.is-open .m-sheet {
    clip-path: circle(150% at calc(100% - 32px) 32px);
    transition: clip-path var(--morph-open-dur) cubic-bezier(0.65, 0, 0.35, 1);
  }


  .m-sheet-top { display: flex; justify-content: space-between; align-items: center; height: 48px; padding-left: 8px; }
  .m-menu-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
  .m-menu-logo img:first-child { width: 24px; height: 24px; }
  .m-menu-logo img:last-child { width: auto; height: 18px; }
  .m-close { background: rgba(var(--flame-rgb), .1); }
  /* три черты → крестик */
  .m-menu.is-open .burger i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .m-menu.is-open .burger i:nth-child(2) { opacity: 0; width: 0; }
  .m-menu.is-open .burger i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }


  /* светящаяся кромка сверху — как у панелей */
  .m-sheet::before {
    content: ''; position: absolute; z-index: -1; top: 0; left: 50%; translate: -50% 0;
    width: 80%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--flame-rgb), .7), transparent);
  }
  .m-sheet::after {
    content: ''; position: absolute; z-index: -1; top: -120px; left: 50%; translate: -50% 0;
    width: 120%; height: 240px;
    background: radial-gradient(closest-side, rgba(var(--flame-rgb), .09), transparent);
  }

  /* пункты — схема-поток, как на сайте: линия, узлы, последний узел светится */
  .m-menu-nav { flex: 1; display: flex; align-items: center; padding: 0 12px; }
  .m-menu-nav ul { position: relative; width: 100%; display: grid; gap: 6px; }
  .m-flow ul::before { /* линия */
    content: ''; position: absolute; left: 11px; top: 34px; bottom: 34px; width: 2px; border-radius: 2px;
    background: linear-gradient(180deg, var(--line-2), rgba(var(--flame-rgb), .85));
  }
  .m-flow ul::after { /* импульс, пробегает по линии при открытии */
    content: ''; position: absolute; left: 8px; top: 34px; width: 8px; height: 8px; border-radius: 50%;
    background: var(--core); box-shadow: 0 0 14px 4px rgba(var(--flame-rgb), .85);
    opacity: 0;
  }
  .m-menu.is-open .m-flow ul::after { animation: m-pulse 1.4s var(--ease-smooth-out) 380ms both; }
  @keyframes m-pulse {
    0%   { opacity: 0; transform: translateY(0); }
    12%  { opacity: 1; }
    88%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(var(--run, 260px)); }
  }
  .m-menu-nav a {
    position: relative;
    display: flex; align-items: center; gap: 22px;
    padding: 14px 8px 14px 0;
    text-decoration: none;
  }
  .m-node {
    position: relative; z-index: 1; flex: none;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--deep); border: 2px solid var(--line-2);
    transition: border-color var(--duration-fast) ease-out, box-shadow var(--duration-fast) ease-out, background-color var(--duration-fast) ease-out;
  }
  .m-node::after {
    content: ''; position: absolute; inset: 5px; border-radius: 50%;
    background: var(--flame); transform: scale(0);
    transition: transform var(--duration-fast) var(--ease-smooth-out);
  }
  .m-menu-nav li:last-child .m-node { border-color: var(--flame); box-shadow: 0 0 18px -2px rgba(var(--flame-rgb), .8); }
  .m-menu-nav li:last-child .m-node::after { transform: scale(1); }
  .m-link-body { display: grid; gap: 0; min-width: 0; }
  .m-link-text {
    font-size: clamp(34px, 10.4vw, 44px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05;
    transition: color var(--duration-quick) ease-out, transform var(--duration-fast) var(--ease-smooth-out);
  }
  .m-link-meta { color: var(--muted); font-size: 14px; font-weight: 500; margin-top: 4px; }
  .m-menu-nav li:last-child .m-link-meta { color: var(--flame); }
  .m-menu-nav a:hover .m-node, .m-menu-nav a:focus-visible .m-node, .m-menu-nav a:active .m-node {
    border-color: var(--flame); box-shadow: 0 0 18px -2px rgba(var(--flame-rgb), .8);
  }
  .m-menu-nav a:hover .m-node::after, .m-menu-nav a:focus-visible .m-node::after, .m-menu-nav a:active .m-node::after { transform: scale(1); }
  .m-menu-nav a:hover .m-link-text, .m-menu-nav a:focus-visible .m-link-text, .m-menu-nav a:active .m-link-text { color: var(--flame); transform: translateX(4px); }

  /* transitions.dev «Texts reveal»: пункты по очереди */
  .m-menu-nav li, .m-menu-foot {
    opacity: 0; transform: translateY(var(--stagger-distance)); filter: blur(var(--stagger-blur));
    transition: opacity 200ms ease, transform 0s linear 200ms, filter 0s linear 200ms;
  }
  .m-menu.is-open .m-menu-nav li, .m-menu.is-open .m-menu-foot {
    opacity: 1; transform: none; filter: none;
    transition:
      opacity   var(--stagger-dur) var(--stagger-ease) var(--in, 0ms),
      transform var(--stagger-dur) var(--stagger-ease) var(--in, 0ms),
      filter    var(--stagger-dur) var(--stagger-ease) var(--in, 0ms);
  }
  .m-menu-nav li:nth-child(1) { --in: 180ms; }
  .m-menu-nav li:nth-child(2) { --in: 240ms; }
  .m-menu-nav li:nth-child(3) { --in: 300ms; }
  .m-menu-nav li:nth-child(4) { --in: 360ms; }
  .m-menu-foot { --in: 440ms; }

  .m-menu-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 4px; }
  .m-contact {
    display: flex; align-items: center; gap: 10px;
    min-height: 64px; padding: 8px 14px 8px 8px;
    border-radius: 22px; text-decoration: none;
    background: rgba(6, 10, 20, .6); border: 1px solid var(--line-2);
    font-size: 16px; font-weight: 700;
  }
  .m-contact--tg { background: var(--flame); border-color: var(--flame); color: var(--on-flame); }
  .m-contact-ico {
    flex: none; width: 46px; height: 46px; border-radius: 50%;
    display: grid; place-items: center;
    background: rgba(var(--flame-rgb), .12); color: var(--flame);
  }
  .m-contact--tg .m-contact-ico { background: var(--on-flame); color: var(--flame); }
  .m-contact-ico svg { width: 22px; height: 22px; }
}
@media (max-width: 960px) and (prefers-reduced-motion: reduce) {
  .m-sheet, .m-menu.is-open .m-sheet { clip-path: none; transition: none; }
  .m-menu-nav li, .m-menu-foot, .burger i { transition: none !important; }
  .m-menu.is-open .m-flow ul::after { animation: none; }
}
@media (max-width: 400px) {
  /* «Заявки, которые» помещается в одну строку и на узких телефонах */
  .hero-title .l1 { font-size: 11.2vw; }
}

/* ============================================================
   ПЛИТКИ: ПОД ШИРИНУ ФОРМЫ (а не экрана)
   ============================================================ */
.form { container-type: inline-size; container-name: leadform; }
.tile-body > span[data-i18n] { min-width: 0; }
/* форма узкая — иконка над названием, чтобы длинные слова влезали */
@container leadform (max-width: 640px) {
  .tile-body {
    flex-direction: column; align-items: flex-start; justify-content: space-between;
    gap: 10px; min-height: 96px; padding: 12px;
    font-size: 15px;
  }
  .tile--wide .tile-body { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; min-height: 60px; }
}
/* форма совсем узкая (телефон) — две колонки */
@container leadform (max-width: 440px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile-body { font-size: 14px; min-height: 88px; }
  .tile-ico { width: 34px; height: 34px; }
}

/* эскизы кейсов: ширины полосок (вместо style="" — так строже защита CSP) */
.sketch--b .s-w70 { width: 70%; }
.sketch--b .s-w46 { width: 46%; }

/* поле-ловушка для ботов: людям не видно и не доступно с клавиатуры */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Телефон-заглушка («скоро»): бледная, не нажимается */
.foot-link.is-placeholder, .m-contact.is-placeholder {
  opacity: .5; cursor: default; pointer-events: none;
}
.foot-link.is-placeholder .foot-arrow { display: none; }
.foot-link.is-placeholder .foot-value { font-weight: 600; color: var(--muted); }
