/* Лендинг АСТРА space. Цвета, ступени, шкала шрифтов, скругления и отступы — brand/DESIGN.md и брендбук (разд. 4, 6, 7, Приложение В);
   шрифты свои — Literata и Manrope (без Google Fonts: запрос к чужому домену отдавал бы IP посетителя за рубеж).
   Inline-стилей в разметке нет — CSP разрешает стили только с нашего домена. Анимации — только здесь и в motion.js.
   Картинки — только свои файлы из img/ (img-src 'self'); пока файла нет, виден запасной цвет контейнера. */

/* Макет второй итерации (по разбору образца): один фон страницы, первый экран на всю ширину без рамки, секции разделены воздухом и линиями,
   карточки приложений — тонкая рамка без заливок, подписи заглавными вразрядку. Цвет живёт в картинах.
   Цвета, шрифты, скругления — brand/DESIGN.md и брендбук; inline-стилей нет (CSP). */

/* Тёмная тема — по умолчанию; светлая — только по выбору посетителя. */
:root {
  --bg: #1b1f3b;
  --ink: #f7f5ef;
  --ink2: #e6ddf8;
  --lead: #e6ddf8;
  --link: #b9a3e5;
  --line: #3a3d5a;          /* тонкие разделители секций и рамки карточек (декор) */
  --line-ui: #727797;       /* граница интерактивного (переключатель темы, вторичная кнопка), не ниже 3 : 1 */
  --btn-bg: #f7f5ef;
  --btn-bg-hover: #ffffff;
  --btn-ink: #1b1f3b;
  --card-hover: rgba(247, 245, 239, 0.035);
  --star: #d6b179;
  --select-bg: #b9a3e5;
  --select-ink: #1b1f3b;
  --haze-a: rgba(139, 111, 198, 0.16);
  --haze-b: rgba(185, 163, 229, 0.08);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-reveal: cubic-bezier(0.22, 0.61, 0.36, 1);
  --gutter: 32px;
  --air: 176px;
  /* Левый край картины тише: под текстом картина темнее, правее открывается полностью */
  --hero-fade-x: linear-gradient(to right, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.3) 38%, #000 68%);
  --hero-fade-y: linear-gradient(transparent, #000 16%, #000 62%, transparent);
  --band-fade-x: var(--hero-fade-x);
  --band-fade-y: linear-gradient(transparent, #000 24%, #000 76%, transparent);
  --pic-fallback:
    radial-gradient(62% 72% at 68% 30%, rgba(185, 163, 229, 0.3), transparent 70%),
    linear-gradient(#142048, #1b1f3b);
  color-scheme: dark;
}

html[data-theme='light'] {
  --bg: #f7f5ef;
  --ink: #1b1f3b;
  --ink2: #34384d;
  --lead: #34384d;
  --link: #775aaf;
  --line: #ded9d1;
  --line-ui: #8a867e;
  --btn-bg: #1b1f3b;
  --btn-bg-hover: #2d2b50;
  --btn-ink: #f7f5ef;
  --card-hover: rgba(27, 31, 59, 0.03);
  --star: #755bae;
  --select-bg: #c9c7e8;
  --select-ink: #1b1f3b;
  --haze-a: rgba(201, 199, 232, 0.5);
  --haze-b: rgba(244, 215, 224, 0.4);
  /* В светлой теме слева почти чистый крем: под тёмным текстом картины нет, правее она проявляется туманом */
  --hero-fade-x: linear-gradient(to right, #000 78%, rgba(0, 0, 0, 0.6) 90%, transparent);
  --hero-fade-y: linear-gradient(transparent, #000 10%, #000 56%, rgba(0, 0, 0, 0.5) 78%, transparent);
  /* цитата: картина светлая, слева почти крем, справа насыщенно: растворяется справа, снизу и чуть сверху */
  --band-fade-x: linear-gradient(to right, #000 72%, rgba(0, 0, 0, 0.55) 87%, transparent);
  --band-fade-y: linear-gradient(transparent, #000 10%, #000 58%, transparent);
  --pic-fallback:
    radial-gradient(62% 72% at 68% 30%, rgba(255, 255, 255, 0.8), transparent 70%),
    linear-gradient(#f7f5ef, #e4dff2);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scrollbar-color: var(--line-ui) var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 24px;
  overflow-x: clip;
}

::selection { background: var(--select-bg); color: var(--select-ink); }

a { color: var(--link); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.wrap { max-width: calc(1120px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 300; text-wrap: balance; }
h3 { text-wrap: balance; }
h1 em { font-style: italic; }

/* Шапка: мелкие заглавные ссылки, ничем не залиты */
.header { padding-top: 24px; padding-bottom: 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-height: 44px; }
.brand-name { font-family: var(--serif); font-weight: 500; font-size: 26px; letter-spacing: 0.12em; }
.brand-name small { font-size: 22px; letter-spacing: 0.04em; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 32px; align-items: center; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }
.nav a { color: var(--ink2); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; transition: color 220ms ease-out; }
.nav a:hover { color: var(--ink); }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line-ui); background: transparent; color: var(--ink);
  font: inherit; font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer;
  transition: background-color 220ms ease-out, transform 120ms ease-out;
}
.theme-toggle:hover { background: var(--card-hover); }
.theme-toggle:active { transform: scale(0.97); }
.theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
.theme-toggle .icon-moon { display: none; }
html[data-theme='light'] .theme-toggle .icon-sun { display: none; }
html[data-theme='light'] .theme-toggle .icon-moon { display: inline; }

.sprite { position: absolute; }
.mark { color: var(--ink); flex: none; stroke-width: 1.8; } /* знак из приложения «Астра гороскоп»: звезда и орбита одним цветом темы; орбита в шапке толще (1,8 вместо 1,1 из файла), форма та же */

/* Кнопки: скругление S (12), рамка 1 px, подпись 14/20 заглавными с разрядкой 0,16 em (норма brand/DESIGN.md). Главная — светлая заливка, вторичная — прозрачная */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; padding: 0 32px; border-radius: 12px; border: 1px solid transparent;
  font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; text-decoration: none; text-align: center;
  transition: background-color 220ms ease-out, transform 120ms ease-out;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); }
.btn-secondary { border-color: var(--line-ui); color: var(--ink); background: transparent; }
.btn-secondary:hover { background: var(--card-hover); }

/* Картины: контейнер держит пропорцию и запасной цвет; сам файл — слой ::after, его включает motion.js (класс near).
   Края всегда растворяются в фон страницы маской: рамок, окон и теней у картин нет ни в одной теме. */
.pic { position: relative; overflow: hidden; background: var(--pic-fallback); aspect-ratio: var(--ar, 3 / 2); }
.pic::after { content: ''; position: absolute; inset: 0; background-repeat: no-repeat; background-size: cover; background-position: center; pointer-events: none; }
.pic.near::after { background-image: var(--img-dark); }
/* Картина показывается целиком, когда файл загружен целиком (motion.js ставит ready): иначе WebP рисуется по мере скачивания, полосой сверху вниз.
   Первый экран не ждёт: его картина предзагружается в <head>. Без скрипта (нет класса gate) картины видны как раньше. */
.gate .pic:not(.pic-hero)::after { opacity: 0; }
.gate .pic.ready::after { opacity: 1; transition: opacity 700ms var(--ease-reveal); }
@media (prefers-reduced-motion: reduce) { .gate .pic.ready::after { transition: none; } }
.p-hero { --img-dark: url('img/hero-dark.webp'); --img-light: url('img/hero-light.webp'); }
.p-chto { --img-dark: url('img/chto-takoe-dark.webp'); --img-light: url('img/chto-takoe-light.webp'); }
.p-samo { --img-dark: url('img/samopoznanie-dark.webp'); --img-light: url('img/samopoznanie-light.webp'); }
.p-legk { --img-dark: url('img/legkost-dark.webp'); --img-light: url('img/legkost-light.webp'); }
.p-igra { --img-dark: url('img/igra-dark.webp'); --img-light: url('img/igra-light.webp'); }
.p-gor { --img-dark: url('img/produkt-goroskop-dark-m.webp'); --img-light: url('img/produkt-goroskop-light-m.webp'); }
.p-stu { --img-dark: url('img/produkt-studio-dark-m.webp'); --img-light: url('img/produkt-studio-light-m.webp'); }
.p-sko { --img-dark: url('img/produkt-skoro-dark-m.webp'); --img-light: url('img/produkt-skoro-light-m.webp'); }
.p-cit { --img-dark: url('img/tsitata-dark.webp'); --img-light: url('img/tsitata-light.webp'); }
.p-kak { --img-dark: url('img/kak-govorim-dark.webp'); --img-light: url('img/kak-govorim-light.webp'); }
html[data-theme='light'] .pic:not(.has-img) { display: none; }
/* Светлая тема: свои светлые картины (<имя>-light.webp), тёмные только для тёмной темы; края растворяются масками в цвет страницы или карточки */
html[data-theme='light'] .pic.near::after { background-image: var(--img-light); }
.pic-soft {
  -webkit-mask-image: radial-gradient(ellipse 62% 66% at 50% 50%, #000 28%, rgba(0, 0, 0, 0.62) 52%, rgba(0, 0, 0, 0.2) 78%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 66% at 50% 50%, #000 28%, rgba(0, 0, 0, 0.62) 52%, rgba(0, 0, 0, 0.2) 78%, transparent 100%);
}
.pic-fadebottom {
  -webkit-mask-image: linear-gradient(#000 44%, rgba(0, 0, 0, 0.6) 66%, rgba(0, 0, 0, 0.2) 86%, transparent);
  mask-image: linear-gradient(#000 44%, rgba(0, 0, 0, 0.6) 66%, rgba(0, 0, 0, 0.2) 86%, transparent);
}
.pic-pano {
  -webkit-mask-image: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.12) 5%, rgba(0, 0, 0, 0.45) 11%, rgba(0, 0, 0, 0.82) 18%, #000 25%, #000 75%, rgba(0, 0, 0, 0.82) 82%, rgba(0, 0, 0, 0.45) 89%, rgba(0, 0, 0, 0.12) 95%, transparent), linear-gradient(transparent, rgba(0, 0, 0, 0.12) 6%, rgba(0, 0, 0, 0.45) 14%, rgba(0, 0, 0, 0.82) 24%, #000 34%, #000 66%, rgba(0, 0, 0, 0.82) 76%, rgba(0, 0, 0, 0.45) 86%, rgba(0, 0, 0, 0.12) 94%, transparent);
  mask-image: linear-gradient(to right, transparent, rgba(0, 0, 0, 0.12) 5%, rgba(0, 0, 0, 0.45) 11%, rgba(0, 0, 0, 0.82) 18%, #000 25%, #000 75%, rgba(0, 0, 0, 0.82) 82%, rgba(0, 0, 0, 0.45) 89%, rgba(0, 0, 0, 0.12) 95%, transparent), linear-gradient(transparent, rgba(0, 0, 0, 0.12) 6%, rgba(0, 0, 0, 0.45) 14%, rgba(0, 0, 0, 0.82) 24%, #000 34%, #000 66%, rgba(0, 0, 0, 0.82) 76%, rgba(0, 0, 0, 0.45) 86%, rgba(0, 0, 0, 0.12) 94%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}

/* Первый экран: картина на всю ширину страницы фоном, текст слева прямо на ней. Верх и низ растворяются в фон страницы */
.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-height: clamp(640px, 100svh, 900px); padding: 140px 0 120px; }
.hero > .header { position: absolute; z-index: 3; top: 0; left: 50%; transform: translateX(-50%); width: 100%; }
.pic-hero {
  position: absolute; z-index: -1; inset: 0; aspect-ratio: auto; background: none;
  -webkit-mask-image: var(--hero-fade-x), var(--hero-fade-y);
  mask-image: var(--hero-fade-x), var(--hero-fade-y);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.pic-hero::after { background-position: 82% center; }
.hero-inner { position: relative; width: 100%; }
.hero-text { max-width: 600px; }
.hero h1 { font-size: 76px; line-height: 78px; letter-spacing: -0.02em; margin-bottom: 28px; }
.lead { font-size: 18px; line-height: 28px; color: var(--lead); max-width: 44ch; margin-bottom: 40px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero-text > * { animation: rise 1200ms var(--ease-reveal) both; }
.hero-text > :nth-child(2) { animation-delay: 140ms; }
.hero-text > :nth-child(3) { animation-delay: 280ms; }
.hero-text > :nth-child(4) { animation-delay: 420ms; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }

.motion .reveal { opacity: 0; transform: translateY(40px); transition: opacity 1100ms var(--ease-reveal), transform 1100ms var(--ease-reveal); }
.motion .reveal.in { opacity: 1; transform: none; }
.motion .reveal-soft { opacity: 0; filter: blur(10px); transition: opacity 1100ms var(--ease-reveal), filter 1100ms var(--ease-reveal); }
.motion .reveal-soft.in { opacity: 1; filter: none; }
.cascade > .reveal:nth-child(2) { transition-delay: 120ms; }
.cascade > .reveal:nth-child(3) { transition-delay: 240ms; }

/* Мерцание звёзд (норма «Движение»): только малые звёзды, картины и текст не мерцают. Цикл от 3,6 с, opacity 0,4 ↔ 1, у каждой своя задержка;
   только opacity и transform, без filter. Работает при классе motion (скрипт есть, reduced-motion не включён); вне экрана пауза (motion.js снимает live).
   Без скрипта и при reduced-motion звёзды стоят на месте. */
/* Мерцание звёзд (норма «Движение»): каждая звезда мигает сама (свой цикл 3,6–5,2 с и своя задержка), opacity 0,15 ↔ 1,
   крупным звёздам и звёздочкам подписей ещё scale 0,8 ↔ 1; только opacity и transform, без filter.
   Работает при классе motion (скрипт есть, reduced-motion не включён); вне экрана пауза (motion.js снимает live).
   Без скрипта и при reduced-motion звёзды стоят на месте. Рисунки звёзд лежат в img/stars-a2.svg и stars-b2.svg (nginx кэширует svg на год:
   при смене рисунка файл получает новое имя). */
.eyebrow-star { transform-box: fill-box; transform-origin: center; }
.sky { display: none; position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.stars-on .sky { display: block; }
.sky-star { position: absolute; background: var(--star); opacity: 0.85; transform-origin: center; }
.sky-star.big, .sky-star.sm { -webkit-mask: url('img/stars-a2.svg') center / contain no-repeat; mask: url('img/stars-a2.svg') center / contain no-repeat; }
.sky-star.dot { -webkit-mask: url('img/stars-b2.svg') center / contain no-repeat; mask: url('img/stars-b2.svg') center / contain no-repeat; }
.sky-s1 { left: 56%; top: 16%; width: 28px; height: 28px; --tw: 3.6s; --tw-delay: -0.4s; }
.sky-s2 { left: 68%; top: 11%; width: 24px; height: 24px; --tw: 4.4s; --tw-delay: -2.1s; }
.sky-s3 { left: 74%; top: 25%; width: 26px; height: 26px; --tw: 5.2s; --tw-delay: -3.3s; }
.sky-s4 { left: 89%; top: 15%; width: 32px; height: 32px; --tw: 4.0s; --tw-delay: -1.2s; }
.sky-s5 { left: 63%; top: 32%; width: 24px; height: 24px; --tw: 4.8s; --tw-delay: -3.9s; }
.sky-s6 { left: 12%; top: 17%; width: 12px; height: 12px; --tw: 3.8s; --tw-delay: -1.0s; }
.sky-s7 { left: 27%; top: 13%; width: 10px; height: 10px; --tw: 4.6s; --tw-delay: -2.5s; }
.sky-s8 { left: 44%; top: 21%; width: 12px; height: 12px; --tw: 3.6s; --tw-delay: -0.2s; }
.sky-s9 { left: 52%; top: 12%; width: 10px; height: 10px; --tw: 5.0s; --tw-delay: -4.1s; }
.sky-s10 { left: 81%; top: 13%; width: 12px; height: 12px; --tw: 4.2s; --tw-delay: -2.9s; }
.sky-s11 { left: 95%; top: 24%; width: 10px; height: 10px; --tw: 4.4s; --tw-delay: -0.8s; }
.sky-s12 { left: 58%; top: 26%; width: 10px; height: 10px; --tw: 5.2s; --tw-delay: -1.7s; }
.sky-s13 { left: 20%; top: 25%; width: 5px; height: 5px; --tw: 3.9s; --tw-delay: -2.2s; }
.sky-s14 { left: 36%; top: 15%; width: 4px; height: 4px; --tw: 4.7s; --tw-delay: -3.4s; }
.sky-s15 { left: 72%; top: 18%; width: 5px; height: 5px; --tw: 3.7s; --tw-delay: -0.6s; }
.sky-s16 { left: 85%; top: 29%; width: 4px; height: 4px; --tw: 5.1s; --tw-delay: -4.4s; }
.sky-s17 { left: 49%; top: 30%; width: 4px; height: 4px; --tw: 4.3s; --tw-delay: -1.5s; }
/* В светлой картине планета стоит левее: крупные звёзды уходят с неё в пустое небо */
[data-theme='light'] .sky-s1 { left: 47%; top: 19%; }
[data-theme='light'] .sky-s2 { left: 84%; top: 11%; }
[data-theme='light'] .sky-s3 { left: 92%; top: 40%; }
[data-theme='light'] .sky-s5 { left: 96%; top: 23%; }
@keyframes twinkle { 0%, 100% { opacity: 0.15; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }
@keyframes twinkle-dim { 0%, 100% { opacity: 0.15; } 50% { opacity: 1; } }
.motion .twinkle { animation: twinkle var(--tw, 3.6s) ease-in-out var(--tw-delay, 0s) infinite paused; }
.motion .sky-star.sm, .motion .sky-star.dot { animation-name: twinkle-dim; }
.motion .twinkle.live { animation-play-state: running; }
.hero .eyebrow-star { --tw-delay: -0.4s; }
#products .twinkle { --tw: 4s; --tw-delay: -1.5s; }
#about .twinkle { --tw: 4.4s; --tw-delay: -2.6s; }
.section-voice .twinkle { --tw: 3.8s; --tw-delay: -0.9s; }

/* Переход между страницами (главная и документы): тихое появление 380 мс, сдвиг 24 px и прозрачность. В браузерах без поддержки страница открывается как обычно. */
@view-transition { navigation: auto; }
@keyframes vt-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes vt-out { to { opacity: 0; } }
::view-transition-old(root) { animation: vt-out 190ms ease-in-out both; }
::view-transition-new(root) { animation: vt-in 380ms ease-in-out both; }

/* Секции: общий фон страницы, воздух и тонкая линия над подписью. Туман — мягкие пятна без краёв */
.section { position: relative; isolation: isolate; padding-top: var(--air); padding-bottom: var(--air); }
.section::before {
  content: ''; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(44% 38% at 12% 22%, var(--haze-a), transparent 72%), radial-gradient(36% 30% at 92% 78%, var(--haze-b), transparent 72%);
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
}
#products { padding-top: 144px; }
#products::before { background: radial-gradient(50% 30% at 80% 8%, var(--haze-a), transparent 72%), radial-gradient(40% 28% at 8% 88%, var(--haze-b), transparent 72%); }
.section-voice::before { background: radial-gradient(50% 40% at 50% 70%, var(--haze-a), transparent 72%); }

/* Подпись секции: линия 1 px и мелкие заглавные с разрядкой 0,22 em (брендбук 7.11, не ниже 12 px) */
.eyebrow {
  display: flex; align-items: center; gap: 10px; margin: 0 0 56px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink2);
}
.eyebrow-star { fill: var(--star); flex: none; }
.hero .eyebrow { margin-bottom: 36px; max-width: 440px; }

/* Шапка секции: слева крупный заголовок, справа вводный абзац */
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 96px; align-items: end; margin-bottom: 72px; }
.sec-head h2 { margin: 0; font-size: 56px; line-height: 60px; letter-spacing: -0.02em; }
.intro { margin: 0; font-size: 16px; line-height: 26px; color: var(--ink2); max-width: 46ch; }

/* О бренде */
.pic-wide { --ar: 21 / 9; }
.values { list-style: none; margin: 120px 0 0; padding: 56px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, 1fr); gap: 56px 48px; }
.value { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.value .pic { width: 100%; }
.value h3 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 34px; line-height: 40px; }
.value p { margin: 0; color: var(--ink2); max-width: 32ch; }

/* Приложения: три отдельные карточки с зазором, рамка 1 px, без заливок и теней, скругление S (12) */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); transition: background-color 220ms ease-out; }
.card:hover, .card:focus-within { background: var(--card-hover); }
.card .pic { --ar: 3 / 2; }
.card-body { display: flex; flex: 1; flex-direction: column; gap: 14px; padding: 4px 32px 32px; }
.tag { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink2); }
.product .name { font-family: var(--serif); font-weight: 300; font-size: 36px; line-height: 42px; color: var(--ink); }
.product p { margin: 0; color: var(--ink2); max-width: 36ch; }
.product .links { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; border-top: 1px solid var(--line); font-size: 14px; line-height: 20px; }
.product .links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); }
.product .soon { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); }

/* Цитата: картина на всю ширину, как первый экран, края растворяются в фон страницы */
.band { position: relative; isolation: isolate; display: flex; align-items: center; min-height: 560px; padding: 120px 0; }
.pic-band {
  position: absolute; z-index: -1; inset: 0; aspect-ratio: auto; background: none;
  -webkit-mask-image: var(--band-fade-x), var(--band-fade-y);
  mask-image: var(--band-fade-x), var(--band-fade-y);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.pic-band::after { background-position: 78% center; }
.band .wrap { position: relative; width: 100%; }
.band p { margin: 0; max-width: 560px; font-family: var(--serif); font-weight: 300; font-size: 56px; line-height: 60px; letter-spacing: -0.02em; text-wrap: balance; }

/* Наш голос: без панели — линия, подпись, текст на общем фоне */
.section-voice { padding-bottom: 96px; }
.section-voice .sec-head { margin-bottom: 96px; align-items: start; }
.section-voice .intro { font-size: 18px; line-height: 30px; max-width: 52ch; }

/* Подвал */
.footer { border-top: 1px solid var(--line); padding-top: 40px; padding-bottom: 40px; font-size: 14px; line-height: 20px; color: var(--ink2); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; align-items: start; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.footer-links li + li { border-top: 1px solid var(--line); }
.footer a { display: inline-flex; align-items: center; min-height: 44px; }
.footer strong { color: var(--ink); font-weight: 600; }

/* Текстовая страница (документы) */
.doc { padding-top: 48px; padding-bottom: 96px; max-width: 760px; }
.doc h1 { font-size: 44px; line-height: 48px; letter-spacing: -0.015em; margin-bottom: 32px; }
.doc h2 { font-size: 34px; line-height: 40px; margin: 48px 0 12px; }
.doc p, .doc li { color: var(--ink2); max-width: 70ch; }
.doc ul { padding-left: 20px; }

/* Облегчённые картины для планшета и телефона */
@media (max-width: 999px) {
  .p-chto { --img-dark: url('img/chto-takoe-dark-m.webp'); --img-light: url('img/chto-takoe-light-m.webp'); }
  .p-samo { --img-dark: url('img/samopoznanie-dark-m.webp'); --img-light: url('img/samopoznanie-light-m.webp'); }
  .p-legk { --img-dark: url('img/legkost-dark-m.webp'); --img-light: url('img/legkost-light-m.webp'); }
  .p-igra { --img-dark: url('img/igra-dark-m.webp'); --img-light: url('img/igra-light-m.webp'); }
  .p-cit { --img-dark: url('img/tsitata-dark-m.webp'); --img-light: url('img/tsitata-light-m.webp'); }
  .p-kak { --img-dark: url('img/kak-govorim-dark-m.webp'); --img-light: url('img/kak-govorim-light-m.webp'); }
}

/* Планшет и телефон: текст сверху, картина внизу экрана растворяется вверх в фон страницы (кадр 4:3 из hero-dark-m.webp) */
@media (max-width: 1099px) {
  :root { --air: 128px; }
  .p-hero { --img-dark: url('img/hero-dark-m.webp'); --img-light: url('img/hero-light-m.webp'); }
  .hero { align-items: flex-start; min-height: 0; padding: 150px 0 500px; }
  .pic-hero { inset: auto 0 0 0; height: 440px;
    -webkit-mask-image: linear-gradient(transparent, rgba(0, 0, 0, 0.55) 24%, #000 50%, #000 74%, transparent 92%);
    mask-image: linear-gradient(transparent, rgba(0, 0, 0, 0.55) 24%, #000 50%, #000 74%, transparent 92%);
    -webkit-mask-composite: initial; mask-composite: initial; }
  .pic-hero::after { background-position: 50% 100%; }
  .hero h1 { font-size: 64px; line-height: 66px; }
  .nav { gap: 8px 20px; letter-spacing: 0.14em; }
  .theme-toggle { letter-spacing: 0.14em; padding: 0 14px; }
  .sec-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 56px; }
  .sec-head h2 { font-size: 46px; line-height: 50px; }
  .values { grid-template-columns: repeat(2, 1fr); margin-top: 88px; }
  .products { grid-template-columns: 1fr; }
  .products { gap: 16px; }
  .band { min-height: 480px; padding: 96px 0 220px; align-items: flex-start; }
  .pic-band {
    -webkit-mask-image: linear-gradient(transparent 28%, rgba(0, 0, 0, 0.6) 52%, #000 74%, transparent);
    mask-image: linear-gradient(transparent 28%, rgba(0, 0, 0, 0.6) 52%, #000 74%, transparent);
    -webkit-mask-composite: initial; mask-composite: initial; }
  .pic-band::after { background-position: 50% 100%; }
  .band p { font-size: 48px; line-height: 52px; }
}
@media (max-width: 699px) {
  .values { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; --air: 96px; }
  .header { position: relative; padding-top: 8px; padding-bottom: 0; gap: 0; }
  .nav { width: 100%; gap: 0 18px; letter-spacing: 0.14em; }
  .theme-toggle { position: absolute; top: 10px; right: 16px; width: 44px; padding: 0; justify-content: center; }
  .theme-toggle span { display: none; }
  .hero { padding: 132px 0 370px; }
  .pic-hero { height: 340px; }
  .hero h1 { font-size: 44px; line-height: 48px; }
  .lead { font-size: 17px; line-height: 26px; margin-bottom: 32px; }
  .btn { width: 100%; }
  .eyebrow { margin-bottom: 40px; }
  .hero .eyebrow { margin-bottom: 28px; }
  .sec-head h2 { font-size: 38px; line-height: 42px; }
  .values { margin-top: 64px; padding-top: 40px; gap: 48px; }
  .value h3 { font-size: 30px; line-height: 36px; }
  .card-body { padding: 4px 20px 24px; }
  .product .name { font-size: 32px; line-height: 38px; }
  .band { min-height: 440px; padding: 72px 0 200px; }
  .band p { font-size: 40px; line-height: 44px; }
  .section-voice .sec-head { margin-bottom: 64px; }
  .section-voice .intro { font-size: 17px; line-height: 28px; }
}

/* Прилипание к блокам при прокрутке: только на главной (у неё на html стоит data-hero; у documents.html нет).
   proximity: страница встаёт на начало блока, когда пользователь остановился ближе трети экрана от него (267 px на 1280, 281 на 390, 341 на 768);
   mandatory не берём: он не выпускает с первого экрана и мешает дочитать блок выше экрана.
   Точка прилипания — метка 1×1 px, а не весь блок: у блока выше экрана нет второй точки у нижнего края, где страница тянулась бы назад.
   У блоков с воздухом сверху (--air) метка и якорь стоят на --snap-gap (48 px) выше линии подписи (--lead: верхний отступ блока), а не на самом верху блока, иначе над подписью остаётся пустое поле 96–176 px.
   Первый экран точкой не делаем: иначе мелкий поворот колеса у самого верха возвращает страницу обратно.
   Шапка не липкая, закрывать заголовок блока нечему, scroll-padding-top не нужен. Якоря (#products, #about, #docs) и прилипание ведут в одну точку. */
html[data-hero] { --snap-gap: 48px; scroll-snap-type: y proximity; }
html[data-hero] .footer { position: relative; }
html[data-hero] #products::after, html[data-hero] #about::after, html[data-hero] .band::after, html[data-hero] .section-voice::after, html[data-hero] .footer::after {
  content: ''; position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; scroll-snap-align: start;
}
html[data-hero] .section { --lead: var(--air); }
html[data-hero] #products { --lead: 144px; }
html[data-hero] #products::after, html[data-hero] #about::after, html[data-hero] .section-voice::after { top: calc(var(--lead) - var(--snap-gap)); }
html[data-hero] #products, html[data-hero] #about { scroll-margin-top: calc(var(--snap-gap) - var(--lead)); }

/* Блоки ниже первого экрана рисуются, когда подходят к экрану (content-visibility). Размер до первого показа — размер содержимого БЕЗ отступов,
   замерен после полной прокрутки на ширинах 1536–375 px; после первого показа браузер помнит настоящий (auto), так что страница не прыгает, а якоря ведут точно. */
#products, #about, .band, .section-voice, .footer { content-visibility: auto; }
#products { contain-intrinsic-size: auto 791px; }
#about { contain-intrinsic-size: auto 1288px; }
.band { contain-intrinsic-size: auto 320px; }
.section-voice { contain-intrinsic-size: auto 787px; }
.footer { contain-intrinsic-size: auto 134px; }
@media (max-width: 1099px) {
  #products { contain-intrinsic-size: auto 2300px; }
  #about { contain-intrinsic-size: auto 1500px; }
  .band { contain-intrinsic-size: auto 164px; }
  .section-voice { contain-intrinsic-size: auto 680px; }
  .footer { contain-intrinsic-size: auto 274px; }
}
@media (max-width: 699px) {
  #products { contain-intrinsic-size: auto 2050px; }
  #about { contain-intrinsic-size: auto 2300px; }
  .section-voice { contain-intrinsic-size: auto 600px; }
}
@media (max-width: 600px) {
  #products { contain-intrinsic-size: auto 1650px; }
  #about { contain-intrinsic-size: auto 1780px; }
  .band { contain-intrinsic-size: auto 168px; }
  .section-voice { contain-intrinsic-size: auto 520px; }
  .footer { contain-intrinsic-size: auto 366px; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important;
    transition-duration: 0.01ms !important; transition-delay: 0ms !important;
  }
}

/* ===================================================================
   Стиль «Небо» на лендинге (решение Марины 14.11.2026): шрифты Literata и Manrope, палитра, пилюли-кнопки, карточки. Ниже перекрывает прежние правила выше.
   =================================================================== */
@font-face { font-family: 'Literata'; font-weight: 500; font-display: swap; src: url('fonts/literata-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Literata'; font-weight: 500; font-display: swap; src: url('fonts/literata-latin-500-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, U+FEFF, U+FFFD; }
@font-face { font-family: 'Literata'; font-weight: 600; font-display: swap; src: url('fonts/literata-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Literata'; font-weight: 600; font-display: swap; src: url('fonts/literata-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, U+FEFF, U+FFFD; }
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 500; font-display: swap; src: url('fonts/literata-cyrillic-500-italic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-weight: 200 800; font-display: swap; src: url('fonts/manrope-cyrillic-wght-normal.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Manrope'; font-weight: 200 800; font-display: swap; src: url('fonts/manrope-latin-wght-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, U+FEFF, U+FFFD; }

:root {
  --serif: 'Literata', Georgia, serif;
  --sans: 'Manrope', system-ui, sans-serif;
  /* палитра «Небо», тёмная */
  --bg: #141a33;
  --ink: #e9e4f7;
  --link: #f2b8b0;
  --line: #2b3257;
  --line-ui: #7b82a8;
  --btn-bg: linear-gradient(100deg, #c9bdf2, #f2b8b0);
  --btn-bg-hover: linear-gradient(100deg, #d6ccf7, #f7c6bf);
  --btn-ink: #1b1f3b;
  --card-hover: rgba(233, 228, 247, 0.05);
  --star: #ebd3a9;
  --select-bg: #c9bdf2;
  --haze-a: rgba(91, 74, 158, 0.28);
  --haze-b: rgba(242, 184, 176, 0.07);
  --paper: #1b2244;
  --paper-ink: #e9e4f7;
  --paper-ink2: #e6ddf8;
  --paper-line: rgba(233, 228, 247, 0.16);
  --paper-link: #f2b8b0;
  --card-border: 1px solid rgba(233, 228, 247, 0.14);
  --card-shadow: none;
  --pic-fallback: radial-gradient(62% 72% at 68% 30%, rgba(201, 189, 242, 0.22), transparent 70%), linear-gradient(#141a33, #141a33);
}
html[data-theme='light'] {
  --bg: #f7f3ec;
  --ink: #1b1f3b;
  --link: #9a3d52;
  --line: #ded7cc;
  --line-ui: #84807a;
  --btn-bg: #1b1f3b;
  --btn-bg-hover: #2d2b50;
  --btn-ink: #f5efe4;
  --card-hover: rgba(27, 31, 59, 0.03);
  --star: #755bae;
  --haze-a: rgba(201, 189, 242, 0.55);
  --haze-b: rgba(242, 184, 176, 0.35);
  --paper: #ffffff;
  --paper-link: #9a3d52;
  --paper-ink: #1b1f3b;
  --paper-ink2: #4a4f6d;
  --paper-line: rgba(27, 31, 59, 0.14);
  --card-border: 0;
  --card-shadow: 0 8px 24px rgba(27, 31, 59, 0.10);
  --pic-fallback: radial-gradient(62% 72% at 68% 30%, rgba(255, 255, 255, 0.8), transparent 70%), linear-gradient(#f7f3ec, #e8e1f3);
}
html[data-theme='light'] body { background: #f7f3ec linear-gradient(#ede7f7, #f7f3ec 760px) no-repeat; }

body { font-family: var(--sans); }
.brand-name { font-family: var(--serif); font-weight: 500; font-size: 24px; letter-spacing: 0.08em; } /* подпись логотипа теперь Literata; знак и написание «АСТРА space» прежние */
.brand-name small { font-size: 20px; letter-spacing: 0.02em; }

/* Заголовки Literata 500–600; Literata шире прежнего шрифта, поэтому кегли меньше */
h1, h2 { font-family: var(--serif); font-weight: 500; }
h1 em { font-style: italic; font-weight: 500; }
.hero h1 { font-size: 62px; line-height: 68px; letter-spacing: -0.015em; }
.sec-head h2 { font-size: 44px; line-height: 52px; letter-spacing: -0.01em; }
.band p { font-family: var(--serif); font-weight: 500; font-size: 44px; line-height: 52px; letter-spacing: -0.01em; }
.product .name { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 34px; }
.value h3 { font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 32px; }
.doc h1 { font-size: 38px; line-height: 44px; letter-spacing: -0.01em; }
.doc h2 { font-size: 28px; line-height: 34px; }
.nav, .eyebrow, .tag, .theme-toggle { font-family: var(--sans); font-weight: 700; }
.nav, .theme-toggle { letter-spacing: 0.14em; }
.eyebrow { letter-spacing: 0.16em; }

/* Кнопки «Небо»: пилюля; тёмная тема — градиент лаванда → розовый с тёмным текстом; светлая — тёмная заливка с кремовым текстом.
   Подпись 15 px (не меньше 14), без заглавных */
.btn { border-radius: 999px; font-family: var(--sans); font-size: 15px; line-height: 20px; font-weight: 700; letter-spacing: 0.01em; text-transform: none; min-height: 56px; padding: 0 34px; transition: background 220ms ease-out, box-shadow 220ms ease-out, transform 120ms ease-out; }
.btn-primary { background: var(--btn-bg); border-color: transparent; color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-bg-hover); border-color: transparent; box-shadow: 0 0 28px rgba(242, 184, 176, 0.28); }
html[data-theme='light'] .btn-primary:hover { box-shadow: 0 6px 18px rgba(27, 31, 59, 0.25); }
.btn-secondary { color: var(--ink); }
.theme-toggle { border-radius: 999px; }

/* Карточки приложений: «бумага» на небе. Тёмная тема — крем, светлая — белая с тенью. Картина на карточке всегда светлая и растворяется в бумагу */
.card { background: var(--paper); border: var(--card-border); border-radius: 28px; color: var(--paper-ink); box-shadow: var(--card-shadow); transition: box-shadow 220ms ease-out, transform 220ms ease-out; }
.card:hover, .card:focus-within { transform: translateY(-4px); }
html:not([data-theme='light']) .card:hover { border-color: rgba(233, 228, 247, 0.3); background: #202853; }
.card .pic { background: none; }
.card-body { padding: 4px 32px 32px; }
.product .name { color: var(--paper-ink); }
.product p { color: var(--paper-ink2); }
.product .links { border-top-color: var(--paper-line); font-weight: 600; }
.product .links a { color: var(--paper-link); }
.product .links a:hover { color: var(--paper-ink); }
.product .soon { border-top-color: var(--paper-line); }
.card .tag { align-self: flex-start; padding: 6px 12px; border-radius: 999px; font-size: 12px; line-height: 16px; letter-spacing: 0.1em; color: #1b1f3b; background: #c9bdf2; }
.products .card:nth-child(2) .tag { background: #f2b8b0; }
.products .card:nth-child(3) .tag { background: #ebd3a9; }
.products .card .soon.tag { background: #ebd3a9; margin-top: auto; border-top: 0; padding-top: 6px; }

:focus-visible { outline-color: var(--link); }


@media (max-width: 1099px) {
  .hero h1 { font-size: 52px; line-height: 58px; }
  .sec-head h2 { font-size: 38px; line-height: 46px; }
  .band p { font-size: 38px; line-height: 46px; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 38px; line-height: 44px; }
  .sec-head h2 { font-size: 32px; line-height: 38px; }
  .band p { font-size: 32px; line-height: 38px; }
  .product .name { font-size: 26px; line-height: 32px; }
  .value h3 { font-size: 24px; line-height: 30px; }
  .card-body { padding: 4px 20px 24px; }
}
