/* ============================================================
   Богатые анимации (подключается только при MOTION: "rich")
   ============================================================ */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ---------- небо и лучи ---------- */
.sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero .aurora, .hero__glow {
  transform: translate3d(calc(var(--px, 0) * -40px), calc(var(--py, 0) * -24px), 0);
  transition: transform .8s var(--ease);
}
.aurora__curtain {
  position: absolute; top: -12%; height: 72%;
  mix-blend-mode: screen; filter: blur(5px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 55%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 55%, transparent);
  transform-origin: top center;
  animation: curtain 23s ease-in-out infinite alternate;
}
.aurora__curtain--a { left: -8%; width: 62%;
  background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(63,182,139,.55) 16px 18px, transparent 22px 34px, rgba(63,182,139,.3) 36px 37px, transparent 40px 52px); }
.aurora__curtain--b { left: 30%; width: 50%; animation-duration: 31s; animation-delay: -9s;
  background: repeating-linear-gradient(90deg, transparent 0 18px, rgba(124,107,214,.45) 20px 21px, transparent 25px 40px, rgba(46,143,168,.4) 42px 44px, transparent 48px 60px); }
.aurora__curtain--c { left: 58%; width: 52%; animation-duration: 41s; animation-delay: -17s;
  background: repeating-linear-gradient(90deg, transparent 0 12px, rgba(46,143,168,.5) 14px 16px, transparent 20px 30px, rgba(63,182,139,.35) 32px 33px, transparent 36px 46px); }
@keyframes curtain {
  0%   { transform: skewX(-18deg) translateX(-6%) scaleY(.9);  opacity: .16; }
  50%  { opacity: .46; }
  100% { transform: skewX(14deg) translateX(8%) scaleY(1.08); opacity: .2; }
}
.fx .hero__glow { animation: glow-drift 26s ease-in-out infinite alternate; }
@keyframes glow-drift { from { opacity: .12; } to { opacity: .24; } }

/* ---------- герой: буквы, дата, остальное ---------- */
.fx .hero__title .ch {
  display: inline-block; opacity: 0;
  transform: translateY(60%) rotate(6deg); filter: blur(8px);
  animation: ch-in .9s var(--ease) forwards;
  animation-delay: calc(var(--i) * 45ms + .15s);
}
@keyframes ch-in { to { opacity: 1; transform: none; filter: none; } }

.fx .hero__date, .fx .hero--aurora .eyebrow {
  background: linear-gradient(90deg, var(--accent), var(--aurora-3), #9C8EE6, var(--accent)) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 9s linear infinite;
}
.fx .hero--aurora .eyebrow .badge { -webkit-text-fill-color: var(--accent); }
@keyframes shimmer { to { background-position: 300% 0; } }

.fx .hero .eyebrow, .fx .hero .back, .fx .hero__date, .fx .hero__sub, .fx .price-row, .fx .hero__cta, .fx .hero__status {
  animation-name: up, shimmer; animation-duration: .9s, 9s; animation-timing-function: var(--ease), linear;
  animation-fill-mode: both, none; animation-iteration-count: 1, infinite;
}
.fx .hero .back, .fx .hero__sub, .fx .price-row, .fx .hero__cta, .fx .hero__status {
  animation-name: up; animation-iteration-count: 1;
}
.fx .hero .back     { animation-delay: .05s; }
.fx .hero .eyebrow  { animation-delay: .1s, 0s; }
.fx .hero__date     { animation-delay: .55s, 0s; }
.fx .hero__sub      { animation-delay: .75s; }
.fx .price-row      { animation-delay: .9s; }
.fx .hero__cta      { animation-delay: 1.05s; }
.fx .hero__status   { animation-delay: 1.2s; }
@keyframes up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- прогресс прокрутки ---------- */
.progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--aurora-3), var(--aurora-2));
  transform: scaleX(0); transform-origin: left;
}
.header:not(.is-stuck) .progress { opacity: 0; }

/* ---------- появление сильнее ---------- */
.fx .reveal { transform: translateY(40px); transition: opacity .8s var(--ease), transform .9s var(--ease); }

.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.w__in { display: inline-block; }
.fx .reveal .w__in { transform: translateY(110%); transition: transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms + .1s); }
.fx .reveal.is-in .w__in { transform: none; }

.fx [data-stagger] > * {
  opacity: 0; transform: translateY(28px) scale(.97);
  transition: opacity .7s var(--ease), transform .8s var(--ease), border-color .3s, background-color .3s, box-shadow .3s, color .3s;
  transition-delay: calc(var(--i, 0) * 90ms + .15s);
}
.fx .is-in [data-stagger] > *, .fx [data-stagger].is-in > * { opacity: 1; transform: none; }
.fx [data-stagger].settled > * { transition-delay: 0s; transition-duration: .7s, .35s, .3s, .3s, .3s, .3s; }
.fx .book__inside li.is-off { opacity: .75; }

/* ---------- подсветка карточек ---------- */
.fx .tcard::after, .fx .fact::after, .fx .tariff::after, .fx .book__right::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .35s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%);
}
.fx .tcard:hover::after, .fx .fact:hover::after, .fx .tariff:hover::after, .fx .book__right:hover::after { opacity: 1; }
.tariff, .book__right { position: relative; }
.fx .tcard:hover { box-shadow: 0 30px 70px -30px color-mix(in srgb, var(--accent) 55%, transparent); }

/* бегущая рамка у выбранного тарифа и открытой карточки */
.fx .tariff.is-on::before, .fx .tcard:hover::before {
  content: ""; position: absolute; inset: -1px; z-index: 3; padding: 1px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from var(--ang), transparent 0 55%, var(--accent), var(--aurora-3), var(--aurora-2), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin-ang 4s linear infinite;
}
@keyframes spin-ang { to { --ang: 360deg; } }
.fx .tcard__art { transition: transform 1.2s var(--ease); }
.fx .tcard:hover .tcard__art { transform: scale(1.08) translateX(-2%); }

/* ---------- маршрут: линия рисуется сверху вниз ---------- */
.fx .route::before { transform: scaleY(0); transition: transform 2s cubic-bezier(.7, 0, .2, 1) .3s; }
.fx .route.is-in::before { transform: scaleY(1); }
.fx .route.is-in .route__n { animation: ring 2.4s ease-out both; animation-delay: calc(var(--i, 0) * 260ms + .6s); }
@keyframes ring {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  60%, 100% { box-shadow: 0 0 0 14px transparent; }
}
.fx .route__day:hover .route__n { background: var(--accent); color: #07110D; transition: background-color .3s, color .3s; }

/* ---------- честный блок ---------- */
.fx .honest { border-left-color: transparent; }
.fx .honest::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -3px; width: 3px;
  background: linear-gradient(var(--alert), #E0A94A);
  transform: scaleY(0); transform-origin: top; transition: transform 1.2s cubic-bezier(.7, 0, .2, 1) .2s;
}
.fx .honest.is-in::before { transform: scaleY(1); }
.fx .honest p { opacity: 0; transform: translateY(14px); transition: opacity .8s, transform .8s var(--ease); }
.fx .honest.is-in p { opacity: 1; transform: none; }
.fx .honest.is-in p:nth-of-type(1) { transition-delay: .35s; }
.fx .honest.is-in p:nth-of-type(2) { transition-delay: .6s; }
.fx .honest.is-in p:nth-of-type(3) { transition-delay: .85s; }

/* ---------- кнопки ---------- */
.fx .btn--primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-20deg); animation: shine 4.8s ease-in-out infinite;
}
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.fx .btn--primary:hover { box-shadow: 0 12px 40px -10px color-mix(in srgb, var(--accent) 80%, transparent); }
.fx .hero__cta .btn--primary, .fx .book__right .btn--primary, .fx .sticky-book .btn--primary { animation: pulse 2.8s infinite; }
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); }
  70%, 100% { box-shadow: 0 0 0 18px transparent; }
}


/* ---------- свечение за курсором ---------- */
.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 2; width: 560px; height: 560px; margin: -280px 0 0 -280px;
  border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 10%, transparent), rgba(124, 107, 214, .05) 55%, transparent);
}

/* ---------- уменьшить движение ---------- */
@media (prefers-reduced-motion: reduce) {
  .aurora__curtain, .hero__glow, .fx .hero__date, .fx .hero--aurora .eyebrow, .fx .btn--primary::after,
  .fx .hero__cta .btn--primary, .fx .book__right .btn--primary, .fx .sticky-book .btn--primary,
  .fx .tariff.is-on::before, .fx .tcard:hover::before, .fx .route.is-in .route__n { animation: none; }
  .fx .hero__title .ch, .fx .hero .eyebrow, .fx .hero .back, .fx .hero__sub, .fx .price-row, .fx .hero__cta, .fx .hero__status {
    animation: none; opacity: 1; transform: none; filter: none;
  }
  .fx .reveal, .fx .reveal .w__in, .fx [data-stagger] > *, .fx .honest p { opacity: 1; transform: none; transition: none; }
  .fx .route::before, .fx .honest::before { transform: none; transition: none; }
  .hero .aurora, .hero__glow { transform: none; }
}
