:root {
  /* Backgrounds */
  --bg-primary: #0A0A0A;
  --bg-secondary: #1A1A1A;
  --bg-elevated: #2A2A2A;

  /* Text */
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0A0;
  --text-muted: #666666;

  /* Accents */
  --color-primary-light: #4D8BD9;
  --color-accent: #F04A4C;
  --color-brand-blue: #1856A7;

  /* System */
  --container: 1280px;
  --side-pad: 80px;
  --section-gap: 120px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
}

/* v1 launch flags — chat & form hidden until backend is ready (Package 2 завтра).
   TODO(v1): remove .is-hidden-v1 from .demo, .lab, #subscribe, .contact__form после миграции бота. */
.is-hidden-v1 { display: none !important; }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overscroll-behavior-y: none; }

html, body {
  overflow-x: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--side-pad);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(240, 74, 76, 0.28);
}
.btn--primary:hover { background: #ff5c5e; box-shadow: 0 12px 32px rgba(240, 74, 76, 0.38); }

.btn--ghost {
  background: var(--bg-primary);
  border: 1.5px solid var(--color-primary-light);
  color: var(--color-primary-light);
}
.btn--ghost:hover { background: rgba(77, 139, 217, 0.1); }

.btn--sm { height: 44px; padding: 0 20px; font-size: 14px; }
.btn--full { width: 100%; height: 56px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary-light);
  font-weight: 500;
  font-size: 15px;
  transition: gap .15s ease;
}
.link-arrow:hover { gap: 10px; }

/* ---------- HEADER ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.header__logo {
  display: flex;
  align-items: center;
}
.header__logo img {
  display: block;
  height: 34px;
  width: auto;
}
.header__nav { display: flex; gap: 28px; }
.header__nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color .2s ease;
}
.header__nav a:hover { color: var(--text-primary); }
.header__right { display: flex; align-items: center; gap: 20px; }
.lang {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
}
.lang__btn {
  background: transparent;
  border: 0;
  padding: 2px 2px;
  font: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .2s ease;
  letter-spacing: 0.02em;
}
.lang__btn.is-active { color: var(--color-primary-light); }
.lang__sep { color: var(--text-muted); user-select: none; }
@media (hover: hover) {
  .lang__btn:hover { color: var(--color-primary-light); }
}
.lang__btn:focus-visible {
  outline: 2px solid var(--color-primary-light);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Optional crossfade on language switch */
body.i18n-fading main,
body.i18n-fading .hero,
body.i18n-fading .section,
body.i18n-fading .footer { opacity: 0.6; transition: opacity 150ms ease; }

/* RTL-ready hooks (architecturally laid out; no current language uses it) */
html[dir="rtl"] body { direction: rtl; }
html[dir="rtl"] .hero__ctas,
html[dir="rtl"] .header__right,
html[dir="rtl"] .header__nav { flex-direction: row-reverse; }
html[dir="rtl"] .link-arrow { direction: rtl; }
html[dir="rtl"] .logos__track { animation-direction: reverse; }
html[dir="rtl"] .steps__track-fill { left: auto; right: 0; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 780px;
  padding: 140px 0 160px;
  overflow: hidden;
  background: var(--bg-primary);
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.55;
  will-change: transform;
}
.hero__blob--1 {
  width: 720px; height: 720px;
  left: -180px; top: -180px;
  background: radial-gradient(circle, #4D8BD9 0%, #1856A7 60%, transparent 100%);
  animation: blob-drift-a 18s ease-in-out infinite alternate;
}
.hero__blob--2 {
  width: 640px; height: 640px;
  right: -120px; bottom: -180px;
  background: radial-gradient(circle, #7A4BD9 0%, #3B1A8A 60%, transparent 100%);
  animation: blob-drift-b 22s ease-in-out infinite alternate;
}

@keyframes blob-drift-a {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(60px, 40px, 0) scale(1.12); }
  100% { transform: translate3d(-20px, 80px, 0) scale(0.95); }
}
@keyframes blob-drift-b {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-80px, -50px, 0) scale(1.08); }
  100% { transform: translate3d(40px, -30px, 0) scale(1.15); }
}
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

/* Cursor-reveal: three layered "lit" grids with radial mask following cursor */
.hero__grid-lit {
  position: absolute; inset: 0;
  pointer-events: none;
  background-size: 64px 64px;
  opacity: 0;
  --mx: 50%; --my: 50%; --r: 280px;
  mask-image: radial-gradient(
    circle var(--r) at var(--mx) var(--my),
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 55%,
    rgba(0,0,0,0) 100%
  );
  -webkit-mask-image: radial-gradient(
    circle var(--r) at var(--mx) var(--my),
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 55%,
    rgba(0,0,0,0) 100%
  );
  transition: opacity 300ms ease;
}
.hero__grid-lit.is-active { opacity: 1; }
.hero__grid-lit--1 {
  --r: 196px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.26) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.26) 1px, transparent 1px);
}
.hero__grid-lit--2 {
  --r: 238px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
}
.hero__grid-lit--3 {
  --r: 294px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
}

.hero__inner { position: relative; }

.hero__title {
  font-family: 'Geist', 'Inter', sans-serif;
  font-weight: 900;
  font-size: 96px;
  line-height: 0.95;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #FFFFFF 0%, #BFC7D9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  max-width: 900px;
  margin-bottom: 32px;
}
.hero__sub {
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 720px;
  margin-bottom: 40px;
}
.hero__ctas { display: flex; gap: 16px; margin-bottom: 20px; }
.hero__micro { font-size: 14px; color: var(--text-muted); }

/* ---------- SECTION BASE ---------- */
.section {
  padding: var(--section-gap) 0;
}
.section--alt { background: var(--bg-secondary); }

.section__title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  max-width: 880px;
  margin-bottom: 20px;
}
.section__title--center { text-align: center; margin-left: auto; margin-right: auto; }
.section__sub {
  font-size: 20px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 720px;
  margin-bottom: 56px;
}
.section__sub--center { text-align: center; margin-left: auto; margin-right: auto; }
.section__head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 56px;
}
.section__head-row .section__title { margin-bottom: 0; }

/* ---------- BLOCK 2 — CHAT DEMO ---------- */
.chat {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 880px;
  margin: 0 auto;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}
.chat__header {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.chat__title { font-size: 13px; color: var(--text-muted); }

/* === Chat status indicator === */
.chat__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}
.chat__status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
  transition: all 0.4s ease;
}
.chat__status-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: lowercase;
  letter-spacing: 0.04em;
  transition: color 0.4s ease;
}
.chat.is-online .chat__status-dot {
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: chat-status-pulse 2s ease-out infinite;
}
.chat.is-online .chat__status-label { color: #22c55e; }
@keyframes chat-status-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70%  { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}
.chat.is-offline .chat__status-dot {
  background: var(--text-muted);
  opacity: 0.4;
  animation: none;
  box-shadow: none;
}
.chat.is-offline .chat__status-label { color: var(--text-muted); }

.chat__body { padding: 28px 28px 22px; }
.chat__messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
}
.chat__msg {
  display: inline-block;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.55;
  max-width: 80%;
  align-self: flex-start;
}
.chat__msg--bot {
  background: rgba(77, 139, 217, 0.14);
  color: var(--text-primary);
  border: 1px solid rgba(77, 139, 217, 0.25);
}

/* === Greeting block: cartoon eyes + bot bubble === */
.chat__greeting {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.chat__eyes {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 32px;
  margin-top: 6px;
}
.chat__eyes svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}
.chat__eyes-pupils {
  transform-origin: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chat__eyes--idle .chat__eyes-pupils {
  animation: eyes-idle 4.5s ease-in-out infinite;
}
@keyframes eyes-idle {
  0%, 20%   { transform: translate(0, 0); }
  25%, 40%  { transform: translate(-6px, 0); }
  45%, 60%  { transform: translate(0, 0); }
  65%, 80%  { transform: translate(6px, 0); }
  85%, 100% { transform: translate(0, 0); }
}
.chat__eyes--down .chat__eyes-pupils {
  animation: none;
  transform: translate(0, 6px);
}
.chat__eyes--thinking .chat__eyes-pupils {
  animation: none;
  transform: translate(-5px, -5px);
}
.chat__eyes-pupil {
  filter: drop-shadow(0 0 1.5px rgba(56, 189, 248, 0.6));
}
@media (max-width: 640px) {
  .chat__eyes { width: 48px; height: 24px; margin-top: 4px; }
  .chat__greeting { gap: 8px; }
}
.chat__msg--user {
  align-self: flex-end;
  background: var(--color-primary-light);
  color: #fff;
  border: 1px solid transparent;
}
.chat__msg--system {
  align-self: center;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  font-style: italic;
  max-width: 100%;
  text-align: center;
}
.chat__msg--bot strong { font-weight: 600; }
.chat__msg--bot em { font-style: italic; }
.chat__msg--bot code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
}
.chat__msg--bot a {
  color: var(--color-primary-light);
  text-decoration: underline;
}
.chat__msg--bot ul { margin: 6px 0 6px 18px; padding: 0; }
.chat__msg--bot li { margin: 2px 0; }
.chat__presets.is-used { display: none; }
.chat__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.preset {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: var(--text-primary);
  transition: background .2s ease, border-color .2s ease;
}
.preset:hover {
  background: #333;
  border-color: var(--color-primary-light);
}
.chat__input {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.chat__input input {
  flex: 1;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.chat__input input::placeholder { color: var(--text-muted); }
.chat__send {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--color-accent);
  color: #fff;
  font-size: 20px;
}
.chat__send:disabled,
.chat__input input:disabled,
.preset:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.3);
  transition: opacity 0.3s ease, filter 0.3s ease;
}
.chat__send:not(:disabled),
.chat__input input:not(:disabled),
.preset:not(:disabled) {
  opacity: 1;
  filter: none;
}

/* ---------- BLOCK 3 — CARDS 3 ---------- */
.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: rgba(77, 139, 217, 0.4); transform: translateY(-2px); }
.card__icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(77, 139, 217, 0.14);
  border: 1px solid rgba(77, 139, 217, 0.3);
  display: flex; align-items: center; justify-content: center;
}
.card__icon svg {
  width: 28px; height: 28px;
  fill: none;
  stroke: var(--color-primary-light);
  stroke-width: 2;
  stroke-linecap: round;
}
.card__title {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.card__lead {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}

/* ---------- BLOCK 4 — LAB ---------- */
.lab-scroll {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.lab-card {
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s ease, transform .2s ease;
}
.lab-card:hover { border-color: var(--color-primary-light); transform: translateY(-2px); }
.lab-card__preview {
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(77, 139, 217, 0.25) 0%, rgba(122, 75, 217, 0.25) 100%),
    var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.lab-card__label {
  font-family: 'Geist', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 32px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: -0.02em;
}
.lab-card__title {
  font-size: 18px;
  font-weight: 600;
  padding: 20px 20px 8px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.lab-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 0 20px 22px;
  line-height: 1.5;
}

/* Lab section carries a "code fog" background — three stacked layers clone
   the same <template> snippets; leader+trail are masked by cursor radial.
   Cards and title must sit above via .section > .container { z-index: 1 } */
.section.lab { isolation: isolate; }
.lab-card { position: relative; z-index: 1; }

.lab-code {
  position: absolute;
  inset: 0;
  pointer-events: none;
  padding: 64px 64px 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: auto;
  grid-auto-flow: row;
  column-gap: 56px;
  row-gap: 48px;
  align-content: space-between;
  overflow: hidden;
  color: #8A8A8A;
  font-family: ui-monospace, 'Geist Mono', 'JetBrains Mono', Menlo, Monaco, monospace;
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0;
  z-index: 0;
  user-select: none;
}
.lab-code__snippet {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: pre;
  overflow: hidden;
}
.lab-code--base { opacity: 0.06; }
.lab-code--leader {
  --mx: 50%; --my: 50%; --r: 260px;
  opacity: 0.45;
  mask-image: radial-gradient(
    circle var(--r) at var(--mx) var(--my),
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 55%,
    rgba(0,0,0,0) 100%
  );
  -webkit-mask-image: radial-gradient(
    circle var(--r) at var(--mx) var(--my),
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 55%,
    rgba(0,0,0,0) 100%
  );
  transition: opacity 300ms ease;
  opacity: 0;
}
.lab-code--leader.is-active { opacity: 0.45; }
.lab-code--trail {
  --mx: 50%; --my: 50%; --r: 320px;
  opacity: 0;
  mask-image: radial-gradient(
    circle var(--r) at var(--mx) var(--my),
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 55%,
    rgba(0,0,0,0) 100%
  );
  -webkit-mask-image: radial-gradient(
    circle var(--r) at var(--mx) var(--my),
    rgba(0,0,0,1) 0%,
    rgba(0,0,0,1) 55%,
    rgba(0,0,0,0) 100%
  );
  transition: opacity 300ms ease;
}
.lab-code--trail.is-active { opacity: 0.22; }

/* Token colors (brand palette, not Monokai/One Dark) */
.tok-kw  { color: #F04A4C; }
.tok-fn  { color: #4D8BD9; }
.tok-cls { color: #7A4BD9; }
.tok-str { color: #6AA8E8; }
.tok-num { color: #4D8BD9; }
.tok-com { color: #797979; font-style: italic; }
.tok-dec { color: #F04A4C; }

/* ---------- BLOCK 5 — METRICS + CASES ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 56px;
  padding: 40px 0;
  background:
    linear-gradient(135deg, rgba(77, 139, 217, 0.12) 0%, rgba(122, 75, 217, 0.12) 100%),
    var(--bg-secondary);
  border: 1px solid rgba(77, 139, 217, 0.2);
  border-radius: var(--radius-lg);
}
.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 32px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.metric:first-child { border-left: none; }
.metric__num {
  font-family: 'Geist', 'Inter', sans-serif;
  font-weight: 900;
  font-size: 80px;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #4D8BD9 0%, #7A4BD9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}
.metric__label {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 180px;
  line-height: 1.4;
}

.cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.case {
  display: flex; flex-direction: column;
}
.case__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  margin-bottom: 16px;
  transition: border-color .25s ease;
  background: #0F0F0F;
}
.case__cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transition: transform .4s ease;
}

.case__cover[data-case="sharp"] {
  background: radial-gradient(
    ellipse at 70% 20%,
    rgba(77, 139, 217, 0.25) 0%,
    rgba(24, 86, 167, 0.10) 40%,
    #0F0F0F 100%
  );
}
.case__cover[data-case="certa"] {
  background: radial-gradient(
    ellipse at 30% 80%,
    rgba(240, 74, 76, 0.20) 0%,
    rgba(122, 75, 217, 0.15) 40%,
    #0F0F0F 100%
  );
}
.case__cover[data-case="truks"] { background: #0F0F0F; }
.case__cover[data-case="truks"] img {
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
}
.case__cover[data-case="truks"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(10,10,10,0.15) 100%);
  pointer-events: none;
}

@media (hover: hover) {
  .case__cover:hover { border-color: rgba(77, 139, 217, 0.35); }
  .case:hover .case__cover img { transform: scale(1.03); }
}
.case__meta { margin-bottom: 10px; }
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(77, 139, 217, 0.14);
  border: 1px solid rgba(77, 139, 217, 0.3);
  color: var(--color-primary-light);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.case__title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.case__lead {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
  flex: 1;
}
.case .link-arrow { margin-top: auto; }

/* ---------- BLOCK 5b — REVIEWS ---------- */
.reviews {
  background: var(--bg-primary);
}
.reviews__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.review-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: 32px;
  overflow: hidden;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
.review-card__qmark {
  position: absolute;
  top: 12px; left: -4px;
  font-family: 'Geist', 'Inter', sans-serif;
  font-weight: 900;
  font-size: 96px;
  line-height: 1;
  color: rgba(77,139,217,0.32);
  user-select: none;
  pointer-events: none;
}
.review-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  position: relative; z-index: 1;
}
.review-card__avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: 'Geist', 'Inter', sans-serif;
  font-weight: 900;
  font-size: 20px;
  color: #FFFFFF;
  letter-spacing: 0;
}
.review-card__avatar--blue   { background: linear-gradient(135deg, #4D8BD9 0%, #1856A7 100%); }
.review-card__avatar--violet { background: linear-gradient(135deg, #7A4BD9 0%, #3B1A8A 100%); }
.review-card__avatar--red    { background: linear-gradient(135deg, #F04A4C 0%, #C33535 100%); }
.review-card__who { min-width: 0; }
.review-card__name {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.review-card__role {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}
.review-card__quote {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  position: relative; z-index: 1;
}
@media (hover: hover) {
  .review-card:hover {
    border-color: rgba(77,139,217,0.5);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(77,139,217,0.18);
  }
}

/* ---------- BLOCK 6 — PRODUCTS ---------- */
.products {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.product {
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 280px;
}
.product--placeholder {
  background: transparent;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.12);
}
.product__badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(240, 74, 76, 0.14);
  border: 1px solid rgba(240, 74, 76, 0.4);
  color: #ff7a7c;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.product__badge--muted {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}
.product__title {
  font-family: 'Geist', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 40px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.product__desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}
.product__cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- BLOCK 7 — STEPS ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.step {
  padding: 28px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.step__num {
  font-family: 'Geist', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-primary-light);
  letter-spacing: 0.06em;
}
.step__title {
  font-family: 'Geist', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.step__desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ---------- BLOCK 8 — INDUSTRIES / LOGOS ---------- */
.industries {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}
.industry {
  padding: 24px 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  text-align: center;
  transition: border-color .2s ease, background .2s ease;
}
.industry:hover { border-color: var(--color-primary-light); background: var(--bg-elevated); }
.industry__icon {
  width: 28px;
  height: 28px;
  color: var(--color-primary-light);
  opacity: 0.85;
  flex-shrink: 0;
  transition: opacity .2s ease;
}
.industry:hover .industry__icon { opacity: 1; }

.logos {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.logos__track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: logos-marquee 30s linear infinite;
  will-change: transform;
}
.logos:hover .logos__track { animation-play-state: paused; }
.logo-card {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  height: 88px;
  padding: 12px 24px;
  background: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}
.logo-card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  left: 0;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.7) 50%,
    transparent 100%
  );
  transform: translateX(-220%) skewX(-18deg);
  transition: transform 0s linear;
}
.logo-card img {
  max-height: 56px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.logo-card[data-client="sharp"],
.logo-card[data-client="cyberflot"],
.logo-card[data-client="sulzer"],
.logo-card[data-client="truewind"],
.logo-card[data-client="instroysnab"],
.logo-card[data-client="truks"] { background: #FFFFFF; border-color: rgba(0, 0, 0, 0.12); }

.logo-card[data-client="bowa"]  { background: #000000; border-color: rgba(255, 255, 255, 0.12); }
.logo-card[data-client="certa"] { background: #1F1F1F; border-color: rgba(255, 255, 255, 0.12); }

.logo-card[data-client="truks"] img,
.logo-card[data-client="certa"] img,
.logo-card[data-client="truewind"] img { max-height: 48px; }
.logo-card[data-client="instroysnab"] img { max-height: 60px; }

@media (hover: hover) {
  .logo-card:hover::after {
    transform: translateX(320%) skewX(-18deg);
    transition: transform 1.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

.regalia {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.regalia__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 999px;
  font: 600 14px/1.4 'Inter', system-ui, sans-serif;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid;
}
.regalia__item--bitrix { border-color: rgba(77, 139, 217, 0.4); }
.regalia__item--minc   { border-color: rgba(122, 75, 217, 0.4); }
.regalia__check { width: 14px; height: 14px; flex-shrink: 0; }
.regalia__item--bitrix .regalia__check { color: #4D8BD9; }
.regalia__item--minc   .regalia__check { color: #7A4BD9; }

@keyframes logos-marquee {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

/* ---------- BLOCK 9 — SUBSCRIBE ---------- */
.subscribe {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.subscribe__ctas {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

/* ---------- BLOCK 10 — CONTACT ---------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.contact__list {
  list-style: none;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact__list li {
  display: flex;
  gap: 20px;
  align-items: baseline;
  font-size: 16px;
}
.contact__key {
  width: 92px;
  color: var(--text-muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.contact__form {
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
.field input,
.field textarea {
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  resize: vertical;
  transition: border-color .2s ease;
}
.field input:focus,
.field textarea:focus { border-color: var(--color-primary-light); }
.field input::placeholder,
.field textarea::placeholder { color: var(--text-muted); }
.contact__micro {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 64px 0 32px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__logo img {
  display: block;
  height: 34px;
  width: auto;
}
.footer__corp-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color .2s ease;
}
.footer__corp-link:hover { color: var(--text-primary); }
.footer__head {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.footer__col a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color .2s ease;
}
.footer__col a:hover { color: var(--text-primary); }

/* Социалки — горизонтальный ряд иконок */
.footer__socials { display: flex; gap: 12px; align-items: center; margin-top: 2px; }
.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  transition: all .2s ease;
}
.footer__social svg { width: 16px; height: 16px; display: block; }
.footer__social:hover {
  background: var(--color-primary-light);
  color: #fff;
  transform: translateY(-2px);
}

/* Контакты с иконками — иконка слева, текст справа */
.footer__contact {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  text-decoration: none;
}
.footer__contact:hover { color: var(--text-primary); }
.footer__contact-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--color-primary-light);
  opacity: 0.85;
}
.footer__contact--text { cursor: default; }
.footer__contact--text:hover { color: var(--text-secondary); }

.footer__bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================================================
   ANIMATIONS
   ================================================== */

/* --- Hero entrance (plays once on load) --- */
.hero__title,
.hero__sub,
.hero__ctas,
.hero__micro {
  opacity: 0;
  transform: translateY(24px);
  animation: hero-rise 0.8s cubic-bezier(0.2, 0.65, 0.2, 1) forwards;
}
.hero__title { animation-delay: 0.05s; }
.hero__sub   { animation-delay: 0.2s; }
.hero__ctas  { animation-delay: 0.35s; }
.hero__micro { animation-delay: 0.5s; }

@keyframes hero-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Primary CTA glow pulse (subtle) --- */
.btn--primary {
  animation: primary-pulse 2.6s ease-in-out infinite;
}
@keyframes primary-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(240, 74, 76, 0.28); }
  50%      { box-shadow: 0 10px 32px rgba(240, 74, 76, 0.48); }
}

/* --- Ghost CTA fill on hover --- */
.btn--ghost {
  transition: background .3s ease, color .3s ease, border-color .3s ease, transform .15s ease;
}
.btn--ghost:hover {
  background: var(--color-primary-light);
  color: #fff;
  border-color: var(--color-primary-light);
}

/* --- Card hover (glow border + shadow). Scale lives only on .lab-card
   because .card elements are JS-driven via data-scroll-slide and having
   two sources write to `transform` fights each other. --- */
.card, .lab-card {
  transition: border-color .3s ease, box-shadow .3s ease;
}
.lab-card {
  transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.card:hover, .lab-card:hover {
  border-color: rgba(77, 139, 217, 0.5);
  box-shadow: 0 12px 40px rgba(77, 139, 217, 0.22);
}
.lab-card:hover { transform: scale(1.02); }

/* --- Scroll reveal (set by IntersectionObserver) --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s cubic-bezier(0.2, 0.65, 0.2, 1), transform .6s cubic-bezier(0.2, 0.65, 0.2, 1);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-children] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .55s cubic-bezier(0.2, 0.65, 0.2, 1), transform .55s cubic-bezier(0.2, 0.65, 0.2, 1);
}
[data-reveal-children].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-children].is-visible > *:nth-child(1) { transition-delay: 0s; }
[data-reveal-children].is-visible > *:nth-child(2) { transition-delay: 0.15s; }
[data-reveal-children].is-visible > *:nth-child(3) { transition-delay: 0.30s; }
[data-reveal-children].is-visible > *:nth-child(4) { transition-delay: 0.45s; }
[data-reveal-children].is-visible > *:nth-child(5) { transition-delay: 0.60s; }
[data-reveal-children].is-visible > *:nth-child(6) { transition-delay: 0.75s; }
[data-reveal-children].is-visible > *:nth-child(7) { transition-delay: 0.90s; }

/* --- Preset bounce-in (chat demo) --- */
.chat.is-visible .preset {
  animation: preset-pop 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) backwards;
}
.chat.is-visible .preset:nth-child(1) { animation-delay: 0.2s; }
.chat.is-visible .preset:nth-child(2) { animation-delay: 0.4s; }
.chat.is-visible .preset:nth-child(3) { animation-delay: 0.6s; }
@keyframes preset-pop {
  0%   { opacity: 0; transform: translateY(10px) scale(0.9); }
  60%  { opacity: 1; transform: translateY(0) scale(1.04); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Chat "typing..." indicator --- */
.typing {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  margin-top: 12px;
  border-radius: 14px;
  background: rgba(77, 139, 217, 0.14);
  border: 1px solid rgba(77, 139, 217, 0.25);
  align-self: flex-start;
  width: fit-content;
}
.typing.is-active { display: inline-flex; }
.typing__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-primary-light);
  animation: typing-bounce 1.2s ease-in-out infinite;
}
.typing__dot:nth-child(2) { animation-delay: 0.15s; }
.typing__dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%           { transform: translateY(-4px); opacity: 1; }
}

/* --- Sticky header shrink on scroll --- */
.header { transition: background .25s ease, border-color .25s ease; }
.header__inner { transition: height .25s ease; }
.header.is-scrolled {
  background: rgba(10, 10, 10, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.header.is-scrolled .header__inner { height: 60px; }

/* ==================================================
   PARALLAX & SCROLL-DRIVEN (pass 3)
   JS writes --px / --progress / transforms inline.
   CSS here only sets up the defaults, decorations, and transitions.
   ================================================== */

/* --- Parallax wrappers around hero blobs ---
   Outer wrapper gets translate from scroll (JS), inner keeps the blob's
   own drift keyframes. This avoids stacking two transforms on one node. */
.hero__blob-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  will-change: transform;
}

/* --- Section soft top-blend (smooth transitions).
   `overflow: clip` contains deco elements positioned with negative offsets,
   so they can't inflate document scrollHeight / scrollWidth. --- */
.section { position: relative; isolation: isolate; overflow: clip; }
.section::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent);
  pointer-events: none;
  z-index: 0;
}
.section > .container { position: relative; z-index: 1; }

/* --- Decorative floating elements --- */
.deco {
  position: absolute;
  pointer-events: none;
  will-change: transform;
  z-index: 0;
}
.deco--ring {
  border-radius: 50%;
  border: 1px solid currentColor;
  background: transparent;
}
.deco--dot {
  border-radius: 50%;
  background: currentColor;
}
.deco--line {
  height: 1px;
  background: currentColor;
}
.deco--grid {
  background-image:
    radial-gradient(circle, currentColor 1px, transparent 1.5px);
  background-size: 14px 14px;
}
.deco--blue { color: rgba(77, 139, 217, 0.14); }
.deco--violet { color: rgba(122, 75, 217, 0.14); }
.deco--blue-strong { color: rgba(77, 139, 217, 0.28); }

/* --- Scroll-driven transforms (JS writes translate/scale via inline style).
   These rules set the *rest* state + transition for things that aren't
   continuously driven — e.g. card entrance that holds until scrolled. */
.scroll-card {
  will-change: transform, opacity;
}

/* --- Block 7: process progress line --- */
.steps { padding-top: 40px; position: relative; }
.steps__track {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  border-radius: 2px;
}
.steps__track-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, #4D8BD9 0%, #7A4BD9 100%);
  box-shadow: 0 0 16px rgba(77, 139, 217, 0.5);
  transition: width 0.08s linear;
}
/* Hide each step's own top border now that we have a unified track. */
.steps .step { border-top: none; padding-top: 20px; }

.step {
  opacity: 0.35;
  transform: scale(0.96);
  transition: opacity .5s ease, transform .5s ease;
}
.step.is-active {
  opacity: 1;
  transform: scale(1);
}
.step__num {
  transition: color .4s ease;
}
.step.is-active .step__num { color: var(--color-primary-light); }

/* ==================================================
   BURGER + MOBILE MENU (≤1024)
   ================================================== */

.burger {
  display: none;
  width: 40px; height: 40px;
  background: transparent;
  border: 0;
  padding: 0;
  position: relative;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 60;
}
.burger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform .3s ease, opacity .2s ease;
  transform-origin: center;
}
.burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.98);
  z-index: 55;
  display: none;
  flex-direction: column;
  padding: 96px 24px 32px;
  opacity: 0;
  transition: opacity .25s ease;
}
@supports (backdrop-filter: blur(20px)) {
  .mobile-menu { background: rgba(10, 10, 10, 0.92); backdrop-filter: blur(20px); }
}
.mobile-menu.is-open {
  display: flex;
  opacity: 1;
}
.mobile-menu__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  flex: 1;
  padding-top: 40px;
}
.mobile-menu__nav a {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(12px);
  transition: color .2s ease, opacity .4s ease, transform .4s ease;
}
.mobile-menu.is-open .mobile-menu__nav a { opacity: 1; transform: translateY(0); }
.mobile-menu.is-open .mobile-menu__nav > *:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.is-open .mobile-menu__nav > *:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.is-open .mobile-menu__nav > *:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.is-open .mobile-menu__nav > *:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.is-open .mobile-menu__nav > *:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu.is-open .mobile-menu__nav > *:nth-child(6) { transition-delay: 0.3s; }
.mobile-menu__lang {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s ease, transform .4s ease;
}
.mobile-menu__lang .lang__btn { font-size: 16px; padding: 4px 2px; }
.mobile-menu.is-open .mobile-menu__lang { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
.mobile-menu__footer {
  padding-bottom: 16px;
}

body.menu-open { overflow: hidden; touch-action: none; }

/* ==================================================
   TABLET (≤ 1024px)
   ================================================== */

@media (max-width: 1024px) {
  :root {
    --container: 100%;
    --side-pad: 32px;
    --section-gap: 96px;
  }

  /* Header: hide desktop nav + desktop CTA, show burger */
  .header__nav { display: none; }
  .header__cta-desktop { display: none; }
  .lang { display: none; }
  .burger { display: flex; }
  .header__inner { height: 64px; }
  .header.is-scrolled .header__inner { height: 56px; }

  /* Section rhythm */
  .section { padding: 96px 0; }
  .section::before { height: 60px; }

  /* Hero */
  .hero { padding: 100px 0 120px; min-height: 90vh; }
  .hero__title { font-size: 56px; line-height: 1.05; }
  .hero__sub { font-size: 22px; max-width: 560px; }
  .hero__ctas { flex-wrap: wrap; gap: 12px; }
  .hero__ctas .btn { min-height: 48px; }
  .hero__blob--1 { width: 420px; height: 420px; left: -60px; top: -100px; }
  .hero__blob--2 { width: 380px; height: 380px; right: -80px; bottom: -100px; }
  .hero__grid { background-size: 48px 48px; }

  /* Headings scale */
  .section__title { font-size: 40px; }
  .section__sub { font-size: 17px; }

  /* Grids */
  .cards-3 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .cards-3 > :nth-child(3) { grid-column: 1 / -1; max-width: calc(50% - 10px); margin: 0 auto; }
  .lab-scroll { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .cases { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .cases > :nth-child(3) { grid-column: 1 / -1; max-width: calc(50% - 10px); }
  .reviews__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 36px; }
  .review-card { padding: 28px; }
  .review-card__qmark { font-size: 80px; }
  .logo-card { min-width: 150px; height: 72px; padding: 10px 20px; }
  .logo-card img { max-height: 44px; }
  .regalia__item { padding: 9px 18px; font-size: 13px; }
  .metrics { padding: 32px 0; }
  .metric__num { font-size: 64px; }
  .products { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .product { padding: 32px; }
  .product__title { font-size: 32px; }
  .industries { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .industries > * { min-height: 80px; }

  /* Process block: vertical stack with left-side progress line */
  .steps { grid-template-columns: 1fr; gap: 20px; padding-top: 0; padding-left: 40px; }
  .steps__track {
    top: 0; left: 16px; right: auto; bottom: 0;
    width: 2px; height: auto;
  }
  .steps__track-fill {
    width: 100% !important;
    height: var(--progress-v, 0%);
    background: linear-gradient(180deg, #4D8BD9 0%, #7A4BD9 100%);
    box-shadow: 0 0 16px rgba(77, 139, 217, 0.5);
    bottom: auto;
    right: auto;
  }
  .steps .step { padding-top: 0; padding-left: 0; }

  /* Logos marquee speed */
  .logos__track { animation-duration: 25s; }

  /* Subscribe centered */
  .subscribe__ctas { flex-wrap: wrap; }
  .subscribe__ctas .btn { min-height: 48px; }

  /* Contact */
  .contact { grid-template-columns: 1fr; gap: 40px; }

  /* Footer: equal 3 columns on tablet, bottom bar centered */
  .footer__inner { grid-template-columns: 1fr 1fr 1fr; gap: 32px 24px; }
  .footer__bottom { flex-wrap: wrap; justify-content: center; gap: 6px 24px; text-align: center; }

  /* Decorations: keep as static (JS-parallax already killed) */
  .deco { display: none; }
}

/* ==================================================
   MOBILE (≤ 640px)
   ================================================== */

@media (max-width: 640px) {
  :root {
    --container: 100%;
    --side-pad: 16px;
    --section-gap: 64px;
  }

  /* Section rhythm */
  .section { padding: 64px 0; }
  .section::before { height: 48px; }

  /* Hero */
  .hero { padding: 80px 0 80px; min-height: 80vh; }
  .hero__title { font-size: 44px; line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: break-word; word-break: break-word; hyphens: auto; }
  .hero__sub { font-size: 18px; max-width: 100%; }
  .hero__ctas { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero__ctas .btn { width: 100%; min-height: 48px; }
  .hero__blob--1 { width: 280px; height: 280px; opacity: 0.45; left: -40px; top: -60px; }
  .hero__blob--2 { width: 280px; height: 280px; opacity: 0.45; right: -60px; bottom: -60px; }
  .hero__grid { background-size: 36px 36px; }

  /* Headings scale */
  .section__title { font-size: 32px; line-height: 1.15; }
  .section__sub { font-size: 16px; }
  .section__head-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .section__head-row .btn { align-self: flex-start; }

  /* Cards H3, body sizes */
  .card__title, .case__title, .lab-card__title { font-size: 20px; }
  .card__lead, .case__lead, .lab-card__desc { font-size: 15px; }

  /* Grids — all to single column */
  .cards-3, .lab-scroll, .cases, .products, .reviews__grid { grid-template-columns: 1fr; gap: 16px; }
  .cards-3 > :nth-child(3),
  .cases > :nth-child(3) { max-width: 100%; margin: 0; }
  .card, .product { padding: 24px; }
  .review-card { padding: 24px; }
  .review-card__qmark { font-size: 72px; top: 8px; }
  .review-card__quote { font-size: 14.5px; }
  .logo-card { min-width: 120px; height: 64px; padding: 8px 16px; }
  .logo-card img { max-height: 36px; }
  .regalia { margin-top: 24px; gap: 12px; }
  .regalia__item { padding: 8px 16px; font-size: 12.5px; }
  .product__title { font-size: 28px; }

  /* Metrics: stack as 3 rows with horizontal divider instead of vertical */
  .metrics { grid-template-columns: 1fr; padding: 24px 0; }
  .metric {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 16px;
  }
  .metric:first-child { border-top: none; }
  .metric__num { font-size: 56px; }
  .metric__label { max-width: 100%; }

  /* Industries: 1 column */
  .industries { grid-template-columns: 1fr; gap: 12px; }
  .industries > * { min-height: 72px; padding: 20px 16px; font-size: 14px; }

  /* Process steps: tighter */
  .steps { padding-left: 32px; gap: 18px; }
  .steps__track { left: 12px; }
  .step__title { font-size: 22px; }
  .step__desc { font-size: 14px; }

  /* Chat demo */
  .chat { border-radius: 16px; }
  .chat__body { padding: 20px 16px 16px; }
  .chat__msg { font-size: 14px; max-width: 100%; }
  .chat__presets { gap: 8px; }
  .preset { min-height: 44px; font-size: 13px; padding: 10px 12px; }
  .chat__input input { height: 44px; font-size: 16px; }
  .chat__send { width: 44px; height: 44px; }

  /* Contact form: full-width fields, 16px inputs (iOS zoom fix) */
  .contact__form { padding: 20px; }
  .field input, .field textarea { font-size: 16px; padding: 12px 14px; }
  .btn--full { min-height: 48px; }
  .contact__list li { flex-direction: column; gap: 4px; }
  .contact__key { width: auto; }

  /* Subscribe CTAs stacked */
  .subscribe__ctas { flex-direction: column; }
  .subscribe__ctas .btn { width: 100%; }

  /* Logos marquee — faster + smaller tiles (widths overridden above) */
  .logos__track { animation-duration: 20s; }

  /* Footer: 1 column on mobile */
  .footer { padding: 48px 0 24px; }
  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; gap: 8px; align-items: flex-start; }

  /* Mobile menu uses smaller typography */
  .mobile-menu__nav a { font-size: 24px; }
  .mobile-menu__nav { gap: 24px; }
}

/* ==================================================
   TOUCH: tap-feedback, no hover lift
   ================================================== */

@media (hover: none) {
  .btn:hover { transform: none; }
  .btn:active { transform: scale(0.98); }
  .card:hover, .lab-card:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: none;
  }
  .card:active, .lab-card:active {
    transform: scale(0.98);
    opacity: 0.92;
  }
  .preset:hover { background: var(--bg-elevated); border-color: rgba(255, 255, 255, 0.08); }
  .preset:active { transform: scale(0.97); }
}

/* --- Reduced motion: kill everything --- */
@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;
    scroll-behavior: auto !important;
  }
  [data-reveal], [data-reveal-children] > * {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero__title, .hero__sub, .hero__ctas, .hero__micro {
    opacity: 1 !important;
    transform: none !important;
  }
  .logos__track { animation: none !important; }
  .hero__blob { animation: none !important; }
  .hero__blob-wrap,
  .hero__grid,
  .hero__inner,
  .deco,
  [data-parallax],
  [data-scroll-scale],
  [data-scroll-slide],
  .chat,
  .scroll-card {
    transform: none !important;
  }
  .steps__track-fill { width: 100% !important; }
  .step { opacity: 1 !important; transform: none !important; }

  /* Cursor-reveal off: hero lit hidden, lab code stays at base only */
  .hero__grid-lit,
  .lab-code--leader,
  .lab-code--trail { opacity: 0 !important; }
  .lab-code--base { opacity: 0.06 !important; }
}

/* Touch devices: no cursor, no masks — keep lab code at static base only */
@media (hover: none), (pointer: coarse) {
  .hero__grid-lit,
  .lab-code--leader,
  .lab-code--trail { display: none; }
  .lab-code--base { opacity: 0.04; }
}

/* ≤1024: cursor-reveal is dead weight (no JS loop, plus perf) — hide layers */
@media (max-width: 1024px) {
  .hero__grid-lit,
  .lab-code--leader,
  .lab-code--trail { display: none; }
  .lab-code--base { opacity: 0.04; padding: 56px 24px; font-size: 11px; }
}

/* ---------- Legal pages (privacy / offer) ---------- */
.page-legal { background: var(--bg-primary); }
.header--minimal { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.legal { padding: 80px 0 120px; }
.legal__container { max-width: 800px; }
.legal__title {
  font: 900 40px/1.2 "Geist", sans-serif;
  color: var(--text-primary);
  margin: 0 0 56px;
}
.legal__section { margin-bottom: 48px; }
.legal__section h2 {
  font: 600 22px/1.3 "Inter", sans-serif;
  color: var(--text-primary);
  margin: 0 0 16px;
}
.legal__section h3 {
  font: 600 17px/1.35 "Inter", sans-serif;
  color: var(--text-primary);
  margin: 24px 0 12px;
}
.legal__section p,
.legal__section li,
.legal__section dd {
  font: 400 15px/1.65 "Inter", sans-serif;
  color: var(--text-secondary);
  margin: 0 0 12px;
}
.legal__section ul,
.legal__section ol { padding-left: 22px; margin: 12px 0; }
.legal__section li { margin-bottom: 8px; }
.legal__dl { margin: 12px 0 0; }
.legal__dl dt {
  font: 600 14px/1.4 "Inter", sans-serif;
  color: var(--text-primary);
  margin-top: 16px;
}
.legal__dl dd {
  margin: 4px 0 0 0;
  padding-left: 0;
}
.legal__table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}
.legal__table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  vertical-align: top;
  line-height: 1.55;
}
.legal__table td:first-child { width: 28%; }
.legal__table-key {
  font-weight: 600;
  color: var(--text-primary);
}
.legal__section a,
.legal__back a {
  color: var(--color-primary-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal__back {
  margin-top: 64px;
  font-size: 15px;
}
.footer--minimal .footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 32px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 13px;
}
@media (max-width: 640px) {
  .legal { padding: 48px 0 80px; }
  .legal__title { font-size: 30px; }
  .legal__section h2 { font-size: 19px; }
  .legal__table td:first-child { width: 40%; }
}

/* ---------- v1 prod additions ---------- */

/* Chat consent-gate */
.chat__consent {
  background: rgba(77, 139, 217, 0.06);
  border-left: 2px solid var(--color-primary-light);
  padding: 20px 24px;
  margin: 16px 0 24px;
  border-radius: 4px;
}
.chat__consent-title {
  font: 600 14px/1.4 "Inter", sans-serif;
  color: var(--text-primary);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chat__consent-text {
  font: 400 14px/1.55 "Inter", sans-serif;
  color: var(--text-secondary);
  margin: 0 0 16px;
}
.chat__consent-text a { color: var(--color-primary-light); text-decoration: underline; }
.chat__consent-check {
  display: flex; gap: 10px; align-items: flex-start;
  font: 400 14px/1.45 "Inter", sans-serif;
  color: var(--text-primary);
  cursor: pointer;
  margin-bottom: 16px;
}
.chat__consent-check input { margin-top: 3px; }
.chat__consent.is-accepted { display: none; }

/* Contact form consent checkbox */
.contact__form-consent {
  display: flex; gap: 10px; align-items: flex-start;
  font: 400 13px/1.45 "Inter", sans-serif;
  color: var(--text-secondary);
  margin: 8px 0 16px;
  cursor: pointer;
}
.contact__form-consent input { margin-top: 3px; flex-shrink: 0; }
.contact__form-consent a { color: var(--color-primary-light); text-decoration: underline; }

/* System / feedback messages in contact form */
.contact__system {
  font: 400 14px/1.45 "Inter", sans-serif;
  color: var(--text-secondary);
  margin: 12px 0 8px;
  padding: 12px 16px;
  background: rgba(77, 139, 217, 0.08);
  border-left: 2px solid var(--color-primary-light);
  border-radius: 4px;
}
.contact__system--error {
  background: rgba(240, 74, 76, 0.08);
  border-left-color: var(--color-accent);
  color: var(--text-primary);
}

/* Chat hint under contact list (visible left column, v1 layout with form hidden) */
.contact__chat-hint {
  margin-top: 32px;
  padding: 20px 24px;
  border-left: 2px solid var(--color-primary-light);
  background: rgba(77, 139, 217, 0.06);
  color: var(--text-secondary);
  font: 400 14px/1.55 "Inter", sans-serif;
  border-radius: 4px;
}

/* V1 layout: form hidden via is-hidden-v1 → collapse grid and center left column */
.contact:has(> .contact__form.is-hidden-v1) {
  grid-template-columns: 1fr;
}
.contact:has(> .contact__form.is-hidden-v1) .contact__left {
  max-width: 640px;
  margin: 0 auto;
}

/* Footer — 5 columns flex-wrap */
.footer__inner { flex-wrap: wrap; gap: 32px; }
.footer__legal-name,
.footer__legal-inn {
  display: block;
  color: var(--text-secondary);
  font: 400 14px/1.6 "Inter", sans-serif;
}
.footer__legal-inn { color: var(--text-muted); font-size: 13px; }

/* Dogfood line at footer bottom */
.footer__dogfood {
  color: var(--text-muted);
  font: 400 12px/1.4 "Inter", sans-serif;
}
@media (max-width: 1024px) {
  .footer__dogfood { flex-basis: 100%; }
}
