/* ============================================================
   «А в кубе» — дизайн-токены и стили · v2
   Минимализм в духе Apple Store: воздух, крупная типографика,
   чередование подложек. Без «коробок»: плитки изображений,
   открытые сетки, тонкие линейки.
   ============================================================ */

:root {
  /* — цвет: меняется только здесь (или через Tweaks) — */
  --blue: #1d3fbf;
  --blue-ink: color-mix(in oklab, var(--blue), black 18%);
  --blue-soft: color-mix(in oklab, var(--blue) 9%, white);
  --tint: #f5f8ff;
  --bg: #ffffff;
  --ink: #0e1320;
  --muted: #59617a;
  --line: rgba(14, 19, 32, 0.1);

  /* — форма — */
  --r-lg: 24px;
  --shadow-md: 0 2px 6px rgba(14, 19, 32, 0.05), 0 18px 48px rgba(20, 35, 90, 0.1);

  /* — типографика — */
  --font: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* — ритм — */
  --wrap: 1120px;
  --pad: clamp(20px, 5vw, 44px);
  --sec-y: clamp(80px, 12vw, 150px);
}

* { box-sizing: border-box; }

/* ============ Прелоадер ============ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffffff, #f5f8ff);
  transition: opacity 0.45s ease, visibility 0.45s;
}
.loader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-in { text-align: center; }
.loader-in img { height: 54px; margin-inline: auto; }
.loader-cubes { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.loader-cubes i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: #2b4eea;
}
.loader-cubes i:nth-child(2) { background: #5e74e0; }
.loader-cubes i:nth-child(3) { background: #8fa0ef; }
@media (prefers-reduced-motion: no-preference) {
  .loader-in img { animation: loaderPulse 1.4s ease-in-out infinite; }
  .loader-cubes i { animation: loaderHop 1s ease-in-out infinite; }
  .loader-cubes i:nth-child(2) { animation-delay: 0.14s; }
  .loader-cubes i:nth-child(3) { animation-delay: 0.28s; }
}
@keyframes loaderPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes loaderHop {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(-9px); opacity: 1; }
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--blue); text-decoration: none; }

:focus-visible {
  outline: 3px solid color-mix(in oklab, var(--blue) 55%, white);
  outline-offset: 3px;
  border-radius: 6px;
}

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

section { scroll-margin-top: 76px; }

/* ============ Кнопки ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: 980px;
  border: 1px solid transparent;
  font: 500 17px/1 var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease,
    border-color 0.25s ease, transform 0.25s ease;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-ink); }
.btn:active { transform: scale(0.985); }

/* текстовая ссылка-действие, как «Купить ›» у Apple */
.link-act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--blue);
  font-weight: 500;
  font-size: 16px;
}
.link-act::after {
  content: "›";
  font-size: 19px;
  line-height: 1;
  transition: transform 0.25s ease;
}
.link-act:hover::after { transform: translateX(3px); }

/* ============ Шапка ============ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  padding-inline: var(--pad);
  background: color-mix(in srgb, var(--bg) 75%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand img { height: 30px; width: auto; }

/* ===== Marker Nav — скользящий квадрат-маркер (намёк на А³) ===== */
.nav-links { display: flex; align-items: center; gap: 2px; position: relative; }

/* синий квадратик, который скользит к активному пункту */
.nav-marker {
  position: absolute;
  left: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--blue);
  transform: translate(0, -50%) scale(0);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px 8px 20px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.nav-item:hover { color: var(--ink); }
.nav-item.is-active { color: var(--blue); }
.nav-item.is-active .nav-label { font-weight: 600; }

.nav-ic { display: inline-flex; }
.nav-ic svg { width: 16px; height: 16px; }

@media (prefers-reduced-motion: reduce) {
  .nav-marker { transition: none; }
}

.nav .btn { min-height: 40px; padding: 8px 20px; font-size: 15px; }

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ============ Секции: чередование подложек ============ */
.sec { padding-block: var(--sec-y); }
.sec-tint { background: var(--tint); }

.sec-head { max-width: 640px; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head h2 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4.8vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.024em;
  font-weight: 600;
  text-wrap: balance;
}
.sec-head p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
  text-wrap: pretty;
}

/* ============ 1 · Hero ============ */
.hero { padding-block: clamp(120px, 18vh, 210px) clamp(80px, 12vh, 160px); position: relative; overflow: hidden; }
.hero-glow {
  position: absolute;
  inset: auto;
  top: -220px;
  right: -180px;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--blue) 14%, transparent), transparent 65%);
  pointer-events: none;
}
.hero-inner { max-width: 840px; position: relative; }
.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(40px, 7.4vw, 84px);
  line-height: 1.03;
  letter-spacing: -0.032em;
  font-weight: 650;
  text-wrap: balance;
}
.hero .sub {
  margin: 0 auto;
  max-width: 560px;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.5;
  text-wrap: pretty;
}
.hero-cta { margin-top: 38px; display: flex; gap: 14px; }
.hero-logo { display: none; }

/* — сборка заголовка по словам — */
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; }
.hero h1 .w > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .w > span {
    transform: translateY(112%);
    transition: transform 0.9s cubic-bezier(0.16, 0.7, 0.2, 1);
    transition-delay: var(--wd, 0s);
  }
  body.loaded .hero h1 .w > span { transform: none; }
}

/* ============ 2 · Портфолио — плитки без рамок ============ */
#portfolio { overflow-x: clip; } /* дрейф ленты не должен расширять страницу */
.car-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.car-nav { display: flex; gap: 10px; flex: none; padding-bottom: 6px; }
.car-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: color-mix(in oklab, var(--ink) 7%, transparent);
  color: var(--ink);
  font-size: 18px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.car-btn:hover { background: color-mix(in oklab, var(--ink) 13%, transparent); }
.car-btn:disabled { opacity: 0.35; cursor: default; }

.car {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(272px, 31vw, 392px);
  gap: clamp(24px, 3vw, 40px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  /* лента выпускается за контейнер — как ряды в Apple Store */
  padding-inline: max(var(--pad), (100vw - var(--wrap)) / 2 + var(--pad));
  padding-block: 8px 12px;
}
.car::-webkit-scrollbar { display: none; }
.car > * { scroll-snap-align: start; }

.case { display: flex; flex-direction: column; }

/* ====== 3D круговая галерея ====== */
/* насыщенный фон секции, чтобы блок не казался пустым */
#portfolio.sec-tint {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(118% 82% at 50% 48%,
      color-mix(in oklab, var(--blue) 20%, white) 0%,
      color-mix(in oklab, var(--blue) 8%, white) 40%,
      var(--tint) 72%,
      color-mix(in oklab, var(--blue) 6%, var(--tint)) 100%);
}
/* всё содержимое — над декоративным слоем */
#portfolio.sec-tint > * { position: relative; z-index: 1; }
/* концентрические орбиты — эхо круговой галереи и расходящихся ног робота */
#portfolio.sec-tint::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-radial-gradient(circle at 50% 47%,
      color-mix(in oklab, var(--blue) 13%, transparent) 0 1.5px,
      transparent 1.5px 78px);
  -webkit-mask: radial-gradient(62% 64% at 50% 47%, #000 0%, rgba(0, 0, 0, 0.5) 52%, transparent 82%);
          mask: radial-gradient(62% 64% at 50% 47%, #000 0%, rgba(0, 0, 0, 0.5) 52%, transparent 82%);
  opacity: 0.75;
}
/* мягкое синее свечение-подложка прямо под кольцом */
.car3d::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(96vw, 1080px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side,
    color-mix(in oklab, var(--blue) 26%, transparent) 0%,
    color-mix(in oklab, var(--blue) 8%, transparent) 46%,
    transparent 70%);
  filter: blur(6px);
  z-index: 0;
  pointer-events: none;
}
.car3d-stage { z-index: 1; }
/* робот в центре кольца — за карточками */
.car3d-robot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(64vw, 780px);
  height: 100%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.car3d-robot.on { opacity: 1; }
.car3d-robot canvas { width: 100%; height: 100%; display: block; }
.car3d {
  position: relative;
  height: clamp(540px, 70vw, 760px);
  margin-top: clamp(28px, 4vw, 44px);
  perspective: 1900px;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.car3d.dragging { cursor: grabbing; }
.car3d-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}
.car3d .case {
  --cw: clamp(232px, 26vw, 330px);
  position: absolute;
  left: 0;
  top: 0;
  width: var(--cw);
  margin-left: calc(var(--cw) / -2);
  margin-top: calc(var(--cw) * -0.375); /* высота media ≈ ширина·0.75 */
  backface-visibility: visible; /* видим карточки и на дальней стороне кольца */
  will-change: transform, opacity;
  transition: opacity 0.25s linear;
}
.car3d .case-media { transition: box-shadow 0.4s ease; }
.car3d .case.is-front .case-media { box-shadow: var(--shadow-md); }
.car3d .case:hover .case-media { transform: none; } /* лифт не нужен в 3D */

/* мобайл: вместо 3D-кольца — плоская свайп-карусель */
.car3d.is-flat {
  height: auto;
  perspective: none;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  cursor: default;
  touch-action: pan-x; /* было pan-y у .car3d — блокировало горизонтальный свайп */
  margin-top: clamp(20px, 5vw, 32px);
}
.car3d.is-flat::-webkit-scrollbar { display: none; }
.car3d.is-flat::before { display: none; }
.car3d.is-flat .car3d-robot { display: none; }
.car3d.is-flat .car3d-stage {
  position: static;
  transform: none !important;
  width: max-content;
  height: auto;
  display: flex;
  gap: 14px;
  padding-inline: var(--pad);
}
.car3d.is-flat .case {
  position: static;
  transform: none !important;
  opacity: 1 !important;
  width: min(76vw, 320px);
  margin: 0;
  flex: 0 0 auto;
  scroll-snap-align: center;
  pointer-events: auto !important;
}
.car3d.is-flat .case .case-media { box-shadow: var(--shadow-md); }

.case-media {
  aspect-ratio: 4 / 3;
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: repeating-linear-gradient(
    45deg,
    color-mix(in oklab, var(--blue) 7%, white) 0 14px,
    color-mix(in oklab, var(--blue) 3%, white) 14px 28px
  );
  display: grid;
  place-items: center;
  transition: transform 0.4s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.4s ease;
}
.case:hover .case-media { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.case-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.6s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.case:hover .case-media img { transform: scale(1.07); }
.case-media .ph-label {
  z-index: 0;
  font: 12px/1.5 ui-monospace, "SF Mono", Menlo, monospace;
  color: color-mix(in oklab, var(--blue) 60%, var(--muted));
  background: color-mix(in srgb, white 72%, transparent);
  padding: 6px 12px;
  border-radius: 8px;
  max-width: 85%;
  text-align: center;
}

/* текст поверх картинки на градиенте */
.case-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 18px;
  background: linear-gradient(
    to top,
    rgba(14, 19, 32, 0.72) 0%,
    rgba(14, 19, 32, 0.28) 42%,
    rgba(14, 19, 32, 0) 72%
  );
  transition: background 0.4s ease;
}
.case:hover .case-overlay {
  background: linear-gradient(
    to top,
    rgba(14, 19, 32, 0.86) 0%,
    rgba(14, 19, 32, 0.46) 48%,
    rgba(14, 19, 32, 0.04) 82%
  );
}
.case-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: color-mix(in oklab, var(--blue) 88%, transparent);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.case-title {
  margin: 0;
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.014em;
}
/* результат раскрывается по высоте (0fr → 1fr) при наведении */
.case-reveal {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.case-result {
  overflow: hidden;
  margin: 0;
  padding-top: 7px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s ease 0.05s, transform 0.35s ease 0.05s;
}
.case:hover .case-reveal { grid-template-rows: 1fr; }
.case:hover .case-result { opacity: 1; transform: translateY(0); }

/* на тач-экранах результат показываем сразу */
@media (max-width: 760px) {
  .case-reveal { grid-template-rows: 1fr; }
  .case-result { opacity: 1; transform: none; }
}

/* ============ 3 · Почему A³ — sticky-сплит, фокус при скролле ============ */
.why-wrap {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) 1.2fr;
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}
.why-side { position: sticky; top: 120px; }
.why-side .sec-head { margin-bottom: 0; }

.why-list { display: flex; flex-direction: column; }
.why-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px clamp(20px, 2.6vw, 32px);
  align-items: start;
  padding-block: clamp(30px, 4vw, 46px);
  border-top: 1px solid var(--line);
  opacity: 0.32;
  transition: opacity 0.55s ease;
}
.why-row:first-child { border-top: none; padding-top: 6px; }
.why-row.focus, .why-row:hover { opacity: 1; }

.why-icon { color: var(--blue); padding-top: 6px; }
.why-icon svg { width: 32px; height: 32px; }
.why-text h3 {
  margin: 0 0 8px;
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.why-text p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 18px);
  max-width: 460px;
  text-wrap: pretty;
}

/* иконка «дорисовывается» штрихом при появлении */
@media (prefers-reduced-motion: no-preference) {
  .why-icon :is(path, circle, rect)[pathLength] {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.1s ease 0.15s;
  }
  .why-row.seen .why-icon :is(path, circle, rect)[pathLength] { stroke-dashoffset: 0; }
  .why-icon [fill="currentColor"] {
    opacity: 0;
    transition: opacity 0.5s ease 0.85s;
  }
  .why-row.seen .why-icon [fill="currentColor"] { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .why-row { opacity: 1; }
}

@media (max-width: 820px) {
  .why-wrap { grid-template-columns: 1fr; gap: clamp(14px, 3vw, 22px); }
  .why-side { position: static; }
  .why-side .sec-head { margin-bottom: 4px; }
  .why-row { padding-block: 24px; opacity: 1; } /* на мобиле не приглушаем строки */
  /* анимация «дорисовки» иконок ненадёжна на мобиле — показываем сразу */
  .why-icon :is(path, circle, rect)[pathLength] { stroke-dashoffset: 0; }
  .why-icon [fill="currentColor"] { opacity: 1; }
}
@media (max-width: 560px) {
  .why-row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding-block: 22px;
  }
  .why-icon { padding-top: 0; }
  .why-icon svg { width: 28px; height: 28px; }
}

/* ============ 4 · Цены — stacking-карты (колода при скролле) ============ */
/* мягкие синие блобы для глубины; overflow НЕ скрываем — иначе sticky сломается */
#pricing.sec-tint {
  position: relative;
  background:
    radial-gradient(42% 52% at 16% 18%, color-mix(in oklab, var(--blue) 18%, white) 0%, transparent 68%),
    radial-gradient(46% 56% at 86% 84%, color-mix(in oklab, var(--blue) 14%, white) 0%, transparent 70%),
    var(--tint);
}

.plans-stack {
  margin-top: clamp(28px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.8vw, 22px);
  padding-bottom: clamp(40px, 9vh, 110px);
}
.stack-card {
  position: sticky;
  top: calc(96px + var(--i) * 22px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(20px, 4vw, 64px);
  align-items: center;
  padding: clamp(26px, 3.4vw, 46px);
  border-radius: 24px;
  background: #fff;
  border: 1px solid color-mix(in oklab, var(--blue) 12%, white);
  box-shadow: 0 18px 50px rgba(20, 35, 90, 0.12);
}
.sc-left { min-width: 0; }
.sc-top { display: flex; align-items: center; gap: 13px; margin-bottom: 14px; }
.sc-index {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.sc-ic {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: color-mix(in oklab, var(--blue) 9%, white);
  border-radius: 11px;
}
.sc-ic svg { width: 20px; height: 20px; }
.sc-badge {
  margin-left: auto;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue);
  border-radius: 999px;
}
.sc-name {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
}
.sc-result {
  margin: 0 0 16px;
  font-size: clamp(14px, 1.4vw, 16px);
  color: var(--muted);
}
.sc-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.sc-points li {
  position: relative;
  padding-left: 17px;
  font-size: 14px;
  color: color-mix(in oklab, var(--ink) 80%, white);
}
.sc-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}
.sc-right {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  text-align: right;
}
.sc-from { margin: 0; display: flex; flex-direction: column; gap: 3px; line-height: 1; }
.sc-from span { font-size: 12px; color: var(--muted); }
.sc-from b {
  font-size: clamp(26px, 3.2vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--blue-ink);
  white-space: nowrap;
}
.sc-cta {
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 8px 20px rgba(29, 63, 191, 0.3);
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.sc-cta:hover { background: var(--blue-ink); transform: translateY(-2px); }

/* выделенная услуга — карта залита синим */
.stack-card.is-featured {
  background: var(--blue);
  border-color: var(--blue-ink);
  box-shadow: 0 22px 54px rgba(20, 35, 90, 0.28);
}
.stack-card.is-featured .sc-index { color: #fff; }
.stack-card.is-featured .sc-ic { background: rgba(255, 255, 255, 0.16); color: #fff; }
.stack-card.is-featured .sc-name { color: #fff; }
.stack-card.is-featured .sc-result { color: rgba(255, 255, 255, 0.82); }
.stack-card.is-featured .sc-points li { color: rgba(255, 255, 255, 0.9); }
.stack-card.is-featured .sc-points li::before { background: #fff; }
.stack-card.is-featured .sc-badge { background: #fff; color: var(--blue-ink); }
.stack-card.is-featured .sc-from span { color: rgba(255, 255, 255, 0.75); }
.stack-card.is-featured .sc-from b { color: #fff; }
.stack-card.is-featured .sc-cta { background: #fff; color: var(--blue-ink); }
.stack-card.is-featured .sc-cta:hover { background: #eef3ff; }

/* подсветка при переходе из hero-чипа */
@keyframes stack-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--blue) 45%, transparent), 0 18px 50px rgba(20, 35, 90, 0.12); }
  100% { box-shadow: 0 0 0 18px transparent, 0 18px 50px rgba(20, 35, 90, 0.12); }
}
.stack-card.pulse { animation: stack-pulse 0.9s ease-out; }

/* мобильные: без наезда — обычный поток, цена под контентом */
@media (max-width: 680px) {
  .stack-card {
    position: static;
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .sc-right {
    align-items: stretch;
    text-align: left;
    flex-direction: row;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 18px;
  }
  .stack-card.is-featured .sc-right { border-top-color: rgba(255, 255, 255, 0.25); }
  .sc-cta { align-self: center; }
}
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 1.8vw, 24px);
  margin-top: clamp(28px, 4vw, 44px);
}
@media (max-width: 900px) { .plans { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.4vw, 30px);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.5));
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 18px 40px rgba(20, 35, 90, 0.1);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.6, 0.2, 1), box-shadow 0.35s ease;
}
/* верхний блик стекла */
.plan-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 130px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.plan-card > * { position: relative; }
.plan-card:hover {
  transform: translateY(-6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 28px 58px rgba(20, 35, 90, 0.17);
}
.plan-ic {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 6px 16px rgba(20, 35, 90, 0.1);
  margin-bottom: 16px;
}
.plan-name {
  margin: 0 0 4px;
  font-size: clamp(18px, 1.5vw, 21px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.plan-result {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}
.plan-ul {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.plan-ul li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  line-height: 1.45;
  color: color-mix(in oklab, var(--ink) 82%, white);
}
.plan-ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background:
    color-mix(in oklab, var(--blue) 14%, white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%231d3fbf' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.5L19 7'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}
.plan-foot {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.plan-from {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}
.plan-from span {
  font-size: 12px;
  color: var(--muted);
}
.plan-from b {
  font-size: clamp(18px, 1.7vw, 22px);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--blue-ink);
}
.plan-cta {
  flex: none;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 6px 16px rgba(29, 63, 191, 0.28);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.plan-cta:hover { background: var(--blue-ink); transform: translateY(-1px); box-shadow: 0 9px 22px rgba(29, 63, 191, 0.34); }

/* выделенная услуга — карточка, залитая синим */
.plan-card.is-featured {
  background: linear-gradient(180deg, color-mix(in oklab, var(--blue) 90%, transparent), color-mix(in oklab, var(--blue) 74%, transparent));
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 24px 52px rgba(20, 35, 90, 0.3);
}
.plan-card.is-featured::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)); }
.plan-card.is-featured:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 32px 66px rgba(20, 35, 90, 0.36); }
.plan-card.is-featured .plan-name { color: #fff; }
.plan-card.is-featured .plan-result { color: rgba(255, 255, 255, 0.82); }
.plan-card.is-featured .plan-ul li { color: rgba(255, 255, 255, 0.92); }
.plan-card.is-featured .plan-ul li::before {
  background-color: rgba(255, 255, 255, 0.18);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.2 4.5L19 7'/%3E%3C/svg%3E");
}
.plan-card.is-featured .plan-ic {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.plan-card.is-featured .plan-foot { border-top-color: rgba(255, 255, 255, 0.22); }
.plan-card.is-featured .plan-from span { color: rgba(255, 255, 255, 0.75); }
.plan-card.is-featured .plan-from b { color: #fff; }
.plan-card.is-featured .plan-cta {
  background: #fff;
  color: var(--blue-ink);
  box-shadow: 0 6px 16px rgba(10, 20, 60, 0.18);
}
.plan-card.is-featured .plan-cta:hover { background: #eef3ff; }

/* бейдж «популярно» */
.plan-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* подсветка карточки при переходе из hero-чипа */
@keyframes plan-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--blue) 45%, transparent); }
  100% { box-shadow: 0 0 0 16px transparent; }
}
.plan-card.pulse {
  animation: plan-pulse 0.9s ease-out;
  border-color: var(--blue);
}

/* ============ (старый интерактивный список услуг — не используется) ============ */
.svc {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 1.2fr;
  gap: clamp(36px, 6vw, 88px);
  align-items: start;
}

/* — слева: список услуг со скользящим индикатором — */
.svc-list {
  position: relative;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
}
.svc-ind {
  position: absolute;
  left: -1.5px;
  top: 0;
  width: 2.5px;
  height: 48px;
  border-radius: 3px;
  background: var(--blue);
  transition: transform 0.5s cubic-bezier(0.3, 0.8, 0.3, 1), height 0.5s cubic-bezier(0.3, 0.8, 0.3, 1);
  will-change: transform;
}
.svc-name {
  appearance: none;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: clamp(12px, 1.6vw, 18px) 0 clamp(12px, 1.6vw, 18px) clamp(20px, 3vw, 34px);
  font-family: var(--font);
  font-size: clamp(22px, 2.8vw, 32px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: color-mix(in oklab, var(--muted) 62%, transparent);
  transition: color 0.35s ease, transform 0.35s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.svc-name .ix {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: color-mix(in oklab, var(--blue) 55%, transparent);
  transition: color 0.35s ease;
}
.svc-name:hover { color: var(--muted); }
.svc-name[aria-selected="true"] { color: var(--ink); transform: translateX(6px); }
.svc-name[aria-selected="true"] .ix { color: var(--blue); }

/* — справа: панель выбранной услуги — */
.svc-panel { padding-top: clamp(4px, 1vw, 14px); min-height: 300px; }
.svc-panel-title {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}
.svc-ul { margin: 0 0 26px; padding: 0; list-style: none; display: grid; gap: 13px; }
.svc-ul li {
  position: relative;
  padding-left: 30px;
  color: var(--ink);
  font-size: clamp(16px, 1.8vw, 18.5px);
  line-height: 1.5;
}
.svc-ul li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 14px;
  height: 1.5px;
  border-radius: 2px;
  background: color-mix(in oklab, var(--blue) 70%, white);
}
.svc-meta { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.plan-price { font-size: 15px; font-weight: 500; color: var(--muted); margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .svc-ul li, .svc-panel .svc-meta, .svc-panel-title {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.2, 0.6, 0.2, 1);
    transition-delay: var(--i, 0s);
  }
  .svc-panel.show :is(.svc-ul li, .svc-meta, .svc-panel-title) {
    opacity: 1;
    transform: none;
  }
}

/* — мобайл: аккордеон вместо двух колонок — */
.svc-points { display: none; }
@media (max-width: 760px) {
  .svc { grid-template-columns: 1fr; }
  .svc-panel { display: none; }
  .svc-name { font-size: 21px; width: 100%; }
  .svc-points {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s cubic-bezier(0.3, 0.8, 0.3, 1);
  }
  .svc-item.open .svc-points { grid-template-rows: 1fr; }
  .svc-points-in { min-height: 0; overflow: hidden; }
  .svc-points .svc-ul { margin: 6px 0 18px; padding-left: 20px; }
  .svc-points .svc-meta { padding: 0 0 22px 20px; }
  .svc-points :is(.svc-ul li, .svc-meta) { opacity: 1; transform: none; }
}

@media (max-width: 720px) and (min-width: 0px) {
  .plan-side { flex-direction: row; align-items: center; gap: 20px; }
}

/* ============ 5 · Контакты ============ */
.contact-panel {
  background: linear-gradient(160deg, color-mix(in oklab, var(--blue), white 6%), var(--blue-ink), color-mix(in oklab, var(--blue), white 2%));
  background-size: 180% 180%;
  color: #fff;
  border-radius: clamp(24px, 4vw, 36px);
  padding: clamp(48px, 8vw, 100px) clamp(28px, 6vw, 96px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact-panel::before {
  content: "";
  position: absolute;
  top: -180px;
  right: -120px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.13), transparent 65%);
  pointer-events: none;
}
.contact-panel > * { position: relative; }
@media (prefers-reduced-motion: no-preference) {
  body.fx .contact-panel { animation: panelDrift 16s ease-in-out infinite alternate; }
  @keyframes panelDrift {
    from { background-position: 0% 0%; }
    to { background-position: 100% 100%; }
  }
  .reveal.reveal-scale { transform: scale(0.96) translateY(18px); }
  .reveal.reveal-scale.in { transform: none; }
}
.contact-panel h2 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.8vw, 54px);
  line-height: 1.07;
  letter-spacing: -0.024em;
  font-weight: 650;
  text-wrap: balance;
}
.contact-panel p {
  margin: 0 auto;
  max-width: 480px;
  font-size: clamp(17px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.78);
  text-wrap: pretty;
}
.contact-cta {
  margin-top: 38px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-white { background: #fff; color: var(--blue); }
.btn-white:hover { background: #eef2ff; }
.btn-ghost-white {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
}
.btn-ghost-white:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.7); }

/* ============ Футер ============ */
.footer { padding: 44px 0 56px; }
.footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.footer .brand img { height: 24px; }
.footer .brand { font-size: 15px; }
.footer-meta { color: var(--muted); font-size: 13.5px; display: flex; gap: 18px; flex-wrap: wrap; }
.footer-meta a { color: var(--muted); }
.footer-meta a:hover { color: var(--ink); }

/* ============ Появление при скролле ============ */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
    transition-delay: var(--d, 0s);
  }
  .reveal.in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .case:hover .case-media { transform: none; }
  .case:hover .case-media img { transform: none; }
  .case-reveal { grid-template-rows: 1fr; }
  .case-result { opacity: 1; transform: none; }
  body.fx .car { translate: none !important; }
}

/* ============================================================
   Варианты страницы (Tweaks → body[data-variant])
   a · Классика — заголовки и hero по центру
   b · Асимметрия — крупнее и влево
   c · Витрина — hero на голубой подложке с логотипом
   ============================================================ */

/* — a · Классика — */
body[data-variant="a"] .hero { text-align: center; }
body[data-variant="a"] .hero-inner { margin-inline: auto; }
body[data-variant="a"] .hero-cta { justify-content: center; }
body[data-variant="a"] .sec-head { margin-inline: auto; text-align: center; }
body[data-variant="a"] .car-head { flex-direction: column; align-items: center; }
body[data-variant="a"] .why-side .sec-head,
body[data-variant="c"] .why-side .sec-head { margin-inline: 0; text-align: left; }

/* — b · Асимметрия — */
body[data-variant="b"] .hero h1 { font-size: clamp(42px, 8.6vw, 100px); }
body[data-variant="b"] .hero .sub { margin-inline: 0; }

/* — c · Витрина — */
body[data-variant="c"] .hero {
  background: var(--tint);
  text-align: center;
  padding-top: clamp(110px, 15vh, 180px);
}
body[data-variant="c"] .hero-inner { margin-inline: auto; }
body[data-variant="c"] .hero-cta { justify-content: center; }
body[data-variant="c"] .hero-logo {
  display: block;
  width: clamp(96px, 14vw, 150px);
  margin: 0 auto 32px;
  filter: drop-shadow(0 18px 40px rgba(29, 63, 191, 0.25));
}
body[data-variant="c"] .hero .accent {
  background: linear-gradient(95deg, var(--blue), color-mix(in oklab, var(--blue) 45%, #7fd1ff));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
body[data-variant="c"] .sec-head { margin-inline: auto; text-align: center; }
body[data-variant="c"] .car-head { flex-direction: column; align-items: center; }
body[data-variant="c"] #portfolio { background: var(--bg); }
body[data-variant="c"] #why { background: var(--tint); }
body[data-variant="c"] #pricing { background: var(--bg); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero-cta .btn { width: 100%; }
  .contact-cta .btn { width: 100%; }
}

/* ============================================================
   Hero · светлый вариант с 3D-роботом (класс оставлен как hero--dark,
   чтобы не трогать разметку; визуально — светлый)
   ============================================================ */
.hero--dark {
  min-height: clamp(560px, 92vh, 980px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(900px 620px at 24% 58%, color-mix(in oklab, var(--blue) 10%, transparent), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f7faff 60%, var(--tint) 100%);
}
.hero--dark .hero-glow {
  background: radial-gradient(circle, color-mix(in oklab, var(--blue) 12%, transparent), transparent 65%);
}

/* слой 3D-сцены: за текстом; загрузку маскирует прелоадер, поэтому
   проявление короткое — робот виден сразу, как только оверлей ушёл */
.hero-3d {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.hero-3d.on { opacity: 1; }

/* лёгкая вуаль: сверху воздух, снизу плавный переход в секцию портфолио */
.hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0) 26%,
    rgba(255, 255, 255, 0) 70%,
    rgba(245, 248, 255, 0.9) 100%);
}

/* текст поверх; мышь проходит сквозь него к роботу (кроме ссылок) */
.hero--dark .hero-inner { z-index: 2; pointer-events: none; }
.hero--dark .hero-inner a { pointer-events: auto; }

/* ============ Hero · декоративный фон позади робота ============ */
/* точечная сетка, тает к краям */
.hero--dark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(color-mix(in oklab, var(--blue) 22%, transparent) 1px, transparent 1.6px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(1000px 640px at 32% 50%, black 30%, transparent 78%);
  mask-image: radial-gradient(1000px 640px at 32% 50%, black 30%, transparent 78%);
  pointer-events: none;
}
/* медленно плывущее голубое сияние слева снизу */
.hero--dark::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 760px;
  height: 760px;
  left: -240px;
  bottom: -300px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in oklab, var(--blue) 16%, transparent), transparent 62%);
  filter: blur(42px);
  animation: heroDrift 16s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes heroDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(110px, -70px, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero--dark::after { animation: none; }
}
/* слои поверх фона: сцена → вуаль → текст */
.hero--dark .hero-3d   { z-index: 1; }
.hero--dark .hero-shade{ z-index: 2; }
.hero--dark .hero-inner{ z-index: 3; }

/* ============ Hero · робот слева, текст справа (где есть 3D) ============ */
@media (min-width: 761px) {
  body[data-variant="a"] .hero--dark { text-align: left; }
  .hero--dark .hero-inner > * { max-width: 560px; margin-left: 50%; }
  body[data-variant="a"] .hero--dark .hero-cta { justify-content: flex-start; }
}

/* заголовок длиннее прежнего — типографика компактнее и колонка шире,
   чтобы чипы и кнопка оставались в первом экране */
.hero--dark .hero-inner { max-width: var(--wrap); width: 100%; }
.hero--dark h1 { font-size: clamp(32px, 4vw, 52px); line-height: 1.08; }
.hero--dark .sub { font-size: clamp(17px, 1.9vw, 20px); }

/* акцентные слова заголовка hero — фирменный синий */
.hero .accent { color: var(--blue); }

/* ============ Hero · услуги-бруски (их «приносит» робот) ============
   3D-брусок: лицевая грань со словом + боковая и верхняя грани.
   Цвет бруска = цвет кубика, который кинул робот (missileColors). */
.hero-chips {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
}
/* hero-inner глушит мышь — зоне чипов и самим чипам она нужна */
.hero--dark .hero-inner .hero-chips,
.hero--dark .hero-inner .chip { pointer-events: auto; }

/* стеклянная пилюля направления */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 18px 0 13px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--blue) 16%, white);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.64));
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  color: var(--ink);
  font: 600 14px/1 var(--font);
  letter-spacing: 0.1px;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 10px 26px rgba(20, 35, 90, 0.1);
  transition: transform 0.45s cubic-bezier(0.2, 0.6, 0.2, 1), opacity 0.4s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* фирменный кубик — пилюли «собираются» в него, наведение раскрывает обратно */
.hero-cube {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%) scale(0.72);
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
}
.cube-on .hero-cube {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
/* пока показан кубик, чипы всегда скрыты: класс сильнее inline-стилей и
   анимаций появления (fill: both), которые иначе «воскрешают» чипы при
   возврате к секции после скролла */
.hero-chips.cube-on .chip {
  animation: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.hero-cube-box {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, color-mix(in oklab, var(--blue) 16%, white), color-mix(in oklab, var(--blue) 78%, white));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 14px 30px rgba(20, 35, 90, 0.22);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-cube:hover .hero-cube-box {
  transform: translateY(-3px) rotate(-3deg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 20px 40px rgba(20, 35, 90, 0.28);
}
.hero-cube-box img { width: 34px; height: 34px; object-fit: contain; }
.hero-cube-cap {
  font: 600 15px/1.1 var(--font);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.chip:hover {
  transform: translateY(-3px);
  border-color: color-mix(in oklab, var(--blue) 36%, white);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 16px 34px rgba(20, 35, 90, 0.16);
}
.chip:active { transform: translateY(-1px); }
.chip:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

.chip-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--blue);
  background: color-mix(in oklab, var(--blue) 12%, white);
}
.chip-ic svg { width: 17px; height: 17px; }

@media (prefers-reduced-motion: no-preference) {
  .chip { opacity: 0; transform: translateY(14px) scale(0.96); }
  /* запасной каскад — если 3D-робот не загрузился */
  .hero-chips.in .chip {
    animation: chipIn 0.55s cubic-bezier(0.2, 0.6, 0.2, 1) both;
    animation-delay: var(--cd, 0s);
  }
  .chip.show { opacity: 1; transform: none; }
  .chip.show:hover { transform: translateY(-3px); }
  /* вспышка у уже видимой пилюли (idle-подброс кубика) */
  .chip.flash { animation: chipFlash 0.7s ease-out; }
  /* «кубик стал пилюлей»: отскок + вспышка */
  .chip.pop { animation: chipPop 0.6s cubic-bezier(0.2, 0.7, 0.3, 1.2) both; }
}
@keyframes chipIn {
  to { opacity: 1; transform: none; }
}
@keyframes chipPop {
  0% { opacity: 0; transform: scale(0.4); }
  62% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: none; }
}
@keyframes chipFlash {
  from { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 0 0 0 rgba(29, 63, 191, 0.5); }
  to { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 0 0 16px rgba(29, 63, 191, 0); }
}

@media (max-width: 760px) {
  .hero-chips { margin-top: 26px; gap: 12px 14px; justify-content: center; }
  .chip { height: 40px; font-size: 13px; padding: 0 16px 0 11px; }
  .chip-ic { width: 24px; height: 24px; }
  .chip-ic svg { width: 16px; height: 16px; }
}

/* мобильные элементы hero (mobile-premium.css показывает их на <760px) */
.hero-btn-secondary { display: none; }

/* искры-кубики при прилёте кубика, брошенного роботом по клику */
.a3burst {
  position: fixed; z-index: 90;
  width: var(--s, 7px); height: var(--s, 7px);
  margin: calc(var(--s, 7px) / -2) 0 0 calc(var(--s, 7px) / -2);
  border-radius: 2px;
  background: linear-gradient(155deg, color-mix(in oklab, var(--blue) 40%, white), var(--blue));
  pointer-events: none;
  animation: a3burst-fly 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes a3burst-fly {
  from { opacity: 1; translate: 0 0; rotate: 0deg; scale: 1; }
  to { opacity: 0; translate: var(--dx, 30px) var(--dy, -30px); rotate: var(--rot, 90deg); scale: 0.35; }
}

/* ============ Модалка проекта ============ */
.case { cursor: pointer; }
.case-modal {
  position: fixed; inset: 0; z-index: 95;
  display: grid; place-items: center;
  padding: 20px;
  background: rgba(10, 14, 34, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.case-modal.open { opacity: 1; }
.cm-card {
  width: min(520px, 100%);
  max-height: min(86vh, 720px);
  overflow-y: auto;
  background: var(--bg);
  border-radius: 28px;
  box-shadow: 0 40px 90px rgba(4, 9, 34, 0.5);
  position: relative;
  transform: translateY(18px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.case-modal.open .cm-card { transform: none; }
.cm-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink); font-size: 22px; line-height: 1;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 4px 14px rgba(14, 19, 32, 0.18);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.cm-close:hover { transform: rotate(90deg); background: #fff; }
.cm-media {
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(80% 90% at 25% 20%, color-mix(in oklab, var(--blue) 26%, white), transparent 70%),
    linear-gradient(160deg, color-mix(in oklab, var(--blue) 12%, white), color-mix(in oklab, var(--blue) 42%, white));
  border-radius: 28px 28px 0 0;
  overflow: hidden;
}
.cm-media img { width: 100%; height: 100%; object-fit: cover; }
.cm-body { padding: 22px 26px 26px; }
.cm-body .case-tag { position: static; display: inline-block; margin-bottom: 12px; }
.cm-title {
  margin: 0 0 10px;
  font-size: clamp(21px, 3vw, 26px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.cm-desc { margin: 0 0 14px; color: var(--muted); font-size: 15.5px; line-height: 1.55; }
.cm-result {
  margin: 0 0 22px;
  font-weight: 600;
  color: var(--blue);
  font-size: 15.5px;
}
.cm-result::before { content: "→ "; }
.cm-cta { width: 100%; }
@media (prefers-reduced-motion: reduce) {
  .case-modal, .cm-card { transition: none; }
}
