:root {
  --bg: #f3f1ec;
  --bg-muted: #ebe8e1;
  --paper: #fbfaf7;
  --ink: #141414;
  --ink-soft: #55534e;
  --line: rgba(20, 20, 20, 0.12);
  --accent: #c46a3c;
  /* Акцент для мелкого текста и заливок под светлым текстом: контраст AA (≥4.5:1) */
  --accent-text: #9c4f28;
  --accent-strong: #a4532a;
  --dark: #151515;
  --radius: 16px;
  /* Единый язык движения: три длительности, одна кривая */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 0.2s;
  --t-base: 0.4s;
  --t-slow: 0.7s;
  --shift: 16px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(196, 106, 60, 0.22); color: var(--ink); }

a { color: inherit; -webkit-tap-highlight-color: transparent; }

h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; overflow-wrap: break-word; }
p { margin: 0; text-wrap: pretty; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 50;
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-size: 14px;
  transition: top var(--t-base) var(--ease);
}

.skip:focus { top: 16px; }

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 12px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 2px;
}

/* Topbar */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: background-color var(--t-base) var(--ease), border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}

.topbar.is-scrolled,
.topbar.is-open {
  background: rgba(243, 241, 236, 0.86);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line);
}

.topbar.is-hidden { transform: translateY(-100%); }

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 16px;
}

.topbar__actions { display: flex; align-items: center; gap: 8px; }

.topbar__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--progress, 0));
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}

.topbar.is-scrolled .topbar__progress { opacity: 1; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: 8px;
}

.logo__mark { width: 28px; height: 28px; flex: none; }
.logo__accent { fill: var(--accent); }

.nav { display: none; gap: 32px; font-size: 15px; }

.nav a {
  position: relative;
  padding: 12px 0;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color var(--t-fast) var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--t-base) var(--ease);
}

.nav a:hover,
.nav a.is-active { color: var(--ink); }

.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

/* Mobile menu */
.menu-btn {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease);
}

.menu-btn:hover { border-color: rgba(20, 20, 20, 0.35); }

.menu-btn span {
  position: absolute;
  left: 14px;
  right: 14px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--t-base) var(--ease);
}

.menu-btn span:first-child { top: 18px; }
.menu-btn span:last-child { top: 24px; }

.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 19;
  background: rgba(243, 241, 236, 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), visibility 0s linear var(--t-base);
}

.mobile-nav.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), visibility 0s;
}

.mobile-nav__inner { display: grid; padding-top: 8px; padding-bottom: 24px; }

.mobile-nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.25;
  text-decoration: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease), color var(--t-fast) var(--ease);
}

.mobile-nav a:last-child { border-bottom: 0; }

.mobile-nav a span {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent-text);
}

.mobile-nav.is-open a { opacity: 1; transform: none; }
.mobile-nav.is-open a:nth-child(2) { transition-delay: 0.04s; }
.mobile-nav.is-open a:nth-child(3) { transition-delay: 0.08s; }
.mobile-nav.is-open a:nth-child(4) { transition-delay: 0.12s; }

.mobile-nav a:active { color: var(--accent-text); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 16px 28px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--t-fast) var(--ease), color var(--t-base) var(--ease);
}

/* Заливка снизу темнее основного акцента, чтобы светлый текст оставался читаемым */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--accent-strong);
  transform: translateY(101%);
  transition: transform var(--t-base) var(--ease);
}

.btn:hover::before { transform: translateY(0); }
.btn:active { transform: scale(0.98); }

.btn__arrow { display: inline-block; transition: transform var(--t-base) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--small { min-height: 44px; padding: 12px 20px; font-size: 14px; }

.btn--light { background: var(--bg); color: var(--ink); }
.btn--light:hover { color: var(--bg); }

.btn:focus-visible,
.link:focus-visible,
.nav a:focus-visible,
.logo:focus-visible,
.menu-btn:focus-visible,
.mobile-nav a:focus-visible,
.contact__tg:focus-visible,
.footer a:focus-visible,
.tg-note a:focus-visible,
.legal__inner a:focus-visible,
.why__dots button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Текстовые ссылки: 44px в высоту за счёт полей, линия под текстом */
.link {
  position: relative;
  display: inline-block;
  padding: 10px 0;
  font-size: 16px;
  color: var(--ink-soft);
  text-decoration: none;
  background:
    linear-gradient(var(--ink), var(--ink)) left calc(100% - 8px) / 0 1px no-repeat,
    linear-gradient(var(--line), var(--line)) left calc(100% - 8px) / 100% 1px no-repeat;
  transition: color var(--t-fast) var(--ease), background-size var(--t-base) var(--ease);
}

.link:hover { color: var(--ink); background-size: 100% 1px, 100% 1px; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 112px 0 96px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; }

.hero__title {
  margin-top: 24px;
  font-family: var(--serif);
  font-size: clamp(44px, 12vw, 132px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  will-change: transform;
}

.hero__title em { font-style: italic; color: var(--accent); }

.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }

.hero__title .line > span { display: inline-block; }

.js .hero__title .line > span {
  transform: translateY(105%);
  transition: transform 0.9s var(--ease);
}

.hero__title .line:nth-child(2) > span { transition-delay: 0.08s; }
.hero__title .line:nth-child(3) > span { transition-delay: 0.16s; }

.js .is-loaded .hero__title .line > span { transform: none; }

.hero__bottom {
  margin-top: 40px;
  display: grid;
  gap: 32px;
  max-width: 560px;
}

.hero__lead { font-size: 18px; line-height: 1.55; color: var(--ink-soft); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 1px;
  height: 48px;
  background: var(--line);
  overflow: hidden;
}

.hero__scroll span {
  position: absolute;
  inset: 0;
  background: var(--ink);
  animation: scrollHint 3.2s var(--ease-in-out) infinite;
}

@keyframes scrollHint {
  0% { transform: translateY(-100%); }
  50%, 100% { transform: translateY(100%); }
}

/* Sections */
.section { padding: 96px 0; position: relative; }
.section--muted { background: var(--bg-muted); }

.section__head { display: grid; gap: 16px; margin-bottom: 48px; max-width: 760px; }

.section__title {
  font-family: var(--serif);
  font-size: clamp(32px, 5.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

/* Cards */
.cards { display: grid; gap: 16px; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 8px 8px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
  isolation: isolate;
  transition: border-color var(--t-base) var(--ease), background-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

.card::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-slow) var(--ease);
}

.card:hover {
  border-color: rgba(20, 20, 20, 0.24);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 16px 40px -32px rgba(20, 20, 20, 0.4);
}

.card:hover::after { transform: scaleX(1); }

.card__visual {
  position: relative;
  aspect-ratio: 16 / 10;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(20, 20, 20, 0.11) 1px, transparent 1.3px);
  background-size: 16px 16px;
  background-position: 8px 8px;
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease);
}

.card:hover .card__visual { border-color: rgba(20, 20, 20, 0.2); }

/* Анимации карточек: линейная графика на canvas поверх точечной сетки */
.viz-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

/* 3D-сцена блока 03: мягкая «студийная» подложка, канвас поверх запасной стопки */
.why__stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(120% 95% at 50% 22%, #fff 0%, var(--paper) 52%, #eeeae2 100%);
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease);
  pointer-events: none;
}

.stage3d {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease);
}

.is-3d::before { opacity: 1; }
.is-3d > .stage3d { opacity: 1; }

.card__num {
  padding: 0 16px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.14em;
  color: var(--accent-text);
}

.card__title {
  padding: 0 16px;
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.card__text { padding: 0 16px; color: var(--ink-soft); }

/* Steps */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.step {
  position: relative;
  padding: 24px 0 32px;
  border-top: 1px solid var(--line);
}

.step::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  height: 1px;
  width: 100%;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-slow) var(--ease-in-out) calc(var(--delay, 0s) + 0.2s);
}

.step.is-visible::before { transform: scaleX(1); }

.step::after {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease) calc(var(--delay, 0s) + 0.2s);
}

.step.is-visible::after { opacity: 1; }

.step__num {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.14em;
  color: var(--accent-text);
  margin-bottom: 16px;
}

.step__title {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 8px;
}

.step__text { color: var(--ink-soft); max-width: 420px; }

/* 03 — Почему мы: 3D-стопка + лента (мобильные) / сценарий по скроллу (десктоп) */
.why { display: grid; gap: 24px; }
.why__aside { display: grid; gap: 32px; }
.why .section__head { margin-bottom: 0; }

.why__stage {
  position: relative;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  isolation: isolate;
}

.why__stage::before { opacity: 1; }

.why__counter {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.why__current { color: var(--accent-text); }

/* Запасная стопка на CSS 3D, если WebGL недоступен */
.why__stack {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  perspective: 1000px;
  transition: opacity var(--t-slow) var(--ease), visibility 0s linear var(--t-slow);
}

.why__stage.is-3d .why__stack { opacity: 0; visibility: hidden; }

.why__layers {
  position: relative;
  width: 38%;
  aspect-ratio: 3 / 2;
  margin-top: 14%;
  transform-style: preserve-3d;
  transform: rotateX(60deg) rotateZ(-36deg);
}

.why__layer {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid rgba(20, 20, 20, 0.16);
  box-shadow: 0 16px 28px -16px rgba(20, 20, 20, 0.35);
  transform: translateZ(calc((3 - var(--i)) * 32px)) translateX(var(--out, 0%));
  transition: transform var(--t-slow) var(--ease), background-color var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}

.why-section[data-active="0"] .why__layer:nth-child(1),
.why-section[data-active="1"] .why__layer:nth-child(2),
.why-section[data-active="2"] .why__layer:nth-child(3),
.why-section[data-active="3"] .why__layer:nth-child(4) {
  --out: 24%;
  background: var(--accent);
  border-color: var(--accent);
}

/* Лента тезисов на мобильных: карточки одной высоты, заголовок переносится, а не обрезается */
.theses {
  list-style: none;
  margin: 0 -24px;
  padding: 0 24px 8px;
  display: flex;
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 24px;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.theses::-webkit-scrollbar { display: none; }

.thesis {
  position: relative;
  flex: 0 0 min(86%, 400px);
  min-width: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 24px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.35);
  transition: border-color var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}

.thesis.is-active { border-color: rgba(20, 20, 20, 0.26); background: rgba(255, 255, 255, 0.7); }

.thesis__num {
  margin-bottom: 16px;
  font-family: var(--serif);
  font-size: 64px;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(20, 20, 20, 0.3);
  font-variant-numeric: lining-nums;
  transition: color var(--t-base) var(--ease), -webkit-text-stroke-color var(--t-base) var(--ease);
}

.thesis.is-active .thesis__num { color: var(--accent); -webkit-text-stroke-color: var(--accent); }

.thesis__title {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  hyphens: manual;
}

.thesis__text { color: var(--ink-soft); }

/* Индикаторы ленты: кнопки 44px, видимая полоска внутри */
.why__dots { display: flex; margin-top: -8px; }

.why__dots button {
  display: flex;
  align-items: center;
  width: 48px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.why__dots button span {
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: rgba(20, 20, 20, 0.2);
  transition: width var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}

.why__dots button:hover span { background: rgba(20, 20, 20, 0.45); }
.why__dots button.is-active span { width: 40px; background: var(--accent); }

/* Contact */
.contact {
  background: var(--dark);
  color: var(--bg);
  overflow: hidden;
}

.contact__orbit {
  position: absolute;
  right: -180px;
  bottom: -160px;
  width: 460px;
  height: 460px;
  fill: none;
  stroke: rgba(243, 241, 236, 0.09);
  stroke-width: 1;
  pointer-events: none;
}

.contact__dot { fill: var(--accent); stroke: none; }

.contact .eyebrow { color: rgba(243, 241, 236, 0.66); }

.contact__inner { position: relative; display: grid; gap: 24px; }

.contact__title {
  font-family: var(--serif);
  font-size: clamp(36px, 7vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

/* Принудительный перенос только на широких экранах: на телефоне строки переносятся сами */
.br-wide { display: none; }

.contact__lead { color: rgba(243, 241, 236, 0.7); font-size: 18px; line-height: 1.55; max-width: 520px; }

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  margin-top: 8px;
}

.contact__tg {
  display: inline-block;
  padding: 8px 0;
  font-size: 18px;
  text-decoration: none;
  background:
    linear-gradient(var(--accent), var(--accent)) left calc(100% - 6px) / 0 1px no-repeat,
    linear-gradient(rgba(243, 241, 236, 0.3), rgba(243, 241, 236, 0.3)) left calc(100% - 6px) / 100% 1px no-repeat;
  transition: background-size var(--t-base) var(--ease);
}

.contact__tg:hover { background-size: 100% 1px, 100% 1px; }

/* Подпись у кнопок Telegram */
.tg-note {
  max-width: 460px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.tg-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.tg-note a:hover { color: var(--ink); }

.hero .tg-note { margin-top: -16px; }

.contact .tg-note { margin-top: -8px; color: rgba(243, 241, 236, 0.6); }
.contact .tg-note a:hover { color: var(--bg); }

/* Юридические страницы */
.topbar--page { position: sticky; top: 0; }

.legal { padding: 56px 0 96px; }
.legal__inner { max-width: 820px; }

.legal__title {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.legal__meta { margin-top: 16px; font-size: 15px; color: var(--ink-soft); }

.legal h2 {
  margin: 48px 0 16px;
  font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.legal p + p,
.legal p + ul,
.legal ul + p { margin-top: 12px; }

.legal__card + p { margin-top: 24px; }
.legal__meta + section > p:first-child { margin-top: 40px; }

.legal ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }

.legal__inner a { color: var(--accent-text); text-underline-offset: 2px; }

.legal__card {
  margin-top: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.35);
}

.legal__card dl { margin: 0; display: grid; gap: 12px; }

.legal__card dt {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.legal__card dd { margin: 0; }

.legal__docs {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

.legal__docs a { display: inline-block; padding: 12px 0; }

@media (min-width: 720px) {
  .legal { padding: 80px 0 144px; }
  .legal__card { padding: 32px; }
  .legal__card dl { grid-template-columns: 200px minmax(0, 1fr); gap: 12px 24px; }
  .legal__card dt { padding-top: 3px; }
}

/* Footer */
.footer {
  background: var(--dark);
  color: rgba(243, 241, 236, 0.6);
  font-size: 14px;
  border-top: 1px solid rgba(243, 241, 236, 0.1);
}

.footer__inner {
  display: grid;
  gap: 16px;
  padding-top: 32px;
  padding-bottom: 24px;
}

.footer__info { display: grid; gap: 4px; }

.footer__contacts,
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
}

.footer__legal { border-top: 1px solid rgba(243, 241, 236, 0.1); padding-top: 8px; }

.footer a[aria-current="page"] { color: var(--bg); }

.footer a {
  display: inline-block;
  padding: 12px 0;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

.footer a:hover { color: var(--bg); }

/* Reveal: короткий сдвиг и проявление, один раз */
.js .reveal {
  opacity: 0;
  transform: translateY(var(--shift));
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
  transition-delay: var(--delay, 0s);
}

.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal.is-revealed { transition-delay: 0s; }

.js .card.reveal.is-revealed {
  transition: border-color var(--t-base) var(--ease), background-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}

/* Small tablet: карточки горизонтально */
@media (min-width: 600px) and (max-width: 959px) {
  .card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    column-gap: 16px;
    padding: 8px;
  }
  .card__visual { grid-row: 1 / span 3; align-self: start; margin-bottom: 0; }
  .card__num { padding: 16px 8px 0; }
  .card__title { padding: 0 8px; }
  .card__text { padding: 0 8px 16px; }
}

/* Tablet+ */
@media (min-width: 720px) {
  .container { padding: 0 40px; }
  .nav { display: flex; }
  .menu-btn,
  .mobile-nav { display: none; }
  .section { padding: 144px 0; }
  .section__head { margin-bottom: 64px; }
  .steps { grid-template-columns: repeat(2, 1fr); column-gap: 40px; }
  .theses { margin: 0 -40px; padding: 0 40px 8px; scroll-padding: 0 40px; }
  .thesis { flex-basis: calc(50% - 8px); padding: 32px 32px 40px; }
  .why__stage { aspect-ratio: 16 / 8; }
  .hero__lead { font-size: 20px; }
  .br-wide { display: inline; }
  .contact__orbit { right: -120px; bottom: auto; top: 50%; width: 620px; height: 620px; margin-top: -310px; }
}

@media (min-width: 960px) {
  .cards { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .card__title { font-size: clamp(24px, 2.2vw, 28px); }
}

@media (min-width: 1024px) {
  .steps { grid-template-columns: repeat(4, 1fr); column-gap: 32px; }
  /* Десктоп: слева закреплённая сцена, справа тезисы сменяются по скроллу */
  .why { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 0 80px; align-items: start; }
  .why__aside {
    position: sticky;
    top: 96px;
    height: calc(100vh - 144px);
    min-height: 520px;
    max-height: 816px;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 40px;
  }
  .why__stage { aspect-ratio: auto; min-height: 0; }
  .why__counter { left: 24px; bottom: 24px; }
  .theses { display: block; margin: 0; padding: 0; overflow: visible; }
  .thesis {
    min-height: 64vh;
    justify-content: center;
    padding: 48px 0;
    border: 0;
    border-radius: 0;
    background: none;
  }
  .thesis::before {
    content: "";
    position: absolute;
    left: -40px;
    top: 50%;
    width: 1px;
    height: 160px;
    background: var(--accent);
    transform: translateY(-50%) scaleY(0);
    transition: transform var(--t-slow) var(--ease);
  }
  .thesis.is-active { background: none; }
  .thesis.is-active::before { transform: translateY(-50%) scaleY(1); }
  /* Неактивные тезисы приглушены цветом, а не прозрачностью: текст остаётся читаемым (AA) */
  .thesis__title { color: var(--ink-soft); transition: color var(--t-base) var(--ease); }
  .thesis.is-active .thesis__title { color: var(--ink); }
  .thesis__num { font-size: 128px; margin-bottom: 16px; }
  .thesis__title { font-size: clamp(30px, 3vw, 40px); line-height: 1.15; }
  .thesis__text { font-size: 18px; max-width: 420px; }
  .why__dots { display: none; }
  .contact { padding: 176px 0; }
  .contact__orbit { right: 4%; width: 680px; height: 680px; margin-top: -340px; }
}

@media (min-width: 1600px) {
  .container { max-width: 1280px; }
}

/* На тач-экранах hover «залипает» после тапа — отключаем его эффекты */
@media (hover: none) {
  .card:hover { border-color: var(--line); background: rgba(255, 255, 255, 0.35); box-shadow: none; }
  .card:hover::after { transform: scaleX(0); }
  .card:hover .card__visual { border-color: var(--line); }
  .btn:hover::before { transform: translateY(101%); }
  .btn:hover .btn__arrow { transform: none; }
  .btn--light:hover { color: var(--ink); }
  .btn:not(.btn--light):hover { color: var(--bg); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .hero__title .line > span { transform: none; }
  .step::after { opacity: 1; }
  .step::before { transform: scaleX(1); }
  .hero__scroll { display: none; }
}
