/* ============================================================
   APOLLO PROPERTY SERVICES — ANIMATIONS.CSS
   Restrained, purposeful motion
   ============================================================ */

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children within service grid */
.services__grid .reveal:nth-child(1) { transition-delay: 0ms; }
.services__grid .reveal:nth-child(2) { transition-delay: 80ms; }
.services__grid .reveal:nth-child(3) { transition-delay: 160ms; }
.services__grid .reveal:nth-child(4) { transition-delay: 240ms; }
.services__grid .reveal:nth-child(5) { transition-delay: 320ms; }
.services__grid .reveal:nth-child(6) { transition-delay: 400ms; }

/* Staggered approach steps */
.approach__steps .reveal:nth-child(1) { transition-delay: 0ms; }
.approach__steps .reveal:nth-child(2) { transition-delay: 100ms; }
.approach__steps .reveal:nth-child(3) { transition-delay: 200ms; }
.approach__steps .reveal:nth-child(4) { transition-delay: 300ms; }


/* ---------- Hero Entrance ---------- */
.hero__content {
  animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero grid subtle pulse */
.hero__grid {
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.65; }
}


/* ---------- Scroll Indicator ---------- */
.hero__scroll span {
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%   { opacity: 0.6; transform: translateY(0); }
  50%  { opacity: 0.2; transform: translateY(12px); }
  100% { opacity: 0.6; transform: translateY(0); }
}


/* ---------- Approach Step Dots ---------- */
.step.visible .step__dot::after {
  animation: dotPulse 1.5s ease-out 0.3s both;
}

@keyframes dotPulse {
  0%   { opacity: 0; transform: scale(0); }
  60%  { opacity: 0.6; transform: scale(1.2); }
  100% { opacity: 0.4; transform: scale(1); }
}


/* ---------- Area Locations Stagger ---------- */
.area__locations .area__loc {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.area__locations.visible .area__loc {
  opacity: 1;
  transform: translateY(0);
}

.area__locations.visible .area__loc:nth-child(1)  { transition-delay: 0ms; }
.area__locations.visible .area__loc:nth-child(2)  { transition-delay: 60ms; }
.area__locations.visible .area__loc:nth-child(3)  { transition-delay: 120ms; }
.area__locations.visible .area__loc:nth-child(4)  { transition-delay: 160ms; }
.area__locations.visible .area__loc:nth-child(5)  { transition-delay: 200ms; }
.area__locations.visible .area__loc:nth-child(6)  { transition-delay: 240ms; }
.area__locations.visible .area__loc:nth-child(7)  { transition-delay: 280ms; }
.area__locations.visible .area__loc:nth-child(8)  { transition-delay: 320ms; }
.area__locations.visible .area__loc:nth-child(9)  { transition-delay: 360ms; }
.area__locations.visible .area__loc:nth-child(10) { transition-delay: 400ms; }
.area__locations.visible .area__loc:nth-child(11) { transition-delay: 440ms; }
.area__locations.visible .area__loc:nth-child(12) { transition-delay: 480ms; }
.area__locations.visible .area__loc:nth-child(13) { transition-delay: 520ms; }
.area__locations.visible .area__loc:nth-child(14) { transition-delay: 560ms; }


/* ---------- Geometric Composition Animation ---------- */
.about__visual.visible .geo-rect--1 {
  animation: rectReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.about__visual.visible .geo-rect--2 {
  animation: rectReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.about__visual.visible .geo-rect--3 {
  animation: rectReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

.about__visual.visible .geo-grid {
  animation: gridReveal 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

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

@keyframes gridReveal {
  from { opacity: 0; }
  to   { opacity: 0.6; }
}


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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .area__locations .area__loc {
    opacity: 1;
    transform: none;
  }

  .hero__content {
    animation: none;
    opacity: 1;
  }

  .hero__grid {
    animation: none;
    opacity: 0.5;
  }

  .hero__scroll span {
    animation: none;
    opacity: 0.4;
  }
}
