/*
 * Посадочная Hespera — стили (06.10.2026, переделаны 08.10.2026).
 *
 * Палитра и радиусы — из приложения (mobile/lib/theme.dart): коралловый
 * градиент #FF3E6C → #FF7E4F, фон #FBF8F9, тёмная тема #191119.
 * Заголовки — Nunito (лежит на сервере), текст — системный шрифт.
 *
 * 08.10.2026: образ «вечерней звезды» из логотипа — звёзды мерцают над
 * горизонтом из двух линий, фон первого экрана дышит, телефон
 * наклоняется за курсором, разделы проявляются при прокрутке.
 * Анимации выключаются у тех, кто попросил систему «меньше движения».
 */

@font-face {
    font-family: "Nunito";
    src: url("/fonts/nunito/nunito-var.woff2") format("woff2");
    font-weight: 200 1000;
    font-display: swap;
}

/* Цвет акцента плавно перетекает при смене слайда */
@property --accent { syntax: "<color>"; inherits: true; initial-value: #FF4D67; }
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root {
    color-scheme: light dark;
    --bg: #FBF8F9;
    --surface: #FFFFFF;
    --ink: #221A20;
    --muted: #736971;
    --line: #E7E0E4;
    --primary: #FF4D67;
    --tint: #FFEEF1;
    --grad: linear-gradient(135deg, #FF3E6C, #FF7E4F);
    --success: #2DB877;
    --success-ink: #1B7A4B;
    --success-tint: #E3F6EC;
    --shadow: 0 40px 80px -32px rgba(80, 20, 50, .42);
    --shadow-sm: 0 14px 34px -16px rgba(80, 20, 50, .26);
    --radius: 28px;
    --display: "Nunito", ui-rounded, system-ui, sans-serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
    --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='17 7 30 30'%3E%3Cpath d='M32 7Q32 22 47 22Q32 22 32 37Q32 22 17 22Q32 22 32 7Z'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #191119;
        --surface: #251B25;
        --ink: #F5EFF3;
        --muted: #A59AA3;
        --line: #3A2E39;
        --tint: rgba(255, 77, 103, .14);
        --success-ink: #5FD69C;
        --success-tint: rgba(45, 184, 119, .16);
        --shadow: 0 40px 80px -32px rgba(0, 0, 0, .8);
        --shadow-sm: 0 14px 34px -16px rgba(0, 0, 0, .65);
    }
}

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

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

/* Переход к разделу не прячет заголовок под липкой шапкой */
section[id] { scroll-margin-top: 68px; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    overflow-x: hidden;
}

a { color: inherit; }
img, svg, video { display: block; max-width: 100%; }

.wrap { width: min(1160px, 100% - 40px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -.02em; }
h2 { font-size: clamp(30px, 4.6vw, 52px); line-height: 1.06; font-weight: 900; }
h3 { font-size: 21px; line-height: 1.25; font-weight: 800; }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Блик, пробегающий по градиентному слову */
.shimmer {
    background-image: linear-gradient(100deg, #FF3E6C 0%, #FF7E4F 30%, #FFC3A6 45%, #FF7E4F 60%, #FF3E6C 100%);
    background-size: 250% 100%;
    animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 999px;
    background: var(--tint); color: var(--primary);
    font-size: 14px; font-weight: 700;
}

.eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse 2.4s ease-in-out infinite; }

@keyframes pulse { 50% { transform: scale(1.6); opacity: .4; } }

.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 620px; }

.ic { width: 22px; height: 22px; flex: none; }
.ic.big { width: 96px; height: 96px; stroke-width: 1.4; }

/* Звезда из логотипа: четыре луча, мерцает */
.star {
    position: absolute; width: var(--s, 10px); height: var(--s, 10px);
    background: var(--star-c, #FF6A7F);
    -webkit-mask: var(--star) center / contain no-repeat; mask: var(--star) center / contain no-repeat;
    animation: twinkle 4.8s ease-in-out infinite; animation-delay: var(--d, 0s);
    opacity: .3;
}

@keyframes twinkle {
    0%, 100% { opacity: .25; transform: scale(.6) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(45deg); }
}

/* ---------- Кнопки (как IskraButton в приложении) ---------- */

.btn {
    position: relative; overflow: hidden; white-space: nowrap;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 56px; padding: 0 26px; border-radius: 999px;
    background: var(--grad); color: #fff;
    font: 800 17px/1 var(--display); text-decoration: none;
    box-shadow: 0 14px 30px -12px rgba(255, 62, 108, .7);
    transition: transform .2s var(--ease), box-shadow .2s ease;
}

/* Блик, пробегающий по кнопке */
.btn::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%);
    transform: translateX(-120%);
    animation: shine 4.5s ease-in-out infinite;
}

@keyframes shine { 0%, 70% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

.btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 22px 40px -14px rgba(255, 62, 108, .9); }
.btn:active { transform: translateY(0) scale(.98); }

.btn:focus-visible, .btn-ghost:focus-visible, .nav a:focus-visible, .arrow:focus-visible, .tour-step:focus-visible,
.faq summary:focus-visible, footer a:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.faq summary:focus-visible { border-radius: 12px; }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 56px; padding: 0 22px; border-radius: 999px;
    border: 1.5px solid var(--line); background: var(--surface);
    font: 800 17px/1 var(--display); text-decoration: none;
    transition: border-color .2s ease, transform .2s var(--ease);
}

.btn-ghost:hover { border-color: var(--primary); transform: translateY(-2px); }

.btn-white { background: #fff; color: #FF3E6C; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .35); }
.btn-white::after { display: none; }
.cta-band .btn:focus-visible { outline-color: #fff; }

/* ---------- Шапка ---------- */

.top {
    position: sticky; top: 0; z-index: 20;
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 78%, transparent);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.top .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo img { height: 38px; width: auto; }
.nav { display: flex; gap: 22px; margin-left: auto; font-weight: 600; font-size: 15px; }
.nav a { position: relative; text-decoration: none; color: var(--muted); transition: color .2s ease; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px; background: var(--grad); transform: scaleX(0); transition: transform .25s var(--ease); }
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.top .btn { min-height: 42px; padding: 0 18px; font-size: 15px; box-shadow: none; }

/* Меню телефона и планшета: кнопка с двумя линиями горизонта из логотипа */
.menu-btn {
    display: none; flex: none; width: 44px; height: 44px; padding: 0; cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}

.menu-btn i { display: block; width: 20px; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), width .3s var(--ease); }
.menu-btn i + i { width: 12px; }
.menu-btn[aria-expanded="true"] i { width: 20px; transform: translateY(4.25px) rotate(45deg); }
.menu-btn[aria-expanded="true"] i + i { transform: translateY(-4.25px) rotate(-45deg); }
.menu-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

.mobile-menu {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 19;
    padding: 8px 20px 20px; display: grid; gap: 14px;
    background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s ease, transform .3s var(--ease), visibility 0s .3s;
}

.mobile-menu.open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .3s var(--ease), visibility 0s; }
.mobile-menu nav { display: grid; }
.mobile-menu nav a {
    display: flex; align-items: center; justify-content: space-between; min-height: 52px;
    font: 800 18px/1.2 var(--display); text-decoration: none; border-bottom: 1px solid var(--line);
}
.mobile-menu nav a .ic { color: var(--muted); width: 20px; height: 20px; }
.mobile-menu .btn { width: 100%; }
/* Плашка iPhone на светлом фоне (меню, первый экран); в коралловом блоке — полупрозрачная .ios-note */
.ios-note.ios-soft { background: var(--tint); color: var(--primary); }
.hero .ios-soft { margin-top: 16px; }

@media (max-width: 920px) {
    .nav { display: none; }
    .top .btn { margin-left: auto; }
    .top .wrap { gap: 10px; }
    .menu-btn { display: inline-flex; }
}

/* На узком экране скачать можно с первого экрана и с кнопки внизу — в шапке только меню */
@media (max-width: 600px) {
    .top .top-get { display: none; }
    .menu-btn { margin-left: auto; }
}

@media (min-width: 921px) { .mobile-menu { display: none; } }

/* ---------- Первый экран ---------- */

.hero { position: relative; overflow: hidden; padding: 48px 0 72px; isolation: isolate; }

/* Небо: краски ленты знакомств, звёзды и горизонт из логотипа */
.sky {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent);
}

.blob {
    position: absolute; border-radius: 50%; opacity: .75;
    animation: drift 18s ease-in-out infinite alternate;
}

.blob.b1 { width: 700px; height: 700px; right: -150px; top: -190px; background: radial-gradient(closest-side, #F5B9C2, rgba(245, 185, 194, 0)); }
.blob.b2 { width: 580px; height: 580px; right: 190px; top: 170px; background: radial-gradient(closest-side, #D07FD2, rgba(208, 127, 210, 0)); opacity: .35; animation-duration: 22s; }
.blob.b3 { width: 620px; height: 620px; right: -230px; top: 330px; background: radial-gradient(closest-side, #BCC8E9, rgba(188, 200, 233, 0)); opacity: .6; animation-duration: 26s; }

@keyframes drift { to { transform: translate(-50px, 40px) scale(1.12); } }

@media (prefers-color-scheme: dark) {
    .blob { opacity: .24 !important; }
    .star { --star-c: #FFD6DE; }
}

/* Горизонт — две линии, как в логотипе, расходятся при загрузке */
.horizon { position: absolute; left: 0; right: 0; bottom: 34px; display: grid; justify-items: center; gap: 10px; }
.horizon i { display: block; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, #FF7E4F 20%, #FF3E6C 50%, #FF7E4F 80%, transparent); opacity: .35; animation: horizon 1.6s var(--ease) .3s both; }
.horizon i:first-child { width: min(1100px, 94%); }
.horizon i:last-child { width: min(640px, 60%); opacity: .22; animation-delay: .5s; }

@keyframes horizon { from { transform: scaleX(0); opacity: 0; } }

.hero > .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 32px; align-items: center; }

.hero h1 {
    font-size: clamp(42px, 6.4vw, 78px); line-height: 1.02; font-weight: 900;
    margin: 20px 0 22px;
}

/* Заголовок появляется по словам */
.words .w { display: inline-block; animation: word .9s var(--ease) both; animation-delay: calc(.08s + var(--i, 0) * .11s); }
.words .w.shimmer { animation: word .9s var(--ease) both, shimmer 6s ease-in-out 1.4s infinite; animation-delay: calc(.08s + var(--i, 0) * .11s), 1.4s; }

@keyframes word { from { opacity: 0; transform: translateY(.45em) rotate(4deg); filter: blur(8px); } }

.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.fine { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 18px; font-size: 14px; color: var(--muted); }
.fine span { display: inline-flex; align-items: center; gap: 6px; }
.fine .ic { width: 16px; height: 16px; color: var(--success); }

/* ---------- Телефон ---------- */

.phone {
    position: relative; width: 300px; aspect-ratio: 390 / 844;
    border-radius: 46px; padding: 10px;
    background: #17121A; box-shadow: var(--shadow), inset 0 0 0 2px #2B2230;
}

.phone.sm { width: 260px; }

/* Вырез камеры */
.phone::before {
    content: ""; position: absolute; z-index: 3; top: 18px; left: 50%; transform: translateX(-50%);
    width: 86px; height: 24px; border-radius: 14px; background: #17121A;
}

/* Блик стекла */
.phone::after {
    content: ""; position: absolute; inset: 10px; z-index: 2; border-radius: 36px; pointer-events: none;
    background: linear-gradient(125deg, rgba(255, 255, 255, .16), transparent 28%);
}

.screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: var(--bg); }

.screen img, .screen video { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- Слайдер первого экрана ---------- */

.stage {
    position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 16px;
    padding: 28px 0; perspective: 1400px;
    transition: --accent .8s ease;
}

.device { position: relative; transform-style: preserve-3d; transition: transform .5s var(--ease); transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)); }

/* Свечение за телефоном — цветом текущего экрана */
.device::before {
    content: ""; position: absolute; inset: -18% -30%; z-index: -1; border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 55%, transparent), transparent 78%);
    opacity: .9;
    animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe { 50% { transform: scale(1.08); opacity: .65; } }

.stage .phone { animation: float 7s ease-in-out infinite; }

@keyframes float { 50% { transform: translateY(-12px); } }

/* Экраны въезжают сбоку; направление и стартовое место ставит скрипт */
.slides img {
    position: absolute; inset: 0; opacity: 0;
    transition: opacity .55s ease, transform .75s var(--ease);
}

.slides img.on { opacity: 1; transform: none; }

/* Стрелки по бокам телефона */
.arrow {
    flex: none; width: 52px; height: 52px; border-radius: 50%; padding: 0; cursor: pointer;
    display: grid; place-items: center; z-index: 6;
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    color: var(--ink); box-shadow: var(--shadow-sm);
    transition: transform .2s var(--ease), background .2s ease, color .2s ease, box-shadow .2s ease;
}

.arrow .ic { width: 24px; height: 24px; }
.arrow:hover { background: var(--accent); color: #fff; transform: scale(1.08); box-shadow: 0 16px 34px -14px var(--accent); }
.arrow:active { transform: scale(.94); }

/* Карточка: чем полезен текущий экран */
.slide-info {
    position: absolute; z-index: 5; left: -24px; top: 34px; width: 282px;
    padding: 18px 18px 14px; border-radius: 24px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    box-shadow: var(--shadow-sm);
    animation: bob 7s ease-in-out -1s infinite;
}

@keyframes bob { 50% { transform: translateY(-8px); } }

.si-list { display: grid; }

.si {
    grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity .45s ease, transform .55s var(--ease), visibility 0s .55s;
}

.si.on { opacity: 1; visibility: visible; transform: none; transition: opacity .5s ease .1s, transform .6s var(--ease) .1s, visibility 0s; }

.si-tag { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 8px; border-radius: 999px; font-size: 13px; font-weight: 800; color: var(--accent); background: color-mix(in srgb, var(--accent) 13%, transparent); }
.si-tag .ic { width: 16px; height: 16px; }
.si b { display: block; margin: 12px 0 6px; font: 900 20px/1.2 var(--display); letter-spacing: -.01em; text-wrap: balance; }
.si p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }

.si-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.si-count { font: 800 13px/1 var(--display); color: var(--muted); white-space: nowrap; }
.si-count b { color: var(--ink); }
.si-bar { flex: 1; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.si-bar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.si-bar i.run { animation: fill var(--dur, 5s) linear forwards; }
.slide-info.paused .si-bar i.run { animation-play-state: paused; }

@keyframes fill { to { transform: scaleX(1); } }

/* Карточка «Субота, 18:00» возле телефона */
.float {
    position: absolute; z-index: 4; background: var(--surface); border-radius: 22px;
    box-shadow: var(--shadow-sm); padding: 14px 16px; font-size: 13px; line-height: 1.35;
    max-width: 230px;
}

.float b { font: 900 16px/1.2 var(--display); display: block; }
.float small { color: var(--muted); font-size: 12px; }

.float.date { bottom: 5%; right: -78px; display: flex; gap: 12px; align-items: center; animation: bob 7s ease-in-out -2s infinite; transform: translateZ(40px); }
.float.date .tick { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--success-tint); color: var(--success-ink); flex: none; }

/* Средние экраны: текст сверху, слайдер на всю ширину, карточка — сбоку без наложения */
@media (max-width: 1100px) {
    .hero { padding-top: 32px; }
    .hero > .wrap { grid-template-columns: 1fr; gap: 12px; }
    .stage { justify-content: center; }
    .slide-info { position: relative; left: auto; top: auto; margin-right: 12px; align-self: center; }
}

/* Телефоны: карточка под телефоном, стрелки по бокам */
@media (max-width: 680px) {
    .stage { display: grid; grid-template-columns: 44px minmax(0, 260px) 44px; justify-content: center; column-gap: 6px; padding-top: 12px; }
    .stage .device { grid-column: 2; grid-row: 1; }
    .stage .arrow.prev { grid-column: 1; grid-row: 1; }
    .stage .arrow.next { grid-column: 3; grid-row: 1; }
    .slide-info { grid-column: 1 / -1; grid-row: 2; width: auto; margin: 18px 0 0; animation: none; }
    .stage .phone { width: 100%; }
    .arrow { width: 44px; height: 44px; }
    .arrow .ic { width: 22px; height: 22px; }
    .float.date { display: none; }
    .tour-stage .phone { width: min(250px, 70vw); }
}

/* ---------- Разделы ---------- */

section.block { padding: 104px 0; position: relative; }
.head { max-width: 760px; margin-bottom: 52px; }
.eyebrow + h2 { margin-top: 16px; }
.faq h2 { margin: 16px 0; }
.head.center { margin-inline: auto; text-align: center; }
.head p { margin: 16px 0 0; }
.head.center .lead { margin-inline: auto; }
.soft { background: var(--tint); background: color-mix(in srgb, var(--tint) 55%, var(--bg)); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card p { margin: 10px 0 0; color: var(--muted); font-size: 16px; }

/* ---------- Как это работает: шаги и ролик ---------- */

.tour-block { overflow: hidden; }
.tour-block::before {
    content: ""; position: absolute; width: 640px; height: 640px; right: -180px; top: 120px; z-index: -1; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 126, 79, .18), transparent);
}

.tour { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }

.tour-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; }

.tour-step {
    position: relative; overflow: hidden; width: 100%; text-align: left; cursor: pointer;
    display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
    padding: 20px 22px; border-radius: 24px; color: inherit; font: inherit;
    background: transparent; border: 1px solid transparent;
    transition: background .3s ease, border-color .3s ease, box-shadow .3s ease, transform .3s var(--ease);
}

.tour-step:hover { background: color-mix(in srgb, var(--surface) 60%, transparent); }

.tour-step.on { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); transform: translateX(6px); }

.tour-step .n {
    width: 46px; height: 46px; border-radius: 15px;
    display: grid; place-items: center; font: 900 20px/1 var(--display);
    background: var(--tint); color: var(--primary);
    transition: background .3s ease, color .3s ease, transform .4s var(--ease);
}

.tour-step.on .n { background: var(--grad); color: #fff; transform: rotate(-6deg) scale(1.06); }

.tour-step .t b { display: block; font: 900 21px/1.25 var(--display); margin-top: 9px; }
.tour-step .t span { display: block; color: var(--muted); font-size: 16px; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease), opacity .4s ease, margin .4s ease; }
.tour-step.on .t span { max-height: 160px; opacity: 1; margin-top: 6px; }

.tour-step .bar { position: absolute; left: 22px; right: 22px; bottom: 0; height: 3px; border-radius: 3px; overflow: hidden; opacity: 0; transition: opacity .3s ease; }
.tour-step .bar i { display: block; height: 100%; background: var(--grad); transform-origin: 0 50%; transform: scaleX(0); }
.tour-step.on .bar { opacity: 1; }

.tour-stage { display: grid; place-items: center; position: relative; --accent: #FF4D67; }
.tour-stage .phone { width: 290px; }

.tour-media > * { position: absolute; inset: 0; opacity: 0; transform: scale(1.04); transition: opacity .5s ease, transform .8s var(--ease); }
.tour-media > .on { opacity: 1; transform: none; }
.tour-media .placeholder { display: grid; place-items: center; background: var(--grad); }
.tour-media .placeholder img { width: 96px; height: 96px; object-fit: contain; }
.tour-note { margin: 18px auto 0; max-width: 290px; text-align: center; font-size: 13px; line-height: 1.45; color: var(--muted); }

@media (max-width: 900px) {
    .tour { grid-template-columns: 1fr; gap: 32px; }
    .tour-stage { order: -1; }
    .tour-step.on { transform: none; }
}

/* ---------- Функции: экран + описание, по очереди слева и справа ---------- */

.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 44px 0; }
.feature-row.flip .feature-shot { order: 2; }
/* isolation — свой контекст наложения: без него свечение с z-index: -1
   уходило под фон раздела .soft и было видно, только пока ряд проявлялся */
.feature-shot { display: grid; place-items: center; position: relative; isolation: isolate; }

.feature-shot::before {
    content: ""; position: absolute; width: 86%; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 38%, transparent), transparent);
    z-index: -1; animation: breathe 7s ease-in-out infinite;
}

/* Плашка из приложения, парящая возле телефона */
.chip {
    position: absolute; z-index: 3; left: calc(50% + 70px); top: 16%;
    display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
    padding: 10px 16px 10px 12px; border-radius: 999px;
    background: var(--surface); box-shadow: var(--shadow-sm); border: 1px solid var(--line);
    font: 800 14px/1 var(--display);
    animation: bob 6s ease-in-out infinite;
}

.chip .ic { width: 26px; height: 26px; padding: 5px; border-radius: 50%; color: #fff; background: var(--accent); }
.feature-row.flip .chip { left: auto; right: calc(50% + 70px); top: auto; bottom: 18%; animation-delay: -3s; }

.feature-text .tag { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--accent, var(--primary)); font-size: 15px; }
.feature-text .tag .ic { width: 20px; height: 20px; }
.feature-text .tag-n { font: 900 15px/1 var(--display); padding: 6px 9px; border-radius: 10px; color: #fff; background: var(--accent); margin-right: 4px; }
.feature-text h3 { font-size: clamp(26px, 3.2vw, 38px); margin: 14px 0 14px; font-weight: 900; line-height: 1.12; }
.feature-text p { color: var(--muted); margin: 0 0 20px; font-size: 18px; }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; }
.ticks li .ic { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--success-tint); color: var(--success-ink); margin-top: 2px; }

/* Телефон выпрямляется, пока раздел въезжает в экран (где браузер умеет) */
@supports (animation-timeline: view()) {
    .feature-shot .phone { animation: straighten linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; }
    .feature-row.flip .feature-shot .phone { --tilt: -12deg; }
    .map-phone { animation: straighten linear both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
}

@keyframes straighten { from { transform: perspective(1100px) rotateY(var(--tilt, 12deg)) rotateX(10deg) translateY(70px) scale(.9); opacity: .4; } }

@media (max-width: 900px) {
    .feature-row { grid-template-columns: 1fr; gap: 28px; padding: 28px 0; }
    .feature-row.flip .feature-shot { order: 0; }
    .chip, .feature-row.flip .chip { left: auto; right: max(0px, calc(50% - 200px)); top: 10%; bottom: auto; font-size: 13px; }
}

/* ---------- Сравнение ---------- */

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.compare .card h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.compare ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.compare li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.compare .old { background: transparent; }
.compare .old li { color: var(--muted); }
.compare .old li .ic { color: #E5484D; }
.compare .new li .ic { color: var(--success); }

/* У Hespera — рамка с бегущим градиентом */
.compare .new {
    position: relative; border: 2px solid transparent;
    background: linear-gradient(var(--surface), var(--surface)) padding-box,
                conic-gradient(from var(--angle), #FF3E6C, #FF7E4F, #FFC3A6, #D07FD2, #FF3E6C) border-box;
    box-shadow: 0 30px 60px -30px rgba(255, 62, 108, .55);
    animation: spin 6s linear infinite;
}

@keyframes spin { to { --angle: 360deg; } }

@media (max-width: 760px) { .compare { grid-template-columns: 1fr; } }

/* ---------- Места ---------- */

.places { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.tile {
    border-radius: 24px; padding: 18px; min-height: 132px; color: #fff;
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative; overflow: hidden;
}

.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255, 255, 255, .22), transparent 55%); }
.tile::before { content: ""; position: absolute; right: -24px; bottom: -24px; width: 96px; height: 96px; border-radius: 50%; background: rgba(255, 255, 255, .12); transition: transform .4s var(--ease); }
.tile .ic { width: 30px; height: 30px; position: relative; z-index: 1; }
.tile b { font: 900 17px/1.15 var(--display); position: relative; z-index: 1; }

.map-phone { margin: 28px auto 0; }

.flow { display: grid; gap: 10px; margin-top: 28px; }
.flow div { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; transition: transform .25s var(--ease), box-shadow .25s ease; }
.flow .ic { width: 40px; height: 40px; padding: 9px; border-radius: 13px; background: var(--tint); color: var(--primary); }
.flow p { margin: 0; font-size: 15px; }
.flow b { display: block; font-size: 16px; }

@media (max-width: 960px) { .places { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .tiles { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Безопасность: ночной блок ---------- */

.dark {
    background: #160E16; color: #F5EFF3; overflow: hidden; isolation: isolate;
    --line: rgba(255, 255, 255, .1); --muted: #B4A8B2;
}

.dark::before, .dark::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; }
.dark::before { width: 680px; height: 680px; left: -240px; top: -240px; background: radial-gradient(closest-side, rgba(255, 62, 108, .35), rgba(255, 62, 108, 0)); animation: drift 20s ease-in-out infinite alternate; }
.dark::after { width: 620px; height: 620px; right: -220px; bottom: -280px; background: radial-gradient(closest-side, rgba(138, 92, 246, .3), rgba(138, 92, 246, 0)); animation: drift 24s ease-in-out infinite alternate-reverse; }

.dark .night { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.dark .star { --star-c: #FFE3E8; }
.dark .eyebrow { background: rgba(255, 77, 103, .16); color: #FF8A9C; }
.dark .lead { color: var(--muted); }

.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.dark .card {
    background: rgba(255, 255, 255, .045); border-color: rgba(255, 255, 255, .09);
}

.feature > span { display: inline-block; color: var(--c, var(--primary)); }
.feature .ic { width: 52px; height: 52px; padding: 13px; border-radius: 17px; margin-bottom: 18px; background: color-mix(in srgb, currentColor 16%, transparent); box-shadow: 0 0 32px -6px color-mix(in srgb, currentColor 60%, transparent); }

@media (max-width: 1000px) { .grid4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid4 { grid-template-columns: 1fr; } }

/* ---------- Призывы ---------- */

.cta-band > * { min-width: 0; }

.cta-band {
    border-radius: 36px; padding: clamp(28px, 5vw, 56px);
    background: linear-gradient(120deg, #FF3E6C, #FF7E4F, #FF5A7A, #FF3E6C);
    background-size: 300% 300%; animation: wave 12s ease-in-out infinite;
    color: #fff;
    display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center;
    position: relative; overflow: hidden; isolation: isolate;
    box-shadow: 0 40px 80px -40px rgba(255, 62, 108, .8);
}

@keyframes wave { 50% { background-position: 100% 50%; } }

.cta-band::before {
    content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -200px; z-index: -1;
    border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .3), transparent);
    animation: drift 14s ease-in-out infinite alternate;
}

.cta-stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.cta-stars .star { --star-c: #fff; }

.cta-band h2 { color: #fff; position: relative; }
.cta-band .lead { color: rgba(255, 255, 255, .92); margin: 16px 0 28px; position: relative; }
.cta-band .meta { margin-top: 16px; font-size: 14px; color: rgba(255, 255, 255, .88); }

.qr { background: #fff; color: #221A20; border-radius: 28px; padding: 22px; text-align: center; justify-self: end; width: 100%; max-width: 250px; position: relative; transform: rotate(3deg); transition: transform .4s var(--ease); box-shadow: 0 30px 50px -30px rgba(0, 0, 0, .5); }
.qr img { width: 100%; height: auto; }
.qr p { margin: 12px 0 0; font-size: 14px; font-weight: 700; }

.ios-note { display: none; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 20px; background: rgba(255, 255, 255, .16); font-weight: 600; }

.install { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.install .card { padding: 22px; }
.install .card b { font: 800 18px/1.3 var(--display); }
.install .card p { font-size: 15px; }
.install .k { color: var(--primary); font: 900 15px var(--display); display: block; margin-bottom: 6px; }

@media (max-width: 860px) {
    .cta-band { grid-template-columns: 1fr; }
    .qr { display: none; }
    .install { grid-template-columns: 1fr; }
}

/* Маленький призыв между разделами */
.nudge { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; padding: 22px 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.nudge b { font: 900 20px/1.25 var(--display); }
.nudge p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* Вопросы */
.faq { max-width: 820px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 0 22px; margin-top: 12px; transition: border-color .2s ease, box-shadow .2s ease; }
.faq details:hover { border-color: color-mix(in srgb, var(--primary) 40%, var(--line)); }
.faq details[open] { box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font: 800 18px/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform .3s var(--ease); color: var(--muted); }
.faq details[open] summary .ic { transform: rotate(180deg); color: var(--primary); }
.faq details p { margin: 0 0 20px; color: var(--muted); }
.faq details[open] p { animation: open .4s var(--ease); }

@keyframes open { from { opacity: 0; transform: translateY(-6px); } }

/* Финал: знак из логотипа — звезда восходит над горизонтом */
.mark { width: 84px; height: 84px; margin: 0 auto 22px; overflow: visible; }
.mark .mark-line { stroke-dasharray: 50; stroke-dashoffset: 50; }
.mark .mark-star { transform-origin: 32px 22px; opacity: 0; }
.in .mark .mark-line { animation: draw .9s var(--ease) .2s forwards; }
.in .mark .mark-line.two { animation-delay: .4s; }
.in .mark .mark-star { animation: rise-star 1.2s var(--ease) .7s forwards, glow 3.6s ease-in-out 2s infinite; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rise-star { from { opacity: 0; transform: translateY(22px) scale(.4) rotate(-45deg); } to { opacity: 1; transform: none; } }
@keyframes glow { 50% { filter: drop-shadow(0 0 8px rgba(255, 62, 108, .7)); transform: scale(1.08); } }

/* Подвал */
footer { padding: 48px 0 calc(48px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); margin-top: 40px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 40px; justify-content: space-between; align-items: flex-start; }
footer img { height: 38px; width: auto; }
footer p { margin: 12px 0 0; color: var(--muted); font-size: 15px; max-width: 360px; }
footer nav { display: flex; flex-wrap: wrap; gap: 12px 28px; font-size: 15px; }
footer nav a { color: var(--muted); transition: color .2s ease; }
footer nav a:hover { color: var(--ink); }
footer .copy { width: 100%; color: var(--muted); font-size: 14px; }

/* Кнопка внизу экрана телефона */
.sticky { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30; transform: translateY(140%); transition: transform .25s ease; }
.sticky .btn { width: 100%; }
.sticky.show { transform: none; }

@media (min-width: 861px) { .sticky { display: none; } }

/* Устройство: на iPhone — пометка вместо кнопки APK, QR — только на компьютере */
[data-device="ios"] .only-android { display: none !important; }
[data-device="ios"] .ios-note { display: flex; }
[data-device="android"] .qr, [data-device="ios"] .qr { display: none; }
[data-device="ios"] .sticky { display: none; }
[data-device="ios"] .top .top-get { display: none; }
[data-device="ios"] .menu-btn { margin-left: auto; }

/* Телефоны: короче страница и кнопки скачивания во всю ширину без переноса */
@media (max-width: 600px) {
    section.block { padding: 72px 0; }
    .head { margin-bottom: 36px; }
    .hero { padding-bottom: 48px; }
    .feature-row { padding: 20px 0; gap: 22px; }
    .feature-shot .phone.sm, .map-phone.phone.sm { width: 220px; }
    .feature-text h3 { margin: 10px 0 10px; }
    .feature-text p { font-size: 17px; margin-bottom: 16px; }
    .hero .actions .btn, .nudge .btn, .cta-band .btn, .finale .btn { width: 100%; }
    .nudge { padding: 20px; }
    .btn { padding: 0 20px; }
}

@media (max-width: 360px) {
    .btn { font-size: 16px; gap: 8px; }
    /* Самые узкие телефоны: в цветной плашке «для Android» не помещается — платформа подписана под кнопкой */
    .cta-band { padding: 24px 20px; }
    .cta-band .opt { display: none; }
}

/* ---------- Появление при загрузке (первый экран) и при прокрутке ---------- */

.rise { animation: rise .9s var(--ease) both; animation-delay: var(--d, 0s); }

@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

.reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s ease, transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

/* Заголовки разделов — ещё и из размытия */
.head.reveal h2 { filter: blur(10px); transform: translateY(14px); transition: filter .9s ease .1s, transform .9s var(--ease) .1s; }
.head.reveal.in h2 { filter: none; transform: none; }

/* Раздел вне экрана: его бесконечные анимации на паузе — меньше нагрузка и расход батареи */
.is-off, .is-off::before, .is-off::after, .is-off *, .is-off *::before, .is-off *::after { animation-play-state: paused !important; }

/* Без скриптов и у «меньше движения» — всё сразу на месте */
.no-js .reveal, .no-js .head.reveal h2 { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal, .head.reveal h2 { opacity: 1; transform: none; filter: none; }
    .star { opacity: .5; }
    .mark .mark-line { stroke-dashoffset: 0; }
    .mark .mark-star { opacity: 1; }
}
