/* Luvcore — сайт.
   Ночная продуктовая страница: графит и молоко, без чистых #000 и #fff.
   Две темы (data-theme: dark | light), все цвета — только через переменные ниже.
   Сервер запрещает встроенные стили (CSP style-src 'self'): никаких style="" в разметке. */

:root {
  --sans: "Onest", "Segoe UI", system-ui, sans-serif;
  --brand: "Unbounded", "Onest", system-ui, sans-serif; /* только слово «luvcore» */
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(20px, 5vw, 48px);
  --nav-h: 60px;
  --r-xl: clamp(22px, 2.6vw, 32px);
  --r-lg: 20px;
  --r-md: 14px;
  --sec: clamp(96px, 13vw, 176px);
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);

  /* Тёмная: графит и тёплое молоко */
  color-scheme: dark;
  --bg: #121211;
  --bg-2: #161615;
  --tile: #1b1b19;
  --tile-2: #222220;
  --ink: #ece9e3;
  --ink-2: #c4c0b8;
  --muted: #8e8a83;
  --line: rgb(236 233 227 / 0.08);
  --line-2: rgb(236 233 227 / 0.14);
  --glass: rgb(18 18 17 / 0.72);
  --on-ink: #141413;
  --shadow: 0 1px 0 rgb(236 233 227 / 0.06) inset, 0 30px 80px -20px rgb(0 0 0 / 0.6), 0 12px 30px -12px rgb(0 0 0 / 0.5);
  --glow: rgb(236 233 227 / 0.07);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2efe9;
  --bg-2: #ebe7e0;
  --tile: #f8f6f2;
  --tile-2: #e9e5de;
  --ink: #1c1b19;
  --ink-2: #45423d;
  --muted: #64605a;
  --line: rgb(28 27 25 / 0.09);
  --line-2: rgb(28 27 25 / 0.16);
  --glass: rgb(242 239 233 / 0.74);
  --on-ink: #f2efe9;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.5) inset, 0 30px 70px -24px rgb(40 34 26 / 0.28), 0 10px 24px -12px rgb(40 34 26 / 0.2);
  --glow: rgb(28 27 25 / 0.05);
}

/* ── База ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-padding-top: calc(var(--nav-h) + 36px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  interpolate-size: allow-keywords;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
::selection { background: var(--ink); color: var(--on-ink); }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 0; }
.center { text-align: center; justify-content: center; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 60;
  background: var(--ink); color: var(--on-ink);
  padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ── Шапка: прозрачная наверху, стекло при прокрутке ── */
.nav {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}
/* Где браузер умеет привязывать анимацию к прокрутке — чистым CSS; иначе класс .scrolled из theme.js */
.scrolled .nav {
  background: var(--glass);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
}
@supports (animation-timeline: scroll()) {
  .nav {
    animation: nav-glass linear both;
    animation-timeline: scroll(root);
    animation-range: 0 48px;
  }
}
@keyframes nav-glass {
  from { background-color: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  to {
    background-color: var(--glass); border-bottom-color: var(--line);
    -webkit-backdrop-filter: saturate(160%) blur(20px); backdrop-filter: saturate(160%) blur(20px);
  }
}
.nav-in {
  width: min(var(--wrap), 100% - 2 * var(--gutter)); height: 100%; margin-inline: auto;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px; justify-self: start;
  text-decoration: none; font-family: var(--brand); font-weight: 300; font-size: 19px; letter-spacing: -0.01em;
}
.brand .mark { width: 10px; height: 20px; fill: currentColor; }
.links { display: flex; gap: 4px; }
.links a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.links a:hover { color: var(--ink); background: var(--line); }
.nav-tools { display: flex; align-items: center; gap: 8px; justify-self: end; }

.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--ink-2);
  transition: background-color 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--line); color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-moon { display: none; }
[data-theme="light"] .theme-btn .i-moon { display: block; }
[data-theme="light"] .theme-btn .i-sun { display: none; }

/* ── Кнопки ─────────────────────────────────────────── */
.pill {
  --h: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: var(--h); padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  background: var(--ink); color: var(--on-ink);
  font-size: 16px; font-weight: 600; letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.2s, border-color 0.2s, opacity 0.2s;
}
.pill:hover { transform: translateY(-1px); }
.pill:active { transform: translateY(0) scale(0.98); }
.pill-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.pill-ghost:hover { border-color: var(--ink-2); }
.pill-sm { --h: 40px; padding: 0 18px; font-size: 14px; }
.pill[data-state="soon"] { opacity: 0.5; cursor: default; transform: none; }
.chev { width: 15px; height: 15px; margin-right: -4px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s var(--ease); }
a:hover > .chev { transform: translateX(2px); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.fine { margin: 18px 0 0; font-size: 14px; color: var(--muted); }

/* ── Заголовки разделов ─────────────────────────────── */
.display {
  margin: 0;
  font-size: clamp(50px, 9vw, 128px); line-height: 0.94; font-weight: 700; letter-spacing: -0.05em;
}
.display-2 {
  margin: 0;
  font-size: clamp(40px, 6.4vw, 88px); line-height: 0.98; font-weight: 700; letter-spacing: -0.045em;
}
.section { padding-block: var(--sec) 0; }
.head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 72px); }
.head.center { margin-inline: auto; }
.head h2 {
  margin: 0;
  font-size: clamp(36px, 5.6vw, 72px); line-height: 1; font-weight: 700; letter-spacing: -0.042em;
}
.eyebrow { margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.sub { margin: 20px 0 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--ink-2); }
.head.center .sub { max-width: 600px; margin-inline: auto; }
.anchor { display: block; height: 0; }
.head-actions { margin-top: 32px; }
.head .fine { margin-top: 14px; }

/* ── Первый экран ───────────────────────────────────── */
.hero {
  position: relative; isolation: isolate;
  margin-top: calc(-1 * var(--nav-h));
  padding-top: calc(var(--nav-h) + clamp(48px, 9vh, 112px));
}
.hero-art {
  position: absolute; z-index: -2; inset: 0 0 auto; height: min(1100px, 100%);
  display: grid; justify-items: center; overflow: hidden; pointer-events: none;
}
.hero-art .art {
  width: min(1180px, 150vw); max-width: none; margin-top: -4%;
  opacity: 0.2;
  -webkit-mask-image: radial-gradient(closest-side, #000 25%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 25%, transparent 100%);
}
[data-theme="light"] .hero-art .art { opacity: 0.3; }
.art-light, [data-theme="light"] .art-dark { display: none; }
[data-theme="light"] .art-light { display: block; }
.snow { position: absolute; z-index: -1; inset: 0 0 auto; width: 100%; height: min(1100px, 100%); pointer-events: none; }

/* плёночное зерно поверх первого экрана */
.hero::after {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  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='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0.55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.07; mix-blend-mode: overlay;
}

.hero-copy { position: relative; text-align: center; display: grid; justify-items: center; }
.hello {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 28px; padding: 7px 14px 7px 12px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--glass);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font-size: 13px; color: var(--ink-2);
}
.hello .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px var(--glow); }
#clock { color: var(--ink); }
.hero .lead {
  max-width: 34em; margin: 28px 0 36px;
  font-size: clamp(17px, 1.7vw, 21px); line-height: 1.5; color: var(--ink-2);
}
.hero .actions { justify-content: center; }

.showcase {
  position: relative; margin-top: clamp(56px, 8vw, 96px);
  padding-right: clamp(28px, 7vw, 96px);
}
.showcase::before {
  content: ""; position: absolute; z-index: -1; inset: 10% 8% -6%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  filter: blur(40px);
}

/* Снимок окна программы: снимки уже со своей рамкой Windows, свою рисовать не надо */
.screen {
  margin: 0; overflow: hidden;
  border-radius: clamp(10px, 1.2vw, 16px);
  background: var(--tile);
  box-shadow: var(--shadow), 0 0 0 1px var(--line-2);
}
.screen img { width: 100%; }
.screen-wide { margin-inline: auto; }

/* Телефон: настоящий снимок экрана в корпусе iPhone Pro.
   Чёрный бортик — padding самой картинки: проценты считаются от ширины телефона
   (у figure они брались бы от ширины родителя), а радиус экрана браузер сам делает
   равным «радиус корпуса − бортик», так что углы всегда концентричны. */
.phone { margin: 0; position: relative; }
.phone img {
  width: 100%; padding: 1.5%; border-radius: 15.5% / 7.28%;
  background: #050505;
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.09), /* блик внутри канта */
    0 0 0 1px #77736c,                       /* титановый кант */
    0 0 0 2px #34322f,
    var(--shadow);
}
/* боковые кнопки: слева «действие» и громкость, справа питание */
.phone::before {
  content: ""; position: absolute; top: 0; left: calc(-0.7% - 2px); right: calc(-0.7% - 2px);
  aspect-ratio: 1 / 2.095; pointer-events: none;
  --key: linear-gradient(#85817a, #57544e 18% 82%, #85817a);
  background:
    var(--key) 0 18.3% / 1% 4.5% no-repeat,
    var(--key) 0 27.6% / 1% 7.5% no-repeat,
    var(--key) 0 37.3% / 1% 7.5% no-repeat,
    var(--key) 100% 31.6% / 1% 11.5% no-repeat;
}
/* Dynamic Island: на самих снимках его нет, место в статус-баре пустое */
.phone::after {
  content: ""; position: absolute; top: 0; left: 35.5%; width: 29%; aspect-ratio: 3.4;
  margin-top: 3.3%; border-radius: 999px; pointer-events: none;
  background: radial-gradient(circle closest-side, #0d1119 55%, #020202 70%) 88% 50% / 14% 48% no-repeat, #020202;
}
.phone-hero {
  position: absolute; right: 0; bottom: -6%;
  width: clamp(120px, 21%, 250px);
}

/* ── Плитки ─────────────────────────────────────────── */
.bento {
  display: grid; gap: 16px;
  grid-template-columns: repeat(12, 1fr);
}
.tile {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 300px; padding: clamp(24px, 3vw, 36px);
  border-radius: var(--r-xl);
  background: var(--tile);
  box-shadow: 0 0 0 1px var(--line) inset;
}
.tile h3 { margin: 0; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.12; font-weight: 650; letter-spacing: -0.025em; }
.tile p { margin: 10px 0 0; color: var(--ink-2); max-width: 30em; }

/* Высоту двух строк задают правые плитки; телефон выходит из нижнего края
   и обрезается плиткой, а не растягивает её (иначе справа пустые плитки). */
.bento { grid-auto-rows: minmax(300px, auto); }
.tile-wave { grid-column: span 7; grid-row: span 2; justify-content: flex-start; min-height: 0; padding-bottom: 0; overflow: clip; }
.tile-wave .tile-copy { max-width: 30em; }
.phone-tile {
  width: min(300px, 62%); margin: 32px auto 0;
  flex: 1 1 0; min-height: 0;
  clip-path: inset(-120px -120px 0); /* режем только снизу: кнопки, кант и тень остаются */
}
.tile-wave { background: radial-gradient(120% 80% at 50% 100%, var(--tile-2), var(--tile) 70%); }

.tile-ads { grid-column: span 5; }
.strike {
  margin: 0 0 auto; padding-bottom: 24px;
  font-size: clamp(48px, 6vw, 84px); line-height: 1; font-weight: 700; letter-spacing: -0.05em;
  color: var(--muted);
}
.strike s { text-decoration-thickness: 0.07em; text-decoration-color: var(--ink); }

.tile-files { grid-column: span 5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: auto; padding-bottom: 24px; }
.chips span {
  padding: 7px 14px; border-radius: 999px; font-size: 14px;
  background: var(--bg); box-shadow: 0 0 0 1px var(--line-2) inset; color: var(--ink-2);
}

.tile-lyrics { grid-column: span 7; }
.lyric {
  display: grid; gap: 6px; margin-bottom: auto; padding-bottom: 28px;
  font-size: clamp(20px, 2.3vw, 30px); line-height: 1.2; font-weight: 600; letter-spacing: -0.025em;
  color: var(--muted);
}
.lyric span:first-child { opacity: 0.45; }
.lyric .now { color: var(--ink); }
.lyric span:last-child { opacity: 0.3; }

.tile-account { grid-column: span 5; }
.tile-icon {
  width: 44px; height: 44px; margin-bottom: auto;
  fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round;
}

/* ── Списки возможностей ─────────────────────────────── */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 48px;
  margin-top: clamp(56px, 7vw, 88px);
}
.feature { padding-top: 22px; border-top: 1px solid var(--line-2); }
.feature h3 { margin: 0; font-size: 19px; line-height: 1.3; font-weight: 650; letter-spacing: -0.015em; }
.feature p { margin: 8px 0 0; color: var(--ink-2); font-size: 16px; }
.actions-end { margin-top: clamp(56px, 7vw, 80px); }
.features-ios { grid-template-columns: repeat(4, 1fr); }

/* ── Темы ───────────────────────────────────────────── */
.themes {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: center;
}
.themes .head { margin-bottom: 0; }
.more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 28px;
  font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 2px;
  transition: border-color 0.2s;
}
.more:hover { border-color: var(--ink); }
.screen-bleed { width: 100%; }

/* ── iPhone ─────────────────────────────────────────── */
.phones {
  display: grid; grid-template-columns: repeat(3, minmax(0, 290px)); justify-content: center; align-items: end;
  gap: clamp(14px, 3vw, 40px);
}
.phones .phone-mid { translate: 0 -8%; }

.install { margin-top: clamp(80px, 10vw, 128px); }
.install-title { margin: 0 0 28px; font-size: clamp(26px, 3vw, 36px); font-weight: 700; letter-spacing: -0.035em; text-align: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { padding: 26px 24px 28px; border-radius: var(--r-lg); background: var(--tile); box-shadow: 0 0 0 1px var(--line) inset; }
.step-n {
  display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 40px;
  border-radius: 50%; font-size: 13px; color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset;
}
.step h4 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 650; letter-spacing: -0.015em; }
.step p { margin: 8px 0 0; font-size: 15px; color: var(--ink-2); }

.price {
  display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: center;
  margin-top: 16px; padding: clamp(28px, 4vw, 48px);
  border-radius: var(--r-xl);
  background:
    radial-gradient(90% 140% at 100% 0%, var(--glow), transparent 60%),
    var(--tile);
  box-shadow: 0 0 0 1px var(--line-2) inset;
}
.price-name { margin: 0; font-weight: 600; color: var(--ink-2); }
.price-sum { margin: 6px 0 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.price-sum span { font-size: clamp(56px, 7vw, 88px); line-height: 1; font-weight: 700; letter-spacing: -0.05em; }
.price-sum small { font-size: 18px; color: var(--muted); }
.price-note { margin: 14px 0 0; color: var(--ink-2); max-width: 34em; }
.price-side { display: grid; justify-items: center; }
.price-side .fine { margin-top: 10px; }
.price-terms {
  grid-column: 1 / -1; margin: 0; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.foot a, .doc a { text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.foot a:hover, .doc a:hover { text-decoration-color: currentColor; }

/* ── Вопросы ────────────────────────────────────────── */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.faq { border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 24px 0; cursor: pointer; list-style: none;
  font-size: clamp(18px, 1.7vw, 21px); font-weight: 600; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-right: 6px;
  border-right: 1.7px solid var(--muted); border-bottom: 1.7px solid var(--muted);
  rotate: 45deg; translate: 0 -3px;
  transition: rotate 0.3s var(--ease), translate 0.3s var(--ease);
}
.faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.faq details p { margin: 0; padding: 0 48px 26px 0; color: var(--ink-2); }
.faq details::details-content {
  block-size: 0; overflow: hidden;
  transition: block-size 0.35s var(--ease), content-visibility 0.35s allow-discrete;
}
.faq details[open]::details-content { block-size: auto; }

/* ── Финал ──────────────────────────────────────────── */
.outro { position: relative; isolation: isolate; overflow: hidden; padding-block: var(--sec); margin-top: clamp(48px, 6vw, 96px); }
.outro-art { position: absolute; z-index: -1; inset: 0; display: grid; place-items: center; pointer-events: none; }
.outro-art .art {
  width: min(980px, 130vw); max-width: none; opacity: 0.22;
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 35%, transparent 100%);
}
.outro-in { text-align: center; display: grid; justify-items: center; }
.outro .actions { margin-top: 40px; }

/* ── Подвал ─────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 14px; color: var(--muted); }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px 32px; }
.foot .brand { color: var(--ink); font-size: 17px; }
.foot-docs { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-docs a { color: var(--ink); }
.foot-docs { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-docs a { color: var(--ink-2); text-decoration: none; }
.foot-docs a:hover { color: var(--ink); }
.foot-legal { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.foot-legal p { margin: 0 0 8px; line-height: 1.6; max-width: 880px; }

/* ── Появление при прокрутке (без JS, только где браузер умеет) ── */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 70%;
    }
    .showcase .screen-hero {
      animation: tilt linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 45%;
      transform-origin: 50% 0;
    }
    .showcase .phone-hero {
      animation: lift linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 50%;
    }
  }
  .hero-copy > * { animation: rise 0.9s var(--ease) both; }
  .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .hero-copy > :nth-child(3) { animation-delay: 0.12s; }
  .hero-copy > :nth-child(4) { animation-delay: 0.18s; }
  .hero-copy > :nth-child(5) { animation-delay: 0.24s; }
  .showcase { animation: rise 1.1s 0.3s var(--ease) both; }
}
@keyframes reveal { from { opacity: 0; translate: 0 36px; } to { opacity: 1; translate: 0 0; } }
@keyframes rise { from { opacity: 0; translate: 0 20px; } to { opacity: 1; translate: 0 0; } }
@keyframes tilt { from { transform: perspective(1600px) rotateX(14deg) scale(0.94); } to { transform: none; } }
@keyframes lift { from { translate: 0 18%; } to { translate: 0 0; } }

/* ── Документы и оплата ─────────────────────────────── */
.doc { width: min(720px, 100% - 2 * var(--gutter)); margin: clamp(16px, 3vw, 32px) auto clamp(72px, 9vw, 120px); }
.doc h1 { margin: 0 0 14px; font-size: clamp(32px, 5vw, 52px); line-height: 1.02; font-weight: 700; letter-spacing: -0.04em; }
.doc .meta { margin: 0 0 40px; color: var(--muted); font-size: 14px; }
.doc h2 { margin: 44px 0 12px; font-size: 21px; font-weight: 650; letter-spacing: -0.02em; }
.doc p, .doc li { line-height: 1.68; color: var(--ink-2); }
.doc b, .doc strong { color: var(--ink); font-weight: 600; }
.doc ol, .doc ul { padding-left: 1.3em; }
.doc li + li { margin-top: 6px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 14px; font-weight: 500; text-decoration: none; }
.back:hover { color: var(--ink); }
.doc > .back { margin-bottom: 20px; }

.pay { max-width: 560px; }
.pay-card {
  margin: 28px 0; padding: 28px;
  border-radius: var(--r-lg); background: var(--tile); box-shadow: 0 0 0 1px var(--line-2) inset;
}
.pay-card p { margin: 0; }
.pay-plans { display: grid; gap: 8px; margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.pay-methods[hidden] { display: none; }
.field[hidden] { display: none; }
.pay-methods .plan { justify-content: flex-start; }
#paidPay { justify-self: start; margin: 4px 0 20px; }
.plan {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  min-height: 52px; padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); color: var(--ink); cursor: pointer;
  transition: border-color 0.2s;
}
.plan input { margin: 0; width: 18px; height: 18px; accent-color: var(--ink); }
.plan:has(input:checked) { border-color: var(--ink); }
.plan:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.plan-term { font-weight: 500; }
.plan-sum { font-weight: 600; font-variant-numeric: tabular-nums; }
.pay-what { color: var(--ink-2); font-weight: 500; }
.pay-sum { margin: 6px 0 14px !important; font-size: clamp(44px, 8vw, 64px); line-height: 1; font-weight: 700; letter-spacing: -0.05em; color: var(--ink) !important; }
.pay-card .muted { color: var(--muted); font-size: 15px; line-height: 1.55; }
.pay-code { margin: 12px 0 16px !important; font-size: clamp(18px, 4.6vw, 24px); letter-spacing: 0.06em; word-break: break-all; user-select: all; color: var(--ink) !important; }
.pay-card .pill { margin-bottom: 16px; }
.pay-form { display: grid; gap: 18px; margin: 8px 0 28px; }
.pay-form .pill { justify-self: stretch; flex-direction: column; gap: 0; min-height: 58px; border: 0; font: inherit; font-weight: 600; }
.pay-form .pill .btn-sub { font-size: 13px; font-weight: 500; opacity: 0.65; }
.pay-form .pill:disabled { opacity: 0.4; cursor: default; transform: none; }
.field { display: grid; gap: 8px; }
.field span { color: var(--ink-2); font-size: 15px; font-weight: 500; }
.field input {
  min-height: 52px; padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: var(--tile); color: var(--ink);
  font: inherit; font-size: 17px;
  transition: border-color 0.2s;
}
.field input:focus { outline: none; border-color: var(--ink); }
.field input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.field input::placeholder { color: var(--muted); opacity: 0.7; }
.pay-error, .pay-failed { margin: 0; padding: 14px 16px; border-radius: var(--r-md); background: var(--tile); box-shadow: 0 0 0 1px var(--line-2) inset; color: var(--ink); }
.small-print { font-size: 14px; color: var(--muted) !important; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.doc-nav .nav-in { grid-template-columns: 1fr auto; }

/* ── Узкие экраны ───────────────────────────────────── */
@media (max-width: 1020px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .features-ios { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .themes { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .links { display: none; }
  .nav-in { grid-template-columns: 1fr auto; }
  .bento { grid-template-columns: 1fr; }
  .bento > .tile { grid-column: auto; grid-row: auto; }
  .tile { min-height: 0; }
  .bento { grid-auto-rows: auto; }
  .tile-wave { height: min(620px, 150vw); }
  .faq-wrap { grid-template-columns: 1fr; }
  .faq-wrap .head { margin-bottom: 8px; }
  .price { grid-template-columns: 1fr; }
  .price-side { justify-items: stretch; }
  .price-side .fine { text-align: center; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero { padding-top: calc(var(--nav-h) + 36px); }
  .hero .actions { display: grid; width: 100%; max-width: 360px; }
  .hello { margin-bottom: 22px; }
  .hero .fine { display: grid; gap: 2px; }
  .hero .fine .sep { display: none; }
  .showcase { padding-right: 18px; }
  .phone-hero { width: 31%; bottom: -10%; }
  .features, .features-ios { grid-template-columns: 1fr; gap: 28px; }
  .steps { grid-template-columns: 1fr; gap: 12px; }
  .step-n { margin-bottom: 20px; }
  .phones { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .outro .actions { display: grid; width: 100%; max-width: 360px; }
  .foot-top { flex-direction: column; align-items: flex-start; }
}

/* Системные настройки: меньше прозрачности, больше контраста */
@media (prefers-reduced-transparency: reduce) {
  :root { --glass: var(--bg); }
  .hello, .scrolled .nav { -webkit-backdrop-filter: none; backdrop-filter: none; }
  @keyframes nav-glass { to { background-color: var(--bg); border-bottom-color: var(--line); } }
}
@media (prefers-contrast: more) {
  :root { --muted: #b3afa8; --ink-2: #dcd8d1; --line: rgb(236 233 227 / 0.2); --line-2: rgb(236 233 227 / 0.32); }
  :root[data-theme="light"] { --muted: #4f4b46; --ink-2: #2e2c29; --line: rgb(28 27 25 / 0.22); --line-2: rgb(28 27 25 / 0.36); }
}

@media (forced-colors: active) {
  .pill, .tile, .step, .price, .screen, .phone img { border: 1px solid CanvasText; }
}
