/* ==========================================================================
   CKAIbiz — redesign / стили
   --------------------------------------------------------------------------
   Оглавление:
    1. Переменные темы (:root)
    2. Базовый сброс, типографика, зерно
    3. Утилиты: container, кнопки, ссылки, sec-label
    4. Шапка, навигация, мобильное меню
    5. Hero: видео, заголовок, бегущая строка
    6. 3D-плитка логотипа (cube)
    7. Манифест (statement)
    8. 01 Направления (rows)
    9. 02 Задачи (tasks)
   10. 03 Процесс (steps)
   11. 04 Приватность (privacy) + блюпринт-схема
   12. 05 Кейсы (slots)
   13. 06 Контакт
   14. Футер
   15. Scroll-анимации (reveal)
   16. Адаптив
   17. prefers-reduced-motion
   --------------------------------------------------------------------------
   Сменить акцентный цвет: --accent в :root.
   ========================================================================== */

/* ============ 1. ПЕРЕМЕННЫЕ ============ */
:root {
  /* Палитра: тёплая бумага + графит + глубокий teal */
  --paper: #f6f4ef;          /* фон-«бумага» */
  --paper-deep: #edeae1;     /* приглушённая бумага (подложки) */
  --ink: #191c1b;            /* графитовый текст */
  --ink-soft: #5c615e;       /* вторичный текст */
  --line: rgba(25, 28, 27, 0.14);       /* тонкие линии */
  --line-strong: rgba(25, 28, 27, 0.32);
  --accent: #1c6462;         /* глубокий teal */
  --accent-deep: #124745;    /* teal темнее (ховеры) */
  --accent-soft: rgba(28, 100, 98, 0.09); /* teal-налёт для подложек */
  --dark: #0e1c1b;           /* тёмная поверхность (приватность, футер) */
  --on-dark: #eef0ea;        /* текст на тёмном */
  --on-dark-soft: rgba(238, 240, 234, 0.62);
  --mint: #79c6bf;           /* светлый teal для акцентов на тёмном */

  /* Шрифты */
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Геометрия */
  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4.5vw, 3rem);
  --radius: 16px;
  --radius-lg: 28px;

  /* Движение */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);

  /* Слои */
  --z-header: 100;
  --z-menu: 90;
  --z-grain: 80;
}

/* ============ 2. БАЗА ============ */
*,
*::before,
*::after { box-sizing: border-box; }

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

html, body { overflow-x: clip; } /* страховка от горизонтального скролла */

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Лёгкое «зерно» поверх всей страницы — снимает цифровую плоскость.
   Это inline-SVG (data:), внешних запросов нет. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.30;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.05'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
em { font-style: normal; }

::selection { background: var(--accent); color: var(--paper); }

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

/* Ссылка «к содержимому» — видна только при фокусе с клавиатуры */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  font-family: var(--font-head);
  font-size: 0.9rem;
  transform: translateY(-300%);
}
.skip-link:focus { transform: none; }

/* ============ 3. УТИЛИТЫ ============ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Тех.подпись секции: 01 — Направления */
.sec-label {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}
.sec-label__num { color: var(--accent); }
.sec-label::after {
  content: "";
  flex: 0 0 44px;
  height: 1px;
  background: var(--line-strong);
  order: 1;
}
.sec-label__name { order: 2; }
.sec-label__num { order: 0; }
.sec-label--center { justify-content: center; }
.sec-label--dark { color: var(--on-dark-soft); }
.sec-label--dark .sec-label__num { color: var(--mint); }
.sec-label--dark::after { background: rgba(238, 240, 234, 0.3); }

.sec-title {
  font-size: clamp(2rem, 4.6vw, 3.3rem);
  max-width: 16em;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.sec-title--dark { color: var(--on-dark); margin-bottom: 1.4rem; }

/* Кнопки */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.01em;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out),
    transform 0.3s var(--ease-out), translate 0.45s var(--ease-out);
  will-change: transform;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--accent);
  color: var(--paper);
  box-shadow: 0 14px 30px -18px rgba(18, 71, 69, 0.75);
}
.btn--primary:hover {
  background: var(--accent-deep);
  box-shadow: 0 18px 36px -18px rgba(18, 71, 69, 0.9);
}

.btn--small { padding: 0.6rem 1.25rem; font-size: 0.92rem; border-color: var(--line-strong); }
.btn--small:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.btn--big { padding: 1.15rem 2.6rem; font-size: 1.1rem; }

/* Ссылка со стрелкой */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-head);
  font-weight: 500;
  color: var(--ink);
  padding-block: 0.4rem;
}
.link-arrow svg {
  width: 15px;
  height: 15px;
  transition: transform 0.3s var(--ease-out);
}
.link-arrow:hover svg { transform: translateX(5px); }
.link-arrow:hover { color: var(--accent); }

/* ============ 4. ШАПКА ============ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  transition: background-color 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft);
}
.header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

.header__progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

.header__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
}
/* Бейдж-плитка: обрезаем прозрачные поля исходного logo.png */
.brand__badge {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
}
.brand__badge img {
  position: absolute;
  width: 174%;
  height: 174%;
  left: -37%;
  top: -37%;
  max-width: none;
}

.nav {
  display: none;
  gap: 1.9rem;
  margin-left: auto;
}
.nav__link {
  position: relative;
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding-block: 0.3rem;
  transition: color 0.25s var(--ease-soft);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease-out);
}
.nav__link:hover,
.nav__link.is-active { color: var(--ink); }
.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.header__cta { display: none; }

/* Бургер */
.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-left: auto;
  background: transparent;
  border: none;
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform 0.35s var(--ease-out);
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }

/* Мобильное меню — полноэкранная панель */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  padding: 90px var(--gutter) 40px;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-soft), visibility 0.4s var(--ease-soft);
}
.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
}
.mobile-menu a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.7rem, 7vw, 2.4rem);
  letter-spacing: -0.02em;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
  transition-delay: calc(var(--mi, 0) * 60ms);
}
.mobile-menu.is-open a {
  opacity: 1;
  transform: none;
}
.mobile-menu__num {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--accent);
}
.mobile-menu__contact { color: var(--accent); border-bottom: none; }

/* ============ 5. HERO ============ */
/* Контент и футер стоят выше фонового куба (z-index:1) — текст всегда читается */
main { position: relative; z-index: 2; }
.footer { position: relative; z-index: 2; }

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: clip;
}

/* Видео-блюпринт: во всю правую часть, края растворяются масками.
   mix-blend-mode: multiply «вплавляет» светлый кадр в бумагу — рамки не видно.
   Если поменяешь видео на тёмное — просто удали строку с mix-blend-mode. */
.hero__media {
  position: absolute;
  z-index: 0;
  top: 50%;
  right: -14vw;
  width: clamp(760px, 68vw, 1300px);
  transform: translateY(-50%);
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.9;
  -webkit-mask-image: radial-gradient(ellipse 58% 60% at 50% 50%, #000 18%, rgba(0, 0, 0, 0.45) 58%, transparent 90%);
  mask-image: radial-gradient(ellipse 58% 60% at 50% 50%, #000 18%, rgba(0, 0, 0, 0.45) 58%, transparent 90%);
}
.hero__media video { width: 100%; height: auto; }

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 120px var(--gutter) 140px;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: clamp(1.8rem, 4vh, 3rem);
}
.hero__eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.6s var(--ease-soft) infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(28, 100, 98, 0.35); }
  50% { box-shadow: 0 0 0 7px rgba(28, 100, 98, 0); }
}

.hero__title {
  font-size: clamp(2.9rem, 7.6vw, 6.3rem);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.04em;
  max-width: 11em;
}

/* Заголовок появляется построчно из «маски» */
.line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line__inner {
  display: inline-block;
  will-change: transform;
}
.js .line__inner {
  transform: translateY(115%);
  transition: transform 1s var(--ease-out);
}
.js .hero.is-loaded .line:nth-child(1) .line__inner { transform: none; transition-delay: 0.15s; }
.js .hero.is-loaded .line:nth-child(2) .line__inner { transform: none; transition-delay: 0.28s; }

/* Слово-акцент: контурные буквы цветом teal */
.outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
}
@supports not (-webkit-text-stroke: 2px black) {
  .outline { color: var(--accent); }
}

.hero__lead {
  max-width: 34em;
  margin-top: clamp(1.6rem, 3.5vh, 2.4rem);
  font-size: clamp(1.05rem, 1.25vw, 1.25rem);
  color: var(--ink-soft);
}
.js .hero__lead,
.js .hero__actions,
.js .hero__eyebrow {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.js .hero.is-loaded .hero__eyebrow { opacity: 1; transform: none; transition-delay: 0.05s; }
.js .hero.is-loaded .hero__lead { opacity: 1; transform: none; transition-delay: 0.45s; }
.js .hero.is-loaded .hero__actions { opacity: 1; transform: none; transition-delay: 0.6s; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem 2rem;
  margin-top: clamp(2rem, 4.5vh, 3rem);
}

/* Бегущая строка внизу hero */
.ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding-block: 0.9rem;
  overflow: hidden;
  background: color-mix(in srgb, var(--paper) 55%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: ticker 30s linear infinite;
  will-change: transform;
}
.ticker__group {
  display: flex;
  align-items: center;
  gap: 2.6rem;
  padding-right: 2.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}
.ticker__group i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ============ 6. 3D-ПЛИТКА ЛОГОТИПА (ФОНОВЫЙ СЛОЙ СЛЕВА) ============ */
/* Настоящий объём: 8 слоёв, сдвинутых по оси Z за лицевую грань.
   Живёт фиксированным слоем у ЛЕВОГО края, ПОЗАДИ текста (main выше по z-index).
   На hero скрыт; появляется со 2-й секции (fade+scale) и едет вниз со скроллом.
   Слои движения разведены, чтобы не конфликтовать:
     .cube        — появление (opacity + scale)
     .cube__drift — параллакс-дрейф по вертикали (transform: translateY, ставит JS)
     .cube__tilt  — наклон к курсору (transform, JS) + парение (translate, CSS-анимация) */
.cube {
  --size: clamp(150px, 15vw, 240px);
  position: fixed;
  z-index: 1;                 /* ниже контента main (z-index:2) — не перекрывает текст */
  top: 38vh;
  left: clamp(8px, 2.5vw, 72px);
  width: var(--size);
  height: var(--size);
  perspective: 1200px;
  pointer-events: none;
  display: none;              /* показываем от 900px — см. адаптив */
  opacity: 0;
  transform: scale(0.78);
  transform-origin: left center;
  transition: opacity 0.9s var(--ease-out), transform 1.1s var(--ease-out);
}
.cube.is-visible {
  opacity: 0.5;
  transform: scale(1);
}

/* Параллакс-обёртка: JS двигает её по вертикали по мере прокрутки */
.cube__drift {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}

.cube__tilt {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateX(9deg) rotateY(-21deg); /* базовый разворот — грань всегда читается */
  animation: cube-float 7s ease-in-out infinite;
  will-change: transform;
}
@keyframes cube-float {
  0%, 100% { translate: 0 -10px; }
  50% { translate: 0 10px; }
}

.cube__slab {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

/* Слои толщины: чем глубже — тем темнее, читается настоящий торец */
.cube__layer {
  position: absolute;
  inset: 0;
  border-radius: 22%;
  background: color-mix(in srgb, #14171a calc(100% - var(--i) * 5%), #3c4248);
  transform: translateZ(calc(var(--i) * -6px));
}

/* Лицевая грань — логотип. Картинка растянута, чтобы обрезать прозрачные поля файла. */
.cube__face {
  position: absolute;
  inset: 0;
  border-radius: 22%;
  overflow: hidden;
  transform: translateZ(0.1px);
  background: #f2f0ea;
}
.cube__face img {
  position: absolute;
  width: 174%;
  height: 174%;
  left: -37%;
  top: -37%;
  max-width: none;
  animation: glitch 7s steps(1) infinite;
  will-change: transform, clip-path;
}

/* Редкий короткий cyber-глитч: хроматический сдвиг + срез полосы */
@keyframes glitch {
  0%, 87%, 100% {
    transform: none;
    filter: none;
    clip-path: none;
  }
  88% {
    transform: translate(2px, -2px);
    filter: drop-shadow(-3px 0 rgba(255, 45, 95, 0.6)) drop-shadow(3px 0 rgba(0, 225, 255, 0.6));
  }
  89.2% {
    transform: translate(-2px, 1px);
    clip-path: inset(12% 0 64% 0);
    filter: drop-shadow(3px 0 rgba(255, 45, 95, 0.6)) drop-shadow(-3px 0 rgba(0, 225, 255, 0.6));
  }
  90.4% {
    transform: translate(1px, 0);
    clip-path: inset(58% 0 8% 0);
    filter: drop-shadow(-2px 0 rgba(0, 225, 255, 0.5));
  }
  91.6% {
    transform: none;
    filter: none;
    clip-path: none;
  }
}

/* Мягкая тень-эллипс под плиткой */
.cube__shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -18%;
  height: 12%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(14, 28, 27, 0.28), transparent 75%);
  animation: shadow-breathe 7s ease-in-out infinite;
}
@keyframes shadow-breathe {
  0%, 100% { transform: scale(0.92); opacity: 0.9; }
  50% { transform: scale(1.05); opacity: 0.65; }
}

/* ============ 7. МАНИФЕСТ ============ */
.statement {
  padding-block: clamp(4.5rem, 11vw, 8.5rem);
  border-top: 1px solid var(--line);
}
.statement__text {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  max-width: 24em;
}
.statement__accent {
  color: var(--accent);
  white-space: nowrap;
}

/* ============ 8. НАПРАВЛЕНИЯ (ROWS) ============ */
.section { padding-block: clamp(4rem, 10vw, 8rem); }

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

.row {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem 1.4rem;
  padding: clamp(1.6rem, 3.5vw, 2.6rem) clamp(0.6rem, 1.5vw, 1.4rem);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.4s var(--ease-soft);
}
.row:hover { background: var(--accent-soft); }

.row__num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  padding-top: 0.5rem;
}
.row__title {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  transition: transform 0.4s var(--ease-out), color 0.4s var(--ease-out);
}
.row:hover .row__title { transform: translateX(10px); color: var(--accent-deep); }

.row__body {
  grid-column: 2;
  max-width: 40em;
  color: var(--ink-soft);
}
.row__tags {
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--ink-soft) 75%, transparent);
}

.row__arrow {
  position: absolute;
  top: 50%;
  right: clamp(0.6rem, 2vw, 1.6rem);
  width: 40px;
  height: 40px;
  color: var(--accent);
  opacity: 0;
  transform: translate(-14px, -50%);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}
.row:hover .row__arrow { opacity: 1; transform: translate(0, -50%); }

/* ============ 9. ЗАДАЧИ ============ */
.section--tasks { background: var(--paper-deep); }

.tasks__head {
  display: grid;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.tasks__head .sec-title { margin-bottom: 0; }
.tasks__note {
  color: var(--ink-soft);
  max-width: 26em;
}

.tasks {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
}
.task {
  position: relative;
  padding: clamp(1.8rem, 3vw, 2.4rem);
  background: var(--paper);
  border-radius: var(--radius);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.task:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -30px rgba(14, 28, 27, 0.45);
}
.task__index {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: color-mix(in srgb, var(--ink-soft) 55%, transparent);
}
.task__icon {
  width: 46px;
  height: 46px;
  color: var(--accent);
  margin-bottom: 1.4rem;
}
.task__icon svg { width: 100%; height: 100%; }
.task__title {
  font-size: 1.3rem;
  margin-bottom: 0.55rem;
}
.task__text { color: var(--ink-soft); }

/* ============ 10. ПРОЦЕСС ============ */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: grid;
  gap: 2.2rem;
  grid-template-columns: 1fr;
  counter-reset: step;
}

/* Линия, которая «прорисовывается», когда секция доехала до экрана */
.steps__line {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 30%, transparent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.6s var(--ease-out) 0.2s;
}
.steps.is-in .steps__line,
.no-js .steps__line { transform: scaleX(1); }

.step {
  position: relative;
  padding-top: 1.6rem;
  border-top: 2px solid var(--line);
}
.step__num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.step__title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.step__text { color: var(--ink-soft); font-size: 0.98rem; }

/* ============ 11. ПРИВАТНОСТЬ ============ */
.section--privacy { padding-block: clamp(2rem, 5vw, 4rem); }

.privacy {
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  grid-template-columns: 1fr;
  align-items: center;
  padding: clamp(2.2rem, 6vw, 4.5rem);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 130% at 85% 10%, rgba(121, 198, 191, 0.14), transparent 55%),
    var(--dark);
  color: var(--on-dark);
  overflow: clip;
}

.privacy__lead {
  color: var(--on-dark-soft);
  max-width: 33em;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
}

.privacy__list {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.1rem;
}
.privacy__list li {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: 1.02rem;
}
.privacy__list svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--mint);
}

/* Блюпринт-схема: линии дорисовываются при появлении панели */
.privacy__visual {
  color: var(--mint);
  justify-self: center;
  width: min(100%, 380px);
}
.scheme { width: 100%; height: auto; }
.scheme__draw path,
.scheme__draw rect,
.scheme__draw circle {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 1.6s var(--ease-soft);
}
.scheme__draw--2 path,
.scheme__draw--2 rect { transition-delay: 0.5s; }
.scheme__draw--3 circle { transition-delay: 1s; }
[data-reveal].is-in .scheme__draw path,
[data-reveal].is-in .scheme__draw rect,
[data-reveal].is-in .scheme__draw circle,
.no-js .scheme__draw path,
.no-js .scheme__draw rect,
.no-js .scheme__draw circle { stroke-dashoffset: 0; }
.scheme__labels text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  fill: var(--on-dark-soft);
}

/* ============ 12. КЕЙСЫ ============ */
.cases__head {
  display: grid;
  gap: 1.5rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}
.cases__head .sec-title { margin-bottom: 0; }
.cases__note { color: var(--ink-soft); max-width: 28em; }

.slots {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
}
.slot {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3vw, 2.4rem);
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  transition: border-color 0.35s var(--ease-soft);
}
.slot:hover { border-color: var(--accent); }
/* Штриховка «зарезервировано» — убери класс slot--empty, когда впишешь кейс */
.slot--empty {
  background: repeating-linear-gradient(
    -45deg,
    transparent 0 14px,
    rgba(25, 28, 27, 0.035) 14px 15px
  );
}
.slot__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.slot__text { color: var(--ink-soft); }
/* Заполненная карточка автоматизации (сплошная рамка вместо штриховки) */
.slot--filled { border-style: solid; justify-content: flex-start; gap: 0.7rem; }
.slot__title { font-size: 1.35rem; letter-spacing: -0.01em; margin: 0.2rem 0 0.1rem; }

/* ============ 13. КОНТАКТ ============ */
.section--contact {
  padding-block: clamp(6rem, 14vw, 11rem);
  border-top: 1px solid var(--line);
}
.contact { text-align: center; }
.contact__title {
  font-size: clamp(2.3rem, 6vw, 4.6rem);
  letter-spacing: -0.035em;
  margin-bottom: 1.6rem;
}
.contact__text {
  color: var(--ink-soft);
  font-size: clamp(1.02rem, 1.3vw, 1.2rem);
  max-width: 34em;
  margin-inline: auto;
  margin-bottom: 2.6rem;
}
.contact__actions { margin-bottom: 2rem; }
.contact__lines {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 3rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.contact__lines em { color: var(--ink); }

/* ============ 14. ФУТЕР ============ */
.footer {
  background: var(--dark);
  color: var(--on-dark);
  padding-block: clamp(3rem, 7vw, 5rem) 2.2rem;
  overflow: clip;
}
/* Гигантский контурный водяной знак */
.footer__word {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(4.5rem, 16vw, 14rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(238, 240, 234, 0.22);
  user-select: none;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
@supports not (-webkit-text-stroke: 1px black) {
  .footer__word { color: rgba(238, 240, 234, 0.12); }
}

.footer__grid {
  display: grid;
  gap: 1.6rem;
  padding-top: 1.8rem;
  border-top: 1px solid rgba(238, 240, 234, 0.14);
}
.footer__tag { color: var(--on-dark-soft); font-size: 0.95rem; }
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
}
.footer__nav a {
  color: var(--on-dark-soft);
  font-size: 0.95rem;
  transition: color 0.25s var(--ease-soft);
}
.footer__nav a:hover { color: var(--on-dark); }
.footer__copy {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(238, 240, 234, 0.4);
}

/* ============ 15. SCROLL-АНИМАЦИИ ============ */
/* Элементы с data-reveal мягко всплывают, когда доезжают до экрана.
   Задержка каскада — inline-переменная --d. Без JS всё видно сразу. */
/* Используем свойство translate (а не transform), чтобы не конфликтовать
   с transform-эффектами ховеров и смещений на тех же элементах. */
.js [data-reveal] {
  opacity: 0;
  translate: 0 30px;
  transition: opacity 0.9s var(--ease-out) var(--d, 0s),
    translate 0.9s var(--ease-out) var(--d, 0s);
  will-change: translate, opacity;
}
.js [data-reveal].is-in {
  opacity: 1;
  translate: none;
}

/* ============ 16. АДАПТИВ ============ */
/* Телефон: видео тише и шире, чтобы текст оставался главным */
@media (max-width: 639px) {
  .hero__media {
    width: 175vw;
    right: -60vw;
    top: 58%;
    opacity: 0.4;
  }
  .hero__actions .btn { width: 100%; }
  .hero__inner { padding-bottom: 110px; }
}

@media (min-width: 640px) {
  .tasks { grid-template-columns: repeat(2, 1fr); }
  .slots { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .tasks { grid-template-columns: repeat(3, 1fr); }
  .task--offset { transform: translateY(2.6rem); }
  .task--offset:hover { transform: translateY(calc(2.6rem - 6px)); }

  .steps { grid-template-columns: repeat(4, 1fr); gap: 2rem; }
  .steps__line { display: block; }
  .step { border-top-color: transparent; }

  .privacy { grid-template-columns: 1.15fr 0.85fr; }

  .tasks__head,
  .cases__head {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
  .tasks__note, .cases__note { max-width: 24em; padding-bottom: 0.4rem; }

  .row {
    grid-template-columns: 3.5rem 1fr 1.2fr;
    align-items: start;
  }
  .row__num { grid-column: 1; }
  .row__title { grid-column: 2; padding-right: 2rem; }
  .row__body { grid-column: 3; padding-right: 4.5rem; }

  .footer__grid {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
  .footer__copy { grid-column: 1 / -1; }
}

@media (min-width: 920px) {
  .nav { display: flex; }
  .header__cta { display: inline-flex; }
  .burger { display: none; }
  .mobile-menu { display: none; }
}

/* Фоновый куб слева показываем только там, где слева есть свободное поле */
@media (min-width: 900px) {
  .cube { display: block; }
}

/* ============ 17. УМЕНЬШЕННОЕ ДВИЖЕНИЕ ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }

  /* Всё видно сразу, без движения */
  .js [data-reveal],
  .js .hero__eyebrow,
  .js .hero__lead,
  .js .hero__actions {
    opacity: 1;
    transform: none;
    translate: none;
  }
  .js .line__inner { transform: none; }
  .steps__line { transform: scaleX(1); }
  .scheme__draw path,
  .scheme__draw rect,
  .scheme__draw circle { stroke-dashoffset: 0; }
  .ticker__track { animation: none; }
  /* Куб: без парения/наклона/дрейфа/глитча — статичный фоновый знак */
  .cube__tilt { animation: none; }
  .cube__drift { animation: none; }
  .cube__shadow { animation: none; }
  .cube__face img { animation: none; }
  .cube.is-visible { transform: scale(1); }
}
