/* ============================================================
   VISUAL POLISH 2 — Additional additive CSS layer
   Wave dividers, testimonials texture, hero text reveal,
   floating CTA bar. Safe to delete to revert.
   ============================================================ */

/* -------------------------------------------------------
   A. FLOATING STICKY CTA BAR
   Injected via JS — these are just the styles.
   ------------------------------------------------------- */
#sticky-cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 9998;
  background: linear-gradient(135deg, #edb417 0%, #f59e0b 100%);
  box-shadow: 0 4px 20px rgba(17, 26, 45, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.65rem 1.5rem;
  transform: translateY(-100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
#sticky-cta-bar.visible {
  transform: translateY(0);
  opacity: 1;
}
#sticky-cta-bar a.cta-btn {
  background: #111a2d;
  color: #fff;
  padding: 0.45rem 1.2rem;
  border-radius: 9999px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, background 0.2s ease;
}
#sticky-cta-bar a.cta-btn:hover {
  transform: scale(1.05);
  background: #1a2740;
}
#sticky-cta-bar a.cta-phone {
  color: #111a2d;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}
#sticky-cta-bar a.cta-phone:hover {
  text-decoration: underline;
}
#sticky-cta-bar .cta-divider {
  width: 1px;
  height: 1.2rem;
  background: rgba(17, 26, 45, 0.2);
}

/* Desktop: top of screen below nav */
@media (min-width: 769px) {
  #sticky-cta-bar {
    top: 0;
    bottom: auto;
    transform: translateY(-100%);
  }
}
/* Mobile: bottom of screen, avoid overlap with floating phone button (bottom-left) */
@media (max-width: 768px) {
  #sticky-cta-bar {
    bottom: 0;
    top: auto;
    transform: translateY(100%);
    padding: 0.6rem 1rem;
    gap: 0.6rem;
  }
  #sticky-cta-bar.visible {
    transform: translateY(0);
  }
  #sticky-cta-bar a.cta-btn {
    font-size: 0.78rem;
    padding: 0.4rem 1rem;
  }
  #sticky-cta-bar a.cta-phone {
    font-size: 0.82rem;
  }
}

/* -------------------------------------------------------
   B. WAVE SECTION DIVIDERS
   Injected as SVG divs between sections via JS.
   ------------------------------------------------------- */
.wave-divider {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin: 0;
  padding: 0;
}
.wave-divider svg {
  display: block;
  width: 100%;
  height: 48px;
}
.wave-divider.navy-to-white svg {
  fill: #ffffff;
}
.wave-divider.white-to-navy svg {
  fill: #111a2d;
}
@media (max-width: 768px) {
  .wave-divider svg {
    height: 32px;
  }
}

/* -------------------------------------------------------
   C. TESTIMONIALS BACKGROUND TEXTURE
   Subtle dot pattern overlay on the testimonials section.
   ------------------------------------------------------- */
#seo-testimonials {
  position: relative;
}
#seo-testimonials::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(circle, #edb417 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 0;
}
#seo-testimonials > * {
  position: relative;
  z-index: 1;
}

/* -------------------------------------------------------
   D. ANIMATED HERO TEXT REVEAL
   Targets the first section inside #root (the hero).
   Uses CSS animations triggered on page load.
   ------------------------------------------------------- */
@keyframes heroFadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero section heading (h1 or large text in first section) */
#root > div > section:first-of-type h1,
#root > div > div > section:first-of-type h1,
#root section:first-of-type h1 {
  animation: heroFadeSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* Hero subheading / paragraph */
#root > div > section:first-of-type p:first-of-type,
#root > div > div > section:first-of-type p:first-of-type,
#root section:first-of-type > div > p:first-of-type {
  animation: heroFadeSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

/* Hero CTA button */
#root > div > section:first-of-type a[class*="rounded-full"],
#root > div > section:first-of-type button[class*="rounded-full"],
#root > div > div > section:first-of-type a[class*="rounded-full"],
#root > div > div > section:first-of-type button[class*="rounded-full"],
#root section:first-of-type a[class*="rounded-full"],
#root section:first-of-type button[class*="rounded-full"] {
  animation: heroFadeSlideUp 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.8s both;
}

/* -------------------------------------------------------
   ACCESSIBILITY — Respect reduced motion preference
   ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  #sticky-cta-bar {
    transition: none;
  }
  #root > div > section:first-of-type h1,
  #root > div > section:first-of-type p:first-of-type,
  #root > div > section:first-of-type a[class*="rounded-full"],
  #root > div > section:first-of-type button[class*="rounded-full"],
  #root > div > div > section:first-of-type h1,
  #root > div > div > section:first-of-type p:first-of-type,
  #root > div > div > section:first-of-type a[class*="rounded-full"],
  #root > div > div > section:first-of-type button[class*="rounded-full"],
  #root section:first-of-type h1,
  #root section:first-of-type > div > p:first-of-type,
  #root section:first-of-type a[class*="rounded-full"],
  #root section:first-of-type button[class*="rounded-full"] {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .wave-divider svg {
    display: none;
  }
}
