/* ==========================================================================
   Hera Hospital — Animations
   Paired with assets/js/animations.js (IntersectionObserver reveal-on-scroll)
   ========================================================================== */

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

@keyframes fadeIn{
  from{ opacity:0; }
  to{ opacity:1; }
}

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

@keyframes pulseRing{
  0%{ box-shadow:0 0 0 0 rgba(200,16,46,.35); }
  70%{ box-shadow:0 0 0 14px rgba(200,16,46,0); }
  100%{ box-shadow:0 0 0 0 rgba(200,16,46,0); }
}

/* Scroll-reveal: smoother, gentle easing without changing card geometry */
.reveal{
  opacity:0;
  transform:translateY(24px);
  transition:opacity .52s cubic-bezier(.22,1,.36,1), transform .52s cubic-bezier(.22,1,.36,1);
}
.reveal.in-view{
  opacity:1;
  transform:translateY(0);
}

/* Staggered reveal helper — apply alongside .reveal on repeated card grids */
.reveal.d1{ transition-delay:.035s; }
.reveal.d2{ transition-delay:.07s; }
.reveal.d3{ transition-delay:.105s; }
.reveal.d4{ transition-delay:.14s; }
.reveal.d5{ transition-delay:.175s; }
.reveal.d6{ transition-delay:.21s; }
.reveal.d7{ transition-delay:.245s; }
.reveal.d8{ transition-delay:.28s; }

/* Gentle float for hero collage accents */
.accent-diamond.a1{ animation:floatY 4.5s ease-in-out infinite; }
.accent-diamond.a2{ animation:floatY 5.5s ease-in-out infinite reverse; }

/* The header appointment CTA stays calm until interaction; avoid a perpetual pulse. */
.nav-right .btn-primary{ animation:none; }

/* Page hero fade-in on load */
.page-hero .breadcrumb,
.page-hero h1,
.page-hero p{
  animation:fadeInUp .5s cubic-bezier(.22,1,.36,1) both;
}
.page-hero h1{ animation-delay:.08s; }
.page-hero p{ animation-delay:.16s; }

/* ---------- Homepage hero text entrance (building photo stays static) ---------- */
@keyframes hero-copy-rise{
  from{ opacity:0; transform:translateY(16px); }
  to{ opacity:1; transform:translateY(0); }
}
@media (min-width: 961px) and (prefers-reduced-motion: no-preference) {
  html.hero-intro-pending .hero-copy > .eyebrow,
  html.hero-intro-pending .hero-title-line,
  html.hero-intro-pending .hero-copy > p,
  html.hero-intro-pending .hero-copy > .hero-actions,
  html.hero-intro-pending .hero-copy > .hero-insurance-heading{
    opacity:0;
    pointer-events:none;
  }
  html.hero-intro-playing .hero-copy > .eyebrow{ animation:hero-copy-rise .28s ease-out .08s both; }
  html.hero-intro-playing .hero-title-line:nth-child(1){ animation:hero-copy-rise .32s ease-out .36s both; }
  html.hero-intro-playing .hero-title-line:nth-child(2){ animation:hero-copy-rise .32s ease-out .66s both; }
  html.hero-intro-playing .hero-title-line:nth-child(3){ animation:hero-copy-rise .34s ease-out .96s both; }
  html.hero-intro-playing .hero-copy > p{ animation:hero-copy-rise .34s ease-out 1.34s both; }
  html.hero-intro-playing .hero-copy > .hero-actions{ animation:hero-copy-rise .32s ease-out 1.72s both; }
  html.hero-intro-playing .hero-copy > .hero-insurance-heading{ animation:hero-copy-rise .34s ease-out 2.08s both; }
}
