/* Premium motion layer (phase 1) */
:root {
  --mx: 50vw;
  --my: 50vh;
  --premium-enter-duration: .45s;
  --premium-clip-duration: .9s;
  --premium-clip-opacity-duration: .55s;
  --premium-beam-duration: 8s;
  --premium-beam-min-opacity: .15;
  --premium-beam-max-opacity: .35;
  --premium-flashlight-opacity: .85;
  --premium-card-glow-opacity: 1;
  --premium-card-shift: -2px;
  --premium-card-scale: 1.01;
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(161, 161, 166, .6) rgba(255, 255, 255, .08);
}

html[data-theme='light'] {
  scrollbar-color: rgba(71, 85, 105, .55) rgba(15, 23, 42, .12);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, .08);
}

*::-webkit-scrollbar-thumb {
  background: rgba(161, 161, 166, .65);
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, .08);
}

html[data-theme='light'] *::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, .12);
}

html[data-theme='light'] *::-webkit-scrollbar-thumb {
  background: rgba(71, 85, 105, .55);
  border-color: rgba(15, 23, 42, .12);
}

body.motion-calm {
  --premium-enter-duration: .32s;
  --premium-clip-duration: .62s;
  --premium-clip-opacity-duration: .38s;
  --premium-beam-duration: 11s;
  --premium-beam-min-opacity: .08;
  --premium-beam-max-opacity: .2;
  --premium-flashlight-opacity: .55;
  --premium-card-glow-opacity: .65;
  --premium-card-shift: -1px;
  --premium-card-scale: 1.005;
}

body.motion-hybrid {
  --premium-enter-duration: .38s;
  --premium-clip-duration: .76s;
  --premium-clip-opacity-duration: .46s;
  --premium-beam-duration: 9.5s;
  --premium-beam-min-opacity: .11;
  --premium-beam-max-opacity: .27;
  --premium-flashlight-opacity: .7;
  --premium-card-glow-opacity: .82;
  --premium-card-shift: -1.5px;
  --premium-card-scale: 1.008;
}

body.premium-stage {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--premium-enter-duration) ease, transform var(--premium-enter-duration) ease;
}

body.premium-stage.premium-ready {
  opacity: 1;
  transform: none;
}

.clip-enter {
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  opacity: 0;
  transform: translateY(14px);
  transition: clip-path var(--premium-clip-duration) cubic-bezier(.2,.8,.2,1), opacity var(--premium-clip-opacity-duration) ease, transform var(--premium-clip-opacity-duration) ease;
}

.clip-enter.in {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  opacity: 1;
  transform: none;
}

.premium-beam {
  position: absolute;
  inset: -15% -30%;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 35%, rgba(255,255,255,.12) 50%, transparent 65%),
    linear-gradient(280deg, transparent 25%, rgba(14,165,233,.12) 50%, transparent 75%);
  mix-blend-mode: screen;
  animation: premiumBeam var(--premium-beam-duration) ease-in-out infinite;
  filter: blur(16px);
  z-index: 0;
}

@keyframes premiumBeam {
  0% { transform: translateX(-12%) translateY(-1%) rotate(.2deg); opacity: var(--premium-beam-min-opacity); }
  50% { transform: translateX(8%) translateY(1%) rotate(-.2deg); opacity: var(--premium-beam-max-opacity); }
  100% { transform: translateX(-12%) translateY(-1%) rotate(.2deg); opacity: var(--premium-beam-min-opacity); }
}

#premium-flashlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(360px 360px at var(--mx) var(--my), rgba(255,255,255,.10), transparent 70%);
  transition: opacity .25s ease;
  opacity: var(--premium-flashlight-opacity);
}

.premium-card {
  position: relative;
  isolation: isolate;
}

.premium-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(280px 200px at var(--px, 50%) var(--py, 50%), rgba(14,165,233,.95), rgba(48,209,88,.45) 38%, rgba(255,214,10,.25) 62%, rgba(255,255,255,.06) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
  z-index: 2;
}

.premium-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(240px 160px at var(--px, 50%) var(--py, 50%), rgba(14,165,233,.12), transparent 70%);
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 1;
}

.premium-card:hover::before,
.premium-card:hover::after,
.premium-card.focused::before,
.premium-card.focused::after {
  opacity: var(--premium-card-glow-opacity);
}

.card-switching .is-active {
  transform: translateY(var(--premium-card-shift)) scale(var(--premium-card-scale));
  box-shadow: 0 12px 36px rgba(0,0,0,.24), 0 0 0 1px rgba(14,165,233,.35) inset;
  transition: transform .35s ease, box-shadow .35s ease;
}

body[data-theme='light'] #premium-flashlight {
  background: radial-gradient(500px 500px at var(--mx) var(--my),
    rgba(14,165,233,.50) 0%,
    rgba(14,165,233,.22) 35%,
    rgba(3,105,161,.06) 60%,
    transparent 72%
  );
  opacity: 1;
  mix-blend-mode: multiply;
  z-index: 9999;
}

@media (pointer: coarse) {
  #premium-flashlight { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.premium-stage,
  body.premium-stage.premium-ready,
  .clip-enter,
  .clip-enter.in,
  .card-switching .is-active {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
    clip-path: none !important;
  }

  .premium-beam,
  #premium-flashlight {
    display: none !important;
    animation: none !important;
  }
}

/* ── NAV CTA PULSE ── */
/* Draws the eye to the primary CTA after the headline loads */
@keyframes ncta-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(14,165,233,0); }
  50% { box-shadow: 0 0 0 3px rgba(14,165,233,.3); }
}
.ncta {
  animation: ncta-ring 3.6s ease-in-out 2s infinite;
}
.ncta:hover,
.ncta:focus-visible {
  animation: none;
}

/* ── PRIMARY BUTTON SHIMMER ── subtle moving sheen on main CTAs */
@keyframes bp-shimmer {
  0% { left: -110%; }
  38%, 100% { left: 145%; }
}
.bp {
  position: relative;
  overflow: hidden;
}
.bp::after {
  content: '';
  position: absolute;
  top: 0;
  left: -110%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent);
  transform: skewX(-12deg);
  animation: bp-shimmer 5.5s ease-in-out 3.5s infinite;
  pointer-events: none;
}

/* ── CONSISTENT NAV LINK HOVER ── ensures all pages get this */
.nlinks > li > a:hover {
  color: var(--text, #f5f5f7);
  background: rgba(255,255,255,.04);
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .ncta { animation: none !important; }
  .bp::after { display: none !important; }
}

/* ── MOBILE NAV ── */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--border, rgba(255,255,255,.08));
  border-radius: 9px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  color: var(--text, #f5f5f7);
  transition: border-color .2s, background .2s;
}
.nav-burger:hover { border-color: var(--border-h, rgba(255,255,255,.15)); background: rgba(255,255,255,.04); }
.nav-burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
nav.nav-open .nav-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
nav.nav-open .nav-burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
nav.nav-open .nav-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-burger { display: flex; }

  nav.nav-open {
    background: var(--bg2, #111111) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid var(--border, rgba(255,255,255,.08)) !important;
  }

  nav.nav-open .nlinks {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 98;
    background: var(--bg2, #111111);
    padding: 5rem 1.25rem 2rem;
    gap: .15rem;
    overflow-y: auto;
    align-items: stretch;
  }

  nav.nav-open .nlinks > li > a {
    font-size: 1rem !important;
    padding: .85rem 1rem !important;
    border-radius: 10px !important;
    width: 100%;
    color: var(--text, #f5f5f7) !important;
    justify-content: space-between;
  }

  nav.nav-open .ndrop {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    background: transparent;
    border: none;
    border-radius: 0;
    min-width: 0;
    padding: 0 0 .5rem .75rem;
  }

  nav.nav-open .ndrop a {
    padding: .5rem .75rem;
    font-size: .875rem;
  }

  nav.nav-open .ndrop-label {
    padding: .4rem .75rem .1rem;
    font-size: .6rem;
  }

  nav.nav-open .ndrop-div { margin: .25rem .5rem; }

  nav.nav-open .nlinks > li > a .iconify { display: none !important; }
}

/* ── DROPDOWN CLICK TOGGLE ── */
/* Bridge the gap so cursor can move into the panel without losing hover */
.nlinks > li > .ndrop {
  top: 100%;
  padding-top: .45rem;
}
/* JS-toggled open state — locks dropdown open on click */
.nlinks > li.drop-open > .ndrop {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) !important;
  pointer-events: auto !important;
}
