/* Главная и страницы-категории: редизайн «Сцена» + «Портал». Подключается после style.css. */
/* =====================================================================
   РЕДИЗАЙН «СЦЕНА»
   Фирменный оранжевый и шрифты остаются. Меняется композиция: первый
   экран — тёмная сцена, за полем запроса в перспективе стоит стена из
   работ; меню — отдельная плавающая панель; ниже — журнальная вёрстка
   с крупными заголовками по левому краю. Разметка и тексты не меняются.
   ===================================================================== */

:root {
  --stage:   #0e1313;
  --stage-2: #141c1c;
  --stage-3: #1c2626;
  --stage-line: #2a3636;
  --stage-text: #e0f5f1;
  --stage-muted: #8ea4a3;
  --gap-shell: 12px;
}

/* Тёмные токены для «сцены» и меню: компоненты внутри (поле запроса,
   мастера, альбомы) уже умеют тёмную тему, им надо только дать её токены */
.hero, .sidebar, .menu-toggle.is-close {
  --n-0:#141c1c; --n-25:#0e1313; --n-50:#141c1c; --n-100:#1c2626; --n-200:#2a3636;
  --n-300:#3a4949; --n-500:#8ea4a3; --n-700:#ccdbda; --n-900:#e0f5f1;
  --bg: var(--stage); --bg-side: var(--stage); --surface: var(--stage-2);
  --panel: var(--stage-2); --panel-2: var(--stage-3);
  --line: var(--stage-line); --line-soft: #1f2929; --line-strong: #3a4949; --border: var(--stage-line);
  --text: var(--stage-text); --text-2: #ccdbda; --muted: var(--stage-muted);
  --a-tint: rgba(75,255,202,.16); --accent-ink: #7fffdb;
  --sh-1: 0 1px 2px rgba(0,0,0,.5);
  --sh-2: 0 2px 6px rgba(0,0,0,.45), 0 12px 28px -12px rgba(0,0,0,.7);
  --sh-3: 0 8px 24px rgba(0,0,0,.5), 0 40px 80px -24px rgba(0,0,0,.8);
  color: var(--text);
}

/* ---------- Меню: плавающая панель ---------- */
.sidebar { background: var(--stage); box-shadow: none; }
.nav-item { border-left: 0; border-radius: 12px; padding-left: 12px; font-weight: 500; color: #a0b4b3; }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--accent); color: #06342a; box-shadow: 0 10px 24px -12px rgba(75,255,202,.9); }
.nav-item.active .ni-ico { color: #fff; }
.brand-logo { color: #fff; }
.theme-toggle { border-color: rgba(255,255,255,.12); color: #a0b4b3; }
.theme-toggle:hover { color: #fff; }
.foot-link { color: #a0b4b3; }
.foot-link:hover { color: #fff; }
.btn-signup { border-radius: 999px; }
.nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }

@media (min-width: 901px) {
  .sidebar {
    top: var(--gap-shell); left: var(--gap-shell);
    height: calc(100vh - var(--gap-shell) * 2);
    width: 204px; /* 14.10.2026: без заголовков групп меню текст короче — панель уже (было 248) */
    border-radius: 24px;
    box-shadow: 0 30px 60px -30px rgba(16,32,32,.45);
  }
  .main { margin-left: calc(204px + var(--gap-shell)); }
}
.menu-toggle { border-radius: 14px; box-shadow: var(--sh-2); }

/* ---------- Сцена ---------- */
.hero {
  max-width: none;
  width: auto;
  margin: calc(var(--gap-shell) - 60px) calc(var(--gap-shell) - 32px) 72px;
  padding: 104px 48px 84px;
  border-radius: 28px;
  background:
    radial-gradient(55% 60% at 50% -5%, rgba(75,255,202,.42) 0%, transparent 70%),
    radial-gradient(35% 45% at 100% 100%, rgba(75,255,202,.20) 0%, transparent 70%),
    radial-gradient(35% 45% at 0% 100%, rgba(121,255,222,.10) 0%, transparent 70%),
    var(--stage);
  isolation: isolate;
  overflow: clip;
}
/* Затемнение между стеной работ и текстом: по центру глубокое, к краям
   сходит на нет — картинки видны по периметру, текст читается */
.hero::before {
  top: 0; left: 0; right: 0; bottom: 0;
  width: auto; height: auto;
  transform: none;
  z-index: -1;
  background: radial-gradient(62% 58% at 50% 46%, rgba(14,19,19,.94) 0%, rgba(14,19,19,.78) 45%, rgba(14,19,19,.25) 100%);
}
:root[data-theme="dark"] .hero::before {
  background: radial-gradient(62% 58% at 50% 46%, rgba(14,19,19,.94) 0%, rgba(14,19,19,.78) 45%, rgba(14,19,19,.25) 100%);
}
:root[data-theme="dark"] .hero { box-shadow: 0 0 0 1px rgba(75,255,202,.18), 0 40px 120px -40px rgba(75,255,202,.35); }

.hero h1 {
  font-size: clamp(50px, 7.4vw, 124px);
  font-weight: 800;
  letter-spacing: -0.058em;
  line-height: .9;
  color: #d6fff7;
  max-width: 11em;
  margin-inline: auto;
  text-wrap: balance;
}
/* Выделенное слово — оранжевая наклейка, которая шлёпается при загрузке */
.hero h1 .hl {
  display: inline-block;
  color: #0b1716;
  background: var(--accent);
  padding: .02em .16em .08em;
  margin: 0 .04em;
  border-radius: .14em;
  transform: rotate(-3deg);
  box-shadow: 0 .18em .5em -.14em rgba(75,255,202,.85), inset 0 -.06em 0 rgba(0,0,0,.12);
  animation: dv-slap .7s cubic-bezier(.2,1.7,.35,1) .35s both;
}
@keyframes dv-slap {
  from { transform: rotate(-16deg) scale(1.9); opacity: 0; }
  to   { transform: rotate(-3deg) scale(1); opacity: 1; }
}
.hero-sub { color: #b8cac9; font-size: clamp(16px, 1.4vw, 19px); max-width: 640px; }
.eyebrow { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #ccdbda; box-shadow: none; backdrop-filter: blur(8px); }
.eyebrow i { box-shadow: 0 0 0 4px rgba(75,255,202,.22), 0 0 12px rgba(75,255,202,.9); }

.hero .prompt-box {
  max-width: 820px;
  margin-inline: auto;
  margin-top: 40px;
  border-radius: 30px;
  padding: 18px;
  background: rgba(20,28,28,.72);
  border: 1px solid rgba(255,255,255,.13);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 50px 110px -40px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.06);
}
.hero .prompt-box:focus-within {
  border-color: rgba(75,255,202,.7);
  box-shadow: 0 50px 110px -40px rgba(0,0,0,.9), 0 0 0 6px rgba(75,255,202,.16), 0 0 80px -20px rgba(75,255,202,.55);
}
.prompt-row textarea { font-size: 17px; }
.generate-btn {
  height: 46px;
  padding-inline: 24px;
  font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 14px 40px -10px rgba(75,255,202,.85);
}
.hero .result { max-width: 820px; margin-inline: auto; }

/* Стена работ: обе бегущие ленты стоят в перспективе за текстом */
@media (min-width: 901px) {
  .hero .showcase:not(.showcase--interactive) {
    position: absolute;
    z-index: -2;
    top: 50%; left: 50%;
    width: 150%;
    margin: 0;
    gap: 22px;
    transform: translate(-50%, -50%) perspective(1500px) rotateX(30deg) rotateZ(-11deg) scale(1.45);
    mask-image: none;
    -webkit-mask-image: none;
    opacity: .9;
  }
  .hero .showcase:not(.showcase--interactive) .showcase-track { gap: 22px; }
  .hero .showcase:not(.showcase--interactive) .sc-card {
    border-radius: 18px;
    border: 0;
    box-shadow: 0 30px 60px -20px rgba(0,0,0,.8);
  }
  .hero .showcase:not(.showcase--interactive) .showcase-row:hover .sc-card:not(:hover) { opacity: 1; }
}
@media (max-width: 900px) {
  .hero .showcase:not(.showcase--interactive) {
    margin-top: 40px;
    transform: perspective(900px) rotateX(14deg);
    transform-origin: 50% 0;
  }
}

/* ---------- Журнальные заголовки по левому краю ---------- */
.sec-title, .control-title {
  text-align: left;
  font-size: clamp(42px, 6vw, 92px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: .92;
  max-width: 13em;
  text-wrap: balance;
}
.sec-sub { text-align: left; margin-left: 0; font-size: 18px; max-width: 58ch; margin-top: 20px; }
.sec-points { justify-content: flex-start !important; }
.control-title { margin-bottom: 56px; }
.control-grid { max-width: none; margin-inline: 0; }
.control-left h3 { font-family: var(--font-display); font-size: clamp(24px, 2.4vw, 34px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.05; }
.ba-slider { border-radius: 28px; }
.btn-get-started { border-radius: 999px; padding: 14px 28px; }

.control-section, .style-section, .tools-section, .how-section, .pricing-section, .faq-section { margin-top: 140px; }

/* ---------- Категории: липкий заголовок слева, лента справа ---------- */
.cats { gap: 0; }
@media (min-width: 901px) {
  .cat {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
    padding-block: 36px;
    border-top: 1px solid var(--line);
  }
  .cat:last-of-type { border-bottom: 1px solid var(--line); }
  .cat-head {
    position: sticky; top: 28px;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    margin: 0;
  }
  .cat-head h3 {
    font-family: var(--font-display);
    font-size: 46px;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: .95;
  }
  .cat-sub { font-size: 15px; margin-top: 10px; }
}
.cat-try { border-radius: 999px; padding: 12px 24px; box-shadow: 0 10px 24px -12px rgba(75,255,202,.8); }
.cat-grid .card { border-radius: 18px; }

/* ---------- Стили: список-переключатель крупным кеглем ---------- */
.ssc-chip { font-size: 17px; font-weight: 600; border-radius: 14px; padding-block: 12px; }
.ssc-chip.is-active { background: var(--accent); color: #06342a; }
.ssc-chip.is-active .ssc-chip-dot { background: #fff; }
.style-switch-stage { border-radius: 28px; }

/* ---------- Возможности: индекс-список вместо карточек ---------- */
.tools-grid {
  display: block;
  margin-top: 56px;
  border-top: 2px solid var(--text);
}
.tool-card,
.tool-card:hover {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px 48px;
  align-items: baseline;
  padding: 30px 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  transform: none;
  overflow: visible;
}
.tool-card h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 50px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  margin: 0;
  transition: color .25s var(--ease), transform .35s var(--ease);
}
.tool-card p { font-size: 16px; line-height: 1.6; max-width: 48ch; }
.tool-card:hover h3 { color: var(--accent); transform: translateX(14px); }

/* ---------- Как это работает: гигантские контурные цифры ---------- */
.how-section::before { display: none; }
.how-steps { gap: 40px; margin-top: 56px; }
.how-steps li,
.how-steps li:hover {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  padding: 0;
}
.how-num {
  font-size: clamp(130px, 15vw, 230px);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: .78;
  color: transparent;
  -webkit-text-stroke: 2px var(--accent);
  margin: 0 0 22px -.04em;
  transition: color .35s var(--ease);
}
.how-steps li:hover .how-num { color: var(--accent); }
.how-steps h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.how-steps p { font-size: 15px; }

/* ---------- Тарифы: популярный — целиком оранжевый ---------- */
.pricing-card { border-radius: 26px; }
.pricing-card--featured {
  background: linear-gradient(160deg, #6bffd6 0%, #4bffca 55%, #37f2b9 100%);
  border-color: transparent;
  color: #0b1716;
  box-shadow: 0 40px 80px -30px rgba(75,255,202,.75);
}
.pricing-card--featured .pricing-name,
.pricing-card--featured .pricing-period { color: rgba(11,23,22,.66); }
.pricing-card--featured .pricing-features li { color: #0b1716; opacity: 1; }
.pricing-card--featured .pricing-features svg { color: #0b1716; }
.pricing-card--featured .pricing-cta { background: #101615; border-color: #101615; color: #fff; box-shadow: none; }
.pricing-card--featured .pricing-cta:hover { background: #000; }
.pricing-card--featured .pricing-cta--outline { background: transparent; color: #0b1716; border-color: rgba(11,23,22,.35); }
.pricing-badge { background: #101615; color: #fff; box-shadow: 0 8px 20px -8px rgba(0,0,0,.6); }
.pricing-amount { font-size: 46px; letter-spacing: -0.05em; }
.pricing-cta { border-radius: 999px; }
.pricing-note { text-align: left; margin-left: 0; }

/* ---------- Вопросы ---------- */
.faq-list { max-width: none; margin-top: 56px; }
.faq-q { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; padding-block: 26px; }
.faq-q::before, .faq-q::after { background: var(--accent); width: 13px; height: 2px; }
.faq-q:hover { color: var(--accent-ink); }

/* ---------- Нижний массив ---------- */
.cta-section h2 { font-size: clamp(48px, 7.4vw, 120px); letter-spacing: -0.058em; line-height: .9; }
.cta-section { padding-block: 120px 80px; }
.on-ink { background: radial-gradient(60% 60% at 50% 0%, rgba(75,255,202,.35) 0%, transparent 70%), var(--ink); }
.cta-peek img { width: 150px; height: 190px; border-radius: 20px; }
.ink-block { border-radius: 36px 36px 0 0; }

/* ---------- Появление при прокрутке, где браузер умеет ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .sec-title, .control-title, .cta-section h2 {
      animation: dv-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 28%;
    }
    .cat-grid .card, .how-steps li, .pricing-card {
      animation: dv-lift linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 25%;
    }
  }
}
@keyframes dv-rise { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
@keyframes dv-lift { from { opacity: .15; transform: translateY(50px) scale(.96); } to { opacity: 1; transform: none; } }

/* ---------- Телефон ---------- */
@media (max-width: 900px) {
  .hero {
    margin: calc(var(--gap-shell) - 70px) calc(var(--gap-shell) - 18px) 48px;
    padding: 76px 20px 44px;
    border-radius: 24px;
  }
  .hero h1 { font-size: clamp(40px, 11vw, 64px); line-height: .95; }
  .how-num { font-size: 120px; }
  .tool-card, .tool-card:hover { grid-template-columns: 1fr; }
  .control-section, .style-section, .tools-section, .how-section, .pricing-section, .faq-section { margin-top: 88px; }
}
@media (max-width: 620px) {
  .sec-title, .control-title { font-size: 40px; }
  .cta-section h2 { font-size: 44px; }
  .cat-head h3 { font-size: 26px; }
}

/* =====================================================================
   ГЛАВНАЯ — «ПОРТАЛ»
   Только главная (класс :root вешает home-fx.js). Первый экран на всю
   высоту: живое оранжевое сияние, прожектор за курсором, вокруг заголовка
   парят работы на разной глубине и отзываются на мышь, слова заголовка
   всплывают, по рамке поля запроса бежит огонь.
   ===================================================================== */

@property --dv-ang {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

:root .hero {
  background:
    radial-gradient(70% 60% at 50% -10%, rgba(75,255,202,.38), transparent 70%),
    var(--stage);
}

/* Сияние: три размытых пятна медленно дрейфуют */
:root .hero::before {
  inset: -25%;
  z-index: -3;
  background:
    radial-gradient(28% 30% at 28% 38%, rgba(75,255,202,.42), transparent 70%),
    radial-gradient(24% 28% at 74% 62%, rgba(123,255,225,.26), transparent 70%),
    radial-gradient(22% 26% at 52% 88%, rgba(27,236,169,.36), transparent 70%),
    radial-gradient(18% 20% at 86% 14%, rgba(101,255,215,.22), transparent 70%);
  filter: blur(46px);
  animation: dv-aurora 20s ease-in-out infinite alternate;
}
@keyframes dv-aurora {
  0%   { transform: translate(-4%, -3%) rotate(0deg) scale(1); }
  50%  { transform: translate(3%, 2%) rotate(9deg) scale(1.08); }
  100% { transform: translate(-2%, 4%) rotate(-7deg) scale(.96); }
}
/* Мелкая пыль света поверх сияния и тень под текстом по центру */
:root .hero::after {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(36% 42% at 50% 50%, rgba(14,19,19,.72), transparent 78%),
    radial-gradient(rgba(190,255,240,.10) 1px, transparent 1.4px) 0 0 / 34px 34px;
  -webkit-mask-image: linear-gradient(#000, #000);
}

/* ---------- Заголовок: слова всплывают по одному ---------- */
:root .hero h1 .hw:not(.hl) {
  display: inline-block;
  animation: dv-word .95s cubic-bezier(.2,.8,.2,1) both;
  animation-delay: calc(var(--i, 0) * 85ms + 120ms);
}
:root .hero h1 .hl { animation-delay: calc(var(--i, 0) * 85ms + 420ms); }
@keyframes dv-word {
  from { opacity: 0; transform: translateY(.55em) rotate(3deg); filter: blur(10px); }
  to   { opacity: 1; transform: none; filter: none; }
}
:root .eyebrow { animation: dv-word .8s cubic-bezier(.2,.8,.2,1) both; }
:root .hero-sub { animation: dv-word .9s cubic-bezier(.2,.8,.2,1) .75s both; }
:root .hero .prompt-box { animation: dv-rise-box 1s cubic-bezier(.2,.8,.2,1) .9s both; }
@keyframes dv-rise-box {
  from { opacity: 0; transform: translateY(40px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Огонь по рамке поля запроса ---------- */
:root .hero .prompt-box::before {
  content: '';
  position: absolute; inset: -1.5px;
  border-radius: inherit;
  padding: 1.5px;
  pointer-events: none;
  background: conic-gradient(from var(--dv-ang),
    transparent 0deg, transparent 200deg,
    rgba(75,255,202,.0) 215deg, #4bffca 285deg, #c8fff2 318deg, #4bffca 335deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: dv-spin 4.5s linear infinite;
}
:root .hero .prompt-box::after {
  content: '';
  position: absolute; inset: 10% 6% -18%;
  z-index: -1;
  border-radius: 40px;
  pointer-events: none;
  background: conic-gradient(from var(--dv-ang), transparent 0 200deg, rgba(75,255,202,.55) 290deg, transparent 360deg);
  filter: blur(40px);
  opacity: .7;
  animation: dv-spin 4.5s linear infinite;
}
@keyframes dv-spin { to { --dv-ang: 360deg; } }
:root .hero .prompt-box:focus-within::before { animation-duration: 1.6s; }

/* ---------- Работы парят вокруг заголовка ---------- */
@media (min-width: 1180px) {
  :root .hero {
    min-height: calc(100vh - var(--gap-shell) * 2);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-block: 80px;
  }
  :root .hero h1 {
    font-size: clamp(60px, 5.4vw, 96px);
    max-width: 9em;
    line-height: .92;
  }
  :root .hero-sub { max-width: 540px; }
  :root .hero .prompt-box { width: min(620px, 100%); }
  :root .hero .result { width: min(620px, 100%); }

  :root .hero .showcase:not(.showcase--interactive),
  :root .hero .showcase:not(.showcase--interactive) .showcase-row,
  :root .hero .showcase:not(.showcase--interactive) .showcase-track {
    position: static;
    display: block;
    width: auto; height: auto;
    margin: 0;
    transform: none;
    animation: none;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
    opacity: 1;
  }
  /* Работы парят только в пределах первого экрана: на страницах с высоким
     героем (мастер логотипа, окно «Оживить фото») они не лезут под блоки ниже.
     Слой поверх поля запроса — поэтому клики пропускаем сквозь него. */
  :root .hero .showcase:not(.showcase--interactive) {
    position: absolute;
    inset: 0 0 auto 0;
    height: min(100%, calc(100vh - var(--gap-shell) * 2));
    pointer-events: none;
  }
  :root .hero .showcase .sc-card { pointer-events: auto; }
  :root .hero .showcase .sc-card:nth-child(n+7) { display: none; }
  /* Под первым экраном мастер (логотип, открытка) — нижние работы убираем, чтобы не торчали из-за него */
  :root .hero.has-wizard .showcase .sc-card:nth-child(n+5) { display: none; }
  :root .hero .showcase .sc-card {
    --d: 1; --fd: 7s;
    position: absolute;
    left: var(--x); top: var(--y);
    width: var(--w); height: auto;
    aspect-ratio: 4 / 5;
    z-index: 1;
    border: 0;
    border-radius: 20px;
    rotate: var(--r);
    box-shadow: 0 34px 70px -24px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.09);
    transition: translate .9s cubic-bezier(.2,.7,.2,1), scale .4s var(--ease), rotate .4s var(--ease), filter .4s ease, box-shadow .4s ease;
    /* backwards, а не both: иначе анимация навсегда держит scale:1
       и увеличение при наведении перестаёт работать */
    animation:
      dv-card-in 1.1s cubic-bezier(.2,.8,.2,1) backwards,
      dv-float var(--fd) ease-in-out infinite alternate;
    animation-delay: calc(var(--k, 0) * 70ms + 500ms), calc(var(--k, 0) * -900ms);
  }
  :root .hero .showcase .sc-card:hover {
    scale: 1.14;
    rotate: 0deg;
    z-index: 5;
    filter: none;
    box-shadow: 0 40px 90px -20px rgba(0,0,0,.95), 0 0 0 2px var(--accent), 0 0 60px -10px rgba(75,255,202,.7);
  }
  :root .hero .showcase-row:hover .sc-card:not(:hover) { opacity: 1; }

  /* Дальний план — меньше, темнее, размыт; ближний — крупнее и резче */
  :root .hero .sc-card.dv-far  { filter: blur(2px) brightness(.62) saturate(.85); }
  :root .hero .sc-card.dv-mid  { filter: brightness(.86); }

  /* Слева — верхняя лента, справа — нижняя */
  :root .hero .showcase-row:not(.showcase-row--r) .sc-card:nth-child(1) { --x: 2.5%; --y: 7%;  --w: 13%;  --r: -7deg; --d: 1.3; --k: 0; --fd: 6.4s; z-index: 4; }
  :root .hero .showcase-row:not(.showcase-row--r) .sc-card:nth-child(2) { --x: 16.5%; --y: 3%; --w: 7.5%; --r: 9deg;  --d: .4;  --k: 3; --fd: 8.2s; }
  :root .hero .showcase-row:not(.showcase-row--r) .sc-card:nth-child(3) { --x: 13%; --y: 37%;  --w: 9.5%; --r: 4deg;  --d: .75; --k: 5; --fd: 7.4s; z-index: 2; }
  :root .hero .showcase-row:not(.showcase-row--r) .sc-card:nth-child(4) { --x: 1.5%; --y: 45%; --w: 11%;  --r: -3deg; --d: 1;   --k: 2; --fd: 6.8s; z-index: 3; }
  :root .hero .showcase-row:not(.showcase-row--r) .sc-card:nth-child(5) { --x: 4.5%; --y: 73%; --w: 13.5%; --r: 6deg; --d: 1.4; --k: 4; --fd: 7.8s; z-index: 4; }
  :root .hero .showcase-row:not(.showcase-row--r) .sc-card:nth-child(6) { --x: 18%; --y: 72%;  --w: 7%;   --r: -10deg; --d: .35; --k: 6; --fd: 8.8s; }

  :root .hero .showcase-row--r .sc-card { left: auto; right: var(--x); }
  :root .hero .showcase-row--r .sc-card:nth-child(1) { --x: 3%;   --y: 5%;  --w: 12%;  --r: 6deg;  --d: 1.25; --k: 1; --fd: 7.1s; z-index: 4; }
  :root .hero .showcase-row--r .sc-card:nth-child(2) { --x: 16%;  --y: 12%; --w: 7%;   --r: -8deg; --d: .4;  --k: 4; --fd: 8.6s; }
  :root .hero .showcase-row--r .sc-card:nth-child(3) { --x: 1.5%; --y: 40%; --w: 10.5%; --r: 3deg; --d: .95; --k: 3; --fd: 6.6s; z-index: 3; }
  :root .hero .showcase-row--r .sc-card:nth-child(4) { --x: 13.5%; --y: 44%; --w: 8.5%; --r: -5deg; --d: .7; --k: 6; --fd: 7.9s; z-index: 2; }
  :root .hero .showcase-row--r .sc-card:nth-child(5) { --x: 3.5%; --y: 71%; --w: 14%;  --r: -6deg; --d: 1.45; --k: 2; --fd: 7.3s; z-index: 4; }
  :root .hero .showcase-row--r .sc-card:nth-child(6) { --x: 18.5%; --y: 76%; --w: 6.5%; --r: 11deg; --d: .35; --k: 5; --fd: 9s; }
}
@keyframes dv-card-in {
  from { opacity: 0; scale: .55; filter: blur(12px); }
  to   { opacity: 1; scale: 1; }
}
@keyframes dv-float {
  from { transform: translateY(-9px); }
  to   { transform: translateY(9px); }
}

/* ---------- Ниже первого экрана ---------- */

/* Карточки категорий въезжают с поворотом при прокрутке */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    :root .how-num {
      animation: dv-fill linear both;
      animation-timeline: view();
      animation-range: cover 20% cover 50%;
    }
    :root .cta-section h2 {
      animation: dv-rise linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 30%;
    }
  }
}
@keyframes dv-fill {
  from { color: transparent; }
  to   { color: var(--accent); }
}

/* Финальный призыв: переливающийся огнём заголовок */
:root .cta-section h2 {
  background: linear-gradient(100deg, #d6fff6 0%, #9effe6 30%, #4bffca 50%, #9effe6 70%, #d6fff6 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: dv-sheen 6s ease-in-out infinite alternate;
}
@keyframes dv-sheen { to { background-position: 100% 0; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    :root .cta-section h2 { animation: dv-sheen 6s ease-in-out infinite alternate; }
  }
}

@media (prefers-reduced-motion: reduce) {
  :root .hero::before,
  :root .hero .prompt-box::before,
  :root .hero .prompt-box::after,
  :root .hero .sc-card { animation: none !important; }
}

/* Прожектор за курсором — отдельный слой. Раньше это был фон самого .hero с переменными
   --sx/--sy: каждое движение мыши пересчитывало стили всего первого экрана. Вид тот же
   (круг 560px, тот же цвет), но двигается только transform этого слоя. Слой ниже сияния. */
:root .hero .dv-spot {
  position: absolute; left: 0; top: 0;
  width: 1120px; height: 1120px;
  margin: -560px 0 0 -560px;
  z-index: -4;
  pointer-events: none;
  background: radial-gradient(circle closest-side, rgba(91,255,208,.22), transparent 65%);
  will-change: transform;
}

/* На сенсорных экранах размытое свечение под полем не вращаем: крутящийся conic-gradient
   под blur(40px) видеокарта телефона перерисовывает каждый кадр. Свечение остаётся на месте,
   огонь по рамке (::before) бежит как раньше. */
@media (hover: none) and (pointer: coarse) {
  :root .hero .prompt-box::after { animation: none; --dv-ang: 250deg; }
}

/* =====================================================================
   ДИЗАЙН «КВАЗАР» (03.10.2026): мятная палитра, тёмный космос в первом экране,
   за заголовком — квазар (диск, ядро, луч), работ вокруг заголовка нет.
   Включается классом :root — его ставит home.js. Тексты и теги не меняются.
   ===================================================================== */
html {
  --qz-mint: #4affce;
  --qz-mint-2: #8effeb;
  --qz-ice: #d3fff9;
  --qz-deep: #020d0b;
}

/* ---------- Сцена: глубокий космос вместо тёплого сияния ---------- */
:root .hero {
  background:
    radial-gradient(60% 50% at 50% 46%, rgba(74,255,206,.10), transparent 70%),
    radial-gradient(120% 90% at 50% 120%, #04201a, transparent 60%),
    var(--qz-deep);
}
:root .hero::before { opacity: .45; }
:root .hero::after {
  background:
    radial-gradient(34% 30% at 50% 48%, rgba(2,13,11,.55), transparent 80%),
    radial-gradient(rgba(220,255,248,.55) 1px, transparent 1.4px) 0 0 / 97px 89px,
    radial-gradient(rgba(220,255,248,.32) 1px, transparent 1.3px) 31px 47px / 61px 73px,
    radial-gradient(rgba(255,255,255,.9) 1.3px, transparent 1.9px) 13px 19px / 233px 197px;
}
:root .hero .dv-spot { background: radial-gradient(circle closest-side, rgba(74,255,206,.14), transparent 65%); }

/* Работ вокруг заголовка нет — только квазар  */
:root .hero .showcase:not(.showcase--interactive) { display: none; }

/* Мерцающие звёзды — отдельный слой, меняется только opacity */
:root .qz-wrap {
  position: absolute; inset: 0;
  z-index: -2;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
:root .qz-twinkle {
  position: absolute; inset: 0;
  background:
    radial-gradient(rgba(255,255,255,.95) 1.2px, transparent 1.8px) 57px 103px / 173px 151px,
    radial-gradient(rgba(142,255,235,.9) 1.1px, transparent 1.7px) 121px 29px / 211px 263px;
  animation: qz-twinkle 3.8s ease-in-out infinite alternate;
}
@keyframes qz-twinkle { from { opacity: .15; } to { opacity: 1; } }

/* ---------- Квазар за заголовком ---------- */
:root .qz-quasar {
  position: absolute;
  /* Центр квазара — в первом экране: на страницах с мастером шапка высокая, 47% её высоты уехало бы вниз */
  left: 50%; top: min(47%, 430px);
  width: min(1180px, 112%);
  aspect-ratio: 1;
  translate: -50% -50%;
}
/* Наклон как в логотипе: луч идёт вверх-вправо под ~49°, диск поперёк луча */
:root .qz-tilt { position: absolute; inset: 0; rotate: 41deg; }
:root .qz-flat { position: absolute; inset: 0; scale: 1 .3; }

:root .qz-glow {
  position: absolute; inset: 14%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(74,255,206,.34), rgba(74,255,206,.10) 55%, transparent 75%);
}
:root .qz-ring,
:root .qz-arms {
  position: absolute; inset: 6%;
  border-radius: 50%;
  -webkit-mask: radial-gradient(closest-side, transparent 14%, #000 22%, #000 52%, rgba(0,0,0,.35) 74%, transparent 100%);
          mask: radial-gradient(closest-side, transparent 14%, #000 22%, #000 52%, rgba(0,0,0,.35) 74%, transparent 100%);
  will-change: transform;
}
:root .qz-ring {
  background: conic-gradient(from 0deg,
    rgba(74,255,206,.22) 0deg, rgba(74,255,206,.55) 38deg, rgba(211,255,249,.95) 70deg, rgba(74,255,206,.4) 118deg,
    rgba(74,255,206,.2) 178deg, rgba(74,255,206,.5) 226deg, rgba(211,255,249,.9) 258deg, rgba(74,255,206,.35) 306deg,
    rgba(74,255,206,.22) 360deg);
  animation: qz-spin 70s linear infinite;
}
/* Рукава спирали: тонкие штрихи, крутятся медленнее и в ту же сторону — диск «закручивается» */
:root .qz-arms {
  inset: 0;
  background: repeating-conic-gradient(from 10deg, rgba(142,255,235,.0) 0deg 9deg, rgba(142,255,235,.22) 11deg, rgba(142,255,235,0) 14deg 23deg);
  opacity: .8;
  animation: qz-spin 140s linear infinite;
}
@keyframes qz-spin { to { rotate: 360deg; } }

/* Тонкие орбиты вокруг ядра — по ним глаз считывает именно диск, а не вспышку */
:root .qz-line {
  position: absolute; inset: 21%;
  border-radius: 50%;
  border: 1.5px solid rgba(142,255,235,.42);
  box-shadow: 0 0 18px rgba(74,255,206,.25), inset 0 0 18px rgba(74,255,206,.18);
}
:root .qz-line + .qz-line { inset: 33%; border-color: rgba(211,255,249,.5); }


:root .qz-core {
  position: absolute; left: 50%; top: 50%;
  width: 13%; aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0, #eafffb 14%, rgba(142,255,235,.75) 32%, rgba(74,255,206,.25) 55%, transparent 72%);
  animation: qz-pulse 4.5s ease-in-out infinite alternate;
}
@keyframes qz-pulse { from { scale: .92; opacity: .85; } to { scale: 1.08; opacity: 1; } }

/* Джет — луч поперёк диска, по нему бегут импульсы света */
:root .qz-jet {
  position: absolute; left: 50%; top: 50%;
  width: 3px; height: 240%;
  translate: -50% -50%;
  border-radius: 3px;
  background: linear-gradient(to bottom, transparent 4%, rgba(211,255,249,.55) 30%, #fff 50%, rgba(211,255,249,.55) 70%, transparent 96%);
  box-shadow: 0 0 14px 2px rgba(74,255,206,.45), 0 0 46px 6px rgba(74,255,206,.18);
  overflow: hidden;
}
:root .qz-jet::before,
:root .qz-jet::after {
  content: '';
  position: absolute; left: -2px; right: -2px;
  height: 7%;
  background: linear-gradient(to bottom, transparent, #fff, transparent);
  animation: qz-shot 3.2s cubic-bezier(.5,0,.5,1) infinite;
}
:root .qz-jet::after { animation-delay: -1.6s; animation-direction: reverse; }
@keyframes qz-shot { from { top: 50%; opacity: 1; } to { top: 0%; opacity: 0; } }

/* ---------- Заголовок: космический шрифт, лёгкое свечение ---------- */
:root .hero h1 {
  font-family: 'Unbounded', var(--font-display);
  font-weight: 700;
  letter-spacing: -0.035em;
  color: #effffb;
  text-shadow: 0 0 42px rgba(74,255,206,.28);
}
:root .hero h1 .hl {
  line-height: 1.05;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset, 0 10px 50px -8px rgba(74,255,206,.75);
  text-shadow: none;
}
:root .hero .eyebrow {
  background: rgba(74,255,206,.07);
  border-color: rgba(74,255,206,.3);
  color: var(--qz-ice);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
}
:root .hero .eyebrow i { box-shadow: 0 0 0 0 rgba(74,255,206,.7); animation: qz-ping 2s ease-out infinite; }
@keyframes qz-ping { to { box-shadow: 0 0 0 9px rgba(74,255,206,0); } }
:root .hero-sub { color: rgba(222,255,249,.72); }

/* Поле запроса — стекло над квазаром */
:root .hero .prompt-box {
  background: rgba(4,24,20,.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
          backdrop-filter: blur(18px) saturate(1.3);
}

@media (min-width: 1180px) {
  :root .hero h1 { font-size: clamp(48px, 4.4vw, 80px); max-width: 11em; line-height: 1.12; }

  /* Текст и поле — над квазаром */
  :root .hero > .eyebrow,
  :root .hero > h1,
  :root .hero > .hero-sub,
  :root .hero > .prompt-box,
  :root .hero > .result { position: relative; z-index: 3; }
}

@media (max-width: 1179px) {
  :root .qz-quasar { top: min(30%, 260px); width: 170%; }
  /* Unbounded широкий: на телефоне «изображений» иначе не влезает в строку */
  :root .hero h1 { font-size: clamp(26px, 8.4vw, 46px); line-height: 1.14; }
}

@media (prefers-reduced-motion: reduce) {
  :root .qz-ring, :root .qz-arms, :root .qz-core,
  :root .qz-jet::before, :root .qz-jet::after, :root .qz-twinkle { animation: none; }
}

/* ---------- /fotosessiya: альбомы на первом экране (09.10.2026) ----------
   Юзер: «чтобы при заходе на страницу сразу можно было работать». Только у страниц
   с блоком альбомов (#nf): заголовок и отступы скромнее, альбомы мельче — 6 в ряд. */
.hero:has(#nf) { padding-top: 44px; }
.hero:has(#nf) h1 { font-size: clamp(34px, 3.4vw, 58px); line-height: 1; max-width: 20em; }
.hero:has(#nf) .hero-sub { max-width: 860px; font-size: 16px; margin-top: 10px; }
.hero:has(#nf) .nf { margin-top: 16px; }
.hero:has(#nf) .nf-head { margin: 14px 0 10px; }
@media (min-width: 1101px) {
  .hero:has(#nf) .nf-albums { grid-auto-columns: calc((100% - 60px) / 6); gap: 12px; }
  .hero:has(#nf) .nf-album-cap { padding: 24px 10px 8px; }
  .hero:has(#nf) .nf-album-cap b { font-size: 13px; }
  .hero:has(#nf) .nf-album-cap span { font-size: 11px; }
}
/* Переключатель «Женская / Мужская / Парная» — компактнее (юзер 09.10: «меньше делай») */
.hero:has(#nf) .nf-gender { gap: 6px; margin-bottom: 8px; }
.hero:has(#nf) .nf-g { padding: 5px 12px; font-size: 12.5px; }
