/* ============================================================
   animations.css — real. Motion & Polish
   ============================================================ */

/* ─── Respect reduced-motion preference ─────────────────── */
@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 !important;
    transform: none !important;
  }

  .hero__blob,
  .hero__badge-dot,
  .marquee-track,
  .cta-section__blob {
    animation: none !important;
  }

  body {
    opacity: 1 !important;
    transition: none !important;
  }
}

/* ─── Hero entrance stagger ─────────────────────────────── */
/* Fired once .visible is added — extra shimmer on headline */
.hero__headline.visible .hero__accent {
  animation: accent-emerge 0.6s var(--ease-out) 0.4s both;
}

@keyframes accent-emerge {
  from {
    opacity: 0.6;
    filter: blur(4px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

/* ─── Counter shimmer on complete ───────────────────────── */
.results__counter {
  position: relative;
}

/* ─── Nav scrolled transition ───────────────────────────── */
/* (handled in components.css, ensured smooth here) */

/* ─── Button press micro-interaction ────────────────────── */
.btn {
  will-change: transform;
}

/* ─── Card lift on hover — gpu hint ─────────────────────── */
.card,
.results__stat,
.faq__item {
  will-change: transform;
}

/* ─── Section heading underline accent ──────────────────── */
.heading-lg em,
.heading-xl em,
.heading-md em {
  position: relative;
}

/* ─── Smooth scroll offset for sticky nav ───────────────── */
:target {
  scroll-margin-top: 5rem;
}

/* ─── Focus ring animation ──────────────────────────────── */
:focus-visible {
  animation: focus-ring 200ms var(--ease-out);
}

@keyframes focus-ring {
  from { outline-offset: 6px; }
  to   { outline-offset: 3px; }
}

/* ─── Guarantee section — dark bg text fade ─────────────── */
.guarantee .reveal {
  /* Override default warm fade for dark background context */
}

/* ─── Hero grain texture ────────────────────────────────── */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 192px 192px;
  z-index: 1;
  mix-blend-mode: multiply;
}

/* ─── Accent word underline ─────────────────────────────── */
.hero__accent {
  position: relative;
}

.hero__accent::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), rgba(255,81,0,0.3));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease-out) 0.6s;
}

.hero__headline.visible .hero__accent::after {
  transform: scaleX(1);
}

/* ─── Button ripple on click ─────────────────────────────── */
.btn:active {
  scale: 0.97;
}

/* ─── CTA blob pulse ────────────────────────────────────── */
.cta-section__blob {
  animation: blob-pulse 6s ease-in-out infinite alternate;
}

@keyframes blob-pulse {
  0%   { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 1;   transform: translate(-50%, -50%) scale(1.12); }
}

/* ─── Featured services tag shimmer ────────────────────── */
.services__featured-tag {
  background: linear-gradient(
    100deg,
    #FF5100 0%,
    #FF7A00 40%,
    rgba(255,255,255,0.55) 50%,
    #FF7A00 60%,
    #FF5100 100%
  );
  background-size: 200% auto;
  animation: shimmer-tag 2.8s linear infinite;
}

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

/* ─── Featured card glow pulse ──────────────────────────── */
@keyframes card-glow-pulse {
  0%, 100% {
    box-shadow: 0 8px 32px rgba(255,81,0,0.10), 0 0 0 1px rgba(255,81,0,0.10);
  }
  50% {
    box-shadow: 0 8px 48px rgba(255,81,0,0.26), 0 0 0 1px rgba(255,81,0,0.22);
  }
}

/* ─── Hero spotlight drift ──────────────────────────────── */
@keyframes spotlight-drift {
  0%   { transform: translateX(-8%) translateY(0); }
  50%  { transform: translateX(8%) translateY(-4%); }
  100% { transform: translateX(-8%) translateY(0); }
}
