/* ==========================================================================
   EasyUni Edu — Motion CSS v2
   Blob gradients, cursor glow, reveal utilities, smooth scroll setup,
   horizontal scroll sections, magnetic hover, tilt cards.
   ========================================================================== */

/* ── Smooth scroll container ─────────────────────────────────────────── */
#smooth-wrapper {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

#smooth-content {
  position: relative;
  will-change: transform;
  backface-visibility: hidden;
}

/* ── Animated gradient blobs ────────────────────────────────────────────
   Pure CSS gradient orbs that float behind hero/CTA sections.
   Use .blob-container to wrap them in a positioned parent. ─────────────── */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
  animation: blobFloat 8s ease-in-out infinite alternate;
}

.blob-1 { /* violet */
  background: radial-gradient(circle, rgba(124,58,237,0.5), rgba(99,102,241,0.3));
  width: 500px; height: 500px;
  top: -150px; right: -100px;
  animation-duration: 8s;
}

.blob-2 { /* cyan */
  background: radial-gradient(circle, rgba(6,182,212,0.45), rgba(59,130,246,0.25));
  width: 350px; height: 350px;
  bottom: -100px; left: -80px;
  animation-duration: 10s;
  animation-delay: -2s;
}

.blob-3 { /* rose */
  background: radial-gradient(circle, rgba(244,63,94,0.3), rgba(251,146,60,0.2));
  width: 280px; height: 280px;
  top: 40%; left: 50%;
  animation-duration: 12s;
  animation-delay: -4s;
}

@keyframes blobFloat {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(40px, -30px) scale(1.08); }
  66%  { transform: translate(-20px, 20px) scale(0.94); }
  100% { transform: translate(10px, -10px) scale(1.03); }
}

/* Morphing SVG blobs via GSAP — .morph-blob for JS-driven scaling sway */

/* ── Cursor glow ────────────────────────────────────────────────────────
   A radial gradient that follows the mouse on the hero section.
   Requires .cursor-glow-container + #cursorGlow JS-driven element. ─────── */
.cursor-glow-container {
  position: relative;
  overflow: hidden;
}

#cursorGlow {
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.12), transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  z-index: 0;
}

/* ── Scroll-triggered reveal base classes ─────────────────────────────── */
[data-reveal] {
  opacity: 0;
}

/* ── Horizontal scroll section ────────────────────────────────────────── */
.horiz-wrap {
  overflow: hidden;
  padding: var(--space-5) 0;
  position: relative;
}
/* Fade edges — gradient overlays */
.horiz-wrap::before,
.horiz-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 2;
  pointer-events: none;
}
.horiz-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--color-bg-alt, #f8fafc) 0%, transparent 100%);
}
.horiz-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--color-bg-alt, #f8fafc) 0%, transparent 100%);
}
.horiz-track {
  display: flex;
  gap: 1.75rem;
  will-change: transform;
  animation: autoScroll 30s linear infinite;
}
@keyframes autoScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.horiz-wrap:hover .horiz-track { animation-play-state: paused; }

.horiz-track > * {
  flex-shrink: 0;
  width: min(240px, 65vw);
  padding: var(--space-5) var(--space-6);
  margin: var(--space-3) 0;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(124,58,237,0.08), 0 2px 8px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.6);
  transition: transform 0.3s var(--ease-out-expo), box-shadow 0.3s ease, background 0.3s ease;
  position: relative;
  z-index: 1;
}
.horiz-track > *:hover {
  background: rgba(255,255,255,0.35);
  box-shadow: 0 20px 56px rgba(124,58,237,0.18), 0 6px 16px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.8);
  transform: scale(1.06);
  z-index: 10;
}

}



/* ── Stagger children ─────────────────────────────────────────────────── */
[data-stagger] > * {
  opacity: 0;
}

/* ── Floating badge animation ─────────────────────────────────────────── */
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.4); }
  50%      { box-shadow: 0 0 0 12px rgba(124,58,237,0); }
}

.badge-pulse {
  animation: badgePulse 2s infinite;
}

/* ── Shimmer / skeleton loading ───────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--color-border-light) 25%, var(--color-bg-alt) 50%, var(--color-border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* ── Text gradient animation ──────────────────────────────────────────── */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.text-gradient-animated {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary), var(--color-primary), var(--color-accent));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

/* ── Hero scroll indicator ────────────────────────────────────────────── */
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%      { transform: translateY(8px); opacity: 0.4; }
}

.scroll-indicator {
  animation: scrollBounce 2s ease-in-out infinite;
}

/* ── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none !important; }
  .badge-pulse { animation: none !important; }
  .skeleton { animation: none !important; }
  .scroll-indicator { animation: none !important; }
  .text-gradient-animated { animation: none !important; }
  [data-reveal] { opacity: 1 !important; }
  [data-stagger] > * { opacity: 1 !important; }
  #smooth-content { transform: none !important; }
}

/* ── Page transition (between page navigations) ───────────────────────── */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--gradient-hero);
  z-index: var(--z-modal);
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
}
