/* Спільний рух бренду (Studio Black). Підключати після tokens.css. Усе вимикається при prefers-reduced-motion. */

/* Живий фон: дві повільні аури + тонкий шум */
.aura { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aura::before, .aura::after {
  content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(80px); opacity: .32;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  animation: aura-a 22s ease-in-out infinite alternate;
}
.aura::before { top: -45vmax; left: -20vmax; }
.aura::after { bottom: -55vmax; right: -30vmax; opacity: .18; background: radial-gradient(circle, #9fb8ff 0%, transparent 60%);
  animation: aura-b 28s ease-in-out infinite alternate; }
@keyframes aura-a { to { transform: translate(18vmax, 10vmax) scale(1.15); } }
@keyframes aura-b { to { transform: translate(-14vmax, -12vmax) scale(.9); } }
.noise { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* Хромовий текст із відблиском, що пробігає */
.chrome-shine { background: linear-gradient(100deg, #8a93a0 0%, #ffffff 18%, #9aa3ad 32%, #e9edf3 48%, #7d8794 62%, #ffffff 80%, #9aa3ad 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 7s linear infinite; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }

/* Поява при прокрутці: додай .reveal, JS ставить .in (стаґер через --i) */
.reveal { opacity: 0; }
.reveal.in { opacity: 1; animation: rv .65s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rv { from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(4px); } }

/* Рамка, що світиться за курсором: елемент з .glow, JS ставить --mx/--my */
.glow { position: relative; isolation: isolate; }
.glow::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(127,180,255,.9), rgba(61,139,255,.25) 35%, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .35s var(--ease); }
.glow::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(61,139,255,.10), transparent 60%);
  opacity: 0; transition: opacity .35s var(--ease); }
.glow:hover::after, .glow:hover::before, .glow:focus-within::after { opacity: 1; }

/* Хромова кнопка з відблиском при наведенні */
.sheen { position: relative; overflow: hidden; }
.sheen::after { content: ""; position: absolute; top: -50%; left: -60%; width: 40%; height: 200%; transform: rotate(25deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); transition: left .7s var(--ease); pointer-events: none; }
.sheen:hover::after { left: 130%; }

/* Пружне натискання */
.press { transition: transform .25s var(--ease); }
.press:active { transform: scale(.94); }

@media (prefers-reduced-motion: reduce) {
  .aura::before, .aura::after, .chrome-shine { animation: none; }
  .reveal, .reveal.in { opacity: 1; animation: none; }
  .sheen::after { display: none; }
}
