/* ===== KEYFRAMES ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.8; transform: scale(1.04); }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* ===== SCROLL REVEAL ===== */
.reveal {
  opacity: 0;
  will-change: opacity, transform;
}

.reveal.active {
  animation-fill-mode: forwards;
  animation-duration: 0.6s;
  animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-up.active    { animation-name: fadeInUp; }
.reveal-down.active  { animation-name: fadeInDown; }
.reveal-left.active  { animation-name: fadeInLeft; }
.reveal-right.active { animation-name: fadeInRight; }
.reveal-scale.active { animation-name: scaleIn; animation-duration: 0.5s; }

/* Stagger delays */
.reveal-d1 { animation-delay: 0.05s; }
.reveal-d2 { animation-delay: 0.1s; }
.reveal-d3 { animation-delay: 0.18s; }
.reveal-d4 { animation-delay: 0.26s; }
.reveal-d5 { animation-delay: 0.34s; }
.reveal-d6 { animation-delay: 0.42s; }
.reveal-d7 { animation-delay: 0.5s; }
.reveal-d8 { animation-delay: 0.58s; }

/* ===== HERO ENTRANCE ===== */
.hero-animate {
  opacity: 0;
  transform: translateY(30px);
}

.hero-animate.loaded {
  animation: fadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ===== STAGGERED GRID CHILDREN ===== */
.stagger-children > * {
  opacity: 0;
}

.stagger-children.active > *:nth-child(1) { animation: fadeInUp 0.5s ease 0.03s forwards; }
.stagger-children.active > *:nth-child(2) { animation: fadeInUp 0.5s ease 0.1s forwards; }
.stagger-children.active > *:nth-child(3) { animation: fadeInUp 0.5s ease 0.18s forwards; }
.stagger-children.active > *:nth-child(4) { animation: fadeInUp 0.5s ease 0.26s forwards; }
.stagger-children.active > *:nth-child(5) { animation: fadeInUp 0.5s ease 0.34s forwards; }
.stagger-children.active > *:nth-child(6) { animation: fadeInUp 0.5s ease 0.42s forwards; }
.stagger-children.active > *:nth-child(7) { animation: fadeInUp 0.5s ease 0.5s forwards; }
.stagger-children.active > *:nth-child(8) { animation: fadeInUp 0.5s ease 0.58s forwards; }

/* ===== ENHANCED HOVER EFFECTS ===== */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 12px 40px rgba(26,26,46,0.1) !important;
}

.hover-glow {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.hover-glow:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(184,134,11,0.15);
  border-color: var(--accent-light);
}

.hover-glow-card {
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-glow-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(26,26,46,0.08);
  border-color: transparent;
}

/* ===== NAV LINK HOVER ===== */
.nav-line {
  position: relative;
}

.nav-line::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav-line:hover::after {
  width: 60%;
}

/* ===== BORDER ANIMATION ON FOCUS ===== */
.input-focus {
  transition: border-color 0.2s ease, box-shadow 0.3s ease;
}

.input-focus:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184,134,11,0.12);
  outline: none;
}

/* ===== FLOATING DECORATIVE ===== */
.float-anim {
  animation: float 4s ease-in-out infinite;
}

.pulse-anim {
  animation: pulse 2.5s ease-in-out infinite;
}

/* ===== LOADING / SPINNER ===== */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ===== PAGE TRANSITION ===== */
.fade-in {
  animation: fadeInUp 0.5s ease forwards;
}

/* ===== RESPONSIVE REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .hero-animate,
  .stagger-children > * {
    opacity: 1 !important;
    animation: none !important;
    transform: none !important;
  }

  .float-anim,
  .pulse-anim {
    animation: none !important;
  }
}
