/* ===================================
   ANIMATIONS / MOTION — Rett Forum 2026
   Smooth, subtle — NOT flashy.
   =================================== */

/* --- Hero gradient background shift --- */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero {
  background-size: 200% 200%;
  animation: gradientShift 12s var(--ease-in-out) infinite;
}

/* --- Hero multi-layer mesh drift --- */
@keyframes heroMesh {
  0%   { transform: translate(0, 0) rotate(0deg); }
  33%  { transform: translate(2%, -1%) rotate(0.5deg); }
  66%  { transform: translate(-1%, 2%) rotate(-0.3deg); }
  100% { transform: translate(1%, -1%) rotate(0.2deg); }
}

/* --- Scroll-reveal class --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-reveal) var(--ease-out),
              transform var(--duration-reveal) var(--ease-out);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- Card hover transitions (glassmorphism + morph) --- */
.card {
  transition: transform var(--duration-normal) var(--ease-out),
              box-shadow var(--duration-normal) var(--ease-out),
              border-color var(--duration-normal) var(--ease-out),
              background var(--duration-normal) var(--ease-out),
              backdrop-filter var(--duration-normal) var(--ease-out);
}
.card:hover {
  transform: translateY(-4px) rotate(0.3deg) scale(1.01);
  box-shadow: var(--shadow-lg),
             0 0 0 1px rgba(123, 79, 160, 0.15),
             0 0 20px rgba(214, 79, 160, 0.08);
  border-color: rgba(123, 79, 160, 0.2);
}

/* --- Stat number fade-in --- */
.stat-value {
  transition: opacity var(--duration-slow) var(--ease-out);
}

/* --- Button ripple effect (CSS-only) --- */
.hero-cta,
.cta-btn {
  position: relative;
  overflow: hidden;
}
.hero-cta::before,
.cta-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(123, 79, 160, 0.25) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;
  opacity: 0;
  pointer-events: none;
}
.hero-cta:active::before,
.cta-btn:active::before {
  width: 300px;
  height: 300px;
  opacity: 1;
  transition: width 0s, height 0s, opacity 0s;
}

/* --- Focus ring animation (pulsing glow) --- */
@keyframes focusPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(123, 79, 160, 0.4); }
  50%      { box-shadow: 0 0 0 5px rgba(123, 79, 160, 0.2); }
}

.hero-cta:focus-visible,
.cta-btn:focus-visible,
.card:focus-visible,
.stat:focus-visible,
.wg-item:focus-visible,
.nav-links a:focus-visible {
  outline: none;
  animation: focusPulse 1.5s var(--ease-in-out) infinite;
}

/* --- prefers-reduced-motion: disable all animations --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero {
    animation: none;
    background-size: 100% 100%;
  }
  .hero::before {
    animation: none;
  }
  .hero-details::before {
    animation: none;
    box-shadow: none;
  }
  .card:hover,
  .stat:hover,
  .wg-item:hover,
  .timeline-day:hover {
    transform: none;
  }
  .hero-cta::before,
  .cta-btn::before {
    display: none;
  }
  .hero-cta:focus-visible,
  .cta-btn:focus-visible,
  .card:focus-visible,
  .stat:focus-visible,
  .wg-item:focus-visible,
  .nav-links a:focus-visible {
    animation: none;
    box-shadow: 0 0 0 3px rgba(123, 79, 160, 0.4);
  }
  .nav-links a::after {
    transition: none;
  }
  .hero-cta::after,
  .cta-btn-primary::after {
    opacity: 1;
    transform: translateX(4px);
    transition: none;
  }
}
