
/* ========================================================================== */
/* Motion layer — animated background + staggered text reveals                */
/* ========================================================================== */

/* ---- Animated background canvas ---- */
.bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 900ms var(--ease);
}
.bg-canvas.is-on { opacity: 1; }

/* Soft aurora wash behind the particle field */
.bg-aurora {
  position: fixed;
  inset: -20% -10%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1200ms var(--ease);
  background:
    radial-gradient(52vw 52vw at 18% 12%, rgba(255, 255, 255, 0.05), transparent 72%),
    radial-gradient(46vw 46vw at 82% 78%, rgba(255, 255, 255, 0.036), transparent 74%);
  filter: blur(46px);
  animation: auroraDrift 34s ease-in-out infinite alternate;
  will-change: transform;
}
html[data-theme="light"] .bg-aurora {
  background:
    radial-gradient(52vw 52vw at 18% 12%, rgba(0, 0, 0, 0.045), transparent 72%),
    radial-gradient(46vw 46vw at 82% 78%, rgba(0, 0, 0, 0.032), transparent 74%);
}
.bg-aurora.is-on { opacity: 1; }

@keyframes auroraDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-2.2%, 1.6%, 0) scale(1.05); }
  100% { transform: translate3d(2%, -1.8%, 0) scale(1.02); }
}

/* Keep real content above both background layers */
/* Lift real content above the two fixed background layers.
   The header keeps its own sticky/80 stacking from styles.css — never
   redeclare it here, or the dropdown menus end up under <main>. */
main,
.site-footer {
  position: relative;
  z-index: 1;
}

/* Bands must stay transparent so the field shows through */
.band,
.hero-band { background: transparent; }

/* ---- Staggered word reveals ---- */
.split-word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: 0.16em;
  margin-bottom: -0.16em;
}
.split-word > i {
  display: inline-block;
  font-style: inherit;
  transform: translateY(112%);
  opacity: 0;
  transition: transform 720ms var(--ease), opacity 520ms var(--ease);
  transition-delay: var(--sd, 0ms);
  will-change: transform;
}
.split-ready.is-in .split-word > i {
  transform: translateY(0);
  opacity: 1;
}

/* Softer secondary line for supporting copy */
.split-fade.is-in { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .bg-canvas, .bg-aurora { display: none; }
  .split-word > i { transform: none !important; opacity: 1 !important; transition: none !important; }
  .bg-aurora { animation: none; }
}
