/* Site-wide effects (static/fx.js, every page built on base.html): a
   living background, light that follows the pointer on cards, covers and
   tiles leaning towards it, sections coming in as they scroll into view,
   transitions between pages, buttons that shine. Nothing here changes how
   an element is laid out or positioned: the effects ride on their own
   properties (translate, a lit edge, an extra layer), so a page's own hover
   lifts, menus and layouts stay exactly as they were. Motion reduced: none
   of it moves (the stylesheet's own rule, and fx.js checks). */

/* ---- the background: a little grain over the sky (night.css draws the sky) ---------- */
.fx-aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fx-grain { position: absolute; inset: 0; opacity: 0.04; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* The pointer's own soft light, over the background only. */
.fx-cursor { position: fixed; top: -300px; left: -300px; z-index: -1; width: 600px; height: 600px; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 13%, transparent), transparent); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .fx-grain { opacity: 0.03; }
  :root:not([data-theme="dark"]) .fx-cursor { opacity: 0.6; }
}
:root[data-theme="light"] .fx-grain { opacity: 0.03; }
:root[data-theme="light"] .fx-cursor { opacity: 0.6; }

/* ---- cards: light under the pointer, a lit edge ---------------------------- */
/* Small self-contained cards get a light that follows the pointer (a layer
   of their own, fx.js); the big panels only a lit edge -- their layout and
   their menus are left alone. */
.fx-glow { position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.35s; background: radial-gradient(420px circle at var(--fx-x, 50%) var(--fx-y, 0%), color-mix(in srgb, var(--accent) 10%, transparent), transparent 46%); }
.fx-glow::before { content: ""; position: absolute; inset: 0; padding: 1px; border-radius: inherit; background: radial-gradient(220px circle at var(--fx-x, 50%) var(--fx-y, 0%), color-mix(in srgb, var(--accent-text) 80%, transparent), transparent 64%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.fx-lit > .fx-glow { opacity: 1; }
.fx-host { position: relative; }
.fx-ripple-host { overflow: hidden; }
.fx-on .card { transition: border-color 0.35s, box-shadow 0.35s; }
.fx-on .card:hover { border-color: color-mix(in srgb, var(--accent) 26%, var(--border)); }

/* ---- covers and tiles leaning towards the pointer ---------------------------- */
/* Only while the pointer is over them (fx-leaning): at rest they're flat, so
   their text stays sharp, and their own hover lift is kept (--fx-lift). */
html.fx-on .fx-leaning { transform: perspective(900px) rotateX(var(--fx-rx, 0deg)) rotateY(var(--fx-ry, 0deg)) translateY(var(--fx-lift, -3px)); transition: box-shadow 0.25s, filter 0.25s; }
.fx-glare { position: absolute; inset: 0; z-index: 1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.35s; background: radial-gradient(circle at var(--fx-gx, 50%) var(--fx-gy, 50%), rgb(255 255 255 / 0.26), transparent 58%); mix-blend-mode: soft-light; }
.fx-leaning > .fx-glare { opacity: 1; }
.song-cover, .artist-pic, .artist-hero-pic { --fx-lift: 0px; }
.plan { --fx-lift: -6px; }
.feature { --fx-lift: -4px; }

/* ---- coming in as they scroll into view ------------------------------------ */
/* With translate, not transform: nothing else an element does is touched. */
.fx-on .fx-reveal { opacity: 0; translate: 0 26px; }
.fx-on .fx-reveal.is-in { opacity: 1; translate: none; transition: opacity 0.7s ease, translate 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--fx-delay, 0s); }

/* ---- the top bar: glass that thickens as the page scrolls; where you are ---- */
.topbar { view-transition-name: fx-topbar; transition: background 0.3s, box-shadow 0.3s; }
.topbar.is-scrolled { background: color-mix(in srgb, var(--bg) 72%, transparent); box-shadow: 0 10px 30px rgb(0 0 0 / 0.28); }
.topbar-link { position: relative; transition: color 0.2s, background 0.2s; }
.topbar-link.is-current { color: var(--text); }
.topbar-link.is-current::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-text)); box-shadow: 0 0 12px var(--accent); }
.brand img { transition: transform 0.6s cubic-bezier(0.3, 1.6, 0.5, 1); }
.brand:hover img { transform: rotate(-14deg) scale(1.1); }
/* A thin bar while the next page loads. */
.fx-loader { position: fixed; top: 0; left: 0; z-index: 200; width: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-text), #b98cff); box-shadow: 0 0 14px var(--accent); pointer-events: none; opacity: 0; transition: opacity 0.3s; }
.fx-loading .fx-loader { opacity: 1; animation: fx-load 2.4s cubic-bezier(0.1, 0.7, 0.2, 1) forwards; }
@keyframes fx-load { to { width: 86%; } }

/* ---- buttons: a shine across on hover, a ripple where pressed --------------- */
.btn-primary, .plan-join { position: relative; overflow: hidden; }
.btn-primary::after, .plan-join::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(110deg, transparent 32%, rgb(255 255 255 / 0.38) 50%, transparent 68%); transform: translateX(-130%); }
.btn-primary:hover::after, .plan-join:hover::after { transform: translateX(130%); transition: transform 0.75s ease; }
.fx-ripple { position: absolute; z-index: 3; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; pointer-events: none; background: rgb(255 255 255 / 0.45); animation: fx-ripple 0.6s ease-out forwards; }
@keyframes fx-ripple { to { transform: scale(var(--fx-r, 30)); opacity: 0; } }

/* ---- headlines with a sheen; titles too long for their place scroll -------- */
/* The landing's headline only: everywhere else one word gleams (style.css: .shine, the pages' hero). */
.hero h1 { background: linear-gradient(100deg, var(--text) 30%, var(--accent-text) 46%, #fff 50%, var(--accent-text) 54%, var(--text) 70%) 0 0 / 260% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: fx-sheen 7s ease-in-out infinite; }
@keyframes fx-sheen { 0%, 30% { background-position: 100% 0; } 70%, 100% { background-position: 0 0; } }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .hero h1 { background-image: linear-gradient(100deg, var(--text) 30%, var(--accent) 46%, var(--accent-edge) 50%, var(--accent) 54%, var(--text) 70%); }
}
:root[data-theme="light"] .hero h1 { background-image: linear-gradient(100deg, var(--text) 30%, var(--accent) 46%, var(--accent-edge) 50%, var(--accent) 54%, var(--text) 70%); }
.fx-scroll { text-overflow: clip !important; animation: fx-marquee var(--fx-time, 10s) ease-in-out 1.5s infinite alternate; }
@keyframes fx-marquee { 0%, 12% { text-indent: 0; } 88%, 100% { text-indent: calc(-1 * var(--fx-shift, 0px)); } }

/* The landing page's player floats. */
.mock-stage { animation: fx-float 7s ease-in-out infinite; }
@keyframes fx-float { 50% { translate: 0 -10px; } }

/* ---- between pages: the content slides, the bars stay ---------------------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: fx-page-out 0.18s ease-in both; }
::view-transition-new(root) { animation: fx-page-in 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
::view-transition-group(fx-topbar), ::view-transition-group(fx-player) { animation-duration: 0.3s; }
@keyframes fx-page-out { to { opacity: 0; } }
@keyframes fx-page-in { from { opacity: 0; translate: 0 10px; } }
.player-bar { view-transition-name: fx-player; }
/* From one dashboard page to the next without a reload (static/nav.js):
   only the page moves -- the background, the top bar and the player stay
   as they are, over it. */
.page { view-transition-name: fx-page; }
:root.fx-swapping::view-transition-old(root), :root.fx-swapping::view-transition-new(root) { animation: none; }
:root.fx-swapping::view-transition-group(fx-page) { animation: none; }
::view-transition-old(fx-page) { animation: fx-page-out 0.14s ease-in both; }
::view-transition-new(fx-page) { animation: fx-page-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
::view-transition-group(fx-topbar), ::view-transition-group(fx-player) { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .fx-on .fx-reveal { opacity: 1; translate: none; }
  .fx-cursor { display: none; }
}
