/* ═══════════════════════════════════════════════════════════════════════
   VESTRA CODA — Animations & Effects
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Scroll Reveal ──────────────────────────────────────────────────── */
[data-animate] {
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-animate].visible { opacity: 1; transform: none; }

[data-animate="fade-up"] { transform: translateY(40px); }
[data-animate="fade-down"] { transform: translateY(-40px); }
[data-animate="fade-left"] { transform: translateX(40px); }
[data-animate="fade-right"] { transform: translateX(-40px); }
[data-animate="fade-in"] { transform: none; }
[data-animate="scale-up"] { transform: scale(0.95); }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ─── Particle Styles ────────────────────────────────────────────────── */
.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform, opacity;
}
.particle--gold {
  background: radial-gradient(circle, rgba(200, 162, 78, 0.6) 0%, transparent 70%);
}
.particle--blue {
  background: radial-gradient(circle, rgba(91, 155, 213, 0.4) 0%, transparent 70%);
}
.particle--purple {
  background: radial-gradient(circle, rgba(153, 50, 204, 0.3) 0%, transparent 70%);
}

/* ─── Shimmer Effect ─────────────────────────────────────────────────── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(200, 162, 78, 0.05) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
}

/* ─── Glow Pulse ─────────────────────────────────────────────────────── */
@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* ─── Gold Line Sweep ────────────────────────────────────────────────── */
@keyframes line-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.hero__subtitle-line {
  overflow: hidden;
  position: relative;
}
.hero__subtitle-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: line-sweep 3s ease-in-out infinite;
}

/* ─── Card Hover Glow ────────────────────────────────────────────────── */
.news-card::after,
.feature-card::after,
.dual-cta__card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(200, 162, 78, 0.04),
    transparent 40%
  );
}
.news-card:hover::after,
.feature-card:hover::after,
.dual-cta__card:hover::after {
  opacity: 1;
}

/* ─── Nav Transition ─────────────────────────────────────────────────── */
.nav { transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease; }

/* ─── Button Ripple ──────────────────────────────────────────────────── */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.05) 50%,
    rgba(255,255,255,0) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}
.btn:hover::after { opacity: 1; }

/* ─── Smooth Section Transitions ─────────────────────────────────────── */
.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  opacity: 0.5;
}
.section:first-of-type::before { display: none; }

/* ─── Floating Animation for Placeholders ────────────────────────────── */
@keyframes float-gentle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-8px) rotate(0.5deg); }
  66% { transform: translateY(4px) rotate(-0.3deg); }
}
.featured__image-placeholder {
  animation: float-gentle 8s ease-in-out infinite;
}
