/* ============================================================
   MUNA / MUNAI — лендинг
   Направление «Цикл»: скролл страницы = лунный цикл.

   Токены. Два easing на весь проект, не десять:
   --ease      — раскрытия и UI
   --ease-mask — маски и переходы
   ============================================================ */

:root {
  --ink-deep: #02030a;
  --ink: #05070f;
  --veil: #0c1430;
  --veil-2: #111a38;

  --moonlight: #e8e6f0;
  --dim: #8b90a8;
  --dimmer: #5c6180;

  /* Фирменный акцент — тот же голубой градиент, что в приложении */
  --accent-a: #2563eb;
  --accent-b: #06b6d4;
  --accent: rgba(255, 213, 0, 0.9);
  --accent-soft: rgba(56, 166, 221, 0.16);
  --grad: linear-gradient(112deg, var(--accent-a) 0%, var(--accent-b) 100%);

  /* Второй фирменный акцент — золото из приложения.
     Разделение ролей: голубой — действие, золото — премиум и лунное. */
  --gold: rgba(255, 213, 0, 0.9);
  --gold-grad: linear-gradient(135deg, rgba(255, 213, 0, 0.72) 0%, rgba(255, 213, 0, 1) 100%);
  --gold-soft: rgba(255, 213, 0, 0.14);
  --gold-line: rgba(255, 213, 0, 0.20);
  --periwinkle: #7c86c4;

  --line: rgba(232, 230, 240, 0.09);
  --line-strong: rgba(232, 230, 240, 0.18);
  --surface: rgba(232, 230, 240, 0.035);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-mask: cubic-bezier(0.76, 0, 0.24, 1);

  --shell: 1180px;
  --gut: clamp(20px, 5vw, 56px);
  --r: 16px;

  --f-display: 'Moonglade', 'Times New Roman', serif;
  --f-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@font-face {
  font-family: 'Moonglade';
  src: url('/assets/moonglade.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Inter — вариативный, локально. Google Fonts не используем: лишний DNS +
   TLS к внешнему домену на критическом пути, а у части RU-аудитории он
   работает через раз. unicode-range режет загрузку по алфавиту, поэтому
   англоязычная версия кириллицу не тянет вообще. */
@font-face {
  font-family: 'Inter';
  src: url('/assets/inter-cyrillic-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/inter-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2192, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   База
   ============================================================ */

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

html {
  /* ЕДИНСТВЕННЫЙ слой фона. Раньше поверх плоского html висел
     фиксированный слой sky с градиентом — в зонах overscroll между ними
     вылезал шов. Теперь градиент растянут на всю высоту документа,
     подложке под ним взяться неоткуда.
     Радиальные пятна расставлены по высоте документа в процентах,
     поэтому по мере прокрутки свет меняется сам, без единой строки JS. */
  background-color: #05070f;
  background-image:
    radial-gradient(56vw 38vh at 88% 3%,  rgba(37, 99, 235, 0.30) 0%, transparent 62%),
    radial-gradient(46vw 26vh at 4%  22%, rgba(6, 182, 212, 0.16) 0%, transparent 66%),
    radial-gradient(52vw 30vh at 96% 44%, rgba(124, 134, 196, 0.18) 0%, transparent 64%),
    radial-gradient(48vw 26vh at 2%  63%, rgba(240, 207, 107, 0.10) 0%, transparent 66%),
    radial-gradient(58vw 34vh at 78% 84%, rgba(37, 99, 235, 0.22) 0%, transparent 64%),
    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.92' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, repeat;
  background-size: auto, auto, auto, auto, auto, 180px 180px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: transparent;
  color: var(--moonlight);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

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

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gut);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 600;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

.sr {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   Навигация
   ============================================================ */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  padding-block: 18px;
  transition: padding 400ms var(--ease), background 400ms var(--ease);
}
.nav.is-stuck {
  padding-block: 10px;
  background: rgba(5, 7, 15, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.wordmark {
  font-family: var(--f-display);
  font-size: 30px;
  letter-spacing: 0.16em;
  line-height: 1;
  color: var(--moonlight);
  padding-block: 4px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  color: var(--dim);
}
.nav-links a { position: relative; padding-block: 6px; transition: color 240ms var(--ease); }
.nav-links a:hover { color: var(--moonlight); }
/* Подчёркивание-вайп вместо смены цвета фона */
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 380ms var(--ease-mask);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-side { display: flex; align-items: center; gap: 14px; }

.lang {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  letter-spacing: 0.09em;
  color: var(--dimmer);
  background: var(--surface);
  border-radius: 50px;
  padding: 4px;
}
.lang a, .lang span {
  padding: 4px 10px;
  border-radius: 50px;
  transition: color 240ms var(--ease), background 240ms var(--ease);
}
.lang a:hover { color: var(--moonlight); }
.lang [aria-current] { background: var(--surface); color: var(--moonlight); }

.burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: none;
  border-radius: 50px;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 17px; height: 1.5px;
  background: var(--moonlight);
  position: relative;
  transition: transform 340ms var(--ease-mask), background 200ms;
}
.burger span::before, .burger span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 17px; height: 1.5px;
  background: var(--moonlight);
  transition: transform 340ms var(--ease-mask);
}
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger.is-open span { background: transparent; }
.burger.is-open span::before { transform: translateY(6px) rotate(45deg); }
.burger.is-open span::after { transform: translateY(-6px) rotate(-45deg); }

/* ============================================================
   Кнопки
   ============================================================ */

.btn {
  --btn-fill: var(--accent);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 30px;
  border: none;
  border-radius: 50px;
  background: rgba(232, 230, 240, 0.07);
  color: var(--btn-fill);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color 320ms var(--ease);
  touch-action: manipulation;
}
/* Заливка снизу вверх, а не смена background-color */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-fill);
  transform: translateY(101%);
  transition: transform 420ms var(--ease-mask);
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { color: var(--ink); }
.btn:active { transform: scale(0.98); }

.btn-solid { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -12px rgba(37, 99, 235, 0.65); }
.btn-solid::before { background: transparent; }
.btn-solid:hover { color: #fff; filter: brightness(1.12) saturate(1.08); }

.btn-ghost { --btn-fill: var(--moonlight); background: rgba(232, 230, 240, 0.05); color: var(--dim); }
.btn-ghost:hover { color: var(--ink); }

.btn-sm { min-height: 40px; padding: 0 20px; font-size: 13px; }

/* ============================================================
   Секции и надзаголовки
   ============================================================ */

.sec { position: relative; padding-block: clamp(88px, 12vw, 168px); }
.sec-line {
  background-image: linear-gradient(90deg, transparent, var(--line) 14%, var(--line) 86%, transparent);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top;
}

/* Надзаголовок = название лунной фазы. Структура кодирует смысл,
   а не украшает: секции идут по циклу, как и продукт. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dimmer);
}
.eyebrow::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft), 0 0 14px 2px rgba(255, 213, 0, 0.35);
  flex: none;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }

h2 {
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.08;
  max-width: 17ch;
}
.sec-lede {
  margin: 20px 0 0;
  max-width: 46ch;
  color: var(--dim);
  font-size: clamp(16px, 1.6vw, 19px);
}

/* ============================================================
   Герой
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 130px 90px;
}
/* Сетка сломана намеренно: контент занимает 7 из 12 колонок слева,
   правые 5 отданы луне. Никакой центрированной колонки. */
.hero-in { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero-copy { grid-column: 1 / 8; }
.hero-side { grid-column: 8 / 13; }

/* Список функций в герое: человек за две секунды понимает, что внутри,
   ещё до того как начал скроллить. И правая половина не пустует. */
.fn-list { display: flex; flex-direction: column; gap: 2px; }
.fn {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 13px 15px;
  border-radius: 13px;
  transition: background 320ms var(--ease);
}
.fn:hover { background: var(--surface); }
.fn-ico { flex: none; width: 21px; height: 21px; margin-top: 2px; color: var(--accent); }
.fn-ico svg { width: 100%; height: 100%; stroke-width: 1.5; }
.fn b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.fn i { display: block; margin-top: 2px; font-style: normal; font-size: 13px; line-height: 1.45; color: var(--dim); }

.today {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 18px 8px 14px;
  border-radius: 50px;
  background: var(--surface);
  box-shadow: 0 0 34px -8px rgba(255, 213, 0, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--dim);
}
.today b {
  font-family: var(--f-display);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

h1 {
  margin: 30px 0 0;
  font-size: clamp(2.05rem, 4.3vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}
/* Курсивная строка на Moonglade — контраст «тонкий вытянутый / плотный гротеск» */
h1 .glade {
  display: block;
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--periwinkle);
}

.hero-sub {
  margin: 28px 0 0;
  max-width: 44ch;
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--dim);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero-note { margin: 18px 0 0; font-size: 13px; color: var(--dimmer); }

/* Маска для построчного раскрытия. Каждая строка едет из-под своей
   границы — вместо общего fade-up на 20px, который выдаёт шаблон. */
.mask { display: block; overflow: hidden; }
.mask > * {
  display: block;
  transform: translateY(105%);
  transition: transform 1000ms var(--ease);
}
.is-in .mask > * { transform: translateY(0); }
.mask:nth-of-type(2) > * { transition-delay: 90ms; }
.mask:nth-of-type(3) > * { transition-delay: 180ms; }

.rise { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.is-in .rise, .rise.is-in { opacity: 1; transform: none; }
.d1 { transition-delay: 120ms; }
.d2 { transition-delay: 220ms; }
.d3 { transition-delay: 320ms; }

/* ============================================================
   Возможности — асимметричное бенто, а не сетка равных карточек
   ============================================================ */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-top: 56px;
}
.cell {
  grid-column: span 2;
  padding: 30px 26px 34px;
  border-radius: var(--r);
  background: linear-gradient(168deg, rgba(232, 230, 240, 0.07) 0%, rgba(232, 230, 240, 0.025) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 22px 46px -34px rgba(0, 0, 0, 0.9);
  transition: border-color 420ms var(--ease), background 420ms var(--ease), transform 420ms var(--ease);
}
.cell:hover { background: linear-gradient(168deg, rgba(232, 230, 240, 0.11) 0%, rgba(232, 230, 240, 0.04) 100%); transform: translateY(-3px); }
.cell-wide { grid-column: span 3; }

.cell-ico {
  width: 34px; height: 34px;
  margin-bottom: 20px;
  color: var(--accent);
}
.cell-ico svg { width: 100%; height: 100%; stroke-width: 1.4; }
.cell h3 { font-size: 19px; line-height: 1.25; margin-bottom: 9px; }
.cell p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--dim); }

/* ============================================================
   Интерфейс — рамка телефона рисуется в CSS, внутри настоящий webp
   ============================================================ */

.rail {
  display: flex;
  gap: clamp(16px, 2.6vw, 30px);
  margin-top: 56px;
  padding-block: 8px;
  padding-inline: var(--gut);
  margin-inline: calc(var(--gut) * -1);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }

.phone {
  flex: none;
  scroll-snap-align: center;
  width: 232px;
}
.phone-body {
  position: relative;
  padding: 9px;
  border-radius: 34px;
  background: linear-gradient(160deg, rgba(232, 230, 240, 0.14), rgba(232, 230, 240, 0.02));
  box-shadow: 0 26px 60px -20px rgba(0, 0, 0, 0.85);
}
.phone-body::after {
  content: '';
  position: absolute;
  top: 17px; left: 50%;
  width: 62px; height: 5px;
  transform: translateX(-50%);
  border-radius: 50px;
  background: rgba(2, 3, 10, 0.9);
}
.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 428 / 926;
  border-radius: 26px;
  background: var(--ink-deep);
}
.phone figcaption {
  margin-top: 16px;
  font-size: 13px;
  letter-spacing: 0.03em;
  color: var(--dimmer);
  text-align: center;
}
.rail-hint { margin-top: 22px; font-size: 13px; color: var(--dimmer); }

/* ============================================================
   Тарифы — полнолуние цикла, здесь золото на пике
   ============================================================ */

.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 56px;
  align-items: stretch;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 32px 28px 30px;
  border-radius: var(--r);
  background: linear-gradient(168deg, rgba(232, 230, 240, 0.07) 0%, rgba(232, 230, 240, 0.02) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), 0 26px 54px -38px rgba(0, 0, 0, 0.9);
  transition: border-color 420ms var(--ease), transform 420ms var(--ease);
}
.plan:hover { transform: translateY(-4px); }
.plan-max {
  background:
    radial-gradient(120% 70% at 50% 0%, var(--gold-soft) 0%, transparent 62%),
    linear-gradient(168deg, rgba(232, 230, 240, 0.07) 0%, rgba(232, 230, 240, 0.02) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 213, 0, 0.22), 0 26px 60px -38px rgba(255, 213, 0, 0.28);
}
.plan-tag {
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 4px 12px;
  border-radius: 50px;
  background: var(--gold-grad);
  color: #1a1a1a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.plan-name {
  font-family: var(--f-display);
  font-size: 30px;
  letter-spacing: 0.09em;
  line-height: 1;
}
.plan-max .plan-name { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.plan-plus .plan-name {
  background: linear-gradient(100deg, var(--accent-a), var(--accent-b));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 18px 0 4px;
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.plan-price span { font-size: 15px; font-weight: 400; color: var(--dimmer); letter-spacing: 0; }
.plan-note { margin: 0 0 24px; font-size: 14px; color: var(--dim); }
.plan ul { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-direction: column; gap: 11px; flex: 1; }
.plan li { display: flex; gap: 11px; font-size: 15px; line-height: 1.45; color: var(--dim); }
.plan li svg { flex: none; width: 17px; height: 17px; margin-top: 3px; color: var(--accent); stroke-width: 2; }
.plan-plus li svg { color: var(--accent-b); }
.plan-start li svg { color: var(--dimmer); }

/* ============================================================
   FAQ — аккордеон на <details>, работает и без JS
   ============================================================ */

.faq {
  margin-top: 48px;
  background-image: linear-gradient(90deg, var(--line), transparent 92%);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top;
}
.qa {
  background-image: linear-gradient(90deg, var(--line), transparent 92%);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: bottom;
}
.qa summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
  font-size: clamp(16px, 1.8vw, 19px);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: color 260ms var(--ease);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--accent); }
.qa-sign {
  flex: none;
  position: relative;
  width: 16px; height: 16px;
  margin-top: 6px;
}
.qa-sign::before, .qa-sign::after {
  content: '';
  position: absolute;
  top: 50%; left: 0;
  width: 16px; height: 1.5px;
  background: currentColor;
  transition: transform 380ms var(--ease-mask), opacity 260ms;
}
.qa-sign::after { transform: rotate(90deg); }
.qa[open] .qa-sign::after { transform: rotate(0deg); opacity: 0; }
.qa-body { padding: 0 0 28px; max-width: 62ch; color: var(--dim); font-size: 16px; }
.qa-body p { margin: 0 0 12px; }
.qa-body p:last-child { margin-bottom: 0; }

/* ============================================================
   Финальный CTA
   ============================================================ */

.finale { position: relative; text-align: center; padding-block: clamp(96px, 14vw, 200px); }
.finale h2 { margin-inline: auto; max-width: 15ch; }
.finale .sec-lede { margin-inline: auto; }
.finale .hero-cta { justify-content: center; }

/* ============================================================
   Подвал
   ============================================================ */

.foot {
  padding-block: 56px 40px;
  background-image: linear-gradient(90deg, transparent, var(--line) 14%, var(--line) 86%, transparent);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
.foot .wordmark { font-size: 34px; }
.foot-desc { margin: 14px 0 0; max-width: 34ch; font-size: 14px; color: var(--dimmer); }
.foot h4 {
  margin: 6px 0 16px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--dimmer);
}
.foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.foot li a { font-size: 14px; color: var(--dim); transition: color 240ms var(--ease); }
.foot li a:hover { color: var(--moonlight); }
.foot-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  margin-top: 48px;
  padding-top: 26px;
  background-image: linear-gradient(90deg, var(--line), transparent 88%);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top;
  font-size: 13px;
  color: var(--dimmer);
}
.foot-base a { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   Адаптив. Брейкпоинты 1024 / 768 / 480.
   ============================================================ */

@media (max-width: 1024px) {
  .hero-copy { grid-column: 1 / 8; }
  .hero-side { grid-column: 8 / 13; }
  .cell, .cell-wide { grid-column: span 3; }
  .plans { grid-template-columns: 1fr; max-width: 480px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .nav-links {
    position: fixed;
    inset: 0 0 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 92px var(--gut) 34px;
    background: rgba(5, 7, 15, 0.96);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-100%);
    transition: transform 520ms var(--ease-mask);
  }
  .nav-links.is-open { transform: translateY(0); }
  /* Панель выезжает от самого верха, поэтому лого и бургер поднимаем
     над ней — иначе шапка при открытом меню выглядит пустой. */
  .nav-links { z-index: 1; }
  .wordmark, .burger { position: relative; z-index: 2; }
  .nav-links a { width: 100%; padding-block: 15px; font-size: 20px; color: var(--moonlight); }
  .nav-links a::after { display: none; }
  .burger { display: inline-flex; }
  .nav-side .btn { display: none; }

  .hero { min-height: auto; padding-block: 128px 72px; }
  .hero-copy, .hero-side { grid-column: 1 / -1; }
  .hero-side { margin-top: 34px; }
  .hero-cta .btn { flex: 1 1 220px; }

  .cell, .cell-wide { grid-column: span 6; }
  .bento { gap: 12px; }
  .foot-grid { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 480px) {
  .wordmark { font-size: 26px; }
  .today { font-size: 12px; }
  .today b { font-size: 22px; }
  .sec { padding-block: 72px; }
  .phone { width: min(268px, 76vw); }
}

/* Тонкая настройка под очень широкие экраны */
/* ============================================================
   Доступность: без движения — значит без движения.
   Всё видимо сразу, ничего не едет.
   ============================================================ */

@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;
  }
  .mask > *, .rise { transform: none !important; opacity: 1 !important; }
}

/* Печать — без фиксированных слоёв */
@media print {
  .nav { display: none; }
  body { background: #fff; color: #000; }
}

/* ============================================================
   ПРОБЛЕМА — короткая секция перед функциями
   ============================================================ */

.pain { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; align-items: start; }
.pain-head { grid-column: 1 / 6; position: sticky; top: 96px; }
.pain-list { grid-column: 7 / 13; display: flex; flex-direction: column; gap: 2px; }
.pain-row {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 17px 0;
  background-image: linear-gradient(90deg, var(--line), transparent 90%);
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: bottom;
  font-size: clamp(15px, 1.55vw, 17px);
  line-height: 1.5;
  color: var(--dim);
}
.pain-row b {
  flex: none;
  width: 26px;
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--dimmer);
  font-variant-numeric: tabular-nums;
}
.pain-row em { color: var(--moonlight); font-style: normal; font-weight: 600; }
.pain-row em::after { content: ' — '; color: var(--dimmer); font-weight: 400; }

/* ============================================================
   ФУНКЦИИ — скроллителлинг.
   Телефон липнет в вьюпорте, текст проезжает мимо, поверх
   скриншота работает живой слой демонстрации.
   ============================================================ */

.feat { position: relative; }
.feat-in { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(24px, 4vw, 64px); }

/* Чётные функции — телефон справа. Ломаем ритм, чтобы не было колонки. */
.feat-stage { grid-column: 1 / 6; position: sticky; top: 0; height: 100svh; display: grid; place-items: center; }
.feat-text { grid-column: 7 / 13; padding-block: 18vh; display: flex; flex-direction: column; gap: 14vh; }
.feat:nth-of-type(even) .feat-stage { grid-column: 8 / 13; }
.feat:nth-of-type(even) .feat-text { grid-column: 1 / 7; }

.feat-step { max-width: 42ch; }
.feat-step h3 { font-size: clamp(23px, 2.9vw, 34px); line-height: 1.14; margin-bottom: 14px; }
.feat-step p { margin: 0; color: var(--dim); font-size: clamp(15px, 1.6vw, 18px); }
.feat-step .kv {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.kv span {
  padding: 6px 13px;
  background: rgba(232, 230, 240, 0.05);
  border-radius: 50px;
  font-size: 13px;
  color: var(--dimmer);
}

/* Липкий телефон */
.demo { width: 288px; }
.demo-body {
  position: relative;
  padding: 10px;
  border-radius: 40px;
  background: linear-gradient(160deg, rgba(232, 230, 240, 0.16), rgba(232, 230, 240, 0.02));
  box-shadow: 0 34px 80px -24px rgba(0, 0, 0, 0.9);
}
.demo-screen {
  position: relative;
  border-radius: 31px;
  overflow: hidden;
  background: var(--ink-deep);
  aspect-ratio: 428 / 926;
}
.demo-screen img { width: 100%; height: 100%; object-fit: cover; }
.demo-body::after {
  content: '';
  position: absolute;
  top: 19px; left: 50%;
  width: 66px; height: 5px;
  transform: translateX(-50%);
  border-radius: 50px;
  background: rgba(2, 3, 10, 0.92);
  z-index: 3;
}

/* Живой слой поверх скриншота */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
/* Затемнение скриншота, чтобы накладка читалась */
.overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 3, 10, 0.80) 0%, rgba(2, 3, 10, 0.94) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.ov-in {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  overflow: hidden;
}
/* Ничто внутри накладки не имеет права быть шире экрана телефона */
.ov-in > * { max-width: 100%; }

/* ============================================================
   Шесть живых накладок. Каждая показывает механику функции.

   Управление прогрессом: нативный CSS scroll-timeline там, где он
   есть (Chrome с 115, Safari с 26 — вместе ~83% рынка, в Safari 26.4+
   считается в отдельном потоке, поэтому на iPhone не дёргается).
   Где нет (Firefox) — тот же кейфрейм по классу .is-in от
   IntersectionObserver. Одна анимация, два способа её проиграть.
   ============================================================ */

.ov-title {
  position: absolute;
  top: 22px; left: 22px; right: 22px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dimmer);
}

/* --- 1. Лунный календарь: круг фаз проворачивается --- */
.ov-wheel { width: 72%; aspect-ratio: 1; position: relative; }
.ov-wheel-ring {
  position: absolute; inset: 0;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
}
.ov-wheel-spin { position: absolute; inset: 0; transform: rotate(-140deg); }
.ov-pip {
  position: absolute;
  top: 50%; left: 50%;
  width: 15px; height: 15px;
  margin: -7.5px;
  border-radius: 50%;
  background: var(--periwinkle);
  opacity: 0.42;
  transform: rotate(var(--a)) translateY(-46%) rotate(calc(var(--a) * -1));
}
.ov-pip.is-now { background: var(--gold); opacity: 1; box-shadow: 0 0 0 6px var(--gold-soft); }
.ov-day {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}
.ov-day b {
  display: block;
  font-family: var(--f-display);
  font-size: 48px;
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.ov-day i { font-style: normal; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dimmer); }

/* --- 2. Цикл: кольцо заполняется --- */
.ov-ring { width: 74%; aspect-ratio: 1; }
.ov-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ov-ring-bg { fill: none; stroke: var(--line-strong); stroke-width: 5; }
.ov-ring-fill {
  fill: none;
  stroke: var(--gold);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
}
.ov-ring-label { position: absolute; text-align: center; }
.ov-ring-label b { display: block; font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ov-ring-label i { font-style: normal; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dimmer); }

/* --- 3. Сны: текст печатается, приезжает разбор --- */
.ov-chat { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.ov-bubble {
  align-self: flex-end;
  max-width: 92%;
  padding: 12px 15px;
  border-radius: 14px 14px 4px 14px;
  background: rgba(124, 134, 196, 0.28);
  font-size: 12.5px;
  line-height: 1.42;
}
.ov-type { display: block; clip-path: inset(0 100% 0 0); }
.ov-reply {
  align-self: flex-start;
  max-width: 96%;
  padding: 13px 15px;
  border-radius: 15px 15px 15px 4px;
  background: rgba(56, 166, 221, 0.10);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--moonlight);
  opacity: 0;
  transform: translateY(14px);
}
.ov-reply b { color: var(--accent); }

/* --- 4. Кто я: карточки стихий выкладываются --- */
.ov-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; width: 100%; }
.ov-card {
  padding: 13px 8px 15px;
  border-radius: 13px;
  background: rgba(232, 230, 240, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
  text-align: center;
  opacity: 0;
  transform: translateY(22px) rotate(var(--r, 0deg));
}
.ov-card u { display: block; font-family: var(--f-display); font-size: 24px; text-decoration: none; color: var(--accent); }
.ov-card span { display: block; margin-top: 7px; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dimmer); }

/* --- 5. Убеждения: старое зачёркивается, новое пишется --- */
.ov-belief { width: 100%; display: flex; flex-direction: column; gap: 20px; }
.ov-old { position: relative; font-size: 13.5px; line-height: 1.45; color: var(--dim); }
.ov-old::after {
  content: '';
  position: absolute;
  top: 52%; left: 0;
  height: 1.5px;
  width: 0;
  background: #d8657a;
}
.ov-arrow { align-self: center; color: var(--dimmer); opacity: 0; }
.ov-new {
  font-size: 14px;
  line-height: 1.45;
  color: var(--moonlight);
  border-left: 2px solid var(--accent);
  padding-left: 13px;
  opacity: 0;
  transform: translateX(-10px);
}

/* ============================================================
   Кейфреймы накладок
   ============================================================ */

@keyframes ovSpin   { to { transform: rotate(220deg); } }
@keyframes ovRing   { to { stroke-dashoffset: 88; } }
@keyframes ovType   { to { clip-path: inset(0 0 0 0); } }
@keyframes ovIn     { to { opacity: 1; transform: none; } }
@keyframes ovStrike { to { width: 100%; } }

/* ------------------------------------------------------------
   Привод 1 — нативный. Прогресс жёстко привязан к скроллу:
   демо реально «отматывается» пальцем, а не просто проигрывается.
   ------------------------------------------------------------ */
@supports (animation-timeline: view()) {
  .demo-anim {
    animation-timeline: view();
    animation-range: entry 32% cover 62%;
    animation-timing-function: linear;
    animation-fill-mode: both;
  }
  .ov-wheel-spin.demo-anim  { animation-name: ovSpin; }
  .ov-ring-fill.demo-anim   { animation-name: ovRing; }
  .ov-type.demo-anim        { animation-name: ovType; }
  .ov-reply.demo-anim,
  .ov-arrow.demo-anim,
  .ov-new.demo-anim,
  .ov-card.demo-anim        { animation-name: ovIn; }
  .ov-old::after            { animation: ovStrike linear both; animation-timeline: view(); animation-range: entry 34% cover 50%; }

  /* Разные фазы внутри одной демонстрации — через сдвиг диапазона */
  .ov-reply.demo-anim  { animation-range: entry 52% cover 74%; }
  .ov-card:nth-child(1).demo-anim { animation-range: entry 34% cover 48%; }
  .ov-card:nth-child(2).demo-anim { animation-range: entry 40% cover 54%; }
  .ov-card:nth-child(3).demo-anim { animation-range: entry 46% cover 60%; }
  .ov-card:nth-child(4).demo-anim { animation-range: entry 52% cover 66%; }
  .ov-arrow.demo-anim { animation-range: entry 46% cover 58%; }
  .ov-new.demo-anim   { animation-range: entry 54% cover 70%; }

  /* Раскрытия секций тоже уходят на нативный таймлайн — минус JS */
  .rise { animation: ovIn linear both; animation-timeline: view(); animation-range: entry 8% entry 46%; opacity: 1; }
  .mask > * { animation: ovMask linear both; animation-timeline: view(); animation-range: entry 4% entry 44%; }
}
@keyframes ovMask { from { transform: translateY(105%); } to { transform: translateY(0); } }

/* ------------------------------------------------------------
   Привод 2 — запасной (Firefox и старые браузеры).
   Тот же кейфрейм, но по времени, включается классом от
   IntersectionObserver.
   ------------------------------------------------------------ */
@supports not (animation-timeline: view()) {
  .is-in .ov-wheel-spin { animation: ovSpin 1400ms var(--ease) both; }
  .is-in .ov-ring-fill  { animation: ovRing 1500ms var(--ease) both; }
  .is-in .ov-type       { animation: ovType 1100ms var(--ease-mask) 200ms both; }
  .is-in .ov-reply      { animation: ovIn 700ms var(--ease) 1300ms both; }
  .is-in .ov-card       { animation: ovIn 620ms var(--ease) both; }
  .is-in .ov-card:nth-child(1) { animation-delay: 200ms; }
  .is-in .ov-card:nth-child(2) { animation-delay: 320ms; }
  .is-in .ov-card:nth-child(3) { animation-delay: 440ms; }
  .is-in .ov-card:nth-child(4) { animation-delay: 560ms; }
  .is-in .ov-old::after { animation: ovStrike 620ms var(--ease-mask) 260ms both; }
  .is-in .ov-arrow      { animation: ovIn 500ms var(--ease) 800ms both; }
  .is-in .ov-new        { animation: ovIn 700ms var(--ease) 980ms both; }
}

/* ============================================================
   Адаптив секций функций
   ============================================================ */

@media (max-width: 900px) {
  /* Липкость на телефоне отключаю: sticky + 100svh внутри длинной
     секции на iOS Safari прыгает при показе/скрытии панели браузера. */
  .feat-in { grid-template-columns: 1fr; gap: 30px; }
  .feat-stage,
  .feat:nth-of-type(even) .feat-stage { grid-column: 1; position: static; height: auto; }
  .feat-text,
  .feat:nth-of-type(even) .feat-text { grid-column: 1; padding-block: 0; gap: 40px; }
  .feat { padding-block: 64px; }
  .demo { width: min(272px, 78vw); }
  /* В одну колонку липкий заголовок не нужен: список поехал бы прямо
     под ним и текст лёг бы на текст. Базовое правило .pain-head описано
     ниже по файлу, поэтому сброс обязан быть здесь, а не выше. */
  .pain-head, .pain-list { grid-column: 1 / -1; position: static; }
  .pain { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  /* Все демо — сразу в конечном состоянии, ничего не движется */
  .ov-wheel-spin { transform: rotate(220deg) !important; }
  .ov-ring-fill { stroke-dashoffset: 88 !important; }
  .ov-type { clip-path: none !important; }
  .ov-reply, .ov-card, .ov-arrow, .ov-new { opacity: 1 !important; transform: none !important; }
  .ov-old::after { width: 100% !important; }
  .feat-stage { position: static; height: auto; }
}

/* ============================================================
   ДЕКОР СЕКЦИЙ
   Строго и монохромно: только тонкие кольца и мелкие звёзды,
   один приглушённый белый. Лежит внутри секций и уезжает
   вместе с контентом.
   ============================================================ */

.decor {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.sec > .shell,
.hero > .shell,
.finale > .shell { position: relative; z-index: 1; }

/* Кольцо. Через inset-тень, а не через градиент: у градиента полоса
   задаётся в процентах от радиуса, поэтому большие кольца выходили
   заметно толще мелких. Тень даёт ровно 1px при любом диаметре. */
.d-ring {
  position: absolute;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(232, 230, 240, 0.075);
}
.d-ring.faint { box-shadow: inset 0 0 0 1px rgba(232, 230, 240, 0.045); }

/* Звезда — та же четырёхлучевая, что в приложении (StarsBackground.vue):
   тот же путь, те же пропорции 4:5, то же мерцание starFade. Цвет
   приглушён до общего белого декора, вместо чистого white. */
.d-star {
  position: absolute;
  color: rgba(232, 230, 240, 0.8);
  animation: starFade ease-in-out infinite;
  will-change: opacity;
}
.d-star.dim { color: rgba(232, 230, 240, 0.45); }

@keyframes starFade {
  0%, 100% { opacity: 0; }
  30%, 70%  { opacity: 0.6; }
  50%       { opacity: 0.9; }
}

@media (max-width: 900px) {
  .d-ring { opacity: 0.4; }
  .d-star { opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
  /* Без мерцания — звёзды просто стоят */
  .d-star { animation: none; opacity: 0.55; }
}
