/**
 * Hublogic Studio — shared UI tokens and chrome for all Hublogic products.
 * Sync: scripts/sync-hublogic-studio-css.py → marketing, GameRocket, Soundship, Showtime.
 */
:root {
  --theme-color: #000000;
  --bg: #000000;
  --bg-elevated: rgba(28, 28, 32, 0.62);
  --bg-surface: rgba(255, 255, 255, 0.045);
  --bg-surface-alt: rgba(255, 255, 255, 0.075);
  --text: #a1a1a1;
  --text-light: #ededed;
  --text-grey: #8f8f8f;
  --border: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(255, 255, 255, 0.3);
  --accent: #ededed;
  --accent-light: #ffffff;
  --accent-on: #000000;
  --accent-soft: rgba(255, 255, 255, 0.1);
  --accent-glow: rgba(255, 255, 255, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.36), 0 0 0 1px rgba(255, 255, 255, 0.16);
  /* Glass — frosted panels on navy */
  /* Specular rim: bright top edge, soft inner glow, faint bottom lip */
  --glass-spec: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  --glass-blur: 16px;
  --glass-blur-sm: 12px;
  --glass-saturate: 140%;
  --glass-fill: rgba(255, 255, 255, 0.04);
  --glass-fill-strong: rgba(255, 255, 255, 0.09);
  --glass-fill-card: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-highlight: rgba(255, 255, 255, 0.22);
  --glass-shadow: var(--glass-spec), 0 4px 24px rgba(0, 0, 0, 0.3);
  --glass-shadow-elevated: var(--glass-spec), 0 10px 36px rgba(0, 0, 0, 0.42);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --wash: radial-gradient(980px 420px at 50% -120px, rgba(255, 255, 255, 0.07), transparent 72%);
  --btn-sheen: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  /* Motion — Apple-like: fast out, gentle spring on press */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --ease-spring: cubic-bezier(0.34, 1.28, 0.64, 1);
  --ease: var(--ease-out);
  --motion-fast: 160ms;
  --motion-medium: 380ms;
  --motion-slow: 620ms;
  --font: Manrope, system-ui, sans-serif;
}

@keyframes studio-fade-up {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes studio-scale-in {
  from {
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

html {
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: var(--bg);
  background-image: var(--wash);
}

body {
  background-color: transparent;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--text);
}

::selection {
  background: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.studio-glass {
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .studio-glass {
    -webkit-backdrop-filter: blur(var(--glass-blur-sm)) saturate(var(--glass-saturate));
    backdrop-filter: blur(var(--glass-blur-sm)) saturate(var(--glass-saturate));
  }
}

/* —— Shared page shell —— */
.frame,
.studio-shell {
  position: relative;
  z-index: 1;
}

.studio-shell.wrap,
.studio-shell.wrap.wide {
  margin-left: auto;
  margin-right: auto;
  padding: 28px clamp(20px, 5vw, 72px) 64px;
}

@media (prefers-reduced-motion: no-preference) {
  .wrap:not(.no-motion-in),
  .frame.studio-shell {
    animation: studio-fade-up var(--motion-medium) var(--ease-out) both;
    animation-delay: 35ms;
  }
}

.wrap:not(.wide) {
  max-width: 420px;
  margin: 0 auto;
}

.wrap.wide {
  max-width: 1080px;
  margin: 0 auto;
}

.studio-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 28px;
  padding: 0 0 16px;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

@media (prefers-reduced-motion: no-preference) {
  .studio-header:not(.showtime-header) {
    animation: studio-fade-up var(--motion-medium) var(--ease-out) both;
  }
}

.studio-header.has-search {
  grid-template-columns: auto minmax(180px, 1fr) auto;
}

.studio-header .brand,
.studio-header .mark {
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: -0.04em;
  font-size: 17px;
  text-decoration: none;
}

.studio-header .brand:hover,
.studio-header .mark:hover {
  color: var(--accent-light);
}

.hublogic-products {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 16px;
  font-size: 12px;
  font-weight: 500;
}

.hublogic-products a {
  color: var(--text-grey);
  text-decoration: none;
  padding: 4px 2px;
  transition:
    color var(--motion-fast) var(--ease-out),
    opacity var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
}

@media (hover: hover) {
  .hublogic-products a:hover {
    transform: translate3d(0, -1px, 0);
  }
}

.hublogic-products a:hover {
  color: var(--accent-light);
}

.hublogic-products a[aria-current='page'] {
  color: var(--accent);
  font-weight: 600;
}

.studio-header .nav,
.studio-header nav.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 4px 4px;
}

@media (max-width: 900px) {
  .studio-header,
  .studio-header.has-search {
    grid-template-columns: 1fr;
  }
  .studio-header .nav,
  .studio-header nav.nav {
    justify-content: flex-start;
  }
}

.top,
header.top,
.frame > .top {
  padding-bottom: 14px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.brand,
.mark {
  font-weight: 600;
  letter-spacing: -0.04em;
  font-size: 17px;
  transition:
    color var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
}

h1 {
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.12;
  color: var(--text-light);
}

h2,
.side-title,
.section-title {
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}

.nav a,
nav a,
.links a,
.nav-btn {
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  transition:
    color var(--motion-fast) var(--ease-out),
    background var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
}

@media (hover: hover) {
  .nav a:hover,
  nav a:hover,
  .links a:hover {
    transform: translate3d(0, -1px, 0);
  }
}

.nav a:hover,
nav a:hover,
.links a:hover,
.brand:hover,
.mark:hover {
  color: var(--accent-light);
}

.nav a.on,
nav a.on,
.nav-btn.on {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}

.track-card,
.game-card,
.product-card,
.card,
form.card {
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  box-shadow: none;
  background: var(--glass-fill-card);
  transition:
    box-shadow var(--motion-medium) var(--ease-out),
    border-color var(--motion-fast) var(--ease-out),
    transform var(--motion-medium) var(--ease-out),
    background var(--motion-medium) var(--ease-out);
}

@media (hover: hover) {
  .game-card:hover,
  .product-card:hover,
  .track-card:hover,
  .card:hover {
    box-shadow: none;
    border-color: var(--border-accent);
    background: var(--glass-fill-card);
    transform: none;
  }
}

button,
.btn,
.hero-actions a,
.hero-actions .primary,
.play-link {
  font-weight: 500;
  letter-spacing: 0;
}

button,
.btn,
.hero-actions a,
.hero-actions .primary,
.play-link,
.nav-btn,
.tabs a,
.tabs button.tab-chip,
.filters a,
.filters button {
  transition:
    background var(--motion-fast) var(--ease-out),
    border-color var(--motion-fast) var(--ease-out),
    color var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-medium) var(--ease-out),
    transform var(--motion-fast) var(--ease-spring);
}

@media (hover: hover) {
  button:hover,
  .btn:hover,
  .nav-btn:hover {
    transform: translate3d(0, -1px, 0);
  }
  .btn-primary:hover,
  .hero-actions .primary:hover,
  .play-link:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    color: var(--accent-on);
  }
}

.btn-primary,
.hero-actions .primary,
.play-link {
  box-shadow: var(--btn-sheen);
}

button:active,
.btn:active,
.nav-btn:active,
.tabs button.tab-chip:active,
.filters button:active {
  transform: scale(0.97);
  transition-duration: 90ms;
}

button:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input,
select,
textarea {
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass-fill-card);
  transition:
    border-color var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-medium) var(--ease-out),
    transform var(--motion-fast) var(--ease-out),
    background var(--motion-fast) var(--ease-out);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.tabs a,
.tabs button.tab-chip,
.filters a,
.filters button {
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: transparent;
}

.nav-btn {
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
}

.tabs a.on,
.tabs button.tab-chip.on,
.filters a.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-on);
  box-shadow: var(--btn-sheen);
}

.nav-btn.on {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

.btn-ghost,
button.ghost,
.filters a:not(.on),
.filters button:not(.on) {
  background: transparent;
}

.hint,
.meta,
.fine,
.site-foot {
  color: var(--text-grey);
}

.err { color: var(--danger); }
.ok { color: var(--ok); }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .studio-glass,
  .studio-header,
  .showtime-header,
  .track-card,
  .game-card,
  .product-card,
  .card,
  form.card,
  input,
  select,
  textarea {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #141416;
  }
}

/* ==========================================================================
   Studio motion layer — neutral theme polish (CSS only, no JS required)
   ========================================================================== */

@keyframes studio-blur-in {
  from { opacity: 0; filter: blur(14px); transform: translate3d(0, 10px, 0); }
  to   { opacity: 1; filter: blur(0);    transform: translate3d(0, 0, 0); }
}

@keyframes studio-reveal {
  from { opacity: 0; transform: translate3d(0, 28px, 0) scale(0.98); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

@keyframes studio-aurora {
  0%   { transform: translate3d(-6%, 0, 0) scale(1); opacity: 0.55; }
  50%  { transform: translate3d(6%, 4%, 0) scale(1.12); opacity: 0.85; }
  100% { transform: translate3d(-6%, 0, 0) scale(1); opacity: 0.55; }
}

@keyframes studio-sheen {
  from { background-position: 160% 0; }
  to   { background-position: -60% 0; }
}

@keyframes studio-line-grow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Ambient aurora + fine grid behind everything */
html:not(.ss-busy)::before {
  content: '';
  position: fixed;
  inset: -20vh -10vw auto -10vw;
  height: 70vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 60% at 30% 30%, rgba(255, 255, 255, 0.07), transparent 70%),
    radial-gradient(35% 55% at 72% 20%, rgba(255, 255, 255, 0.05), transparent 70%);
  filter: blur(30px);
  animation: studio-aurora 18s var(--ease-in-out) infinite;
}

html::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 55% at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(70% 55% at 50% 0%, #000 0%, transparent 78%);
}

body { position: relative; z-index: 1; }

@media (prefers-reduced-motion: no-preference) {
  /* Headline: blur-to-sharp entrance */
  h1 {
    animation: studio-blur-in 900ms var(--ease-out) 80ms backwards;
  }

  /* Staggered entrance for direct children of the main containers */
  :is(main, .wrap, .studio-shell) > :is(p, h2, section, form, div, nav, ul, article, a, main):not(.no-stagger) {
    animation: studio-fade-up 700ms var(--ease-out) backwards;
  }
  :is(main, .wrap, .studio-shell) > :nth-child(1) { animation-delay: 60ms; }
  :is(main, .wrap, .studio-shell) > :nth-child(2) { animation-delay: 130ms; }
  :is(main, .wrap, .studio-shell) > :nth-child(3) { animation-delay: 200ms; }
  :is(main, .wrap, .studio-shell) > :nth-child(4) { animation-delay: 270ms; }
  :is(main, .wrap, .studio-shell) > :nth-child(5) { animation-delay: 340ms; }
  :is(main, .wrap, .studio-shell) > :nth-child(6) { animation-delay: 410ms; }
  :is(main, .wrap, .studio-shell) > :nth-child(n + 7) { animation-delay: 480ms; }

  /* Card grids: cascade in */
  :is(.products, .grid, .cards) > * {
    animation: studio-scale-in 640ms var(--ease-out) backwards;
  }
  :is(.products, .grid, .cards) > :nth-child(1) { animation-delay: 120ms; }
  :is(.products, .grid, .cards) > :nth-child(2) { animation-delay: 180ms; }
  :is(.products, .grid, .cards) > :nth-child(3) { animation-delay: 240ms; }
  :is(.products, .grid, .cards) > :nth-child(4) { animation-delay: 300ms; }
  :is(.products, .grid, .cards) > :nth-child(5) { animation-delay: 360ms; }
  :is(.products, .grid, .cards) > :nth-child(6) { animation-delay: 420ms; }
  :is(.products, .grid, .cards) > :nth-child(n + 7) { animation-delay: 480ms; }

  /* Header hairline draws itself */
  .studio-header { position: relative; border-bottom-color: transparent; }
  .studio-header::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--border);
    transform-origin: left center;
    animation: studio-line-grow 900ms var(--ease-out) 150ms backwards;
  }

  /* Cards: lift, brighten border, soft glow */
  .track-card,
  .game-card,
  .product-card,
  .card,
  form.card {
    will-change: transform;
  }
  @media (hover: hover) {
    .game-card:hover,
    .product-card:hover,
    .track-card:hover,
    .card:hover {
      transform: translate3d(0, -3px, 0);
      border-color: var(--border-accent);
      box-shadow: 0 14px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 60px rgba(255, 255, 255, 0.04);
    }
  }

  /* Primary buttons: sheen sweep on hover */
  .btn-primary,
  .hero-actions .primary,
  .play-link,
  button.primary {
    background-image: linear-gradient(110deg, transparent 35%, rgba(0, 0, 0, 0.12) 50%, transparent 65%);
    background-size: 250% 100%;
    background-position: 160% 0;
    background-repeat: no-repeat;
  }
  @media (hover: hover) {
    .btn-primary:hover,
    .hero-actions .primary:hover,
    .play-link:hover,
    button.primary:hover {
      animation: studio-sheen 900ms var(--ease-out);
      transform: translate3d(0, -1px, 0);
    }
  }

  /* Nav pills: soft background wash */
  @media (hover: hover) {
    .nav a:hover,
    nav a:hover,
    .links a:hover {
      background: rgba(255, 255, 255, 0.06);
    }
  }

  /* Scroll-driven reveal where supported (Chromium/Safari); others just show content */
  @supports (animation-timeline: view()) {
    .site-foot,
    .profile,
    .launch-spotlight,
    .play-panel,
    .section-reveal {
      animation: studio-reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html:not(.ss-busy)::before { animation: none; }
}
/* ==========================================================================
   Studio motion layer II — smooth, layered, pointer-aware
   (pairs with hublogic-motion.js; everything degrades gracefully without it)
   ========================================================================== */

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

@keyframes studio-word-in {
  from { opacity: 0; transform: translate3d(0, 0.55em, 0) rotate(2.5deg); filter: blur(10px); }
  to   { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); filter: blur(0); }
}
@keyframes studio-spin { to { --studio-angle: 360deg; } }
@keyframes studio-ripple { from { transform: scale(0); opacity: 0.35; } to { transform: scale(1); opacity: 0; } }
@keyframes studio-vt-out { to { opacity: 0; filter: blur(6px); transform: scale(0.992); } }
@keyframes studio-vt-in  { from { opacity: 0; filter: blur(6px); transform: scale(1.008); } }
@keyframes studio-float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -3px, 0); } }
@keyframes studio-pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.28); } 100% { box-shadow: 0 0 0 12px rgba(255,255,255,0); } }

/* Scroll progress hairline (element injected by hublogic-motion.js) */
.studio-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 9999;
  pointer-events: none;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, rgba(255,255,255,0.15), #fff);
  will-change: transform;
}

/* Click ripple */
.has-ripple { position: relative; overflow: hidden; }
.studio-ripple {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255,255,255,0.55), rgba(255,255,255,0) 65%);
  mix-blend-mode: overlay;
  animation: studio-ripple 650ms var(--ease-out) forwards;
}

/* Split headline words */
.studio-word { display: inline-block; will-change: transform, opacity, filter; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Cross-page transitions: soft blur crossfade (Chromium/Safari; others navigate normally) */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: studio-vt-out 220ms var(--ease-in-out) both; }
  ::view-transition-new(root) { animation: studio-vt-in 380ms var(--ease-out) 60ms both; }

  /* Split headlines replace the single blur-in */
  h1.is-split { animation: none; }
  h1.is-split .studio-word {
    animation: studio-word-in 900ms var(--ease-out) calc(120ms + var(--i, 0) * 75ms) backwards;
  }

  /* Aurora follows the pointer (uses `translate`, independent of the drift animation) */
  html:not(.ss-busy)::before {
    translate: calc(var(--px, 0) * 56px) calc(var(--py, 0) * 32px);
    transition: translate 1400ms var(--ease-out);
  }

  /* Header nav links cascade in */
  .studio-header .nav > *,
  .studio-header nav > * { animation: studio-fade-up 600ms var(--ease-out) backwards; }
  .studio-header .nav > :nth-child(1), .studio-header nav > :nth-child(1) { animation-delay: 220ms; }
  .studio-header .nav > :nth-child(2), .studio-header nav > :nth-child(2) { animation-delay: 280ms; }
  .studio-header .nav > :nth-child(3), .studio-header nav > :nth-child(3) { animation-delay: 340ms; }
  .studio-header .nav > :nth-child(4), .studio-header nav > :nth-child(4) { animation-delay: 400ms; }
  .studio-header .nav > :nth-child(n + 5), .studio-header nav > :nth-child(n + 5) { animation-delay: 460ms; }

  /* Cursor spotlight inside cards (position set by hublogic-motion.js) */
  @media (hover: hover) {
    html :is(.product-card, .game-card, .track-card, .card, .profile):not(.track-card-skeleton):hover {
      background-image: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.075), transparent 62%);
    }
    html .launch-spotlight:hover {
      background-image:
        radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,0.09), transparent 62%),
        linear-gradient(135deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.015) 100%);
    }
  }

  /* Rotating light around featured cards */
  .launch-spotlight,
  .product-card--new { position: relative; }
  .launch-spotlight::before,
  .product-card--new::before {
    content: '';
    position: absolute;
    inset: -1px;
    padding: 1px;
    border-radius: inherit;
    pointer-events: none;
    background: conic-gradient(from var(--studio-angle), transparent 0 62%, rgba(255,255,255,0.7) 82%, transparent 100%);
    -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);
    mask-composite: exclude;
    animation: studio-spin 7s linear infinite;
    opacity: 0.85;
  }

  /* Magnetic primary buttons (offset set by hublogic-motion.js) */
  .btn-primary,
  .hero-actions .primary,
  .play-link {
    translate: var(--tx, 0) var(--ty, 0);
    transition:
      translate 320ms var(--ease-out),
      background var(--motion-fast) var(--ease-out),
      border-color var(--motion-fast) var(--ease-out),
      color var(--motion-fast) var(--ease-out),
      box-shadow var(--motion-medium) var(--ease-out),
      transform var(--motion-fast) var(--ease-spring);
  }
  @media (hover: hover) {
    .btn-primary:hover,
    .hero-actions .primary:hover,
    .play-link:hover {
      box-shadow: 0 10px 36px rgba(255,255,255,0.16), var(--btn-sheen);
    }
  }

  /* Live / status dots breathe */
  .live-dot, .status-dot, .badge-live { animation: studio-pulse-ring 1.8s var(--ease-out) infinite; }

  /* Brand mark gently floats */
  .studio-header .brand, .studio-header .mark { display: inline-block; }
  @media (hover: hover) {
    .studio-header .brand:hover, .studio-header .mark:hover { animation: studio-float 1.6s var(--ease-in-out) infinite; }
  }

  /* Inputs: focus ring blooms */
  input:focus-visible, select:focus-visible, textarea:focus-visible {
    transition: border-color var(--motion-fast) var(--ease-out), box-shadow 420ms var(--ease-out);
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-progress, .studio-ripple { display: none; }
}

/* ==========================================================================
   Liquid glass layer — Vercel-clean black, Apple-style translucent surfaces.
   Panels blur and saturate whatever is behind them, with a specular rim.
   ========================================================================== */

/* Soft colored light behind the glass (kept very low so the page stays black) */
html:not(.ss-busy)::before {
  inset: 0;
  height: 100vh;
  background:
    radial-gradient(34% 40% at 16% 26%, rgba(64, 90, 255, 0.26), transparent 70%),
    radial-gradient(30% 38% at 84% 30%, rgba(168, 85, 247, 0.2), transparent 70%),
    radial-gradient(36% 42% at 66% 78%, rgba(20, 184, 166, 0.16), transparent 70%),
    radial-gradient(28% 34% at 10% 74%, rgba(236, 72, 153, 0.12), transparent 70%);
  filter: blur(46px) saturate(120%);
  opacity: 1;
  animation: studio-orbs 22s var(--ease-in-out) infinite;
}
@keyframes studio-orbs {
  0%, 100% { transform: translate3d(-2%, 0, 0) scale(1); }
  50% { transform: translate3d(2%, 2%, 0) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.ss-busy)::before { animation: none; }
}
html::after { background-image: none; }

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .track-card, .game-card, .product-card, .card, form.card, .profile,
  .launch-spotlight, .play-panel, .studio-glass,
  .studio-header, .tabs, input, select, textarea {
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  }
}

.track-card, .game-card, .product-card, .card, form.card, .profile,
.launch-spotlight, .play-panel, .studio-glass {
  background-color: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow: var(--glass-shadow);
}

/* Floating glass navigation bar */
.studio-header {
  position: sticky;
  top: 12px;
  z-index: 60;
  margin-bottom: 32px;
  padding: 10px 14px 10px 20px;
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  background-color: rgba(18, 18, 22, 0.5);
  box-shadow: var(--glass-spec), 0 10px 40px rgba(0, 0, 0, 0.5);
}
.studio-header::after { display: none; }
@media (max-width: 900px) {
  .studio-header { border-radius: 26px; padding: 10px 16px; }
  .studio-header:not(.has-search) { grid-template-columns: 1fr auto; }
}

/* Pills, tabs, inputs: small pieces of glass */
.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  width: fit-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border-radius: 24px;
  border: 1px solid var(--glass-border);
  background: var(--glass-fill);
  box-shadow: var(--glass-spec);
}
.tabs a, .tabs button.tab-chip, .filters a, .filters button { border-color: transparent; }
.tabs a.on, .tabs button.tab-chip.on, .filters a.on {
  background: rgba(255, 255, 255, 0.92);
  color: #000;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 4px 14px rgba(0, 0, 0, 0.35);
}
.nav a.on, nav a.on, .nav-btn.on {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 2px 10px rgba(0, 0, 0, 0.25);
}

input, select, textarea {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}
input:focus-visible, select:focus-visible, textarea:focus-visible {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(255, 255, 255, 0.1);
}

/* Secondary buttons become glass; primary stays solid white */
.btn-secondary, .btn-ghost, button.ghost, .hero-actions a:not(.primary) {
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-spec);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
}
.btn-secondary:hover, .btn-ghost:hover, button.ghost:hover,
.hero-actions a:not(.primary):hover {
  background-color: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}
.btn-primary, .hero-actions .primary, .play-link {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 22px rgba(0, 0, 0, 0.35);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .btn-primary, .hero-actions .primary, .play-link { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Hover: panels brighten like light catching the glass */
@media (hover: hover) {
  .game-card:hover, .product-card:hover, .track-card:hover, .card:hover {
    background-color: var(--glass-fill-strong);
    border-color: rgba(255, 255, 255, 0.26);
    box-shadow: var(--glass-shadow-elevated);
  }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
  background-clip: content-box;
}

@media (prefers-reduced-transparency: reduce) {
  .studio-header, .tabs, .btn-secondary {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background-color: #141416;
  }
}

/* ==========================================================================
   Smooth pass — keep the look, drop everything that repaints every frame.
   Blur only on a handful of large surfaces; no blur-filter animations,
   no pointer-driven style updates, no per-card compositing layers.
   ========================================================================== */

/* Background light: static soft gradients (no filter, no animation) */
html:not(.ss-busy)::before {
  filter: none;
  animation: none;
  translate: none;
  transition: none;
  will-change: auto;
}

/* Blur only where it earns its cost */
.track-card, .game-card, .product-card, .card, form.card,
input, select, textarea, .btn-secondary, .btn-ghost, button.ghost,
.hero-actions a:not(.primary), .tabs {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.track-card, .game-card, .product-card, .card, form.card {
  background-color: rgba(255, 255, 255, 0.045);
  will-change: auto;
}
.studio-header,
.launch-spotlight, .profile, .play-panel, .studio-glass {
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
}

/* Entrance motion: opacity + translate only (no blur filters) */
@keyframes studio-blur-in {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes studio-word-in {
  from { opacity: 0; transform: translate3d(0, 0.4em, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes studio-vt-out { to { opacity: 0; } }
@keyframes studio-vt-in  { from { opacity: 0; } }
.studio-word { will-change: auto; }

@media (prefers-reduced-motion: no-preference) {
  /* One gentle fade for the page; no per-element staggers */
  :is(main, .wrap, .studio-shell) > :is(p, h2, section, form, div, nav, ul, article, a, main):not(.no-stagger) { animation: none; }
  :is(.products, .grid, .cards) > * { animation: none; }
  .studio-header .nav > *, .studio-header nav > * { animation: none; }
  .studio-header .brand:hover, .studio-header .mark:hover { animation: none; }

  /* Static featured-card edge (the spinning light repainted every frame) */
  .launch-spotlight::before, .product-card--new::before { animation: none; opacity: 0.35; }

  /* No scroll-driven reveals, no cross-page blur transitions */
  .site-foot, .profile, .launch-spotlight, .play-panel, .section-reveal { animation: none; animation-timeline: auto; }
  @view-transition { navigation: none; }

  /* Cards: border brightens, no lift (lifting re-composites the blur beneath) */
  .game-card:hover, .product-card:hover, .track-card:hover, .card:hover { transform: none; }

  /* Primary buttons: plain, no magnetic offset or sweep */
  .btn-primary, .hero-actions .primary, .play-link, button.primary { translate: none; background-image: none; }
  .btn-primary:hover, .hero-actions .primary:hover, .play-link:hover, button.primary:hover { animation: none; }
}

/* ==========================================================================
   Calm pass — one easing, one speed, compositor-only motion.
   Everything below animates transform/opacity/color only (no blur, no layout).
   ========================================================================== */
:root {
  --calm-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --calm-fast: 160ms;
  --calm-med: 260ms;
}

html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
::selection { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* Interactive things share the same quiet transition */
a, button, .btn, .btn-secondary, .btn-ghost, .btn-primary, input, select, textarea,
.track-card, .game-card, .product-card, .card, .tab, .tabs button, .studio-header nav > *, .choice {
  transition:
    color var(--calm-fast) var(--calm-ease),
    background-color var(--calm-fast) var(--calm-ease),
    border-color var(--calm-fast) var(--calm-ease),
    box-shadow var(--calm-med) var(--calm-ease),
    opacity var(--calm-fast) var(--calm-ease),
    transform var(--calm-med) var(--calm-ease);
}

:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.7); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

@media (prefers-reduced-motion: no-preference) {
  /* One soft entrance for the page content (opacity only, so nothing shifts) */
  @keyframes calm-in { from { opacity: 0; } to { opacity: 1; } }
  :is(main, .wrap, .studio-shell) { animation: calm-in 360ms var(--calm-ease) both; }

  /* Cards: tiny lift, cheap now that they no longer blur */
  @media (hover: hover) {
    .track-card:hover, .game-card:hover, .product-card:hover { transform: translate3d(0, -2px, 0); }
  }

  /* Buttons: press feedback */
  .btn:active, .btn-primary:active, .btn-secondary:active, .btn-ghost:active, button:active:not(:disabled) {
    transform: scale(0.98);
    transition-duration: 80ms;
  }

  /* Cross-page: simple crossfade, no blur, no movement */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: calm-vt-out 140ms linear both; }
  ::view-transition-new(root) { animation: calm-vt-in 220ms var(--calm-ease) both; }
  @keyframes calm-vt-out { to { opacity: 0; } }
  @keyframes calm-vt-in { from { opacity: 0; } }
}

@media (prefers-reduced-motion: reduce) {
  :is(main, .wrap, .studio-shell) { animation: none; }
}
