/* Курс — сайт. Токени кольорів і типографіки повторюють застосунок (src/theme/tokens.ts).
   Анімації — лише transform, opacity і stroke-dashoffset; prefers-reduced-motion показує
   фінальний статичний стан. */

@font-face {
  font-family: "Onest";
  src: url("/static/onest-cyrillic.68e5e01d62.woff2") format("woff2");
  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: "Onest";
  src: url("/static/onest-latin.052df74533.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Метрики системного шрифту під Onest — менше зсуву макета, поки грузиться woff2. */
@font-face {
  font-family: "Onest Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Roboto");
  size-adjust: 104%;
  ascent-override: 92%;
  descent-override: 24%;
}

:root {
  color-scheme: light dark;
  --bg: #F7F7F8;
  --bg-2: #EFEFF1;
  --surface: #FFFFFF;
  --text: #0F1115;
  --text-2: #50555F;
  --line: rgba(15, 17, 21, .08);
  --line-2: rgba(15, 17, 21, .16);
  --accent: #3366F0;
  --accent-ink: #2453D6;
  --accent-soft: rgba(51, 102, 240, .12);
  --on-accent: #FFFFFF;
  --amber: #E08A00;
  --amber-ink: #8A5600;
  --amber-soft: rgba(224, 138, 0, .14);
  --ok: #1E9E5A;
  --ok-soft: rgba(30, 158, 90, .14);
  --danger-soft: rgba(217, 54, 54, .1);
  --danger: #C62F2F;
  --grad: linear-gradient(135deg, #4A7BFF, #2147C4);
  --glass: rgba(247, 247, 248, .78);
  --street: #E1E3E8;
  --street-major: #D3D6DD;
  --block: #ECEEF2;
  --park: #DDEFE4;
  --map-line: rgba(15, 17, 21, .28);
  --shadow: 0 1px 2px rgba(15, 17, 21, .05), 0 18px 40px -18px rgba(15, 17, 21, .18);
  --radius: 22px;
  --font: "Onest", "Onest Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1115;
    --bg-2: #14171C;
    --surface: #181B21;
    --text: #F2F3F5;
    --text-2: #A3A8B3;
    --line: rgba(242, 243, 245, .08);
    --line-2: rgba(242, 243, 245, .18);
    --accent: #6B93FF;
    --accent-ink: #8EAEFF;
    --accent-soft: rgba(107, 147, 255, .16);
    --on-accent: #0F1115;
    --amber: #FFB547;
    --amber-ink: #FFC870;
    --amber-soft: rgba(255, 181, 71, .16);
    --ok: #3CCB7F;
    --ok-soft: rgba(60, 203, 127, .16);
    --danger-soft: rgba(255, 107, 107, .12);
    --danger: #FF8A8A;
    --glass: rgba(15, 17, 21, .74);
    --street: #262B34;
    --street-major: #2E343F;
    --block: #1A1E25;
    --park: #16302A;
    --map-line: rgba(242, 243, 245, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -18px rgba(0, 0, 0, .6);
  }
}

/* --- База ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--font);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 1.4rem + 5.2vw, 5.4rem); font-weight: 760; letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.3rem); font-weight: 720; letter-spacing: -.03em; }
h3 { font-size: 1.2rem; font-weight: 650; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent-ink); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
a, button, summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }

.i { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.skip { position: absolute; left: 16px; top: 12px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); transform: translateY(-200%); }
.skip:focus { transform: none; }
.top-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 16px; pointer-events: none; }

.lead { font-size: clamp(1.1rem, 1rem + .45vw, 1.3rem); color: var(--text-2); line-height: 1.5; }
.note { color: var(--text-2); font-size: .97rem; }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--accent-ink); font-weight: 650; font-size: .95rem; letter-spacing: .02em; }
/* Пунктир — фірмовий знак: так у застосунку позначено шлях за сенсорами без GPS. */
.kicker::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 10px); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 650; text-decoration: none; white-space: nowrap;
  transition: transform .2s ease, opacity .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.btn-lg { min-height: 56px; padding: 0 26px; }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost .i { transition: transform .25s ease; }
.btn-ghost:hover .i { transform: translateY(2px); }

.store { display: flex; flex-wrap: wrap; gap: 12px; }
.store-soon {
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 22px;
  border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-2);
  font-weight: 650; line-height: 1.3;
}
.store-soon .i { color: var(--accent); }
.store-badge img { height: 52px; width: auto; }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; text-decoration: none; }
.link-arrow .i { transition: transform .25s ease; }
.link-arrow:hover .i { transform: translateX(3px); }

/* --- Шапка: скло, при прокрутці стискається ------------------------------- */

.site-header { position: sticky; top: -12px; z-index: 50; }
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--glass); border-bottom: 1px solid var(--line); opacity: 0; transition: opacity .3s ease;
}
/* Скло — лише після прокрутки: backdrop-filter над анімованою сценою hero перемальовувався б щокадру. */
.is-scrolled .site-header::before { opacity: 1; -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 72px; transition: transform .3s ease; }
.is-scrolled .header-inner { transform: translateY(6px); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 720; font-size: 1.2rem; letter-spacing: -.02em; text-decoration: none; }
.brand img { border-radius: 9px; }
.nav { display: none; margin-left: 24px; }
.nav ul { display: flex; gap: 4px; list-style: none; }
.nav a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text-2); font-weight: 550; text-decoration: none; }
.nav a:hover { color: var(--text); background: var(--line); }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.lang { display: inline-flex; align-items: center; padding: 3px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-2); font-size: .85rem; font-weight: 650; }
.lang > * { display: grid; place-items: center; min-width: 40px; height: 34px; padding: 0 10px; border-radius: 999px; }
.lang-current { background: var(--text); color: var(--bg); }
.lang a { color: var(--text-2); text-decoration: none; }
.lang a:hover { color: var(--text); }
@media (min-width: 900px) { .nav { display: block; } }
@media (max-width: 359px) { .header-actions .btn { display: none; } }

/* --- Hero ---------------------------------------------------------------- */

.hero { position: relative; padding: 32px 0 72px; overflow: clip; }
.hero-track { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero-track path { fill: none; stroke: var(--accent); stroke-opacity: .22; stroke-width: 3; stroke-dasharray: 2 14; stroke-linecap: round; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.eyebrow { display: inline-flex; padding: 6px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; font-size: .95rem; margin-bottom: 20px; }
.hero h1 { max-width: 12ch; }
.hero .lead { margin-top: 22px; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 32px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; list-style: none; color: var(--text-2); font-weight: 550; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts .i { color: var(--ok); }

.hero-visual { position: relative; aspect-ratio: 1 / 1.03; width: 100%; max-width: 600px; margin-inline: auto; }
.scene {
  position: absolute; right: 0; top: 3%; width: 86%; margin: 0;
  aspect-ratio: 480 / 400; border-radius: 28px; overflow: hidden;
  background: var(--bg-2); box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
}
.hero-phone { position: absolute; left: 0; bottom: 0; width: 46%; }
/* Пауза для автоанімацій (WCAG 2.2.2). Без JS і з reduced motion анімацій і кнопки немає. */
.motion-toggle {
  position: absolute; right: 0; bottom: 2%; display: none; min-height: 36px; padding: 0 14px;
  border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--text-2); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.motion-toggle:hover { color: var(--text); }
@media (prefers-reduced-motion: no-preference) { .js .motion-toggle { display: inline-flex; align-items: center; } }
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
.motion-paused .reveal { animation-play-state: running !important; }
@media (min-width: 960px) { .hero-visual { aspect-ratio: 1 / .93; } .hero-phone { width: 41%; } }

@media (min-width: 960px) {
  .hero { padding: 56px 0 104px; }
  .hero-grid { grid-template-columns: repeat(12, 1fr); gap: 24px; }
  .hero-text { grid-column: 1 / 7; }
  .hero-visual { grid-column: 7 / 13; }
}

/* Телефон — нейтральна рамка, намальована CSS. */
.phone {
  position: relative; padding: 3.2%;
  border-radius: 15% / 7%;
  background: linear-gradient(150deg, #43474F, #121418 38%, #23262C);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .09), 0 40px 80px -32px rgba(15, 17, 21, .55);
}
.phone picture, .phone img { width: 100%; border-radius: 12.5% / 5.8%; }
.phone img { background: var(--bg-2); }

/* --- Сцена hero ----------------------------------------------------------- */

.sc-svg { width: 100%; height: 100%; }
.sc-blk { fill: var(--block); }
.sc-park { fill: var(--park); }
.sc-st { fill: none; stroke: var(--street); stroke-width: 10; }
.sc-st-major { stroke: var(--street-major); stroke-width: 16; }
.sc-plan { fill: none; stroke: var(--accent); stroke-opacity: .16; stroke-width: 7; stroke-linejoin: round; stroke-linecap: round; }
.sc-draw { fill: none; stroke-dasharray: 1 1; stroke-dashoffset: 0; stroke-linejoin: round; }
.sc-gps { stroke: var(--accent); stroke-width: 7; }
.sc-draw-b { stroke: #FFF; stroke-width: 14; }
.sc-dr { fill: none; stroke: var(--amber); stroke-width: 6; stroke-dasharray: 1 10; stroke-linecap: round; stroke-linejoin: round; }
.sc-start { fill: var(--surface); stroke: var(--accent); stroke-width: 3; }
.sc-dest circle:first-child { fill: var(--accent); fill-opacity: .18; }
.sc-dest circle:last-child { fill: var(--accent); }
.sc-ghost-ring { fill: none; stroke: var(--text-2); stroke-width: 2; stroke-dasharray: 3 4; }
.sc-ghost-dot { fill: var(--text-2); fill-opacity: .55; }
.sc-ghost, .sc-ring, .sc-dot-dr { opacity: 0; }
.sc-ghost, .sc-ring { transform-box: fill-box; transform-origin: center; }
.sc-marker {
  offset-path: path("M200 360L200 290L270 290L270 220L350 220L350 150L440 150L440 80");
  offset-rotate: 0deg; offset-distance: 100%;
}
.sc-dot { stroke: #FFF; stroke-width: 3.5; }
.sc-dot-gps { fill: var(--accent); }
.sc-dot-dr { fill: var(--amber); }
.sc-ring { fill: var(--amber); fill-opacity: .2; stroke: var(--amber); stroke-opacity: .55; stroke-width: 1.5; }

.sc-toast {
  position: absolute; top: 5%; right: 4%; display: flex; align-items: center; gap: 8px; max-width: 70%;
  padding: 8px 12px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow);
  font-size: clamp(.72rem, .6rem + .5vw, .9rem); font-weight: 650; line-height: 1.25; opacity: 0;
}
.sc-toast-spoof .i { color: var(--amber); }
.sc-toast-ok .i { color: var(--ok); }
.sc-ghost-label { position: absolute; right: 3%; bottom: 3%; padding: 2px 8px; border-radius: 8px; background: var(--surface); color: var(--text-2); font-size: clamp(.65rem, .55rem + .4vw, .8rem); font-weight: 600; opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .sc-route, .sc-marker { animation: sc-fade 8s linear infinite; }
  .sc-marker { animation: sc-fade 8s linear infinite, sc-move 8s linear infinite; }
  .sc-draw-a { animation: sc-a 8s linear infinite; }
  .sc-draw-b { animation: sc-b 8s linear infinite; }
  .sc-draw-c { animation: sc-c 8s linear infinite; }
  .sc-dot-gps { animation: sc-gps 8s linear infinite; }
  .sc-dot-dr { animation: sc-dr 8s linear infinite; }
  .sc-ring { animation: sc-ring 8s ease-out infinite; }
  .sc-ghost, .sc-ghost-label { animation: sc-ghost 8s ease-out infinite; }
  .sc-toast-spoof { animation: sc-toast-spoof 8s ease-out infinite; }
  .sc-toast-ok { animation: sc-toast-ok 8s ease-out infinite; }
  .is-paused .scene *, .is-paused .scene { animation-play-state: paused !important; }
}
/* Таймлайн 8 с: рух 5–80%; GPS до 41%, сенсори 41–63% (пунктир), GPS відновлено, пауза. */
@keyframes sc-fade { 0% { opacity: 0; } 3%, 94% { opacity: 1; } 100% { opacity: 0; } }
@keyframes sc-move { 0%, 5% { offset-distance: 0%; } 80%, 100% { offset-distance: 100%; } }
@keyframes sc-a { 0%, 5% { stroke-dashoffset: 1; } 41.06%, 100% { stroke-dashoffset: 0; } }
@keyframes sc-b { 0%, 41.06% { stroke-dashoffset: 1; } 63.41%, 100% { stroke-dashoffset: 0; } }
@keyframes sc-c { 0%, 63.41% { stroke-dashoffset: 1; } 80%, 100% { stroke-dashoffset: 0; } }
@keyframes sc-gps { 0%, 40.6% { opacity: 1; } 41.6%, 63% { opacity: 0; } 64%, 100% { opacity: 1; } }
@keyframes sc-dr { 0%, 40.6% { opacity: 0; } 41.6%, 63% { opacity: 1; } 64%, 100% { opacity: 0; } }
@keyframes sc-ring { 0%, 41% { opacity: 0; transform: scale(.6); } 43% { opacity: 1; transform: scale(1); } 63% { opacity: 1; transform: scale(2.3); } 65%, 100% { opacity: 0; transform: scale(1); } }
@keyframes sc-ghost { 0%, 41% { opacity: 0; transform: scale(.5); } 44%, 60% { opacity: 1; transform: scale(1); } 63%, 100% { opacity: 0; transform: scale(1); } }
@keyframes sc-toast-spoof { 0%, 41% { opacity: 0; transform: translateY(-8px); } 44%, 60% { opacity: 1; transform: none; } 63%, 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes sc-toast-ok { 0%, 64% { opacity: 0; transform: translateY(-8px); } 67%, 89% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; transform: translateY(-8px); } }

/* --- Секції -------------------------------------------------------------- */

.section { position: relative; padding: 80px 0; }
.section-head { display: grid; gap: 16px; max-width: 46rem; margin-bottom: 40px; }
@media (min-width: 960px) { .section { padding: 120px 0; } .section-head { margin-bottom: 56px; } }

.cards { display: grid; gap: 16px; list-style: none; }
.card { padding: 28px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card h3 { margin: 18px 0 8px; }
.card p { color: var(--text-2); }
.card-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); }
.card-icon .i { width: 26px; height: 26px; }
.card-icon-warn { background: var(--danger-soft); color: var(--danger); }
.card-icon-night { background: rgba(224, 64, 46, .14); color: #D23A2A; }
@media (min-width: 720px) { .cards-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .cards-3 { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.scenarios { margin-top: 56px; }
.scenarios-title { margin-bottom: 20px; font-size: 1.45rem; }
.scenario-list { display: grid; gap: 0; list-style: none; border-top: 1px solid var(--line-2); }
.scenario { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line-2); }
.scenario h4 { margin: 2px 0 6px; font-size: 1.1rem; font-weight: 650; line-height: 1.3; }
.scenario p { color: var(--text-2); }
@media (min-width: 900px) { .scenario-list { grid-template-columns: repeat(3, 1fr); gap: 32px; border-top: 0; } .scenario { flex-direction: column; border-bottom: 0; border-top: 1px solid var(--line-2); } }

/* Як працює: GPS → детектор → сенсори + дороги. */
.flow { display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 8px; margin-bottom: 40px; }
.flow-node { display: grid; justify-items: center; gap: 8px; text-align: center; font-weight: 650; font-size: .9rem; max-width: 9rem; }
.flow-node .i { box-sizing: content-box; width: 28px; height: 28px; padding: 16px; border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); color: var(--accent-ink); }
.flow-node-1 .i { color: var(--amber-ink); }
.flow-node-2 .i { color: var(--ok); }
.flow-link { width: 100%; height: 8px; overflow: visible; margin-bottom: 30px; }
.flow-link path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100 0; vector-effect: non-scaling-stroke; }
.flow-link-dr path { stroke: var(--amber); stroke-dasharray: 2 9; }
@media (prefers-reduced-motion: no-preference) {
  .flow-link-dr path { animation: flow-dash 1.2s linear infinite; }
}
@keyframes flow-dash { to { stroke-dashoffset: -11; } }

.steps { display: grid; gap: 16px; list-style: none; counter-reset: step; }
.step { position: relative; padding: 28px 28px 28px 76px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); counter-increment: step; }
.step::before { content: counter(step); position: absolute; left: 24px; top: 26px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-weight: 720; }
.step h3 { margin-bottom: 8px; }
.step p { color: var(--text-2); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } .step { padding: 76px 28px 28px; } }
.honest { display: flex; gap: 24px; align-items: center; margin-top: 24px; padding: 28px; border-radius: var(--radius); background: var(--amber-soft); }
.honest h3 { margin-bottom: 6px; }
.honest-track { width: 120px; flex: none; }
.honest-track path { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.honest-gps { stroke: var(--accent); }
.honest-dr { stroke: var(--amber); stroke-dasharray: 1 7; }
.honest-track circle { fill: var(--accent); }
.honest-err { fill: var(--amber) !important; fill-opacity: .25; stroke: var(--amber); stroke-width: 1.5; }
@media (max-width: 600px) { .honest { flex-direction: column; align-items: flex-start; } }

/* --- Можливості: scrollytelling -------------------------------------------- */

.story-steps { display: grid; gap: 56px; list-style: none; }
.story-step h3 { margin: 16px 0 8px; font-size: 1.45rem; }
.story-step p { color: var(--text-2); max-width: 32em; }
.phone-inline { width: min(280px, 78%); margin-top: 28px; }
.story-stage { display: none; }
@media (min-width: 960px) {
  .story { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; }
  .story-steps { grid-column: 1 / 7; gap: 0; }
  .story-step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; padding-block: 32px; transition: opacity .4s ease; }
  .js .story-step:not(.is-active) { opacity: .38; }
  .phone-inline { display: none; }
  .story-stage { display: block; grid-column: 8 / 13; }
  .story-phone {
    position: sticky; top: max(96px, calc(50vh - 330px));
    display: grid; width: min(310px, calc((100vh - 150px) / 2.2)); margin-inline: auto;
    transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .4s ease-out;
  }
  .story-screen { grid-area: 1 / 1; opacity: 0; transition: opacity .55s ease; }
  .story-screen.is-active { opacity: 1; }
}

/* --- В авто --------------------------------------------------------------- */

.car { background: var(--bg-2); }
.car-grid { display: grid; gap: 48px; align-items: center; }
.car .card { box-shadow: none; }
.car .note { margin-top: 20px; }
.car-visual { display: grid; place-items: center; }
.phone-night { width: min(300px, 76%); }
@media (min-width: 960px) {
  .car-grid { grid-template-columns: repeat(12, 1fr); gap: 24px; }
  .car-text { grid-column: 1 / 8; }
  .car-visual { grid-column: 9 / 13; }
}

/* --- Офлайн-мапа ---------------------------------------------------------- */

.map-grid { display: grid; gap: 40px; align-items: center; }
.stats { display: grid; gap: 12px; margin: 0 0 24px; }
.stats div { display: flex; flex-direction: column-reverse; gap: 2px; padding: 16px 20px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.stats dt { color: var(--text-2); font-size: .95rem; }
.stats dd { margin: 0; font-size: 1.6rem; font-weight: 720; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.map-figure { margin: 0; }
.ua-map { width: 100%; height: auto; }
.ua-outline use { fill: none; stroke: var(--map-line); stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ua-fill .rg { fill: var(--accent); opacity: .26; }
.ua-fill .rg-built-in { opacity: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; color: var(--text-2); font-size: .92rem; }
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-item::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--accent); }
.legend-dl::before { opacity: .3; }
@media (min-width: 960px) {
  .map-grid { grid-template-columns: repeat(12, 1fr); gap: 24px; }
  .map-text { grid-column: 1 / 6; }
  .map-figure { grid-column: 6 / 13; }
}
@media (prefers-reduced-motion: no-preference) {
  .js .ua-fill .rg { opacity: 0; transform: scale(.94); transform-box: fill-box; transform-origin: center; transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--i, 0) * 70ms); }
  .js .is-loaded .ua-fill .rg { opacity: .26; transform: none; }
  .js .is-loaded .ua-fill .rg-built-in { opacity: 1; }
}

/* --- Приватність ------------------------------------------------------------ */

.privacy-card { padding: 32px 20px; border-radius: 32px; background: var(--surface); box-shadow: var(--shadow); }
.privacy-facts { display: grid; gap: 24px; list-style: none; margin-bottom: 32px; }
.privacy-facts h3 { margin: 14px 0 6px; }
.privacy-facts p { color: var(--text-2); }
.privacy-card .note { max-width: 46rem; margin-bottom: 20px; padding-left: 16px; border-left: 3px dashed var(--line-2); }
@media (min-width: 720px) { .privacy-card { padding: 56px; } .privacy-facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .privacy-facts { grid-template-columns: repeat(4, 1fr); } }

/* --- FAQ ----------------------------------------------------------------- */

.faq-grid { display: grid; gap: 8px; }
@media (min-width: 960px) { .faq-grid { grid-template-columns: repeat(12, 1fr); gap: 24px; } .faq .section-head { grid-column: 1 / 5; align-self: start; position: sticky; top: 104px; } .faq-list { grid-column: 5 / 13; } }
.qa { border-bottom: 1px solid var(--line-2); }
.qa summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover h3 { color: var(--accent-ink); }
.qa summary h3 { font-size: 1.15rem; line-height: 1.35; }
.qa summary::after { content: ""; flex: none; width: 10px; height: 10px; margin: 8px 6px 0 0; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg); transition: transform .3s ease; }
.qa[open] summary::after { transform: translateY(4px) rotate(225deg); }
.qa-a { padding: 0 32px 24px 0; color: var(--text-2); }
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    :root { interpolate-size: allow-keywords; }
    .qa::details-content { block-size: 0; overflow-y: clip; transition: block-size .35s ease, content-visibility .35s allow-discrete; }
    .qa[open]::details-content { block-size: auto; }
  }
}

/* --- Фінальний CTA ---------------------------------------------------------- */

.cta-card {
  position: relative; display: grid; justify-items: center; gap: 18px; padding: 56px 20px; overflow: hidden;
  border-radius: 36px; background: var(--grad); color: #FFF; text-align: center;
}
.cta-card::before { content: ""; position: absolute; inset: auto -10% -40% -10%; height: 70%; border-top: 3px dashed rgba(255, 255, 255, .28); border-radius: 50%; }
.cta-card h2 { max-width: 18ch; }
.cta-card .lead { color: rgba(255, 255, 255, .88); max-width: 34em; }
.cta-icon { border-radius: 22px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .45); }
.cta-card .store { justify-content: center; margin-top: 8px; }
.cta-card .store-soon { background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); color: #FFF; }
.cta-card .store-soon .i { color: #FFF; }
.cta-card .btn { background: #FFF; color: #1B3FB8; }
.cta-note { color: rgba(255, 255, 255, .86); font-size: .95rem; }
@media (min-width: 720px) { .cta-card { padding: 80px 48px; } }

/* --- Футер --------------------------------------------------------------- */

.site-footer { position: relative; padding: 56px 0 72px; border-top: 1px solid var(--line); color: var(--text-2); font-size: .95rem; overflow: hidden; }
.footer-grid { display: grid; gap: 28px; }
.footer-brand p { margin-top: 10px; max-width: 22rem; }
.footer-links { display: grid; gap: 8px; list-style: none; }
.footer-links a, .footer-meta a { color: var(--text); overflow-wrap: anywhere; }
.footer-meta { display: grid; gap: 8px; }
.footer-track { position: absolute; left: 0; right: 0; bottom: 8px; width: 100%; height: 40px; }
.footer-track path { fill: none; stroke: var(--accent); stroke-opacity: .3; stroke-width: 2.5; stroke-dasharray: 2 10; stroke-linecap: round; vector-effect: non-scaling-stroke; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 5fr 3fr 4fr; } }

/* --- Юридичні сторінки й підтримка ------------------------------------------ */

.legal { padding: 24px 0 96px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; color: var(--text-2); font-size: .95rem; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .5; }
.legal-head { display: grid; gap: 14px; margin: 28px 0 40px; max-width: 46rem; }
.legal-head h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.6rem); }
.updated { color: var(--text-2); }
.legal-grid { display: grid; gap: 32px; }
.toc { padding: 20px 22px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); align-self: start; }
.toc h2 { font-size: 1rem; margin-bottom: 10px; letter-spacing: 0; }
.toc ol { display: grid; gap: 6px; padding-left: 1.2em; color: var(--text-2); font-size: .95rem; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (min-width: 960px) {
  .legal-grid { grid-template-columns: 17rem minmax(0, 1fr); gap: 56px; }
  .toc { position: sticky; top: 96px; }
}
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1em; }
.prose h2 { margin-top: 2.2em; font-size: 1.6rem; scroll-margin-top: 96px; }
.prose h3 { margin-top: 1.6em; font-size: 1.15rem; scroll-margin-top: 96px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose strong { font-weight: 650; }

.support-grid { display: grid; gap: 32px; }
.contact-card { display: grid; gap: 14px; justify-items: start; padding: 28px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); align-self: start; }
.contact-card h2 { font-size: 1.5rem; }
.contact-card h3 { margin-top: 12px; font-size: 1rem; }
.contact-card .btn { white-space: normal; text-align: center; }
.doc-links { display: grid; gap: 6px; list-style: none; }
.support-list > h2 { font-size: 1.6rem; margin-bottom: 8px; }
.howto { padding: 22px 0; border-bottom: 1px solid var(--line-2); scroll-margin-top: 96px; }
.howto h3 { margin-bottom: 8px; }
.howto p { color: var(--text-2); max-width: 68ch; }
@media (min-width: 960px) { .support-grid { grid-template-columns: 22rem minmax(0, 1fr); gap: 56px; } .contact-card { position: sticky; top: 96px; } }

.notfound { padding: 64px 0 120px; text-align: center; }
.notfound .wrap { display: grid; justify-items: center; gap: 20px; }
.nf-track { width: min(320px, 90%); }
.nf-track path { fill: none; stroke-width: 5; stroke-linecap: round; }
.nf-gps { stroke: var(--accent); }
.nf-dr { stroke: var(--amber); stroke-dasharray: 1 10; }
.nf-end { fill: var(--amber); }
.nf-x { stroke: var(--text-2); stroke-width: 4; }
.nf-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* --- Поява блоків при прокрутці ------------------------------------------------ */

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal-in linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  }
  .io .reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
  .io .reveal.is-in { opacity: 1; transform: none; }
  .hero-track path { animation: track-crawl 30s linear infinite; }
  @view-transition { navigation: auto; }
}
@keyframes reveal-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes track-crawl { to { stroke-dashoffset: -320; } }

/* --- OG-зображення 1200×630 ------------------------------------------------- */

/* OG завжди в темній палітрі — однаковий знімок незалежно від теми системи. */
.og {
  --bg: #0F1115; --text: #F2F3F5; --text-2: #A3A8B3; --accent: #6B93FF; --accent-ink: #8EAEFF;
  --accent-soft: rgba(107, 147, 255, .16); --amber: #FFB547; --bg-2: #14171C;
  width: 1200px; height: 630px; margin: 0; overflow: hidden; background: var(--bg); color: var(--text);
}
.og-frame { position: relative; display: grid; grid-template-columns: 1fr 330px; align-items: center; gap: 48px; width: 1200px; height: 630px; padding: 0 88px 0 80px; }
.og-track { position: absolute; inset: 0; width: 100%; height: 100%; }
.og-track path { fill: none; stroke-width: 8; stroke-linecap: round; }
.og-gps { stroke: var(--accent); stroke-opacity: .5; }
.og-dr { stroke: var(--amber); stroke-dasharray: 2 18; }
.og-text { position: relative; display: grid; gap: 18px; align-content: center; }
.og-brand { display: flex; align-items: center; gap: 16px; font-size: 2.2rem; font-weight: 750; letter-spacing: -.02em; }
.og-brand img { border-radius: 18px; }
.og h1 { font-size: 3.9rem; max-width: 12ch; }
.og-sub { font-size: 1.45rem; line-height: 1.4; color: var(--text-2); max-width: 24em; }
.og-tag { justify-self: start; margin-top: 6px; padding: 10px 18px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; font-size: 1.3rem; }
.og-phone { position: relative; width: 300px; margin-top: 220px; transform: rotate(4deg); }

/* --- Друк ---------------------------------------------------------------- */

@media print {
  :root { --bg: #FFF; --surface: #FFF; --text: #000; --text-2: #333; }
  .site-header, .site-footer, .toc, .skip, .footer-track, .hero-track, .nf-links { display: none !important; }
  body { font-size: 11pt; }
  .legal { padding: 0; }
  .prose { max-width: none; }
  .prose a::after { content: " (" attr(href) ")"; font-size: .85em; color: #444; }
  .prose h2 { break-after: avoid; }
}
