/* ============================================
   ROMBEY.EU 2026 — Animations
   ============================================ */

/* --- Scroll Reveal Base States --- */
[data-reveal] {
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

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

/* Revealed State */
[data-reveal].revealed {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* --- Hero Keyframes --- */
@keyframes meshShift {
  0% {
    opacity: 0.8;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.1) rotate(1deg);
  }
  100% {
    opacity: 0.8;
    transform: scale(1) rotate(-1deg);
  }
}

@keyframes float1 {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-30px, 20px); }
  100% { transform: translate(20px, -30px); }
}

@keyframes float2 {
  0% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
  100% { transform: translate(-20px, 30px); }
}

/* --- Hero Entrance Animation --- */
/* h1 is the LCP element — must be visible immediately to avoid rendering delay */
.hero-content > *:not(h1) {
  opacity: 0;
  transform: translateY(30px);
  animation: heroEntrance 0.8s var(--ease-out) forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
/* nth-child(2) is h1 — no animation delay */
.hero-content > *:nth-child(3) { animation-delay: 0.2s; }
.hero-content > *:nth-child(4) { animation-delay: 0.35s; }
.hero-content > *:nth-child(5) { animation-delay: 0.5s; }

@keyframes heroEntrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Gradient Text Shimmer (subtle) --- */
@keyframes gradientShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero .text-gradient {
  background: linear-gradient(135deg, #6c5ce7, #00cec9, #fd79a8, #6c5ce7);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShimmer 8s ease-in-out infinite;
}

/* --- Nav Link Underline Slide --- */
/* Already handled in style.css with ::after pseudo-element */

/* --- Card Hover Glow --- */
.service-card:hover {
  border-color: rgba(108,92,231,0.2);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.4),
    0 0 20px rgba(108,92,231,0.08);
}

[data-theme="light"] .service-card:hover {
  box-shadow:
    0 16px 48px rgba(0,0,0,0.08),
    0 0 20px rgba(108,92,231,0.06);
}

/* --- Stat Number Count-up Placeholder --- */
.stat-number {
  transition: transform var(--duration-fast) var(--ease-spring);
}

.stat-card:hover .stat-number {
  transform: scale(1.05);
}

/* --- Button Arrow Animation --- */
.btn svg {
  transition: transform var(--duration-fast) var(--ease-out);
}

.btn:hover svg {
  transform: translateX(3px);
}

/* --- Mobile Menu Item Stagger --- */
.nav.open .nav-list li {
  opacity: 0;
  transform: translateY(20px);
  animation: menuItemReveal 0.4s var(--ease-out) forwards;
}

.nav.open .nav-list li:nth-child(1) { animation-delay: 0.05s; }
.nav.open .nav-list li:nth-child(2) { animation-delay: 0.1s; }
.nav.open .nav-list li:nth-child(3) { animation-delay: 0.15s; }
.nav.open .nav-list li:nth-child(4) { animation-delay: 0.2s; }

@keyframes menuItemReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Form Input Focus Glow --- */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  animation: inputFocusPulse 0.3s var(--ease-out);
}

@keyframes inputFocusPulse {
  0% { box-shadow: 0 0 0 0 rgba(108,92,231,0.3); }
  100% { box-shadow: 0 0 0 3px rgba(108,92,231,0.15); }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero-content > * {
    opacity: 1;
    transform: none;
  }

  .hero-orb {
    animation: none;
  }
}
