/* ==========================================================================
   PREMIUM LAYER — надстройка над base.css.
   Палитра, тексты и состав блоков не меняются: только глубина, ритм,
   свет, движение и переходы между блоками.
   ========================================================================== */

:root {
  --ease: cubic-bezier(.22, .9, .24, 1);
  --glass: rgba(31, 34, 41, .66);
  --glass-solid: rgba(31, 34, 41, .86);
  --hair: rgba(255, 255, 255, .06);
}

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 64px; }

body {
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01", "tnum" 0;
}

/* ------------------------------ СЦЕНА ФОНА ------------------------------ */
.stage {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}

.stage-glow {
  position: absolute;
  left: 0; top: 0;
  width: 90vmax; height: 90vmax;
  border-radius: 50%;
  opacity: 0;
  will-change: transform, opacity;
  /* Фон перетекает между блоками одной анимацией при смене раздела (GPU, без перерисовки) */
  transition: transform 1.6s cubic-bezier(.22, .8, .24, 1), opacity 1.2s ease;
}
.stage-glow.g-cyan    { background: radial-gradient(closest-side, rgba(0, 210, 255, .5), rgba(0, 210, 255, 0) 72%); }
.stage-glow.g-magenta { background: radial-gradient(closest-side, rgba(255, 46, 147, .5), rgba(255, 46, 147, 0) 72%); }

/* Структурная сетка в колонках контейнера */
.stage-grid {
  position: absolute;
  inset: -200px 0;
  background-image:
    linear-gradient(to right, var(--hair) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: calc(1160px / 6) 100%, 100% calc(1160px / 6);
  background-position: calc(50% - 580px) 0, 0 0;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 20%, transparent 80%);
          mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 20%, transparent 80%);
  opacity: .75;
}

.stage-ring {
  position: absolute;
  left: 0; top: 0;
  width: 62vmax; height: 62vmax;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .05);
  will-change: transform;
  transition: transform 1.8s cubic-bezier(.22, .8, .24, 1);
}

.stage-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 90% at 50% 40%, transparent 45%, rgba(10, 11, 14, .6) 100%),
    linear-gradient(to bottom, rgba(10, 11, 14, .0) 70%, rgba(10, 11, 14, .35));
}

.stage-grain {
  display: none; /* шумовой слой с mix-blend-mode сильно нагружает GPU телефонов */
  position: absolute;
  inset: 0;
  opacity: .06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------- ПРОГРЕСС И БОКОВАЯ РЕЙКА ------------------------- */
.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 120;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 12px rgba(0, 210, 255, .5);
  pointer-events: none;
}

.rail {
  position: fixed;
  right: 18px;
  top: 50%;
  translate: 0 -50%;
  z-index: 90;
  display: none;
  flex-direction: column;
  gap: 10px;
  padding: 12px 7px;
  border-radius: 99px;
  background: rgba(22, 24, 29, .55);
  border: 1px solid var(--hair);
}
.rail button {
  width: 6px; height: 6px;
  border-radius: 99px;
  background: var(--border);
  transition: height .5s var(--ease), background-color .4s ease, box-shadow .4s ease;
  position: relative;
}
.rail button::after { content: ""; position: absolute; inset: -6px -9px; }
.rail button:hover { background: var(--muted); }
.rail button.on {
  height: 24px;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 210, 255, .7);
}
@media (min-width: 1100px) { .rail { display: flex; } }

/* ------------------------------ ШАПКА ------------------------------ */
.header {
  background-color: rgba(22, 24, 29, .94);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
  box-shadow: 0 1px 0 var(--hair);
  transition: background-color .4s ease, box-shadow .4s ease;
}
.header.scrolled {
  background-color: rgba(22, 24, 29, .96);
  box-shadow: 0 1px 0 var(--hair), 0 18px 40px -24px rgba(0, 0, 0, .7);
}

.nav a {
  position: relative;
  padding: 6px 0;
  transition: color .3s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .5s var(--ease);
}
.nav a:hover::after, .nav a.active::after { transform: scaleX(1); }
.nav a.active { color: var(--text); }

.logo-mark {
  box-shadow: 0 0 0 4px rgba(0, 210, 255, .06), 0 0 18px -4px rgba(0, 210, 255, .5);
  transition: box-shadow .4s ease;
}
.logo:hover .logo-mark { box-shadow: 0 0 0 5px rgba(0, 210, 255, .1), 0 0 24px -2px rgba(0, 210, 255, .7); }

/* ------------------------------ РИТМ СЕКЦИЙ ------------------------------ */
.section {
  position: relative;
  border-bottom: 0;
  padding: 112px 0;
}
.hero {
  position: relative;
  border-bottom: 0;
  padding: 88px 0 120px;
}
.footer { position: relative; padding: 112px 0 48px; }

/* Тонкий шов между блоками с цветным акцентом */
.section::before, .footer::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: min(1160px, calc(100% - 40px));
  height: 1px;
  translate: -50% 0;
  background: linear-gradient(90deg, transparent, var(--border) 14%, var(--border) 86%, transparent);
}
.section::after, .footer::after {
  content: "";
  position: absolute;
  top: -1px; left: 50%;
  width: 140px; height: 3px;
  margin-left: -580px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  opacity: .85;
  filter: blur(.3px);
}
#pricing::after, #process::after { background: linear-gradient(90deg, var(--magenta), transparent); }
@media (max-width: 1200px) { .section::after, .footer::after { margin-left: 0; left: 20px; } }

.container { position: relative; }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  letter-spacing: .16em;
}
.section-kicker::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
  opacity: .8;
}
.section-title {
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.1;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.section-sub { font-size: 16px; line-height: 1.65; margin-top: 14px; max-width: 620px; }
.section-head-row { margin-bottom: 52px; }

/* ------------------------------ КНОПКИ ------------------------------ */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 14px 26px;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease,
              transform .5s var(--ease), box-shadow .5s var(--ease);
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); transition-duration: .15s; }
.btn-sm { padding: 9px 18px; }

.btn-cyan { box-shadow: 0 10px 30px -12px rgba(0, 210, 255, .65), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-cyan:hover { box-shadow: 0 16px 38px -12px rgba(0, 210, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-magenta { box-shadow: 0 10px 30px -12px rgba(255, 46, 147, .65), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-magenta:hover { box-shadow: 0 16px 38px -12px rgba(255, 46, 147, .85); }
.btn-magenta-outline:hover { box-shadow: 0 14px 34px -14px rgba(255, 46, 147, .8); }
.btn-ghost { background-color: var(--glass-solid); }
.btn-ghost:hover { box-shadow: 0 14px 34px -16px rgba(0, 210, 255, .55); }

/* ------------------------------ КАРТОЧКИ ------------------------------ */
.build-card, .price-card, .feature-card, .step-card, .faq-item, .footer-box, .pricing-footnote {
  position: relative;
  isolation: isolate;
  background-color: var(--glass-solid);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 18px 36px -26px rgba(0, 0, 0, .8);
  transition: border-color .3s ease, box-shadow .4s var(--ease), translate .4s var(--ease);
}
.build-card, .price-card, .feature-card, .step-card, .footer-box { border-radius: 14px; }
.faq-item { border-radius: 12px; }

/* Подсветка, следующая за курсором */
.fx-spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(0, 210, 255, .13), transparent 65%);
  transition: opacity .5s ease;
  pointer-events: none;
}
.fx-spot.accent-m::before, .price-card.featured-magenta::before, .feature-card:nth-child(2)::before, .step-card:nth-child(3)::before {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 46, 147, .14), transparent 65%);
}
.fx-spot:hover::before { opacity: 1; }

@media (hover: hover) and (pointer: fine) {
  .build-card:hover, .feature-card:hover, .step-card:hover, .price-card:hover {
    translate: 0 -6px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 40px 70px -36px rgba(0, 0, 0, .9), 0 0 40px -20px rgba(0, 210, 255, .45);
  }
  .build-card.accent-m:hover, .feature-card:nth-child(2):hover, .step-card:nth-child(3):hover {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 40px 70px -36px rgba(0, 0, 0, .9), 0 0 40px -20px rgba(255, 46, 147, .5);
  }
}

.price-card { padding: 32px 28px 28px; }
.price-card.featured-cyan {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 40px 90px -45px rgba(0, 210, 255, .6), 0 0 0 6px rgba(0, 210, 255, .04);
}
.price-card.featured-magenta {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 40px 90px -45px rgba(255, 46, 147, .5), 0 0 0 6px rgba(255, 46, 147, .035);
}
.price-card.featured-cyan:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 50px 100px -40px rgba(0, 210, 255, .75), 0 0 0 6px rgba(0, 210, 255, .07); }
.price-card.featured-magenta:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 50px 100px -40px rgba(255, 46, 147, .65), 0 0 0 6px rgba(255, 46, 147, .06); }
.price-amount { font-size: 34px; letter-spacing: -.03em; }
.price-name { letter-spacing: -.02em; }
.price-list li { line-height: 1.5; }
.price-tag { letter-spacing: .02em; }

.feature-card, .step-card { padding: 30px 26px; }
.feature-title { letter-spacing: -.015em; }
.feature-num, .step-code { letter-spacing: .12em; }

.build-media { border-bottom-color: var(--hair); }
.build-media img { scale: 1.04; transition: scale .6s var(--ease); }
@media (hover: hover) and (pointer: fine) { .build-media:hover img { scale: 1.1; } }
.build-media::after, .hero-photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(22, 24, 29, .5), transparent 38%);
  pointer-events: none;
}
.zoom-hint {
  z-index: 2;
  transition: transform .4s var(--ease), background-color .3s ease, border-color .3s ease;
}
.build-media:hover .zoom-hint { transform: scale(1.12); border-color: var(--cyan); }
.build-body { padding: 20px; }
.build-title { letter-spacing: -.01em; }
.build-price { font-size: 16px; }

/* ------------------------------ HERO ------------------------------ */
.hero-grid { gap: 72px; }
.hero-title {
  font-size: clamp(32px, 4.6vw, 58px);
  line-height: 1.04;
  letter-spacing: -.04em;
  margin-bottom: 24px;
  text-wrap: balance;
}
.hero-desc { font-size: 17px; line-height: 1.7; margin-bottom: 36px; }
.hero-badge {
  background-color: var(--glass);
  padding: 7px 14px;
  letter-spacing: .1em;
  box-shadow: 0 0 30px -12px rgba(0, 210, 255, .5);
}
.hero-badge-dot { position: relative; box-shadow: 0 0 10px var(--cyan); }
.hero-badge-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--cyan);
  animation: ping 2.4s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(.4); opacity: .9; } 80%, 100% { transform: scale(1.8); opacity: 0; } }

.hero-stats { padding-top: 28px; gap: 24px; border-top-color: var(--hair); }
.stat-val { font-size: 20px; letter-spacing: -.02em; }
.stat-label { line-height: 1.5; margin-top: 4px; }

.hero-media-col { position: relative; }
.hero-media-col::before {
  content: "";
  position: absolute;
  width: min(100%, 380px);
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  border: 1px solid rgba(0, 210, 255, .35);
  translate: 18px 18px;
  opacity: .6;
  pointer-events: none;
}
.hero-media-col::after {
  content: "";
  position: absolute;
  width: min(100%, 380px);
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  background: radial-gradient(closest-side, rgba(255, 46, 147, .3), transparent 90%);
  translate: -26px 30px;
  z-index: -1;
  pointer-events: none;
}
.hero-photo-frame {
  border-radius: 14px;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9), 0 0 0 1px var(--hair);
  transition: border-color .4s ease, box-shadow .5s var(--ease);
}
.hero-photo-frame:hover { box-shadow: 0 60px 110px -40px rgba(0, 0, 0, .9), 0 0 60px -20px rgba(0, 210, 255, .5); }
.hero-photo-frame img { scale: 1.04; transition: scale .6s var(--ease); }
@media (hover: hover) and (pointer: fine) { .hero-photo-frame:hover img { scale: 1.09; } }
.hero-photo-badge {
  z-index: 2;
  background-color: rgba(22, 24, 29, .78);
  border-color: var(--hair);
  border-radius: 10px;
}

/* ------------------------------ ЦЕНЫ / FAQ / ФУТЕР ------------------------------ */
.budget-toggle-wrap { background-color: var(--glass-solid); border-radius: 12px; }
.toggle-btn { transition: background-color .4s var(--ease), color .3s ease, box-shadow .5s var(--ease); }
.toggle-btn.active-cyan { box-shadow: 0 8px 22px -8px rgba(0, 210, 255, .7); }
.toggle-btn.active-magenta { box-shadow: 0 8px 22px -8px rgba(255, 46, 147, .7); }
.price-amount, .price-delta { transition: opacity .25s ease; }

.pricing-footnote { border-radius: 10px; padding: 18px 22px; }

.faq-list { gap: 14px; }
.faq-btn { padding: 22px 24px; font-size: 16px; transition: color .3s ease; }
.faq-btn:hover { color: var(--cyan); }
.faq-icon { transition: transform .5s var(--ease); }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-item.open { border-color: rgba(0, 210, 255, .35); }
.faq-panel { transition: grid-template-rows .55s var(--ease); }
.faq-answer { padding: 16px 24px 22px; line-height: 1.7; border-top-color: var(--hair); }

.footer-box {
  padding: 56px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 60px 120px -60px rgba(0, 0, 0, .9);
}
.footer-box::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(520px circle at 0% 0%, rgba(0, 210, 255, .12), transparent 60%),
    radial-gradient(520px circle at 100% 100%, rgba(255, 46, 147, .12), transparent 60%);
}
.footer-bottom { border-top-color: var(--hair); margin-top: 40px; letter-spacing: .02em; }

/* ------------------------------ ЛАЙТБОКС ------------------------------ */
.lightbox { background-color: rgba(10, 11, 14, .94); }
.lightbox.open { animation: lbIn .3s ease; }
.lightbox.open .lightbox-img { animation: lbImg .4s var(--ease); }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbImg { from { opacity: 0; transform: scale(.94) translateY(16px); } to { opacity: 1; transform: none; } }

/* ------------------------------ ПОЯВЛЕНИЕ БЛОКОВ ------------------------------
   Только opacity + transform (GPU). Лёгкий подъём и проявление, без clip-path и размытия.
   JS снимает класс .fx-in после показа, так что слой не висит в памяти. */
.js .fx-in {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity .6s ease var(--d, 0s), transform .7s var(--ease) var(--d, 0s);
}
.js .fx-in.in {
  opacity: 1;
  transform: none;
}
.section-kicker::before { transition: width .8s var(--ease) .15s; }
.js .fx-line:not(.in) .section-kicker::before { width: 0; }

/* ------------------------------ АДАПТИВ ------------------------------ */
@media (max-width: 860px) {
  .hero-grid { gap: 56px; }
  .hero-media-col::before { translate: 12px 12px; }
  .footer-box { padding: 28px; }
}
@media (max-width: 760px) {
  /* На телефонах: убираем самые дорогие по отрисовке детали */
  .stage-ring, .hero-media-col::after { display: none; }
  .stage-glow { transition-duration: 1.2s, .9s; }
  .build-card, .price-card, .feature-card, .step-card, .faq-item, .footer-box, .pricing-footnote {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  }
  .price-card.featured-cyan, .price-card.featured-magenta { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07); }
  .hero-photo-frame { box-shadow: 0 0 0 1px var(--hair); }
  .section::after, .footer::after { filter: none; }
  .js .fx-in { transform: translate3d(0, 16px, 0); transition-duration: .5s, .55s; }
}
@media (max-width: 580px) {
  .section { padding: 72px 0; }
  .hero { padding: 48px 0 80px; }
  .footer { padding: 72px 0 36px; }
  .section-head-row { margin-bottom: 36px; }
  .hero-desc { font-size: 16px; }
  .stage-grid { opacity: .5; }
  .price-card { padding: 26px 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01s !important; }
  .js .fx-in { opacity: 1; transform: none; }
}
