/* ============================================================================
   AVH Studios — Studio Launcher
   The "choose your studio" hub reached from the Dashboard. Visually echoes the
   in-app wizard intro (animated grid / glow / scan backdrop + equalizer) and the
   four studio cards are large, animated, clickable tabs.
   §218 — the four cards were re-imagined as clean, modern "glass tile" cards
   (Concept B): flat dark panel, top-lit hairline, a floating 3D emblem tile with
   an accent glow, an editorial 01–04 badge, minimal copy and a cursor-driven 3D
   tilt. The hero, backdrop, equalizer, nav and footer are unchanged.
   Loaded after brand.css.
   ========================================================================== */

/* ---- animated hero backdrop (mirrors the wizard intro) ------------------- */
.lx-hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 30px;
  text-align: center;
}
.lx-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.lx-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(53, 194, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 194, 255, 0.07) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(80% 70% at 50% 30%, #000 0%, transparent 78%);
  mask-image: radial-gradient(80% 70% at 50% 30%, #000 0%, transparent 78%);
  animation: lxGrid 26s linear infinite;
}
@keyframes lxGrid { to { background-position: 46px 46px, 46px 46px; } }

.lx-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.lx-glow-1 { width: 480px; height: 480px; background: rgba(255, 107, 53, .34); top: -160px; left: -90px; animation: lxFloat 14s ease-in-out infinite; }
.lx-glow-2 { width: 560px; height: 560px; background: rgba(53, 194, 255, .28); top: -180px; right: -120px; animation: lxFloat 17s ease-in-out infinite reverse; }
.lx-glow-3 { width: 420px; height: 420px; background: rgba(53, 255, 158, .16); bottom: -220px; left: 40%; animation: lxFloat 20s ease-in-out infinite; }
@keyframes lxFloat { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(26px, 20px, 0); } }

.lx-scan {
  position: absolute; left: 0; right: 0; height: 180px;
  background: linear-gradient(180deg, transparent, rgba(53, 194, 255, .06), transparent);
  animation: lxScan 8s linear infinite;
}
@keyframes lxScan { from { top: -180px; } to { top: 100%; } }

.lx-hero .wrap { position: relative; z-index: 1; }

.lx-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10.5px; letter-spacing: .7px; text-transform: uppercase;
  color: var(--text-dim); border: 1px solid var(--border); border-radius: 999px; padding: 5px 13px;
}
.lx-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-3); box-shadow: 0 0 10px var(--accent-3); animation: lxPulse 1.6s ease-in-out infinite; }
@keyframes lxPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.8); } }

.lx-title { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.06; letter-spacing: -.6px; margin: 16px 0 12px; }
.lx-title span { background: linear-gradient(92deg, var(--accent) 0%, var(--accent-2) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-sub { max-width: 620px; margin: 0 auto; font-size: 1.02rem; color: var(--text-dim); }
.lx-sub b { color: var(--text); }

/* ---- animated equalizer under the hero ----------------------------------- */
.lx-eq { display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 40px; margin: 22px auto 0; }
.lx-eq i { width: 4px; height: 40%; border-radius: 2px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); animation: lxEq 1s ease-in-out infinite; }
@keyframes lxEq { 0%, 100% { height: 16%; opacity: .45; } 50% { height: 100%; opacity: 1; } }

/* ---- the four studio cards (Concept B — clean glass tiles) ---------------- */
.lx-grid-cards {
  position: relative; z-index: 1;
  display: grid;
  /* Five studios now. auto-fit + a min track keeps the row even at every
     width: 5 across on a wide desktop, 3 on a laptop, 2 on a tablet, 1 on a
     phone -- no orphan card stranded on its own row. */
  grid-template-columns: repeat(auto-fit, minmax(196px, 1fr));
  gap: 20px;
  margin: 46px 0 10px;
  perspective: 1200px;
}

.lx-card {
  --lx-accent: var(--accent);
  position: relative;
  display: flex; flex-direction: column;
  padding: 22px 19px 20px;
  border-radius: 20px;
  border: 1px solid #232833;
  background: linear-gradient(180deg, #181b22, #12141a);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .42);
  color: var(--text); text-decoration: none;
  transform-style: preserve-3d;
  transform: translateY(0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .42s cubic-bezier(.2,.7,.3,1), box-shadow .42s ease, border-color .42s ease;
  animation: lxCardIn .55s cubic-bezier(.22,.61,.36,1) backwards;
  will-change: transform;
}
.lx-card:nth-child(2) { animation-delay: .08s; }
.lx-card:nth-child(3) { animation-delay: .16s; }
.lx-card:nth-child(4) { animation-delay: .24s; }
.lx-card:nth-child(5) { animation-delay: .32s; }
@keyframes lxCardIn { from { opacity: 0; transform: translateY(22px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* top-lit hairline */
.lx-card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 40%);
  -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, linear-gradient(#000 0 0); mask-composite: exclude;
}

/* cursor spotlight (uses --mx/--my set by launcher.js) */
.lx-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--lx-accent) 18%, transparent), transparent 62%);
  opacity: 0; transition: opacity .4s ease;
}
.lx-card:hover::after, .lx-card:focus-visible::after { opacity: 1; }

.lx-card:hover, .lx-card:focus-visible {
  transform: translateY(-6px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  border-color: color-mix(in srgb, var(--lx-accent) 55%, #232833);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 0 1px color-mix(in srgb, var(--lx-accent) 42%, transparent), 0 24px 60px color-mix(in srgb, var(--lx-accent) 20%, transparent);
  outline: none;
}

/* editorial number badge */
.lx-num {
  position: absolute; top: 20px; right: 22px;
  font-size: .72rem; font-weight: 800; letter-spacing: .14em; color: #565c69;
  transition: color .4s ease;
}
.lx-card:hover .lx-num, .lx-card:focus-visible .lx-num { color: var(--lx-accent); }

/* floating 3D emblem tile */
.lx-tile {
  position: relative; width: 68px; height: 68px; border-radius: 18px; overflow: hidden;
  background: #0d0f14; border: 1px solid rgba(255, 255, 255, .10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 12px 26px rgba(0, 0, 0, .5), 0 0 34px color-mix(in srgb, var(--lx-accent) 24%, transparent);
  transition: box-shadow .4s ease, border-color .4s ease;
}
.lx-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02); transition: transform .55s cubic-bezier(.2,.7,.3,1); }
.lx-card:hover .lx-tile, .lx-card:focus-visible .lx-tile {
  border-color: color-mix(in srgb, var(--lx-accent) 45%, rgba(255, 255, 255, .10));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 14px 30px rgba(0, 0, 0, .55), 0 0 46px color-mix(in srgb, var(--lx-accent) 42%, transparent);
}
.lx-card:hover .lx-tile img, .lx-card:focus-visible .lx-tile img { transform: scale(1.12); }

.lx-card h3 { margin: 18px 0 6px; font-size: 1.12rem; font-weight: 700; letter-spacing: -.01em; color: #f2f4f8; }
.lx-card p { margin: 0; color: #98a0ac; font-size: .86rem; line-height: 1.55; }

.lx-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.lx-tag { font-size: .68rem; font-weight: 600; color: #c3c8d2; background: #1b1f27; border: 1px solid #2a2f3a; border-radius: 999px; padding: 3px 9px; }

.lx-go {
  margin-top: auto; padding-top: 18px;
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: .86rem; color: var(--lx-accent);
}
.lx-go .lx-arrow { transition: transform .25s ease; }
.lx-card:hover .lx-go .lx-arrow, .lx-card:focus-visible .lx-go .lx-arrow { transform: translateX(4px); }

/* per-studio accent colour */
.lx-card[data-studio="reproduction"] { --lx-accent: #ff6b35; }
.lx-card[data-studio="reperformance"] { --lx-accent: #35c2ff; }
.lx-card[data-studio="voices"] { --lx-accent: #35ff9e; }
.lx-card[data-studio="collaboration"] { --lx-accent: #ffb020; }
.lx-card[data-studio="musicvideo"] { --lx-accent: #a78bfa; }

/* ---- footer note --------------------------------------------------------- */
.lx-foot { position: relative; z-index: 1; text-align: center; color: var(--text-dim); font-size: .88rem; margin: 34px 0 8px; }
.lx-foot a { color: var(--accent-2); }

@media (max-width: 1180px) { .lx-grid-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px)  { .lx-grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .lx-grid-cards { grid-template-columns: 1fr; margin-top: 34px; }
  .lx-hero { padding: 48px 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .lx-grid, .lx-glow, .lx-scan, .lx-eq i, .lx-card { animation: none !important; }
  .lx-card { opacity: 1; transform: none; }
  .lx-card:hover, .lx-card:focus-visible { transform: translateY(-4px); }
}

/* ---------- Music Video Studio: coming soon ---------- */
.lx-card.is-soon { position: relative; }
.lx-card.is-soon .lx-tile img { filter: grayscale(.55) brightness(.72); }
.lx-card.is-soon:hover .lx-tile img { filter: grayscale(.2) brightness(.9); }
.lx-soon-flag {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-size: 9.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: #04121a; background: linear-gradient(180deg, #00b1fb, #0090d0);
  border-radius: 999px; padding: 4px 9px;
  box-shadow: 0 6px 16px rgba(0,177,251,.35);
}
