/* =========================================================================
   OY — общие стили (ядро)
   ========================================================================= */

@property --accent { syntax: '<color>'; inherits: true; initial-value: #B3202A; }
@property --accent-text { syntax: '<color>'; inherits: true; initial-value: #FF6B73; }
@property --accent-strong { syntax: '<color>'; inherits: true; initial-value: #B3202A; }
@property --accent-ink { syntax: '<color>'; inherits: true; initial-value: #FFFFFF; }
@property --glow { syntax: '<color>'; inherits: true; initial-value: rgba(179, 32, 42, .38); }
@property --bg-tint { syntax: '<color>'; inherits: true; initial-value: #0E0A0B; }

/* «Вечер у маяка»: тёплая ночь, бумага цвета льна и янтарный свет лампы.
   Fyr по-шведски — маяк, поэтому свет здесь жёлтый, а не неоновый */
:root {
  --bg: #14110E;
  --bg-2: #1C1814;
  --bg-3: #26201B;
  --fg: #F6EEE2;
  --muted: #B4A797;
  --line: rgba(255, 236, 210, .1);
  --line-2: rgba(255, 236, 210, .19);

  --light-bg: #F4EDE2;
  --light-bg-2: #EAE0D1;
  --light-fg: #2A211A;
  --light-muted: #6C5F52;
  --light-line: rgba(60, 40, 20, .14);

  /* бумага и лампа — общие для всего сайта */
  --linen: #F4EDE2;
  --linen-2: #FBF7F0;
  --linen-3: #EAE0D1;
  --linen-ink: #2A211A;
  --linen-muted: #6C5F52;
  --linen-line: rgba(60, 40, 20, .14);
  --lamp: #FFB547;
  --lamp-deep: #C9771C;
  --lamp-ink: #2A1A06;
  --lamp-glow: rgba(255, 170, 60, .28);
  --night: #14110E;

  --ok: #8BD9A6;
  --bad: #FF7A6B;

  --sans: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --serif: 'Palatino Linotype', Palatino, 'Book Antiqua', 'URW Palladio L', 'Noto Serif', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1320px;
  --radius: 28px;
  --ease: cubic-bezier(.2, .7, .1, 1);

  --header-h: 64px;

  transition: --accent .7s var(--ease), --accent-text .7s var(--ease), --accent-strong .7s var(--ease),
    --accent-ink .7s var(--ease), --glow .7s var(--ease), --bg-tint .7s var(--ease);
}

:root[data-color="red"] {
  --accent: #B3202A;
  --accent-text: #FF6B73;
  --accent-strong: #B3202A;
  --accent-ink: #FFFFFF;
  --glow: rgba(179, 32, 42, .38);
  --bg-tint: #0E0A0B;
}

:root[data-color="ice"] {
  --accent: #DCE6EC;
  --accent-text: #CFE3EE;
  --accent-strong: #2F5A70;
  --accent-ink: #0A0A0B;
  --glow: rgba(170, 210, 232, .26);
  --bg-tint: #090B0D;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

/* лёгкое зерно, как у бумаги и старой плёнки: сайт перестаёт быть стерильным */
body::after {
  content: ''; position: fixed; inset: 0; z-index: 70; pointer-events: none;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .4 0 0 0 0 .3 0 0 0 1.4 -.35'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media print { body::after { display: none; } }

html.lenis, html.lenis body { height: auto; }
.lenis-smooth { scroll-behavior: auto !important; }
.lenis-stopped { overflow: hidden; }

@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  min-width: 320px;
}

img, svg, canvas { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg use { fill: none; }
svg:has(use) { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

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

.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 1000;
  background: var(--fg); color: var(--bg);
  padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}
.light :focus-visible { outline-color: var(--accent-strong); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono { font-family: var(--mono); font-feature-settings: 'zero' 0; }
.muted { color: var(--muted); }
.accent-text { color: var(--accent-text); }
.light .accent-text { color: var(--accent-strong); }

/* ---------- Типографика ---------- */

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}
/* огонёк перед подписью раздела */
.eyebrow::before {
  content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--lamp); box-shadow: 0 0 0 4px var(--lamp-glow), 0 0 14px var(--lamp);
}
.light .eyebrow { color: var(--light-muted); }
.light .eyebrow::before { background: var(--lamp-deep); box-shadow: 0 0 0 4px rgba(201, 119, 28, .16); }

.mega {
  font-size: clamp(64px, 14vw, 220px);
  line-height: .86;
  letter-spacing: -.055em;
  font-weight: 700;
}

/* Заголовки разделов — с засечками: сайт говорит спокойно, как книга у огня */
.h2 {
  font-family: var(--serif);
  font-size: clamp(40px, 6.2vw, 104px);
  line-height: 1;
  letter-spacing: -.025em;
  font-weight: 400;
  max-width: 14ch;
  text-wrap: balance;
}
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.02em; }
.serif em, .h2 em { font-style: italic; }

.h3 {
  font-size: clamp(28px, 3.4vw, 52px);
  line-height: 1;
  letter-spacing: -.035em;
  font-weight: 650;
  text-wrap: balance;
}

.lead {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.45;
  color: var(--muted);
  max-width: 34ch;
  text-wrap: pretty;
}
.light .lead { color: var(--light-muted); }

.note {
  font-size: 15px;
  color: var(--muted);
  max-width: 40ch;
}

.giant {
  font-size: clamp(96px, 22vw, 360px);
  line-height: .8;
  letter-spacing: -.06em;
  font-weight: 700;
}
.giant--accent { color: var(--accent-text); }

/* Разбиение на строки */
.line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line__inner { display: inline-block; will-change: transform; }
.split { display: inline-block; }

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

.btn {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h);
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), background-color .3s, color .3s, border-color .3s, box-shadow .3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 40px -10px var(--glow);
}
.btn--ghost { border-color: var(--line-2); background: rgba(255, 240, 220, .04); }
.btn--ghost:hover { border-color: var(--fg); background: rgba(255, 240, 220, .08); }
/* кнопка-лампа: тёплая, с мягким ореолом */
.btn--lamp { background: var(--lamp); color: var(--lamp-ink); box-shadow: 0 10px 34px -12px var(--lamp), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn--lamp:hover { background: #FFC266; }
.btn--ink { background: var(--linen-ink); color: var(--linen-2); }
.btn--ink:hover { background: #3A2E25; }
.btn--sm { --h: 40px; padding: 0 18px; font-size: 14px; }
.btn--wide { width: 100%; }

/* ---------- Лоадер ---------- */

.loader {
  position: fixed; inset: 0; z-index: 900;
  display: grid; place-content: center; justify-items: center; gap: 18px;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s;
  animation: loader-failsafe 0s linear 10s forwards;
}
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark { width: 132px; height: auto; fill: none; stroke-width: 3; stroke-linecap: round; }
.loader__o { stroke: var(--lamp); stroke-dasharray: 101; stroke-dashoffset: 101; animation: loader-o 1.6s var(--ease) infinite; }
.loader__o--r { animation-delay: .15s; }
.loader__x { stroke: var(--fg); stroke-dasharray: 26; stroke-dashoffset: 26; animation: loader-x 1.6s var(--ease) infinite .3s; }
.loader__label { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
@keyframes loader-o { 0% { stroke-dashoffset: 101; } 45%, 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -101; } }
@keyframes loader-x { 0% { stroke-dashoffset: 26; } 45%, 70% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -26; } }

/* ---------- Фон и сцена ---------- */

.bgfx {
  position: fixed; inset: 0; z-index: 0;
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-tint), var(--bg) 60%);
  pointer-events: none;
  overflow: hidden;
}
.bgfx__glow {
  position: absolute;
  width: 70vmax; height: 70vmax;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 62%);
  filter: blur(20px);
  opacity: .9;
  will-change: transform;
}
.bgfx__glow--a { right: -18vmax; top: -10vmax; }
.bgfx__glow--b { left: -30vmax; bottom: -40vmax; opacity: .45; }
.bgfx__shade { position: absolute; inset: 0; background: #ECEBE7; opacity: 0; }

.stage {
  position: fixed; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  pointer-events: none;
}

main, .site-footer { position: relative; z-index: 2; }

/* ---------- Шапка ----------
   Тёплое стекло, лампа в логотипе и лента разделов посередине: на узком
   экране она листается пальцем, ничего не прячется */

.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: clamp(10px, 2vw, 28px);
  padding: 0 var(--gutter);
  background: rgba(20, 17, 14, .8);
  backdrop-filter: saturate(150%) blur(18px);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  border-bottom: 1px solid var(--line);
}
/* тонкая полоска света под шапкой — как луч маяка по горизонту */
.site-header::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent 8%, rgba(255, 181, 71, .55) 50%, transparent 92%);
  opacity: .55;
}
.brand { flex: none; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.02em; font-size: 18px; }
.brand__mark { width: 46px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.brand__mark circle { stroke: var(--accent-text); }
/* переходный период: сайт — Fyr, телефоны — OY. Логотип «fyr / OY»; у «маяка» тёплый луч */
.brand__fyr { width: 40px; height: 26px; flex: none; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.brand__fyr-beam { fill: var(--lamp); stroke: none; opacity: .55; transform-box: view-box; transform-origin: 23px 6px; animation: brand-beam 8s linear infinite; }
.brand__fyr-lamp { fill: #FFD58A; stroke: none; filter: drop-shadow(0 0 3px var(--lamp)); }
.brand__sep { margin: 0 -2px; color: var(--muted); font-weight: 400; }
@keyframes brand-beam { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .brand__fyr-beam { animation: none; } }
/* устройства Fyr в меню отмечены огоньком */
.site-nav .site-nav__fyr { color: var(--fg); font-weight: 600; }
.site-nav .site-nav__fyr::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 7px 2px 0; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 8px var(--lamp); vertical-align: middle; }
.site-nav .site-nav__fyr:hover { color: #FFF6E6; }
/* плашка переходного периода в подвале страниц OY */
.transit-plate { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 16px 20px; border: 1px solid rgba(255, 181, 71, .32); border-radius: 18px; background: linear-gradient(100deg, rgba(255, 181, 71, .1), rgba(255, 181, 71, .03)); color: var(--fg); font-size: 14px; line-height: 1.5; }
.transit-plate b { color: var(--lamp); font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.transit-plate a { color: var(--lamp); white-space: nowrap; }
.site-nav {
  flex: 0 1 auto; min-width: 0;
  display: flex; justify-content: safe center; gap: 0; font-size: 13.5px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { flex: none; padding: 7px 10px; border-radius: 999px; text-decoration: none; color: var(--muted); transition: color .2s, background-color .2s; white-space: nowrap; }
.site-nav a:hover { color: var(--fg); background: rgba(255, 236, 210, .07); }
.site-nav a[aria-current="page"] { color: var(--fg); background: rgba(255, 236, 210, .1); }
/* меню делится на три группы: устройства Fyr · телефоны OY · система, аксессуары и сравнение */
.site-nav a:is([href="/0x5e/"], [href="/os/"]) { position: relative; margin-left: 13px; }
.site-nav a:is([href="/0x5e/"], [href="/os/"])::before { content: ''; position: absolute; left: -7px; top: 50%; width: 1px; height: 16px; margin-top: -8px; background: var(--line-2); }
.site-nav a[href="/compare/"] { box-shadow: inset 0 0 0 1px var(--line-2); color: var(--fg); }
.header-actions { flex: none; display: flex; align-items: center; gap: 14px; }
/* «Купить» в шапке горит лампой на любой странице */
.header-actions .btn--accent { background: var(--lamp); color: var(--lamp-ink); box-shadow: 0 8px 26px -10px var(--lamp), inset 0 1px 0 rgba(255, 255, 255, .45); }
.header-actions .btn--accent:hover { background: #FFC266; }
/* Прячем через top: transform шапки анимирует GSAP при появлении */
.site-header { transition: top .4s var(--ease); }

/* ---------- Подменю страницы модели (как у Apple) ----------
   Под общей шапкой: название модели, разделы, цвет и «Купить». При прокрутке
   общая шапка уезжает вверх, а подменю прилипает к краю экрана. */

:root { --subnav-h: 52px; }
.subnav {
  position: fixed; top: var(--header-h); left: 0; right: 0; z-index: 49;
  height: var(--subnav-h);
  background: rgba(20, 17, 14, .74);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
  transition: top .4s var(--ease);
}
html.subnav-stuck .site-header { top: calc(-1 * var(--header-h) - 1px); }
html.subnav-stuck .subnav { top: 0; }
.subnav__inner { height: 100%; display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); padding: 0 var(--gutter); }
.subnav__title { margin-right: auto; font-size: 21px; font-weight: 650; letter-spacing: -.025em; text-decoration: none; white-space: nowrap; }
.subnav__menu { display: flex; gap: clamp(14px, 1.6vw, 26px); font-size: 13px; }
.subnav__menu a { color: var(--muted); text-decoration: none; white-space: nowrap; transition: color .2s; }
.subnav__menu a:hover, .subnav__menu a.is-active { color: var(--fg); }
.subnav__actions { display: flex; align-items: center; gap: 14px; }
.subnav__actions .btn--sm { height: 30px; padding: 0 14px; font-size: 13px; }
.subnav__toggle { display: none; }
@media (min-width: 761px) {
  html[data-subnav] .hero__inner { padding-top: calc(var(--header-h) + var(--subnav-h) + 24px); }
}
html[data-subnav] [id] { scroll-margin-top: var(--subnav-h); }

/* ---------- Переключатель цвета ---------- */

.swatch {
  display: inline-block;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), inset 0 -6px 10px rgba(0, 0, 0, .25);
  flex: none;
}
.swatch--red { background: radial-gradient(circle at 35% 30%, #E2505A, #B3202A 55%, #7A121A); }
.swatch--ice { background: radial-gradient(circle at 35% 30%, #FFFFFF, #DCE6EC 55%, #A9B9C3); }

.color-switch--mini { display: flex; gap: 8px; }
.color-switch--mini .swatch { position: relative; }
.color-switch--mini .swatch[aria-checked="true"]::after {
  content: ''; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid var(--fg);
}

.color-switch--big { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.color-opt {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 18px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  font-size: 15px;
  transition: border-color .3s, background-color .3s;
}
.color-opt[aria-checked="true"] { border-color: var(--fg); background: rgba(255, 255, 255, .1); }
.light .color-opt { border-color: var(--light-line); background: rgba(0, 0, 0, .03); }
.light .color-opt[aria-checked="true"] { border-color: var(--light-fg); background: #fff; }
.color-opt .swatch { pointer-events: none; }

/* ---------- Секции ---------- */

.section { position: relative; }
.solid { background: var(--bg); }
.light { background: var(--light-bg); color: var(--light-fg); }
/* Бумага: льняной фон, тёплые чернила. Переопределяет токены, поэтому всё,
   что внутри пишет var(--fg) и var(--muted), само становится тёмным на светлом */
.paper {
  --fg: var(--linen-ink); --muted: var(--linen-muted);
  --line: var(--linen-line); --line-2: rgba(60, 40, 20, .24);
  --bg: var(--linen); --bg-2: var(--linen-2); --bg-3: var(--linen-3);
  --accent-text: var(--accent-strong);
  background: var(--linen); color: var(--linen-ink);
}
.paper--deep { --bg: var(--linen-3); background: var(--linen-3); }
.paper .eyebrow::before { background: var(--lamp-deep); box-shadow: 0 0 0 4px rgba(201, 119, 28, .16); }
.paper :focus-visible { outline-color: var(--lamp-deep); }
.solid:not(.pinned), .final { padding-block: clamp(96px, 14vh, 180px); }

.pinned { min-height: 100vh; min-height: 100svh; }
.pin-wrap {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding-top: var(--header-h);
}

.stage-text { position: relative; max-width: min(520px, 44vw); }
.stage-text--right { margin-left: auto; }
.stage-text--bottom { align-self: flex-end; padding-bottom: clamp(32px, 8vh, 80px); }
.stage-text .lead { margin-top: 20px; }
.stage-text .h2 { font-size: clamp(40px, 5.2vw, 92px); }

/* ---------- Градиентный текст ---------- */

.grad { --grad: linear-gradient(105deg, var(--fg) 30%, var(--accent-text) 110%); }
.grad--accent { --grad: linear-gradient(170deg, var(--accent-text) 15%, var(--fg) 120%); }
.grad:not(:has(.line)), .grad .line__inner {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.light .grad { --grad: linear-gradient(105deg, var(--light-fg) 30%, var(--accent-strong) 110%); }

/* ---------- Коротко о главном (карусель) ---------- */

.highlights { overflow: hidden; }
.hl { margin-top: clamp(36px, 6vh, 64px); }
.hl__track {
  --pad: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter)));
  list-style: none; margin: 0; padding: 0 var(--pad);
  display: flex; gap: 20px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad);
  scrollbar-width: none;
}
.hl__track::-webkit-scrollbar { display: none; }
.hl__track:focus-visible { outline-offset: -2px; }
.hl__slide {
  position: relative; flex: none; scroll-snap-align: start;
  width: min(1000px, 84vw); height: clamp(440px, 66vh, 640px);
  border-radius: 28px; overflow: hidden;
  background: radial-gradient(120% 90% at 80% 100%, var(--glow), transparent 60%), var(--bg-2);
  border: 1px solid var(--line);
  display: grid; grid-template-rows: auto 1fr;
}
.hl__text { padding: clamp(28px, 4vw, 52px); padding-bottom: 0; max-width: 640px; }
.hl__title { margin: 0; max-width: 17ch; font-size: clamp(26px, 2.8vw, 44px); font-weight: 700; line-height: 1.08; letter-spacing: -.03em; }
.hl__desc { margin: 14px 0 0; max-width: 36ch; color: var(--muted); font-size: clamp(15px, 1.3vw, 18px); }
.hl__vis { position: relative; display: grid; place-items: center; min-height: 0; }

.hl__controls { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 28px; }
.hl__dots { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 22px; border-radius: 999px; background: rgba(255, 255, 255, .1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hl__dot { --p: 0; width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; transition: width .5s var(--ease); }
.hl__dot span { display: block; position: relative; width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .45); overflow: hidden; transition: width .5s var(--ease), background .3s; }
.hl__dot[aria-current="true"] { width: 56px; }
.hl__dot[aria-current="true"] span { width: 48px; background: rgba(255, 255, 255, .3); }
.hl__dot[aria-current="true"] span::after { content: ''; position: absolute; inset: 0; background: var(--fg); transform-origin: left; transform: scaleX(var(--p)); border-radius: inherit; }
.hl__play { width: 56px; height: 56px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .1); color: var(--fg); cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.hl__play svg { width: 22px; height: 22px; grid-area: 1 / 1; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hl__play .i-play { fill: currentColor; stroke-width: 1.5; }
.hl__play[data-playing="true"] .i-play, .hl__play[data-playing="false"] .i-pause { display: none; }
.reduced .hl__play, html:not(.anim) .hl__play { display: none; }

/* ---------- Подколы ---------- */

.jab {
  margin-top: 22px; padding-left: 14px; border-left: 2px solid var(--accent-text);
  font-size: 15px; font-weight: 600; color: var(--fg); max-width: 42ch;
}
.light .jab { color: var(--light-fg); border-left-color: var(--accent-strong); }
.pro-teaser--link { text-decoration: none; transition: border-color .3s, transform .3s var(--ease); }
.pro-teaser--link:hover { border-color: var(--fg); transform: translateY(-2px); }

/* ---------- Сноски, как у Apple: цифра у числа, расшифровка внизу страницы ---------- */

sup.fn { font-size: .5em; line-height: 0; vertical-align: super; margin-left: .08em; font-weight: 500; letter-spacing: 0; }
.h2 sup.fn, .mega sup.fn, .giant sup.fn { font-size: .28em; vertical-align: .9em; }
sup.fn a { color: inherit; opacity: .7; text-decoration: none; padding: 0 .1em; border-radius: 3px; transition: opacity .2s; }
sup.fn a:hover, sup.fn a:focus-visible { opacity: 1; text-decoration: underline; }
.footnotes {
  position: relative; background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 40px 0 36px;
  font-size: 12px; line-height: 1.55; color: var(--muted);
}
.footnotes__list { list-style: none; counter-reset: fn; display: grid; gap: 10px; max-width: 980px; }
.footnotes__list li { counter-increment: fn; position: relative; padding-left: 22px; scroll-margin-top: calc(var(--header-h) + 24px); }
.footnotes__list li::before { content: counter(fn) '.'; position: absolute; left: 0; font-family: var(--mono); font-size: 11px; }
.footnotes__list li:target { color: var(--fg); }
.footnotes__back { color: var(--fg); text-decoration: none; margin-left: 4px; }
.footnotes__more { margin-top: 18px; max-width: 980px; }
[id^="fnr-"] { scroll-margin-top: 45vh; }

/* ---------- Футер ----------
   Тёплый подвал: маяк справа светит над текстом, а строки стоят спокойно */

.site-footer {
  position: relative; overflow: hidden;
  background: radial-gradient(50% 140% at 92% 0%, rgba(255, 181, 71, .13), transparent 62%), var(--bg-2);
  border-top: 1px solid var(--line);
  padding: clamp(48px, 7vw, 80px) 0 calc(40px + env(safe-area-inset-bottom));
}
/* маяк и его луч — только украшение */
.site-footer::before {
  content: ''; position: absolute; right: clamp(-40px, 2vw, 40px); top: 10px; width: 230px; height: 150px; pointer-events: none; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 230 150'%3E%3Cdefs%3E%3ClinearGradient id='b' x1='1' x2='0'%3E%3Cstop offset='0' stop-color='%23FFB547' stop-opacity='0'/%3E%3Cstop offset='1' stop-color='%23FFB547' stop-opacity='.55'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M170 38 L10 6 L10 64Z' fill='url(%23b)'/%3E%3Cg fill='none' stroke='%23B4A797' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M160 150 L166 52 H184 L190 150'/%3E%3Cpath d='M162 52 H188 M168 52 V40 H182 V52 M166 40 L175 30 L184 40'/%3E%3Cpath d='M164 84 H186 M162 118 H188'/%3E%3C/g%3E%3Ccircle cx='175' cy='46' r='3.5' fill='%23FFD58A'/%3E%3C/svg%3E") no-repeat right top / contain;
}
.footer__inner { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: center; }
.footer__brand { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.footer__privacy { display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 236, 210, .03); font-weight: 600; font-size: 15px; text-align: center; }
.footer__privacy svg { width: 20px; height: 20px; color: var(--ok); flex: none; }
.footer__small { justify-self: end; font-size: 12px; line-height: 1.7; color: var(--muted); }
.footer__small a { color: var(--fg); text-decoration-color: rgba(255, 236, 210, .3); text-underline-offset: 3px; }
.footer__small a:hover { color: var(--lamp); }
.footer__concept { grid-column: 1 / -1; margin: 8px 0 0; padding-top: 22px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--muted); text-align: center; text-wrap: pretty; }
.footer__concept a { color: var(--fg); }

/* Карта сайта: всё, что есть, в четыре понятные колонки */
.footer__map { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.2fr 1fr 1.6fr; gap: 28px 32px; padding-bottom: 36px; margin-bottom: 12px; border-bottom: 1px dashed var(--line-2); }
.footer__map-h { margin-bottom: 14px; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: color-mix(in srgb, var(--lamp) 62%, var(--fg)); }
.footer__map ul { display: grid; gap: 9px; }
.footer__map a { color: var(--fg); text-decoration: none; font-size: 15px; transition: color .2s; }
.footer__map a:hover { color: var(--lamp); }
.footer__map-old { grid-template-columns: 1fr 1fr; column-gap: 20px; }
.footer__map-old a { color: var(--muted); font-size: 14px; }
@media (max-width: 860px) { .footer__map { grid-template-columns: 1fr 1fr; } .footer__map > div:last-child { grid-column: 1 / -1; } .footer__map-old { grid-template-columns: repeat(3, 1fr); } }
/* старая строка ссылок повторяла карту — убираем, остаются бренд и приватность */
.footer__map ~ .footer__small { display: none; }
@media (min-width: 861px) { .footer__map ~ .footer__privacy { justify-self: end; grid-column: 2 / -1; } }
.site-footer:has(.footer__map)::before { opacity: .22; top: auto; bottom: 70px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 200;
  translate: -50% 0;
  max-width: min(520px, calc(100vw - 32px));
  padding: 14px 20px; border-radius: 16px;
  background: var(--linen-2); color: var(--linen-ink);
  font-size: 15px; font-weight: 500;
  box-shadow: 0 20px 60px rgba(20, 10, 0, .45), 0 0 0 1px rgba(255, 181, 71, .3);
}

/* ---------- Появление (начальные состояния только при JS) ---------- */

.anim [data-reveal] { opacity: 0; }
.anim.reduced [data-reveal] { opacity: 1; }

/* =========================================================================
   Адаптив (общие элементы)
   ========================================================================= */

/* в меню тринадцать пунктов: на узких экранах лента листается, ничего не прячем */
@media (max-width: 1560px) {
  .site-nav { font-size: 13px; }
  .site-nav a { padding: 6px 7px; }
}
@media (max-width: 1100px) {
  .site-nav { justify-content: flex-start; font-size: 13px; }
  .site-nav a { padding: 6px 9px; }
}

@media (max-width: 860px) {
  .footer__inner { grid-template-columns: 1fr; justify-items: start; }
  .footer__small { justify-self: start; }
  .footer__concept { text-align: left; }
}

@media (max-width: 760px) {
  :root { --header-h: 58px; }
  body { font-size: 16px; }
  .btn { --h: 48px; padding: 0 20px; }
  .header-actions .btn--sm { padding: 0 14px; }

  .pin-wrap { align-items: flex-end; padding-bottom: 28px; }
  .stage-text, .stage-text--right { max-width: none; margin-left: 0; width: 100%; }
  .stage-text--bottom { padding-bottom: 0; }
  .pinned .stage-text::before {
    content: ''; position: absolute; inset: -40px calc(-1 * var(--gutter)) -28px;
    background: linear-gradient(to top, rgba(20, 17, 14, .92) 55%, rgba(20, 17, 14, 0));
    z-index: -1; pointer-events: none;
  }
  .pinned .lead { font-size: 16px; }
  .pinned .h2 { font-size: clamp(34px, 10vw, 52px); }

  .hl__slide { width: 86vw; height: 480px; border-radius: 22px; }
  .hl__track { gap: 12px; }
  .hl__dots { height: 48px; padding: 0 14px; }
  .hl__play { width: 48px; height: 48px; }
}

@media (max-width: 860px) {
  .subnav__title { font-size: 18px; }
  .subnav__toggle {
    display: grid; place-items: center; width: 32px; height: 32px; margin-left: -12px; border: 0; border-radius: 8px;
    background: transparent; color: var(--muted); cursor: pointer;
  }
  .subnav__toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
  .subnav.is-open .subnav__toggle svg { transform: rotate(180deg); }
  .subnav__toggle:focus-visible { outline: 2px solid var(--accent-text); }
  .subnav__menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 6px var(--gutter) 16px;
    background: rgba(20, 17, 14, .95); border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .25s, visibility 0s .25s;
  }
  .subnav.is-open .subnav__menu { visibility: visible; opacity: 1; transform: none; transition: opacity .25s, transform .25s; }
  .subnav__menu a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .subnav__actions .color-switch--mini { display: none; }
}

@media (max-width: 480px) {
  .header-cta__more { display: none; }
  /* место под ленту меню: на телефоне в логотипе остаются «fyr / OY» */
  .site-header .brand .brand__mark { display: none; }
  .site-header { gap: 8px; }
}
@media (max-width: 400px) {
  .header-actions .color-switch--mini { display: none; }
}

/* Уменьшенное движение */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .2s !important; }
  .loader__o, .loader__x { stroke-dashoffset: 0; }
}
