/* ============================================================
   Animations & Transitions
   ============================================================ */

/* ─── Keyframes ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

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

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

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px) scale(.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(30px) scale(.95); }
}

@keyframes spinslow {
  to { transform: rotate(360deg); }
}

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(10,123,80,.35); }
  50%       { box-shadow: 0 0 0 8px rgba(10,123,80,0); }
}

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

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ─── Page Entry / Exit Transitions ─────────────────────── */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

/* ─── Reveal on scroll ───────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}

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

/* Staggered delays */
.reveal--d1 { transition-delay: .08s; }
.reveal--d2 { transition-delay: .16s; }
.reveal--d3 { transition-delay: .24s; }
.reveal--d4 { transition-delay: .32s; }
.reveal--d5 { transition-delay: .40s; }
.reveal--d6 { transition-delay: .48s; }

/* Direction variants */
.reveal--left  { transform: translateX(-24px); }
.reveal--right { transform: translateX(24px); }
.reveal--scale { transform: scale(.94); }

.reveal--left.is-visible,
.reveal--right.is-visible,
.reveal--scale.is-visible {
  transform: none;
}

/* ─── Floating Rings (hero) ──────────────────────────────── */
.hero-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero-ring--lg {
  width: 520px;
  height: 520px;
  border: 1px solid rgba(10,123,80,.10);
  animation: floatY 8s ease-in-out infinite;
}

.hero-ring--md {
  width: 360px;
  height: 360px;
  border: 1px dashed rgba(201,161,58,.18);
  animation: spinslow 60s linear infinite;
}

.hero-ring--sm {
  width: 200px;
  height: 200px;
  border: 1px solid rgba(10,123,80,.06);
  animation: floatY 10s ease-in-out infinite reverse;
}

/* ─── Live Pulse Dot ─────────────────────────────────────── */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clr-primary);
  animation: pulseDot 2.5s ease infinite;
  flex-shrink: 0;
}

/* ─── Gradient Radial BG ─────────────────────────────────── */
.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1100px 540px at 78% -8%,  rgba(10,123,80,.10),  transparent 60%),
    radial-gradient(820px 460px at 8% 18%,    rgba(201,161,58,.10), transparent 55%);
  pointer-events: none;
}

/* ─── Shimmer (skeleton loader) ──────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--clr-bg-muted) 25%, rgba(255,255,255,.6) 50%, var(--clr-bg-muted) 75%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--r-md);
}

/* ─── Count-up Numbers ───────────────────────────────────── */
.counter[data-count] {
  font-variant-numeric: tabular-nums;
}

/* ─── Sticky Navbar scroll state ─────────────────────────── */
.navbar { transition: background var(--t-slow), box-shadow var(--t-base), backdrop-filter var(--t-slow); }

/* ─── WhatsApp float button ──────────────────────────────── */
.whatsapp-float {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  z-index: var(--z-toast);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,.5);
  text-decoration: none;
  transition: transform var(--t-spring), box-shadow var(--t-base);
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 12px 32px rgba(37,211,102,.6);
}

/* Lift WhatsApp float above the bottom nav on mobile */
@media (max-width: 640px) {
  .whatsapp-float {
    bottom: calc(58px + env(safe-area-inset-bottom, 0px) + var(--sp-3));
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    width: 46px;
    height: 46px;
    right: var(--sp-4);
  }
}

/* ─── Scroll Progress Bar ────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-gold));
  z-index: calc(var(--z-sticky) + 10);
  transition: width .1s linear;
  pointer-events: none;
}

/* ─── Page Loader ────────────────────────────────────────── */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--clr-bg-card);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--sp-4);
  transition: opacity .4s ease;
}

.page-loader.is-done {
  opacity: 0;
  pointer-events: none;
}

.page-loader__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-primary);
  animation: floatY 1.5s ease-in-out infinite;
}

.page-loader__ring {
  width: 24px;
  height: 24px;
  border: 3px solid var(--clr-gold);
  border-radius: 50%;
  border-right-color: transparent;
  transform: rotate(-30deg);
}

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

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