/* BlackFern — refined, minimalist motion layer (loaded after styles.css).
   Premium "quiet luxury" micro-interactions; all heavy motion is disabled under
   prefers-reduced-motion. Isolated here so it can be removed cleanly. */

/* Scroll progress — a hairline at the very top reflecting read position. */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 400;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.85));
  pointer-events: none;
  will-change: width;
}

/* Hero cursor spotlight — a soft warm glow that follows the pointer. */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    560px circle at var(--mx, 50%) var(--my, 28%),
    rgba(255, 255, 255, 0.07),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.8s ease;
}
#hero.spotlight-on::after { opacity: 1; }

/* Decorative hero background drifts slightly while scrolling (set via JS). */
.hero-bg { will-change: transform; }

/* Refined scroll reveal — a faint blur that sharpens on entry. */
.fade-in {
  filter: blur(5px);
  transition: opacity 0.85s ease, transform 0.85s ease, filter 0.85s ease;
}
.fade-in.visible { filter: blur(0); }

/* Section titles reveal with a subtle bottom-up mask wipe. */
.sec-title.fade-in,
.cta-heading {
  clip-path: inset(0 0 110% 0);
  transition:
    opacity 0.9s ease,
    transform 0.9s ease,
    filter 0.9s ease,
    clip-path 1s cubic-bezier(0.22, 0.7, 0.16, 1);
}
.sec-title.fade-in.visible,
.cta-band-inner.visible .cta-heading { clip-path: inset(0 0 -10% 0); }

/* Navigation underline draws in on hover/focus. */
.nav-links a { position: relative; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  height: 1px;
  width: 0;
  background: currentColor;
  opacity: 0.75;
  transition: width 0.3s cubic-bezier(0.22, 0.7, 0.16, 1);
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after { width: 100%; }

/* Buttons + logos: a barely-there lift on hover. */
.btn-primary:hover,
.btn-ghost:hover { transform: translateY(-2px); }
.ref-logo { will-change: transform; }
.ref-logo:hover { transform: translateY(-3px); }

/* Stat values align nicely while counting up. */
.stat-num { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  #scroll-progress { display: none; }
  #hero::after { display: none; }
  .hero-bg { transform: none !important; }
  .sec-title.fade-in,
  .cta-heading { clip-path: none; }
  .fade-in { filter: none; }
  .btn-primary:hover,
  .btn-ghost:hover,
  .ref-logo:hover { transform: none; }
}
