/* ============================================================
   Jacob Lutz — motion + polish layer (preview)
   Loads AFTER styles.css. Additive only; overrides where needed.
   Techniques: Motion (motion.dev) + anime.js drive the JS;
   this file carries the Kokonut-UI-style visual polish.
   ============================================================ */

/* ------------------------------------------------------------
   Reveal initial states.
   Keep content visible by default. The motion layer can still add polish,
   but the site must never look empty while CDN modules are loading.
   ------------------------------------------------------------ */
.anim-ready.motion-prehide .section-head > *,
.anim-ready.motion-prehide .lede,
.anim-ready.motion-prehide .pkg,
.anim-ready.motion-prehide .stat,
.anim-ready.motion-prehide .credits-head,
.anim-ready.motion-prehide .credit,
.anim-ready.motion-prehide .deal-card,
.anim-ready.motion-prehide .disc,
.anim-ready.motion-prehide .format,
.anim-ready.motion-prehide .release-featured,
.anim-ready.motion-prehide .studio-cta,
.anim-ready.motion-prehide .contact-grid > *,
.anim-ready.motion-prehide .footer > * {
  opacity: 0;
  transform: translateY(18px);
}

/* Hero pieces start hidden too (choreographed on load). */
.anim-ready.motion-prehide .hero-title,
.anim-ready.motion-prehide .mhero-name { opacity: 0; }
.anim-ready.motion-prehide .hero-meta,
.anim-ready.motion-prehide .hero-scroll,
.anim-ready.motion-prehide .mhero-roles,
.anim-ready.motion-prehide .mhero-booking { opacity: 0; }

/* Failsafe: reveal everything, no transforms. */
.anim-fallback .section-head > *,
.anim-fallback .lede,
.anim-fallback .pkg,
.anim-fallback .stat,
.anim-fallback .credits-head,
.anim-fallback .credit,
.anim-fallback .deal-card,
.anim-fallback .disc,
.anim-fallback .format,
.anim-fallback .release-featured,
.anim-fallback .studio-cta,
.anim-fallback .contact-grid > *,
.anim-fallback .footer > *,
.anim-fallback .hero-title,
.anim-fallback .mhero-name,
.anim-fallback .hero-meta,
.anim-fallback .hero-scroll,
.anim-fallback .mhero-roles,
.anim-fallback .mhero-booking {
  opacity: 1 !important;
  transform: none !important;
}

/* Per-character spans injected by the hero name splitter. */
.char {
  display: inline-block;
  will-change: transform, opacity;
}

/* ============================================================
   Kokonut-style polish
   ============================================================ */

@media (prefers-reduced-motion: no-preference) {

  /* ---- Shimmer sweep on amber CTAs (Kokonut "attract" pattern) ---- */
  .btn,
  .nav-cta,
  .mhero-booking {
    position: relative;
    overflow: hidden;
    isolation: isolate;
  }
  .btn::after,
  .nav-cta::after,
  .mhero-booking::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
      100deg,
      transparent 20%,
      rgba(255, 255, 255, 0.45) 50%,
      transparent 80%
    );
    transform: translateX(-120%);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
  }
  .btn:hover::after,
  .nav-cta:hover::after,
  .mhero-booking:hover::after {
    transform: translateX(120%);
  }

  /* ---- "Now booking" dot — gentle pulse ---- */
  .dot {
    animation: jl-pulse 2.6s ease-in-out infinite;
  }
  @keyframes jl-pulse {
    0%, 100% { box-shadow: 0 0 0 0 var(--accent), 0 0 12px var(--accent); }
    50%      { box-shadow: 0 0 0 4px rgba(232, 168, 87, 0), 0 0 18px var(--accent); }
  }

  /* ---- Ambient amber glow behind the CTA bands (adds depth) ---- */
  .studio-cta { position: relative; overflow: hidden; }
  .studio-cta::before {
    content: "";
    position: absolute;
    top: -60%;
    right: -10%;
    width: 60%;
    height: 220%;
    background: radial-gradient(
      closest-side,
      rgba(232, 168, 87, 0.16),
      rgba(232, 168, 87, 0) 70%
    );
    filter: blur(10px);
    pointer-events: none;
    animation: jl-breathe 7s ease-in-out infinite;
  }
  @keyframes jl-breathe {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.08); }
  }
}

/* ---- Glass / gradient-edge polish on cards (works with reduced motion) ---- */
.stat,
.pkg,
.format {
  position: relative;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
}
/* Top specular hairline — the Kokonut "liquid glass" tell. */
.stat::before,
.format::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding-top: 1px;
  background: linear-gradient(
    to bottom,
    rgba(245, 241, 234, 0.14),
    rgba(245, 241, 234, 0) 40%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.stat:hover,
.format:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
}

/* ---- Credit & discography tiles: lift + warm edge on hover ---- */
.credit,
.disc {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease;
}
.credit:hover,
.disc:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -26px rgba(0, 0, 0, 0.95),
              0 0 0 1px rgba(232, 168, 87, 0.28);
}

/* ---- Package rows: warm rail on hover ---- */
.pkg:hover { border-color: var(--line-strong); }
.pkg-row { transition: background 0.35s ease; }

/* Respect reduced motion for card lifts too. */
@media (prefers-reduced-motion: reduce) {
  .stat:hover, .format:hover, .credit:hover, .disc:hover {
    transform: none;
  }
}

/* ---- Lenis smooth-scroll resets (its momentum replaces CSS smooth) ---- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
