/* ============================================================
   ALLIANT WELLNESS — ANIMATIONS & TRANSITIONS
   ============================================================ */

/* ── Scroll-triggered Entrance ─────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.7s ease-out;
}

.fade-in.is-visible { opacity: 1; }

.fade-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-right.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.is-visible {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for grid children */
.stagger-children > *:nth-child(1) { transition-delay: 0s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.5s; }

/* ── Keyframe Animations ───────────────────────────────────── */

/* Floating blob drift */
@keyframes float-blob {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -20px) scale(1.05); }
  66%  { transform: translate(-20px, 15px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

/* Bob up-down */
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* Heartbeat pulse */
@keyframes pulse-ring {
  0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(240, 165, 0, 0.5); }
  70%  { transform: scale(1.04); box-shadow: 0 0 0 14px rgba(240, 165, 0, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(240, 165, 0, 0); }
}

/* Teal pulse (for call button) */
@keyframes pulse-teal {
  0%   { box-shadow: 0 0 0 0 rgba(43, 57, 144, 0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(43, 57, 144, 0); }
  100% { box-shadow: 0 0 0 0 rgba(43, 57, 144, 0); }
}

/* Shimmer / shine sweep */
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Line draw (for step connectors) */
@keyframes line-draw {
  from { width: 0; }
  to   { width: 100%; }
}

/* Star fill */
@keyframes star-fill {
  from { fill: #DDD; }
  to   { fill: var(--color-accent); }
}

/* Spin (social icons) */
@keyframes spin-once {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Nav cascade */
@keyframes nav-drop {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero word entrance */
@keyframes word-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Counter count-up (JS-driven — class added by observer) */
@keyframes count-up-flash {
  0%   { color: var(--color-accent); }
  100% { color: var(--color-white); }
}

/* Wave */
@keyframes wave-shift {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Applied Animations ────────────────────────────────────── */

/* Floating background blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.06;
  filter: blur(80px);
  animation: float-blob 10s ease-in-out infinite;
  pointer-events: none;
}

.blob--1 {
  width: 400px; height: 400px;
  top: -10%; left: -10%;
  animation-duration: 12s;
}

.blob--2 {
  width: 300px; height: 300px;
  top: 40%; right: -5%;
  animation-duration: 9s;
  animation-delay: -3s;
}

.blob--3 {
  width: 250px; height: 250px;
  bottom: -5%; left: 30%;
  animation-duration: 14s;
  animation-delay: -6s;
}

.blob--gold {
  background: var(--color-accent);
  opacity: 0.04;
}

/* Floating badge bob */
.float-badge {
  animation: bob 3s ease-in-out infinite;
}

/* Pulse CTA */
.btn--pulse {
  animation: pulse-ring 3.5s ease-in-out infinite;
}

/* Pulse phone icon */
.phone-pulse {
  animation: pulse-teal 3s ease-in-out infinite;
}

/* Social icon spin on hover */
.social-icon:hover svg {
  animation: spin-once 0.5s ease-in-out;
}

/* Team image zoom overlay */
.team-img-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.team-img-wrap img {
  transition: transform 0.6s ease;
}

.team-img-wrap:hover img {
  transform: scale(1.05);
}

.team-img-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(18, 104, 104, 0.85));
  padding: var(--space-md);
  transform: translateY(100%);
  transition: transform 0.4s ease;
  color: var(--color-white);
}

.team-img-wrap:hover .team-img-overlay {
  transform: translateY(0);
}

/* Step line draw */
.step-line {
  height: 3px;
  background: var(--color-primary);
  width: 0;
  transition: width 1.2s ease;
}

.step-line.is-visible { width: 100%; }

/* Star fill animation */
.star-animated {
  fill: #DDD;
}

.stars.is-visible .star-animated {
  animation: star-fill 0.5s ease forwards;
}

.stars.is-visible .star-animated:nth-child(1) { animation-delay: 0s; }
.stars.is-visible .star-animated:nth-child(2) { animation-delay: 0.1s; }
.stars.is-visible .star-animated:nth-child(3) { animation-delay: 0.2s; }
.stars.is-visible .star-animated:nth-child(4) { animation-delay: 0.3s; }
.stars.is-visible .star-animated:nth-child(5) { animation-delay: 0.4s; }

/* Continuous wave animation */
.wave-animated {
  animation: wave-shift 12s linear infinite;
  width: 200%;
}

/* Header scroll shrink */
.site-header.scrolled {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  box-shadow: 0 2px 20px rgba(26, 140, 140, 0.15);
}

/* Hero image reveal */
.hero-img-reveal {
  opacity: 0;
  transform: translateX(30px);
  filter: blur(6px);
  transition: opacity 0.9s ease, transform 0.9s ease, filter 0.9s ease;
  transition-delay: 0.3s;
}

.hero-img-reveal.is-visible {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}

/* Service card top border glow on hover */
.service-card {
  border-top: 3px solid transparent;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.service-card:hover {
  border-top-color: var(--color-primary);
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(26, 140, 140, 0.18);
}

/* Review card micro parallax */
.review-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(26, 140, 140, 0.14);
}

/* Form field focus animation */
.form-group input,
.form-group textarea,
.form-group select {
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  transform: translateY(-1px);
}

/* Success animation */
@keyframes check-draw {
  from { stroke-dashoffset: 100; }
  to   { stroke-dashoffset: 0; }
}

.success-check {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: check-draw 0.8s ease forwards 0.3s;
}

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