/* ==========================================================================
   GaMMa VPS — запуск сервера → выбор тарифа
   Без зависимостей. Шрифты локальные: Inter (opsz + wght), JetBrains Mono.
   ========================================================================== */

/* ---------- Шрифты ------------------------------------------------------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  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;
}
/* Только знак рубля (₽) — 1,4 КБ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-ruble.woff2") format("woff2");
  unicode-range: U+20BD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  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;
}

/* ---------- Токены ------------------------------------------------------- */

:root {
  color-scheme: dark;

  /* Палитра снята со скриншота gamma-price.com */
  --bg: #121018;
  --surface: #1b1925;
  --surface-2: #242037;
  --header-1: #42347a;
  --header-2: #3b3267;
  --header-3: #382f5c;

  --violet: #775ded;      /* основной акцент */
  --violet-2: #9282f1;
  --lavender-1: #d2c9fc;  /* градиент заголовка, верх */
  --lavender-2: #bfb5f9;
  --lavender-3: #ad9ff6;  /* градиент заголовка, низ */
  --ink: #d4ccfb;         /* текст бейджей */

  --text: #f6f4ff;
  --text-2: #a8a6b7;
  --text-3: #85829a;

  --ok: #7cf0c5;
  --glitch-a: rgba(255, 64, 140, .85);
  --glitch-b: rgba(64, 224, 255, .85);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --gutter: clamp(16px, 4vw, 40px);
  --slide: 0; /* 0…1 — положение ползунка, пишет JS */
}

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

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  font-optical-sizing: auto;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

p { margin: 0; }
b { font-weight: 600; color: var(--text); }
button { font: inherit; color: inherit; }
::selection { background: rgba(119, 93, 237, .55); color: #fff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

/* Символы, которые «перебираются» в моноширинных подписях */
.scr { font-style: normal; color: var(--violet-2); }

/* ---------- Фон ---------------------------------------------------------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -12%, rgba(43, 35, 79, .9), rgba(43, 35, 79, 0) 62%),
    var(--bg);
}

.bg__glow { position: absolute; border-radius: 50%; }

.bg__glow--a {
  width: 95vmax;
  height: 95vmax;
  left: -40vmax;
  top: -55vmax;
  background: radial-gradient(closest-side,
    rgba(96, 72, 200, .42), rgba(96, 72, 200, .22) 40%, rgba(96, 72, 200, .07) 70%, rgba(96, 72, 200, 0));
  animation: drift-a 24s var(--ease-in-out) infinite alternate;
}

.bg__glow--b {
  width: 85vmax;
  height: 85vmax;
  right: -42vmax;
  bottom: -52vmax;
  background: radial-gradient(closest-side,
    rgba(52, 48, 150, .5), rgba(52, 48, 150, .22) 45%, rgba(52, 48, 150, .06) 72%, rgba(52, 48, 150, 0));
  animation: drift-b 28s var(--ease-in-out) infinite alternate;
}

/* Свечение за заголовком: разгорается вместе с ползунком */
.bg__glow--c {
  left: 50%;
  top: 46%;
  width: min(1200px, 130vw);
  height: min(760px, 90vh);
  translate: -50% -50%;
  background: radial-gradient(closest-side,
    rgba(119, 93, 237, .22), rgba(119, 93, 237, .09) 55%, rgba(119, 93, 237, 0));
  opacity: calc(.55 + var(--slide) * .45);
  transition: opacity 1.2s var(--ease-out), scale 1.6s var(--ease-out);
}
html:not([data-ready]) .bg__glow--c { opacity: 0; scale: .8; }
html[data-state="on"] .bg__glow--c { opacity: 1; scale: 1.2; }

@keyframes drift-a { to { translate: 7vmax 5vmax; } }
@keyframes drift-b { to { translate: -6vmax -4vmax; } }

.bg__stars { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Плёночное зерно: убирает «лесенку» на тёмных градиентах */
.bg__grain {
  position: absolute;
  inset: 0;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

.bg__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(130% 95% at 50% 45%, rgba(10, 9, 16, 0) 55%, rgba(10, 9, 16, .72) 100%);
}

/* ---------- Загрузчик ---------------------------------------------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(26px, 4.5svh, 40px);
  padding: var(--gutter);
  pointer-events: none;
}

.loader__core {
  --ring: clamp(150px, 34vmin, 200px);
  position: relative;
  display: grid;
  place-items: center;
  width: var(--ring);
  height: var(--ring);
}

.loader__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: ring-in 1.3s .1s var(--ease-out) backwards;
  transition: opacity .5s ease, scale .8s var(--ease-out);
}

.loader__orbit {
  fill: none;
  stroke: rgba(210, 201, 252, .24);
  stroke-width: 1;
  stroke-dasharray: 1 6;
  stroke-linecap: round;
  transform-origin: 100px 100px;
  animation: orbit 40s linear infinite;
}
.loader__track { fill: none; stroke: rgba(210, 201, 252, .1); stroke-width: 1.5; }
.loader__arc { fill: none; stroke: url(#lg-arc); stroke-width: 2.5; stroke-linecap: round; }

.loader__fly-x,
.loader__fly-y { display: grid; place-items: center; }

.loader__mark {
  position: relative;
  width: calc(var(--ring) * .52);
  height: calc(var(--ring) * .52);
  animation: mark-in 1.1s var(--ease-out) backwards;
}
.loader__mark::before {
  content: "";
  position: absolute;
  inset: -38%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(119, 93, 237, .5), rgba(119, 93, 237, 0));
  transition: opacity .7s ease;
}
.loader__mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.loader__disc { fill: #0d0c12; }

/* Знак «прорисовывается» по контуру, затем заливается */
.loader__glyph {
  fill: #fff;
  fill-opacity: 0;
  stroke: #fff;
  stroke-width: .5;
  stroke-linejoin: round;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation:
    glyph-draw 1.4s .2s var(--ease-in-out) forwards,
    glyph-fill .7s 1.25s var(--ease-out) forwards;
}

.loader__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(320px, 80vw);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-2);
  animation: fade-up 1s .45s var(--ease-out) backwards;
  transition: opacity .4s ease, translate .5s var(--ease-out);
}
.loader__status { white-space: nowrap; transition: color .3s ease; }
.loader__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(210, 201, 252, .45) 1px, transparent 1px) 0 0 / 5px 1px repeat-x;
  opacity: .6;
}
.loader__pct { color: var(--lavender-1); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.loader__pct::after { content: "%"; margin-left: .2em; color: var(--text-3); }

.loader.is-done .loader__status { color: var(--lavender-1); }
.loader.is-leaving .loader__ring { opacity: 0; scale: 1.14; }
.loader.is-leaving .loader__meta { opacity: 0; translate: 0 8px; }
.loader.is-leaving .loader__mark::before { opacity: 0; }

@keyframes ring-in { from { opacity: 0; scale: .86; rotate: -35deg; } }
@keyframes mark-in { from { opacity: 0; scale: .7; filter: blur(10px); } }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes glyph-draw { to { stroke-dashoffset: 0; } }
@keyframes glyph-fill { to { fill-opacity: 1; stroke-opacity: 0; } }
@keyframes fade-up { from { opacity: 0; translate: 0 10px; } }

/* ---------- Каркас ------------------------------------------------------- */

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    max(14px, env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
  overflow-x: clip;
}

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

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

.topbar {
  --h: clamp(52px, 34px + 2vw, 60px);
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(100%, 1040px);
  height: var(--h);
  margin-inline: auto;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--header-1), var(--header-2) 48%, var(--header-3));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .09),
    inset 0 0 0 1px rgba(255, 255, 255, .05),
    0 18px 50px -20px rgba(66, 52, 122, .75);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.012em;
  white-space: nowrap;
}
.brand__mark {
  flex: none;
  width: calc(var(--h) - 16px);
  height: calc(var(--h) - 16px);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: calc(var(--h) - 16px);
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(14, 12, 22, .32);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.chip__dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6e6b80;
  box-shadow: 0 0 0 3px rgba(110, 107, 128, .2);
  transition: background-color .5s ease, box-shadow .5s ease;
}
html[data-state="on"] .chip__dot {
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(124, 240, 197, .18), 0 0 12px rgba(124, 240, 197, .75);
}

/* ==========================================================================
   Экран 1 — запуск сервера
   ========================================================================== */

.gate {
  gap: clamp(20px, 4.2svh, 52px);
  padding-block: clamp(8px, 2.6svh, 48px);
}
.gate__hero,
.gate__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* ---------- Кнопка питания ----------------------------------------------- */

.power {
  --size: clamp(52px, 8svh, 84px);
  position: relative;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  margin-bottom: clamp(14px, 2.6svh, 28px);
  isolation: isolate;
}

.power::before {
  content: "";
  position: absolute;
  inset: -60%;
  z-index: -2;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(119, 93, 237, .5), rgba(119, 93, 237, .16) 50%, rgba(119, 93, 237, 0));
  opacity: calc(.35 + var(--slide) * .65);
}
html[data-state="on"] .power::before { opacity: 1; transition: opacity .6s ease; }

.power__disc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 15%, rgba(146, 130, 241, .32), rgba(36, 32, 55, .94) 55%, rgba(22, 20, 32, .97));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .12),
    inset 0 0 0 1px rgba(192, 181, 249, .18),
    0 20px 40px -18px rgba(0, 0, 0, .9);
}

/* Режим ожидания: мягкие круги расходятся от кнопки */
.power__pulse {
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid rgba(191, 181, 249, .34);
  border-radius: 50%;
  animation: pulse 3.2s cubic-bezier(.2, .6, .35, 1) infinite;
  transition: border-color .6s ease;
}
.power__pulse + .power__pulse { animation-delay: 1.6s; }
html[data-state="on"] .power__pulse { border-color: rgba(191, 181, 249, .65); }

/* Кольцо «заряда»: заполняется, пока тянут ползунок */
.power__ring {
  position: absolute;
  left: -8px;
  top: -8px;
  width: calc(100% + 16px);
  height: calc(100% + 16px);
  overflow: visible;
}
.power__ring path { fill: none; stroke-width: 2.2; stroke-linecap: round; }
.power__ring-track { stroke: rgba(210, 201, 252, .1); }
.power__ring-fill {
  stroke: url(#lg-ring);
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--slide) * 100);
  opacity: clamp(0, var(--slide) * 25, 1);
}
html[data-state="on"] .power__ring-fill { stroke-dashoffset: 0; opacity: 1; }

.power__burst {
  position: absolute;
  inset: 0;
  border: 2px solid var(--lavender-2);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.power__icon {
  position: relative;
  width: 46%;
  height: 46%;
  overflow: visible;
  opacity: calc(.72 + var(--slide) * .28);
  filter: drop-shadow(0 2px 8px rgba(119, 93, 237, .45));
  transition: filter .5s ease;
}
.power__icon path {
  fill: none;
  stroke: url(#lg-power);
  stroke-width: 2.6;
  stroke-linecap: round;
}
html[data-state="on"] .power__icon {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(210, 201, 252, .95)) drop-shadow(0 0 20px rgba(119, 93, 237, .85));
}
html[data-state="on"] .power__icon path { stroke: #fff; }

@keyframes pulse {
  from { opacity: .8; scale: 1; }
  to { opacity: 0; scale: 1.85; }
}

/* ---------- Бейдж -------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 30px;
  margin-bottom: clamp(12px, 2.3svh, 24px);
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: rgba(52, 43, 88, .62);
  box-shadow: inset 0 0 0 1px rgba(192, 181, 249, .16);
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.badge__dot {
  position: relative;
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--violet-2);
  box-shadow: 0 0 10px rgba(146, 130, 241, .9);
  transition: background-color .5s ease, box-shadow .5s ease;
}
.badge__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  animation: ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}
html[data-state="on"] .badge__dot { background: var(--ok); box-shadow: 0 0 10px rgba(124, 240, 197, .8); }

@keyframes ping { 75%, 100% { scale: 2.6; opacity: 0; } }

/* ---------- Заголовок ---------------------------------------------------- */

.title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: -.14em 0 -.12em;
  font-size: clamp(2.5rem, 15vw, 8.75rem);
  font-size: clamp(2.5rem, min(15vw, 12svh), 8.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.025em;
  text-transform: uppercase;
}

/* Каждая строка — маска; текст «выезжает» из-под неё */
.title__line { display: block; overflow: hidden; }
.title__line + .title__line { margin-top: -.3em; }

.title__rise {
  display: grid;
  transition: transform 1.25s var(--ease-out) var(--d, 0s);
}

.title__text {
  --sheen: linear-gradient(105deg, rgba(255, 255, 255, 0) 42%, rgba(255, 255, 255, .95) 50%, rgba(255, 255, 255, 0) 58%);
  grid-area: 1 / 1;
  justify-self: center;
  display: block;
  /* поля, чтобы градиент покрывал диакритику и выносные элементы */
  padding: .16em .08em .14em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image: var(--sheen), var(--fill);
  background-size: 260% 100%, 100% 100%;
  background-position: 130% 0, 0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
}
.title__text--1 { --fill: linear-gradient(180deg, #ffffff 30%, #e8e3ff 100%); }
.title__text--2 { --fill: linear-gradient(180deg, #ddd5fe 12%, var(--lavender-2) 50%, #a291f5 90%); }

.title__state { transition: transform 1s var(--ease-out), opacity .6s ease; }
.title__state--on { transform: translateY(105%); opacity: 0; }
html[data-state="on"] .title__state--off { transform: translateY(-105%); opacity: 0; }
html[data-state="on"] .title__state--on { transform: none; opacity: 1; transition-delay: .08s; }

/* Блик по заголовку в момент запуска */
html[data-state="on"] .title__text--1 { animation: sheen 1.5s .3s var(--ease-in-out) both; }
html[data-state="on"] .title__state--on { animation: sheen 1.5s .45s var(--ease-in-out) both; }

@keyframes sheen {
  from { background-position: 130% 0, 0 0; }
  to { background-position: -30% 0, 0 0; }
}

/* ---------- Подзаголовок ------------------------------------------------- */

.lead {
  display: grid;
  width: min(100%, 32em);
  margin-top: clamp(12px, 2.3svh, 24px);
  font-size: clamp(1rem, .95rem + .25vw, 1.1875rem);
  line-height: 1.55;
  color: var(--text-2);
}
/* Предложение по возможности держится одной строкой и переносится целиком */
.lead__state > span { display: inline-block; }
.lead__state {
  grid-area: 1 / 1;
  text-wrap: balance;
  transition: opacity .6s ease, translate .8s var(--ease-out), filter .6s ease, visibility .6s;
}
.lead__state--on { opacity: 0; translate: 0 12px; filter: blur(6px); visibility: hidden; }
html[data-state="on"] .lead__state--off { opacity: 0; translate: 0 -12px; filter: blur(6px); visibility: hidden; }
html[data-state="on"] .lead__state--on {
  opacity: 1;
  translate: 0 0;
  filter: blur(0);
  visibility: visible;
  transition-delay: .15s;
}

/* ---------- Ползунок ----------------------------------------------------- */

.slider {
  --h: 68px;
  --pad: 6px;
  --thumb: calc(var(--h) - var(--pad) * 2);
  --x: 0px; /* смещение кружка, пишет JS */
  --p: 0;   /* прогресс 0…1, пишет JS */
  position: relative;
  width: min(100%, 440px);
  height: var(--h);
  touch-action: manipulation; /* без зума по двойному тапу */
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

/* Мягкое свечение под дорожкой */
.slider::before {
  content: "";
  position: absolute;
  inset: 14px 8% -16px;
  z-index: -1;
  border-radius: 999px;
  background: rgba(119, 93, 237, .3);
  filter: blur(24px);
  opacity: 0;
  transition: opacity 1s .5s ease;
}
html[data-landed] .slider::before { opacity: calc(.55 + var(--p) * .45); }

.slider__track {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(40, 35, 62, .92), rgba(26, 23, 38, .92));
  box-shadow:
    inset 0 0 0 1px rgba(192, 181, 249, .16),
    inset 0 1px 0 rgba(255, 255, 255, .07),
    inset 0 -12px 24px -14px rgba(119, 93, 237, .35);
  clip-path: inset(0 0 0 0 round 999px);
  transition: clip-path 1s var(--ease-in-out);
}
/* До «приземления» логотипа дорожка свёрнута в круглое гнездо */
html:not([data-landed]) .slider__track { clip-path: inset(0 calc(100% - var(--h)) 0 0 round 999px); }

.slider__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: calc(var(--x) + var(--h));
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(119, 93, 237, .06), rgba(119, 93, 237, .5) 72%, rgba(146, 130, 241, .9));
  box-shadow: inset 0 0 0 1px rgba(192, 181, 249, .2);
  opacity: calc(.4 + var(--p) * .6);
}
.slider__fill::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(119, 93, 237, .45), rgba(119, 93, 237, .75) 60%, rgba(160, 144, 246, .95));
  opacity: 0;
  transition: opacity .6s ease;
}
html[data-state="on"] .slider__fill::after { opacity: 1; }

.slider__cue {
  position: absolute;
  inset: 0 0 0 var(--h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 38px;
  transition: opacity .7s .5s ease;
}
html:not([data-landed]) .slider__cue { opacity: 0; }

.slider__text {
  font-size: clamp(.9375rem, .9rem + .2vw, 1.0625rem);
  font-weight: 500;
  letter-spacing: -.006em;
  white-space: nowrap;
  opacity: clamp(0, 1 - var(--p) * 2.2, 1);
  translate: calc(var(--p) * 30px) 0;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(100deg, rgba(212, 204, 251, .62) 0 40%, #fff 50%, rgba(212, 204, 251, .62) 60% 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: shimmer 2.6s linear infinite;
}

.slider__chev {
  position: absolute;
  top: 50%;
  right: 22px;
  display: flex;
  gap: 1px;
  translate: 0 -50%;
  opacity: clamp(0, 1 - var(--p) * 3, 1);
}
.slider__chev svg {
  width: 7px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: rgba(191, 181, 249, .25);
  animation: chev 1.6s ease-in-out infinite;
}
.slider__chev svg:nth-child(2) { animation-delay: .16s; }
.slider__chev svg:nth-child(3) { animation-delay: .32s; }

.slider__done {
  position: absolute;
  inset: 0 var(--h) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.006em;
  white-space: nowrap;
  color: #fff;
  opacity: 0;
  translate: -12px 0;
  transition: opacity .5s ease, translate .7s var(--ease-out);
}
.slider__done svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html[data-state="on"] .slider__done { opacity: 1; translate: 0 0; transition-delay: .2s; }

/* Кружок с логотипом */
.slider__thumb {
  position: absolute;
  top: var(--pad);
  left: var(--pad);
  z-index: 2;
  width: var(--thumb);
  height: var(--thumb);
  border-radius: 50%;
  translate: var(--x) 0;
  cursor: grab;
  touch-action: pan-y;
  outline: none;
  transition: scale .4s var(--ease-spring);
}
.slider__thumb > svg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
}
.slider__thumb::before {
  content: "";
  position: absolute;
  inset: -12px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(119, 93, 237, .75), rgba(119, 93, 237, 0));
  opacity: calc(.45 + var(--p) * .55);
}
.slider__thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .1),
    inset 0 1px 0 rgba(255, 255, 255, .16),
    0 8px 18px -6px rgba(0, 0, 0, .8);
  transition: box-shadow .2s ease;
}
.slider__thumb:focus-visible::after {
  box-shadow:
    0 0 0 2px var(--bg),
    0 0 0 4px var(--lavender-2),
    inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.slider__ripple {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--lavender-2);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

html:not([data-landed]) .slider__thumb { opacity: 0; }
.slider:not(.is-ready) .slider__thumb { pointer-events: none; }
.slider.is-dragging .slider__thumb { cursor: grabbing; scale: 1.06; }
html[data-state="on"] .slider__thumb { cursor: default; }

@media (hover: hover) and (pointer: fine) {
  .slider.is-ready .slider__thumb:hover { scale: 1.05; }
  html[data-state="on"] .slider .slider__thumb:hover { scale: 1; }
}

@keyframes shimmer {
  from { background-position: 100% 0; }
  to { background-position: 0 0; }
}
@keyframes chev {
  0%, 100% { color: rgba(191, 181, 249, .22); }
  40% { color: rgba(255, 255, 255, .9); }
}

/* ---------- Подсказка ---------------------------------------------------- */

.gate__foot {
  display: grid;
  place-items: center;
  min-height: 40px;
  margin-top: clamp(8px, 1.6svh, 14px);
}

.hint {
  font: 500 11px/1.2 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: opacity .5s ease, visibility .5s;
}
.hint__keys { display: none; }
.gate__action:has(.slider__thumb:focus-visible) .hint__pointer { display: none; }
.gate__action:has(.slider__thumb:focus-visible) .hint__keys { display: inline; }
html:not([data-landed]) .hint { opacity: 0; }
html[data-landed] .hint { transition-delay: 1.1s; }
html[data-state="on"] .hint { opacity: 0; visibility: hidden; transition-delay: 0s; }

/* ==========================================================================
   Экран 2 — выбор тарифа и срока
   ========================================================================== */

.plans {
  gap: clamp(18px, 3.4svh, 34px);
  padding-block: clamp(14px, 3svh, 40px);
}

.plans__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(8px, 1.4svh, 14px);
}

.plans__title {
  position: relative;
  margin: 0;
  font-size: clamp(1.875rem, 8.6vw, 4.5rem);
  font-size: clamp(1.875rem, min(8.6vw, 9svh), 4.5rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.03em;
  text-transform: uppercase;
  text-wrap: balance;
  outline: none;
}
.plans__title > span {
  padding-block: .1em;
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}
.plans__title-a { background-image: linear-gradient(180deg, #ffffff 30%, #e8e3ff 100%); }
.plans__title-b { background-image: linear-gradient(180deg, #ddd5fe 12%, var(--lavender-2) 50%, #a291f5 90%); }

.plans__lead {
  max-width: 34em;
  font-size: clamp(.9375rem, .9rem + .2vw, 1.0625rem);
  color: var(--text-2);
  text-wrap: balance;
}

/* «Окно» с тарифами */
.panel {
  width: min(100%, 780px);
  padding: clamp(14px, 2.4vw, 26px);
  border-radius: clamp(24px, 3vw, 32px);
  background: linear-gradient(180deg, rgba(34, 30, 52, .84), rgba(24, 22, 34, .92));
  box-shadow:
    inset 0 0 0 1px rgba(192, 181, 249, .14),
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 50px 100px -50px rgba(0, 0, 0, .9);
  text-align: left;
}

.field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.field + .field { margin-top: clamp(16px, 2.4svh, 22px); }
.field__label {
  float: left;
  width: 100%;
  margin: 0 0 10px;
  padding: 0 4px;
  font: 500 11px/1 var(--font-mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* Радиокнопки спрятаны визуально, но работают с клавиатуры и для скринридеров */
.tile__input,
.term__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

/* Общая основа карточек выбора */
.tile,
.term {
  position: relative;
  isolation: isolate;
  border-radius: 20px;
  cursor: pointer;
  background: rgba(255, 255, 255, .035);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
  transition: background-color .25s ease, box-shadow .35s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.tile::before,
.term::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(160deg, rgba(119, 93, 237, .62), rgba(80, 60, 180, .48));
  opacity: 0;
  transition: opacity .35s ease;
}
.tile.is-checked,
.term.is-checked {
  box-shadow:
    inset 0 0 0 1.5px rgba(210, 201, 252, .72),
    0 18px 40px -18px rgba(119, 93, 237, .95);
}
.tile.is-checked::before,
.term.is-checked::before { opacity: 1; }
.tile:has(:focus-visible),
.term:has(:focus-visible) { outline: 2px solid var(--lavender-1); outline-offset: 3px; }
.tile:active,
.term:active { transform: scale(.98); }
@media (hover: hover) {
  .tile:hover,
  .term:hover { background-color: rgba(255, 255, 255, .065); }
}

/* ---------- Тарифы ------------------------------------------------------- */

.tiles {
  clear: both;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.tile {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 80px;
  padding: 14px 16px;
}
.tile__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: var(--lavender-1);
  background: linear-gradient(145deg, rgba(119, 93, 237, .3), rgba(52, 48, 150, .3));
  box-shadow: inset 0 0 0 1px rgba(192, 181, 249, .22);
  transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.tile__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tile.is-checked .tile__icon {
  color: #fff;
  background: rgba(255, 255, 255, .14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
}
.tile__text { display: grid; gap: 2px; min-width: 0; }
.tile__name {
  font-size: clamp(1.125rem, 1rem + .7vw, 1.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.tile__from {
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text-2);
}
.tile.is-checked .tile__from { color: rgba(255, 255, 255, .78); }

.tile__check {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .18);
  transition: background-color .3s ease, box-shadow .3s ease;
}
.tile__check svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  scale: .4;
  transition: opacity .2s ease, scale .35s var(--ease-spring);
}
.tile.is-checked .tile__check { background: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .14); }
.tile.is-checked .tile__check svg { stroke: var(--violet); opacity: 1; scale: 1; }

/* ---------- Сроки -------------------------------------------------------- */

.terms {
  clear: both;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.term {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name save"
    "price price"
    "per per";
  align-content: start;
  gap: 2px 8px;
  min-height: 108px;
  padding: 14px;
  border-radius: 18px;
}
.term__name {
  grid-area: name;
  align-self: center;
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-2);
}
.term__save {
  grid-area: save;
  align-self: center;
  padding: 4px 7px;
  border-radius: 999px;
  font: 600 10.5px/1 var(--font-mono);
  letter-spacing: .02em;
  white-space: nowrap;
  color: var(--ok);
  background: rgba(124, 240, 197, .1);
  box-shadow: inset 0 0 0 1px rgba(124, 240, 197, .22);
}
.term__save:empty { display: none; }
.term__price {
  grid-area: price;
  margin-top: 14px;
  font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.term__per {
  grid-area: per;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text-3);
}
.term.is-checked .term__name,
.term.is-checked .term__per { color: rgba(255, 255, 255, .8); }
.term.is-checked .term__save { color: #fff; background: rgba(255, 255, 255, .16); box-shadow: none; }

/* ---------- Итог и кнопка ------------------------------------------------ */

.checkout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(16px, 2.4svh, 22px);
  padding: 14px 14px 14px 22px;
  border-radius: 24px;
  background: rgba(14, 12, 22, .58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}

.summary { display: grid; gap: 2px; min-width: 0; }
.summary__what { font-size: .875rem; white-space: nowrap; color: var(--text-2); }
.summary__price {
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.375rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.summary__meta {
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text-3);
}
.summary__meta b { font-weight: 600; color: var(--ok); }

.cta {
  position: relative;
  isolation: isolate;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 62px;
  padding: 0 26px;
  overflow: hidden;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.005em;
  white-space: nowrap;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(90deg, #6247dc, #7f62f2 55%, #9a86f7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .28),
    inset 0 -2px 8px rgba(40, 20, 120, .35),
    0 18px 40px -14px rgba(119, 93, 237, .95);
  transition: transform .25s var(--ease-out), box-shadow .3s ease;
  -webkit-tap-highlight-color: transparent;
}
/* Пробегающий блик */
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .32) 50%, rgba(255, 255, 255, 0) 62%) 130% 0 / 250% 100% no-repeat;
  animation: cta-sheen 4.2s 1.4s ease-in-out infinite;
}
.cta svg {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cta__arrow { transition: translate .3s var(--ease-out); }
.cta__label { display: grid; }
.cta__sum { display: none; font-variant-numeric: tabular-nums; } /* цена в кнопке — только на телефонах */
.cta__label > span { grid-area: 1 / 1; transition: opacity .25s ease, translate .35s var(--ease-out); }
.cta__busy { opacity: 0; translate: 0 10px; }
.cta.is-busy .cta__idle { opacity: 0; translate: 0 -10px; }
.cta.is-busy .cta__busy { opacity: 1; translate: 0 0; }
.cta.is-busy .cta__arrow { animation: cta-go .8s ease-in-out infinite; }
.cta:focus-visible { outline: 2px solid var(--lavender-1); outline-offset: 3px; }
.cta:active { transform: scale(.985); }
@media (hover: hover) {
  .cta:hover {
    transform: translateY(-2px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .3),
      inset 0 -2px 8px rgba(40, 20, 120, .35),
      0 26px 50px -14px rgba(119, 93, 237, 1);
  }
  .cta:hover .cta__arrow { translate: 4px 0; }
}

.panel__note {
  margin-top: 12px;
  text-align: center;
  font-size: .8125rem;
  color: var(--text-3);
}

@keyframes cta-sheen {
  0% { background-position: 130% 0; }
  32%, 100% { background-position: -30% 0; }
}
@keyframes cta-go { 50% { translate: 6px 0; } }

/* ==========================================================================
   Глитч-переход между экранами
   ========================================================================== */

.screen.glitch-out { animation: glitch-out .52s steps(1, end) forwards; pointer-events: none; }
.screen.glitch-in { animation: glitch-in .7s steps(1, end) both; }

@keyframes glitch-out {
  0%   { transform: none; clip-path: inset(0 0 0 0); filter: none; opacity: 1; }
  7%   { transform: translateX(-10px) skewX(6deg); clip-path: inset(8% 0 62% 0);
         filter: drop-shadow(4px 0 0 var(--glitch-a)) drop-shadow(-4px 0 0 var(--glitch-b)); }
  14%  { transform: translateX(12px); clip-path: inset(58% 0 12% 0); }
  21%  { transform: translateX(-4px); clip-path: inset(0 0 0 0);
         filter: drop-shadow(-5px 0 0 var(--glitch-a)) drop-shadow(5px 0 0 var(--glitch-b)); }
  28%  { transform: translateX(18px) skewX(-10deg); clip-path: inset(32% 0 40% 0); }
  35%  { transform: translateX(-16px); clip-path: inset(70% 0 4% 0); }
  42%  { transform: translateX(3px); clip-path: inset(0 0 0 0);
         filter: drop-shadow(4px 0 0 var(--glitch-a)) drop-shadow(-4px 0 0 var(--glitch-b)) brightness(1.5); }
  50%  { transform: translateX(-22px) scaleY(1.04); clip-path: inset(14% 0 52% 0); opacity: .85; }
  58%  { transform: translateX(8px); clip-path: inset(44% 0 30% 0); }
  66%  { transform: translateX(-6px); clip-path: inset(0 0 0 0); opacity: .7;
         filter: drop-shadow(-6px 0 0 var(--glitch-a)) drop-shadow(6px 0 0 var(--glitch-b)) brightness(1.8); }
  76%  { transform: translateX(10px) scaleX(1.06); clip-path: inset(40% 0 40% 0); opacity: 1; }
  86%  { transform: scaleX(1.25); clip-path: inset(48.5% 0 48.5% 0); filter: brightness(3); }
  94%  { transform: scaleX(1.6); clip-path: inset(49.6% 0 49.6% 0); opacity: .6; }
  100% { transform: scaleX(2); clip-path: inset(50% 0 50% 0); opacity: 0; }
}

@keyframes glitch-in {
  0%   { transform: scaleX(2); clip-path: inset(50% 0 50% 0); opacity: 0; filter: brightness(3); }
  8%   { transform: scaleX(1.4); clip-path: inset(49% 0 49% 0); opacity: 1; }
  16%  { transform: scaleX(1.1) translateX(-12px); clip-path: inset(40% 0 42% 0);
         filter: drop-shadow(5px 0 0 var(--glitch-a)) drop-shadow(-5px 0 0 var(--glitch-b)) brightness(1.6); }
  24%  { transform: translateX(14px) skewX(-8deg); clip-path: inset(12% 0 55% 0); }
  32%  { transform: translateX(-8px); clip-path: inset(0 0 0 0);
         filter: drop-shadow(-4px 0 0 var(--glitch-a)) drop-shadow(4px 0 0 var(--glitch-b)); }
  40%  { transform: translateX(20px) skewX(8deg); clip-path: inset(62% 0 10% 0); }
  48%  { transform: translateX(-4px); clip-path: inset(0 0 0 0);
         filter: drop-shadow(3px 0 0 var(--glitch-a)) drop-shadow(-3px 0 0 var(--glitch-b)); }
  58%  { transform: translateX(6px); clip-path: inset(28% 0 46% 0); }
  68%  { transform: none; clip-path: inset(0 0 0 0);
         filter: drop-shadow(2px 0 0 var(--glitch-a)) drop-shadow(-2px 0 0 var(--glitch-b)); }
  80%  { transform: translateX(-2px);
         filter: drop-shadow(1px 0 0 var(--glitch-a)) drop-shadow(-1px 0 0 var(--glitch-b)); }
  90%, 100% { transform: none; clip-path: inset(0 0 0 0); filter: none; opacity: 1; }
}

/* Цветные «срезы» заголовка во время появления */
.plans__title::before,
.plans__title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  -webkit-text-fill-color: currentColor;
  pointer-events: none;
  opacity: 0;
}
.plans__title::before { color: var(--glitch-a); }
.plans__title::after { color: var(--glitch-b); }
.plans.glitch-in .plans__title::before { animation: glitch-slice-a .7s steps(1, end) both; }
.plans.glitch-in .plans__title::after { animation: glitch-slice-b .7s steps(1, end) both; }

@keyframes glitch-slice-a {
  0%   { opacity: 1; transform: translateX(-7px); clip-path: inset(10% 0 60% 0); }
  14%  { transform: translateX(6px); clip-path: inset(55% 0 18% 0); }
  28%  { transform: translateX(-3px); clip-path: inset(30% 0 45% 0); }
  42%  { transform: translateX(9px); clip-path: inset(70% 0 4% 0); }
  56%  { transform: translateX(-2px); clip-path: inset(4% 0 78% 0); }
  70%  { transform: translateX(3px); clip-path: inset(40% 0 40% 0); }
  84%, 100% { opacity: 0; }
}
@keyframes glitch-slice-b {
  0%   { opacity: 1; transform: translateX(6px); clip-path: inset(62% 0 8% 0); }
  14%  { transform: translateX(-8px); clip-path: inset(18% 0 58% 0); }
  28%  { transform: translateX(4px); clip-path: inset(46% 0 30% 0); }
  42%  { transform: translateX(-6px); clip-path: inset(6% 0 74% 0); }
  56%  { transform: translateX(2px); clip-path: inset(66% 0 12% 0); }
  70%  { transform: translateX(-3px); clip-path: inset(24% 0 56% 0); }
  84%, 100% { opacity: 0; }
}

/* Цифровой шум поверх экрана (рисует JS) */
.glitch-noise {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: pixelated;
}

/* ---------- Подвал ------------------------------------------------------- */

.footer {
  padding-top: 6px;
  text-align: center;
  font: 500 11px/1.4 var(--font-mono);
  letter-spacing: .08em;
  color: var(--text-3);
}

/* ---------- Появление страницы после загрузчика -------------------------- */

.reveal {
  transition:
    opacity .9s ease var(--d, 0s),
    translate 1.1s var(--ease-out) var(--d, 0s),
    scale 1.1s var(--ease-out) var(--d, 0s);
}
html:not([data-ready]) .reveal { opacity: 0; translate: 0 16px; }
html:not([data-ready]) .topbar { translate: 0 -16px; }
html:not([data-ready]) .power { translate: none; scale: .6; }
html:not([data-ready]) .title__rise { transform: translateY(112%); }

.gate__action { transition: opacity .6s ease; }
html:not([data-ready]) .gate__action { opacity: 0; }

/* Страховка: если JS не запустился, через 9 с показываем страницу без анимаций */
html:not([data-ready]) .loader { animation: failsafe-out .5s 9s forwards; }
html:not([data-ready]) :is(.reveal, .title__rise, .gate__action),
html:not([data-landed]) :is(.slider__thumb, .slider__cue) { animation: failsafe-in .6s 9s forwards; }
html:not([data-landed]) .slider__track { animation: failsafe-track .6s 9s forwards; }

@keyframes failsafe-out { to { opacity: 0; visibility: hidden; } }
@keyframes failsafe-in { to { opacity: 1; translate: none; scale: none; transform: none; } }
@keyframes failsafe-track { to { clip-path: inset(0 0 0 0 round 999px); } }

/* ---------- Адаптив ------------------------------------------------------ */

/* Телефоны: ползунок уходит вниз, в зону большого пальца */
@media (max-width: 640px) and (min-height: 600px) {
  .gate { justify-content: flex-end; }
  .gate__hero { margin-block: auto; }
}

@media (max-width: 640px) {
  .plans__lead { font-size: .875rem; }
  .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .term { min-height: 84px; padding: 12px 14px; }
  .term__price { margin-top: 8px; }

  /* На телефоне итог — прямо в кнопке; кнопка «прилипает» к низу экрана, если не помещается */
  .checkout {
    position: sticky;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 3;
    margin-top: 14px;
    padding: 0;
    background: none;
    box-shadow: none;
  }
  .summary { display: none; }
  .cta__sum { display: inline; }
  .cta__icon { display: none; }
  .cta {
    width: 100%;
    min-height: 56px;
    padding: 0 20px;
    gap: 10px;
    font-size: 1rem;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .28),
      inset 0 -2px 8px rgba(40, 20, 120, .35),
      0 14px 34px -10px rgba(119, 93, 237, .9),
      0 12px 30px rgba(10, 9, 16, .55);
  }
}

@media (max-width: 420px) {
  .slider { --h: 64px; --pad: 5px; }
  .brand { gap: 10px; font-size: 1rem; }
  .chip { padding: 0 12px; letter-spacing: .08em; }
  .tile { gap: 10px; min-height: 72px; padding: 12px; }
  .tile__icon { width: 40px; height: 40px; border-radius: 12px; }
  .tile__icon svg { width: 21px; height: 21px; }
  .tile__check { display: none; }
  .summary__meta { white-space: normal; }
}

@media (max-width: 389px) {
  .panel { padding: 12px; }
  .tile { gap: 8px; }
  .tile__icon { width: 32px; height: 32px; border-radius: 10px; }
  .tile__icon svg { width: 18px; height: 18px; }
}

@media (max-width: 370px) {
  .tile__icon { display: none; }
  .tile { padding-inline: 14px; }
  /* Скидка «садится» на верхний край карточки, чтобы не спорить с названием срока */
  .term { grid-template-areas: "name name" "price price" "per per"; }
  .term__save {
    position: absolute;
    top: -8px;
    right: 8px;
    padding: 3px 6px;
    font-size: 10px;
    background: #163b32;
    box-shadow: inset 0 0 0 1px rgba(124, 240, 197, .4);
  }
  .term.is-checked .term__save { color: var(--violet); background: #fff; }
}

@media (max-width: 359px) {
  .slider__chev { display: none; }
  .slider__cue { padding-right: 14px; }
  .chip { gap: 7px; padding: 0 10px; font-size: 10px; letter-spacing: .04em; }
  .brand__name { font-size: .9375rem; }
  .term { padding: 12px; }
}

@media (max-width: 340px) {
  .cta { padding: 0 14px; }
  .cta__arrow { display: none; }
}

/* Невысокие телефоны: подписи полей остаются только для скринридеров, карточки ниже */
@media (max-width: 640px) and (max-height: 600px) {
  .plans { gap: 12px; padding-block: 8px; }
  .field + .field { margin-top: 10px; }
  .term { min-height: 76px; }
}
@media (max-width: 640px) and (max-height: 600px), (max-height: 500px) and (orientation: landscape) {
  .field__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Невысокие экраны (iPhone SE с панелями браузера, маленькие ноутбуки) */
@media (max-height: 600px) {
  .topbar { --h: 48px; }
  .power { --size: 48px; margin-bottom: 12px; }
  .power__pulse { display: none; }
  .gate { gap: 16px; padding-block: 8px; }
  .gate__foot { min-height: 36px; }
}

/* Телефон горизонтально: всё помещается в один экран */
@media (max-height: 500px) and (orientation: landscape) {
  .page {
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }
  .topbar { --h: 46px; }
  .power,
  .hint,
  .footer { display: none; }
  .gate { gap: 14px; padding-block: 6px; }
  .badge { height: 26px; margin-bottom: 8px; }
  .title { font-size: clamp(2rem, min(15vw, 11svh), 5rem); }
  .lead { margin-top: 8px; font-size: .9375rem; line-height: 1.45; }
  .slider { --h: 56px; --pad: 5px; }
  .gate__foot { min-height: 36px; margin-top: 4px; }

  /* Тарифы: компактно, кнопка «прилипает» к низу */
  .plans { gap: 10px; padding-block: 6px; }
  .plans__title { font-size: clamp(1.5rem, 7.5svh, 2.25rem); }
  .plans__lead,
  .panel__note { display: none; }
  .panel { padding: 12px; }
  .field + .field { margin-top: 10px; }
  .tile { min-height: 56px; padding: 8px 12px; }
  .tile__icon { width: 34px; height: 34px; border-radius: 10px; }
  .tile__icon svg { width: 19px; height: 19px; }
  .tile__check { top: 50%; translate: 0 -50%; }
  .term { min-height: 0; padding: 10px 12px; }
  .term__price { margin-top: 4px; font-size: 1.125rem; }
  .term__per { display: none; }
  .checkout {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 3;
    margin-top: 10px;
    padding: 8px 8px 8px 16px;
    background: rgba(24, 21, 36, .96);
  }
  .summary__price { font-size: 1.5rem; }
  .summary__meta { display: none; }
  .cta { min-height: 50px; }
}

/* Большие экраны: элементы управления чуть крупнее */
@media (min-width: 1800px) and (min-height: 1050px) {
  .title { font-size: clamp(2.5rem, min(15vw, 12svh), 10rem); }
  .lead { font-size: 1.3125rem; }
  .power { --size: 96px; }
  .badge { height: 34px; font-size: 12px; }
  .slider { --h: 76px; --pad: 7px; width: min(100%, 500px); }
  .slider__text { font-size: 1.1875rem; }
  .panel { width: min(100%, 860px); }
}

/* ---------- Reduced motion, высокий контраст ----------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .2s !important;
    transition-delay: 0s !important;
  }
  .power__pulse,
  .badge__dot::after,
  .cta::before { display: none; }
  .slider__text { animation: none; background: none; color: var(--ink); -webkit-text-fill-color: currentColor; }
}

@media (forced-colors: active) {
  .title__text,
  .slider__text,
  .plans__title > span { color: CanvasText; -webkit-text-fill-color: CanvasText; background: none; }
  .slider__track,
  .tile,
  .term { border: 1px solid CanvasText; }
  .tile.is-checked,
  .term.is-checked { outline: 3px solid Highlight; }
}
