/* ============================================================
   header-premium.css
   Premium animation layer for the site header. Purely additive
   on top of the existing .nav styles — does not touch the
   scroll hide/show or the glass "scrolled" state.

   • staggered entrance reveal on load (.nav-anim)
   • gradient underline that wipes in-left / out-right + lift
   • logo hover glow + graceful shrink when scrolled
   • "Get Started" shine sweep (magnetism added in JS)
   ============================================================ */

/* ── 0. FLOATING GLASS ISLAND ───────────────────────────────
   Detach the bar from the edges into a rounded, glassmorphic
   island that floats over the content. Glass is always on now
   (this is where glassmorphism earns its place — real content
   scrolls behind it). Uses left/right/width + margin auto for
   centring so it never fights the scroll hide/show transform. */
.nav {
  top: calc(var(--safe-top, 0px) + 14px);
  left: 0; right: 0;
  width: min(1240px, calc(100% - 36px));
  margin-inline: auto;
  height: 76px;
  padding: 8px 24px;
  border-radius: 24px;
  background: rgba(18, 13, 15, 0.55);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
          backdrop-filter: blur(24px) saturate(145%);
  border: 1px solid rgba(240, 236, 228, 0.16);
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(196, 128, 140, 0.05),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

/* Size the signature emblem to read clearly inside the island */
.nav-logo-img { height: 60px; width: 60px; }

/* Scrolled: deepen the glass + firm up the border (no bottom rule
   — the island already has a full border all the way round) */
.nav.scrolled {
  background: rgba(13, 10, 12, 0.72);
  border-color: rgba(240, 236, 228, 0.17);
  border-bottom: 1px solid rgba(240, 236, 228, 0.17);
}
.nav.scrolled .nav-logo-img { transform: scale(0.82); }

@media (max-width: 600px) {
  .nav { width: calc(100% - 20px); border-radius: 18px; padding: 6px 16px; height: 62px; }
  .nav-logo-img { height: 50px; width: 50px; }
}

/* ── 1. ENTRANCE REVEAL ─────────────────────────────────────
   Elements rise + fade in a staggered sequence on load. The
   .nav-anim class is present from first paint, so the animation
   plays once; reduced-motion shows everything immediately. */
@keyframes navRise {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: none; }
}

.nav-anim .nav-logo,
.nav-anim .nav-links li,
.nav-anim .nav-right > * {
  animation: navRise 0.85s var(--expo, cubic-bezier(0.16,1,0.3,1)) both;
}

.nav-anim .nav-logo                         { animation-delay: 0.14s; }
.nav-anim .nav-center .nav-links li:nth-child(1) { animation-delay: 0.30s; }
.nav-anim .nav-center .nav-links li:nth-child(2) { animation-delay: 0.38s; }
.nav-anim .nav-right > *:nth-child(1)       { animation-delay: 0.44s; }
.nav-anim .nav-right > *:nth-child(2)       { animation-delay: 0.50s; }
.nav-anim .nav-right > *:nth-child(3)       { animation-delay: 0.56s; }
.nav-anim .nav-right > *:nth-child(4)       { animation-delay: 0.50s; }

/* ── 2. LINK HOVER — gradient underline, wipe in-left/out-right ── */
.nav-links a {
  transition: color 0.3s ease, transform 0.4s var(--expo, cubic-bezier(0.16,1,0.3,1));
}
.nav-links a::after {
  height: 1.5px;
  background: var(--accent-grad, linear-gradient(135deg,#f0c0cc,#c4808c 45%,#964060));
  transform-origin: right;               /* base: collapses toward the right */
}
.nav-links a:hover { transform: translateY(-1px); }
.nav-links a:hover::after { transform-origin: left; }  /* hover: grows from the left */

/* ── 3. LOGO — hover glow + scrolled shrink ─────────────────── */
.nav-logo-img {
  transition: transform 0.55s var(--expo, cubic-bezier(0.16,1,0.3,1)), filter 0.5s ease;
}
.nav-logo:hover .nav-logo-img {
  transform: scale(1.06);
  filter: drop-shadow(0 0 18px rgba(196,128,140,0.5));
}
.nav.scrolled .nav-logo-img { transform: scale(0.8); }
.nav.scrolled .nav-logo:hover .nav-logo-img {
  transform: scale(0.85);
  filter: drop-shadow(0 0 16px rgba(196,128,140,0.5));
}

/* ── 4. GET STARTED — shine sweep on hover ──────────────────── */
.nav-contact { position: relative; overflow: hidden; }
.nav-contact::before {
  content: "";
  position: absolute; top: 0; left: -120%;
  width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,0.35), transparent);
  transition: left 0.6s var(--expo, cubic-bezier(0.16,1,0.3,1));
  pointer-events: none;
}
.nav-contact:hover::before { left: 130%; }

@media (prefers-reduced-motion: reduce) {
  .nav-anim .nav-logo,
  .nav-anim .nav-links li,
  .nav-anim .nav-right > * { animation: none; }
  .nav-contact::before { display: none; }
}
