/* ============================================================
   utilities.css — helpers, eyebrow labels, reveal states, decor
   ============================================================ */

/* ---- Eyebrow / kicker label ---- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--purple-600);
  background: var(--lavender-200);
  padding: 0.35rem 0.85rem;
  border-radius: var(--r-pill);
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--coral);
}
.section--brand .eyebrow {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
}
.section--brand .eyebrow::before { background: var(--sun); }

/* ---- Text helpers ---- */
.text-center { text-align: center; }
.text-balance { text-wrap: balance; }
.lead { font-size: var(--fs-lead); color: var(--ink-soft); line-height: var(--lh-snug); }
.muted { color: var(--ink-faint); }
.text-grad {
  background: linear-gradient(120deg, var(--purple-600), var(--coral));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-wiggle { display: inline-block; }

/* ---- Spacing helpers ---- */
.mt-0 { margin-top: 0; }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-0 { margin-bottom: 0; }

.full-width { width: 100%; }

/* ---- Decorative dots & blobs ---- */
.decor { position: absolute; pointer-events: none; z-index: 0; }
.decor--dots {
  width: 120px; height: 120px;
  background-image: radial-gradient(var(--purple-300) 2.4px, transparent 2.6px);
  background-size: 20px 20px;
  opacity: 0.55;
}
.blob { position: absolute; pointer-events: none; z-index: 0; filter: blur(0.5px); }

.floaty { animation: floaty 6s var(--ease) infinite; }
.floaty--slow { animation-duration: 9s; }
.floaty--rev { animation-direction: reverse; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-16px) rotate(3deg); }
}

.spin-slow { animation: spin 22s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-reveal="left"]  { transform: translateX(-32px); }
.reveal[data-reveal="right"] { transform: translateX(32px); }
.reveal[data-reveal="zoom"]  { transform: scale(0.92); }
.reveal.is-visible[data-reveal] { transform: none; }
/* Stagger children */
.reveal-group > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal-group.is-visible > * { opacity: 1; transform: none; }
.reveal-group.is-visible > *:nth-child(2) { transition-delay: 0.08s; }
.reveal-group.is-visible > *:nth-child(3) { transition-delay: 0.16s; }
.reveal-group.is-visible > *:nth-child(4) { transition-delay: 0.24s; }
.reveal-group.is-visible > *:nth-child(5) { transition-delay: 0.32s; }
.reveal-group.is-visible > *:nth-child(6) { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-group > * { opacity: 1 !important; transform: none !important; }
  .floaty, .spin-slow { animation: none !important; }
}

/* ============================================================
   Cursor-driven interactivity (see modules/interactive.js)
   ============================================================ */

/* Custom cursor glow: a trailing ring + a precise dot */
.cursor-ring, .cursor-dot {
  position: fixed; top: 0; left: 0; z-index: 9999;
  pointer-events: none; border-radius: 50%;
  opacity: 0; transition: opacity 0.3s var(--ease);
  will-change: transform;
}
.cursor-ring {
  width: 34px; height: 34px;
  border: 2px solid rgba(124, 92, 252, 0.6);
  transition: opacity 0.3s var(--ease), width 0.25s var(--ease),
              height 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.cursor-dot { width: 8px; height: 8px; background: var(--purple-600); }
body.cursor-active .cursor-ring,
body.cursor-active .cursor-dot { opacity: 1; }
.cursor-ring.is-hover {
  width: 60px; height: 60px;
  background: rgba(124, 92, 252, 0.12);
  border-color: rgba(255, 140, 155, 0.85);
}
.cursor-ring.is-down { width: 26px; height: 26px; background: rgba(124, 92, 252, 0.2); }

/* Parallax decor: JS sets the transform */
[data-parallax] { will-change: transform; }

/* Pupils follow the cursor; eyes blink on their own */
.pupil { transition: transform 0.1s ease-out; will-change: transform; }
.hero-eyes { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; }
@keyframes blink {
  0%, 93%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(0.1); }
}

/* Spotlight: a soft glow that tracks the cursor inside a section */
.has-spotlight { position: relative; }
.has-spotlight > * { position: relative; z-index: 1; }
.has-spotlight::after {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%),
              rgba(124, 92, 252, 0.28), transparent 62%);
  opacity: var(--spot, 0);
  transition: opacity 0.35s var(--ease);
}
/* On purple surfaces the glow should read as light, not purple */
.cta-band.has-spotlight::after,
.mission__art.has-spotlight::after {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(255, 255, 255, 0.22), transparent 60%);
}

/* 3D tilt + moving glare sheen */
.tilt3d {
  transition: transform 0.16s ease-out, box-shadow 0.25s var(--ease);
  transform-style: preserve-3d;
  will-change: transform;
}
.tilt3d::after {
  content: "";
  position: absolute; inset: 0; z-index: 6;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at var(--glx, 50%) var(--gly, 50%),
              rgba(255, 255, 255, 0.5), transparent 42%);
  opacity: var(--gl, 0);
  transition: opacity 0.2s var(--ease);
  mix-blend-mode: soft-light;
}

/* Magnetic buttons — JS controls transform, so drop the hover lift */
.is-magnetic { transition: transform 0.22s var(--ease); }
.is-magnetic:hover { transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-parallax], .pupil, .tilt3d, .is-magnetic { transform: none !important; transition: none !important; }
  .has-spotlight::after, .tilt3d::after, .cursor-ring, .cursor-dot { display: none !important; }
  .hero-eyes { animation: none !important; }
}
