/* Самохостинг вместо Google Fonts: у их Gochi Hand нет кириллицы
   (unicode-range только U+0000-00FF) — кириллический текст молча падал на
   системный cursive (курсивная засечка вместо почерка). Файлы — те же, что
   уже использует webapp (webapp/src/assets/fonts/, @fontsource/*). */
/* по одному @font-face на каждый вес × подмножество — файлы статичные
   (не variable font), font-weight:"400 800" на одном файле дал бы неверные
   начертания для всех весов кроме того, что реально зашит в файле */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-cyrillic-400-normal.woff2') format('woff2');
  unicode-range: U+0400-04FF, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-cyrillic-600-normal.woff2') format('woff2');
  unicode-range: U+0400-04FF, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/inter-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/inter-cyrillic-700-normal.woff2') format('woff2');
  unicode-range: U+0400-04FF, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/inter-latin-800-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('fonts/inter-cyrillic-800-normal.woff2') format('woff2');
  unicode-range: U+0400-04FF, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Gochi Hand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/gochi-hand-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}
@font-face {
  font-family: 'Gochi Hand';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/gochi-hand-cyrillic.otf') format('opentype');
  unicode-range: U+0400-04FF, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  /* ── Цвет / фон ─────────────────────────────────────── */
  --color-gradient-start: #73b6ff;
  --color-gradient-mid: #4e91fb;
  --color-gradient-end: #2f5cd1;
  --color-ink: #ffffff;
  --color-ink-soft: rgba(255, 255, 255, 0.82);
  --color-accent: #d8f0ff;

  --glass-bg: rgba(255, 255, 255, 0.14);
  --glass-bg-strong: rgba(255, 255, 255, 0.22);
  --glass-border: rgba(255, 255, 255, 0.32);
  --glass-blur: 18px;
  --glass-shadow: 0 18px 40px rgba(6, 30, 90, 0.28);

  /* ── Типографика: базовые размеры из брифа (112px / 53px под десктоп),
     дальше — clamp() до самого маленького экрана ─────── */
  --font-display: 'Inter', sans-serif;
  --font-hand: 'Gochi Hand', cursive;

  --size-h1: clamp(2.6rem, 3vw + 2.1rem, 7rem); /* 112px на большом десктопе */
  --size-h2: clamp(2rem, 1.6vw + 1.5rem, 3.4rem);
  --size-h3: clamp(1.3rem, 0.6vw + 1.1rem, 1.7rem);
  --size-body: clamp(1rem, 0.3vw + 0.9rem, 1.15rem);
  --size-hand: clamp(1.3rem, 1.4vw + 1rem, 3.3rem); /* 53px на большом десктопе */

  /* ── Позиция/размер 3D-модели (общая точка с градиентом) ────── */
  --model-center-x: 78.66%;
  --model-center-y: 46.27%;
  --model-size: clamp(937px, 134.7vmin, 2108px);

  --gradient-hero: radial-gradient(
    circle at var(--model-center-x) var(--model-center-y),
    var(--color-gradient-start) 0%,
    var(--color-gradient-mid) 45%,
    var(--color-gradient-end) 100%
  );

  --content-max-width: 1200px;
  --content-pad: clamp(20px, 5vw, 96px);
}

/* планшетный диапазон — раньше модель прыгала сразу с десктопных 82.8%/55.8%
   на 1014px max-размер, на 700–1024px ширины это гарантированно наезжало на
   hero-copy (46rem текста уже не помещается рядом с моделью такого размера) */
@media (max-width: 1024px) {
  :root {
    --model-center-x: 70%;
    --model-center-y: 42%;
    --model-size: clamp(560px, 78vmin, 820px);
  }
}

@media (max-width: 640px) {
  :root {
    --model-center-x: 78.43%;
    --model-center-y: 30.6%;
    --model-size: clamp(531px, 173.9vmin, 1014px);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  /* Safari при bounce-скролле сверху/снизу показывает фон <html>, а не
     <body> — без этого была видна белая полоса над градиентом при овербаунсе */
  background: var(--color-gradient-mid);
}

body {
  font-family: var(--font-display);
  color: var(--color-ink);
  background: var(--gradient-hero);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* На тач-устройствах (Android Chrome/Yandex Browser — тот же Blink-движок)
   background-attachment: fixed вместе со сворачиванием адресной строки даёт
   известный баг рендера: чёрная полоса/мигание сверху при скролле, пока фон
   не успевает перерисоваться. iOS Safari эту связку тихо игнорирует (поэтому
   там и на десктопе бага нет) — откатываем на обычный scroll именно там, где
   ломается; десктоп/Safari эта медиа-запроса не задевает. */
@media (hover: none) and (pointer: coarse) {
  body {
    background-attachment: scroll;
  }
}

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

/* ── Стекло / 3D-наклон — общие переиспользуемые компоненты ──── */

.glass {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--glass-shadow);
  border-radius: var(--glass-radius, 20px);
  overflow: hidden;
  /* в Chrome backdrop-filter иногда не обрезается border-radius/overflow —
     угол блюра рендерится прямоугольником поверх скруглённой карточки.
     clip-path — надёжный способ обрезать именно так, как нарисовано.
     Радиус — переменная: у .btn-pill border-radius:999px (капсула), и
     захардкоженные 20px тут срезали её края почти в прямоугольник на
     двухстрочном тексте. */
  clip-path: inset(0 round var(--glass-radius, 20px));
}

/* блик — диагональная полоса поверх стекла, как отсвет на настоящей панели */
.glass::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.08) 22%,
    rgba(255, 255, 255, 0) 40%
  );
  pointer-events: none;
}

.card-3d {
  perspective: 900px;
  transform-style: preserve-3d;
  will-change: transform;
}

.tilt-a {
  transform: rotate3d(0.4, 1, 0, 8deg) rotate(-2deg) scale(var(--tilt-scale, 1));
}

.tilt-b {
  transform: rotate3d(0.4, 1, 0, -8deg) rotate(2.5deg) scale(var(--tilt-scale, 1));
}

/* лёгкое парение — та же идея, что float-покачивание у 3D-модели
   (SceneController: sin(elapsed * 0.78) * 0.11), только в CSS и медленнее,
   чтобы не спорить с моделью за внимание */
@keyframes float-slow {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

.float-slow {
  animation: float-slow 7.8s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Точки-навигация по разделам ──────────────────────── */

.dot-nav {
  position: fixed;
  z-index: 60;
  right: clamp(14px, 3vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: clamp(14px, 2vh, 20px);
}

.dot-nav__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 24px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.dot-nav__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.32s cubic-bezier(0.65, 0, 0.35, 1), background 0.32s ease;
}

.dot-nav__btn:hover .dot-nav__dot {
  background: rgba(255, 255, 255, 0.7);
}

.dot-nav__btn.is-active .dot-nav__dot {
  width: 26px;
  background: #ffffff;
}

.dot-nav__btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
  border-radius: 999px;
}

.dot-nav__label {
  position: absolute;
  right: calc(100% + 12px);
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-ink);
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  padding: 0.3em 0.75em;
  border-radius: 999px;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}

.dot-nav__btn:hover .dot-nav__label,
.dot-nav__btn:focus-visible .dot-nav__label {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 640px) {
  .dot-nav {
    right: 10px;
    gap: 12px;
  }
  .dot-nav__label {
    display: none;
  }
}

/* ── Hero ─────────────────────────────────────────────── */

.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  padding: var(--content-pad);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1rem, 3vh, 2.2rem);
}

#model-stage {
  position: absolute;
  top: var(--model-center-y);
  left: var(--model-center-x);
  width: var(--model-size);
  height: var(--model-size);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 1;
}

#model-stage.is-loaded {
  opacity: 1;
}

.model-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* QR в правый верхний угол — сам SVG нарисован белым (fill:white) без
   фона, поэтому просто кладём поверх градиента, без подложки-карточки */
.hero-qr {
  position: absolute;
  top: var(--content-pad);
  right: var(--content-pad);
  z-index: 3;
  width: clamp(64px, 6vw, 112px);
  height: auto;
}

@media (max-width: 640px) {
  .hero-qr {
    width: clamp(52px, 15vw, 76px);
    top: calc(var(--content-pad) * 0.6);
    right: calc(var(--content-pad) * 0.6);
  }
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 46rem;
}

.hero-title {
  margin: 0 0 clamp(1rem, 2.4vh, 1.8rem);
  font-family: var(--font-display);
  font-weight: 800;
  /* ограничено и по ширине, и по высоте — гарантирует, что hero не поедет
     за пределы экрана даже на низких десктопных окнах */
  font-size: clamp(1.9rem, 3.4vw + 3.4vh, 5.6rem);
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.pill-inline {
  display: inline-block;
  padding: 0.05em 0.35em;
  border-radius: 0.3em;
  color: var(--color-gradient-end);
  background: var(--glass-bg-strong);
  -webkit-text-fill-color: var(--color-gradient-end);
}

.fact-cards {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.8rem, 2vw, 1.4rem);
  margin-bottom: clamp(1rem, 2.4vh, 1.8rem);
}

.fact-cards .glass {
  padding: 1rem 1.3rem;
  max-width: 15rem;
}

.fact-title {
  margin: 0 0 0.25em;
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.15;
  text-transform: uppercase;
}

.fact-number {
  margin: 0;
  font-weight: 800;
  font-size: 2.4rem;
  line-height: 1;
}

.fact-sub {
  margin: 0.3em 0 0;
  font-size: 0.85rem;
  color: var(--color-ink-soft);
}

.hand-notes {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3em 1.4em;
}

.hand-note {
  margin: 0;
  font-family: var(--font-hand);
  font-size: clamp(1.1rem, 1vw + 0.9rem, 1.8rem);
  line-height: 1.1;
  color: var(--color-ink);
  opacity: 0.92;
}

.hero-cta {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.2rem;
  margin-top: clamp(1rem, 3vh, 2rem);
}

.btn-pill {
  display: inline-block;
  max-width: 100%;
  padding: 0.85em 1.8em;
  font-weight: 700;
  font-size: clamp(0.9rem, 0.4vw + 0.8rem, 1.05rem);
  color: var(--color-ink);
  text-decoration: none;
  text-transform: uppercase;
  text-align: center;
  /* длинный текст ("ПОПРОБУЙ БЕСПЛАТНО — @LINGOPALAI_BOT") на узких
     экранах шире viewport — раньше вылезал за край и скруглённые
     концы пилюли обрезались overflow-x:hidden на body */
  white-space: normal;
  --glass-radius: 999px;
  border-radius: 999px;
  transition: transform 0.2s ease;
}

.btn-pill:hover,
.btn-pill:focus-visible {
  transform: scale(1.1);
}

.btn-pill:active {
  transform: scale(1.04);
}

/* ── "Как начать": центрированная колонка по референсу ────────── */

.section--center {
  align-items: center;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.8em;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.center-title {
  max-width: 36rem;
  margin: 0 auto clamp(1rem, 2.4vh, 1.6rem);
}

.center-body {
  max-width: 34rem;
  margin: 0 auto clamp(1.8rem, 4vh, 2.6rem);
}

.status-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  width: fit-content;
  max-width: 26rem;
  margin: clamp(1.8rem, 4vh, 2.6rem) auto 0;
  padding: 1.1rem 1.3rem;
  text-align: left;
}

.status-card__icon {
  flex: none;
  margin-top: 0.1em;
}

.status-card__title {
  margin: 0 0 0.3em;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
}

.status-card__desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--color-ink-soft);
}

.footer-copy {
  margin: clamp(2.4rem, 6vh, 4rem) 0 0;
  font-size: 0.85rem;
  color: var(--color-ink-soft);
  opacity: 0.75;
}

/* ── Footer / privacy ─────────────────────────────────── */

.site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 1.5rem var(--content-pad) calc(1.8rem + env(safe-area-inset-bottom));
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.78rem;
}

.footer-link {
  padding: 0;
  border: 0;
  color: var(--color-ink-soft);
  background: transparent;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  cursor: pointer;
}

.footer-link:hover,
.footer-link:focus-visible {
  color: #fff;
}

.privacy-dialog {
  width: min(680px, calc(100vw - 32px));
  max-width: none;
  height: min(760px, calc(100dvh - 32px));
  max-height: none;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 28px;
  color: var(--color-ink);
  background: rgba(15, 72, 174, 0.96);
  box-shadow: 0 28px 90px rgba(0, 18, 79, 0.58);
  overflow: hidden;
}

.privacy-dialog::backdrop {
  background: rgba(2, 17, 61, 0.72);
  backdrop-filter: blur(8px);
}

.privacy-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.privacy-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.5rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.privacy-dialog-head h2 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
  line-height: 1.05;
}

.privacy-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font: 400 1.7rem/1 var(--font-display);
  cursor: pointer;
}

.privacy-dialog-body {
  min-height: 0;
  padding: 1.25rem 1.5rem 1.6rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  color: var(--color-ink-soft);
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  line-height: 1.55;
}

.privacy-dialog-body::-webkit-scrollbar {
  display: none;
}

.privacy-dialog-body h3 {
  margin: 1.35rem 0 0.45rem;
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
}

.privacy-dialog-body h3:first-of-type {
  margin-top: 1.1rem;
}

.privacy-dialog-body p {
  margin: 0.55rem 0;
}

.privacy-dialog-body a {
  color: #fff;
  font-weight: 700;
}

/* ── Контентные секции ────────────────────────────────── */

.section {
  position: relative;
  z-index: 2;
  max-width: var(--content-max-width);
  margin: 0 auto;
  /* тот же левый отступ, что у hero-текста (--content-pad) — колонки должны
     стартовать по одной вертикали при скролле */
  padding: clamp(4rem, 10vh, 7rem) var(--content-pad);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-title {
  margin: 0 0 0.3em;
  font-weight: 800;
  font-size: var(--size-h2);
  line-height: 1.05;
}

.section-title.small {
  font-size: var(--size-h3);
  margin-top: 2.2em;
}

.section-title.small:first-child {
  margin-top: 0;
}

.section-subtitle {
  margin: 0 0 1em;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--color-ink-soft);
}

.section-body {
  max-width: 42rem;
  margin: 0 0 1em;
  font-size: var(--size-body);
  line-height: 1.5;
  color: var(--color-ink-soft);
}

.feature-list {
  position: relative;
  display: grid;
  gap: clamp(2.2rem, 5vh, 3.2rem);
  margin: 3rem 0 4rem;
  max-width: 42rem;
  /* отступ слева под рельс — визуально группирует три пункта в один поток,
     а не три случайных абзаца */
  padding-left: clamp(1.4rem, 3vw, 2rem);
}

/* растущая "нить прогресса" вдоль трёх шагов — не декоративная линия,
   а честная структура: тапаешь → копишь рейтинг → зовёшь друзей */
.feature-rail {
  position: absolute;
  left: 0;
  top: 0.4em;
  bottom: 0.4em;
  width: 2px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(255, 255, 255, 0.35) 100%
  );
  border-radius: 2px;
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1);
}

.feature-list.is-in .feature-rail {
  transform: scaleY(1);
}

.feature {
  padding: 0;
}

.feature h3 {
  margin: 0 0 0.35em;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-ink);
}

.feature p {
  margin: 0;
  color: var(--color-ink-soft);
  line-height: 1.55;
}

.quote {
  margin: 1.6rem 0 1.8rem;
  padding: 1.3rem 1.6rem;
  /* было display:block без width — карточка растягивалась на всю ширину
     колонки (32rem), даже когда текст короче, и торчала пустым полем
     справа. fit-content стягивает рамку по контенту, как настоящий баббл */
  width: fit-content;
  max-width: 32rem;
  border-left: 4px solid transparent;
}

.quote p {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
}

/* ── Reveal-анимации, включаются через IntersectionObserver (app.js) ─── */

.reveal-fade {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-fade.is-in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-clip {
  clip-path: inset(0 0 0 100%);
  opacity: 0;
  transition: clip-path 0.8s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.4s ease;
}
/* триггерим от .feature-list, а не от самой карточки: у карточки в скрытом
   состоянии нулевая видимая площадь (clip-path), и IntersectionObserver,
   наблюдающий за ней напрямую, никогда не зафиксирует пересечение —
   рельс (.feature-list) геометрию не теряет, поэтому наблюдаем его */
.feature-list.is-in .reveal-clip {
  clip-path: inset(0 0 0 0);
  opacity: 1;
}
.feature-list .reveal-clip:nth-child(3) {
  transition-delay: 0.14s;
}
.feature-list .reveal-clip:nth-child(4) {
  transition-delay: 0.28s;
}

/* левый бордер "вырастает" сверху вниз, а не просто проявляется —
   параллель с идеей растущего рельса у карточек выше по странице */
.reveal-grow {
  border-left-color: transparent;
  /* round 20px — иначе этот clip-path перекрывает скруглённый clip-path
     из .glass (тот же элемент, тот же CSS-свойство — побеждает
     объявленное позже) и углы карточки становятся прямыми */
  clip-path: inset(0 0 100% 0 round 20px);
  transition: clip-path 0.7s cubic-bezier(0.65, 0, 0.35, 1), border-left-color 0.5s ease 0.5s;
}
/* тот же принцип, что у .feature-list выше: наблюдаем обёртку без
   clip-path, а не саму схлопывающуюся карточку */
.quote-anchor.is-in .reveal-grow {
  border-left-color: var(--color-accent);
  clip-path: inset(0 0 0% 0 round 20px);
}

/* акцентные слова проявляются по очереди — задержка на каждый .accent
   выставляется инлайном из app.js (transition-delay) */
.reveal-accents .accent {
  color: var(--color-ink);
  transition: color 0.5s ease;
}
.reveal-accents.is-in .accent {
  color: var(--color-accent);
}

@media (max-width: 640px) {
  .hero-copy {
    max-width: 100%;
  }

  .fact-cards .glass {
    max-width: none;
  }

  /* на мобиле точки-навигация лежат поверх правого края текста —
     резервируем под них дорожку, иначе строки подныривают под точки.
     Это правило должно идти последним в каскаде — иначе его затирает
     шорткод .section { padding: ... } объявленный выше */
  .section,
  .hero-copy,
  .hero-cta {
    padding-right: calc(var(--content-pad) + 22px);
  }
}

/* ── Каракули: заполняют пустые поля 2 и 3 экранов ────────────
   Только на широких десктопах, где справа реально пусто — на
   планшете/мобиле это же место занято моделью или самим текстом,
   там каракулям просто негде поместиться без наложений. */

.doodle-desktop-only {
  display: none;
}

.doodle-underline {
  color: var(--color-accent);
  font-weight: 700;
}

.feature-list-wrap {
  position: relative;
}

.doodle-note {
  position: absolute;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 190px;
}

.doodle-note--app {
  left: 44rem;
  top: 4%;
}

.doodle-hand {
  font-family: var(--font-hand);
  font-size: 1.35rem;
  line-height: 1.15;
  color: rgba(255, 255, 255, 0.85);
  transform: rotate(-2deg);
}

/* было: голая стрелка без подписи, "right:-78px" отрывало её от карточки —
   выглядело как случайная закорючка в воздухе. Теперь стрелка + подпись,
   как у остальных .doodle-note, и она стоит вплотную к правому краю. */
.doodle-note--quote {
  right: -12.5rem;
  top: -0.6rem;
  align-items: flex-end;
  text-align: right;
}

.doodle-note--quote .doodle-arrow {
  transform: scaleX(-1) rotate(6deg);
}

/* обёртка quote должна быть positioning context для стрелки выше —
   без этого она позиционируется от всей секции, а не от самой цитаты */
.quote-anchor {
  position: relative;
  /* тот же предел, что у самой цитаты — иначе обёртка растягивается на
     всю ширину секции, и стрелка "right: -78px" улетает к точкам-навигации
     вместо того чтобы указывать на саму карточку */
  max-width: 32rem;
}

.doodle-strike {
  position: absolute;
  left: 44rem;
  top: 6%;
  align-items: center;
  gap: 2px;
  font-family: var(--font-hand);
}

.doodle-strike__old {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.7);
  text-decoration-thickness: 2px;
  transform: rotate(-4deg);
}

.doodle-strike__new {
  font-size: 1.7rem;
  color: var(--color-accent);
  transform: rotate(3deg);
  margin-left: 4px;
}

.doodle-sparkles {
  position: absolute;
  top: 6%;
  right: 7%;
  align-items: flex-end;
  gap: 10px;
}

.doodle-sparkles--start {
  top: auto;
  bottom: 12%;
  right: 9%;
}

.doodle-sparkles--start2 {
  position: absolute;
  top: 30%;
  right: 6%;
  transform: rotate(-3deg);
}

/* ── доп. дудлы 2/3 экрана: крупнее/средние, разной формы ─────── */

.doodle-bolt--app {
  position: absolute;
  right: 8%;
  bottom: 20%;
  transform: rotate(-6deg);
}

.doodle-star--app {
  position: absolute;
  left: 46.5rem;
  top: 54%;
  transform: rotate(10deg);
}

.doodle-loop--start {
  position: absolute;
  left: 43.5rem;
  top: 56%;
}

.doodle-check--start {
  position: absolute;
  right: 6%;
  top: 44%;
  transform: rotate(-8deg);
}

/* ── Hero: дудлы вокруг 3D-модели, в свободных полях справа-сверху
   и справа-снизу от неё — там, где модель не занимает кадр ────── */

.doodle-sparkles--hero {
  top: 6%;
  right: 4%;
}

.doodle-note--hero-a {
  top: 8%;
  right: 33%;
}

.doodle-note--hero-a .doodle-arrow {
  transform: rotate(-8deg);
}

.doodle-note--hero-b {
  bottom: 10%;
  right: 4%;
  text-align: right;
  align-items: flex-end;
}

.doodle-note--hero-b .doodle-arrow {
  transform: scaleX(-1) rotate(10deg);
}

/* два пустых поля между текстом и моделью на широких экранах —
   крестик и сердце-каракуля, разного размера, без подписи */
.doodle-cross--hero {
  position: absolute;
  top: 42%;
  right: 37%;
  transform: rotate(-8deg);
}

.doodle-heart--hero {
  position: absolute;
  top: 61%;
  right: 46%;
  transform: rotate(6deg);
}

/* показываем каракули только на широких десктопах — это правило должно
   идти последним в каскаде, иначе его затирают display:flex у самих
   .doodle-note/.doodle-strike/.doodle-sparkles, объявленные выше */
@media (min-width: 1180px) {
  .doodle-desktop-only {
    display: block;
  }
  .doodle-note,
  .doodle-strike,
  .doodle-sparkles,
  .doodle-cross--hero,
  .doodle-heart--hero {
    display: flex;
  }
}

@media (max-width: 640px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    padding-top: 0.8rem;
  }

  .privacy-dialog {
    width: calc(100vw - 20px);
    height: min(760px, calc(100dvh - 20px));
    border-radius: 22px;
  }

  .privacy-dialog-head {
    padding: 1.05rem 1.1rem 0.85rem;
  }

  .privacy-dialog-body {
    padding: 1rem 1.1rem calc(1.3rem + env(safe-area-inset-bottom));
  }
}
