/* ==========================================================================
   Theme override styles — loaded AFTER main.css (depends on 'whowho-main').
   Sections:
     1) Header logo
     3) Integra blue footer strip
     4) Animation & frontend polish
     5) Premium ambient animation — hero sections
     6) Premium layered animation — has-premium-animation + has-premium-ambient
     7) Soft lighting — has-soft-lighting (light/white sections)
     8) Card depth & element lighting — has-premium-card-depth
     9) JS-injected decoration base styles + ww-node keyframe
   Brand palette: navy #0D1F3C · royal blue #1E90FF · cyan #64B4FF · gold #F4C430
   No canvas. No WebGL. No external libraries.
   ========================================================================== */

/* ─── 1) Header logo ─────────────────────────────────────────────────────── */
.header-inner { padding: .5rem 2rem; min-height: 104px; transition: min-height 0.3s ease; }
.header-logo-img { height: 88px; width: auto; object-fit: contain; transition: height 0.3s ease; }
.page-main  { padding-top: 104px; }
.page-hero  { padding-top: calc(104px + 3.5rem); }
.mobile-nav { max-height: calc(100vh - 104px); }
@media (max-width: 768px) {
  .header-logo-img { height: 58px; }
  .page-main { padding-top: 74px; }
  .page-hero { padding-top: calc(74px + 2.5rem); }
}

/* ─── 3) Integra blue footer strip ──────────────────────────────────────── */
.footer-integra { background: #1c4d96; color: #fff; text-align: center; padding: 1.1rem 0; }
.footer-integra-line { margin: 0 0 .4rem; font-size: .8125rem; line-height: 1.7; color: #fff; }
.footer-integra-line a { color: #fff; text-decoration: none; }
.footer-integra-line a:hover { color: #fff; text-decoration: underline; }
.footer-integra .fi-sep { opacity: .55; margin: 0 .4rem; }
.footer-integra-brand {
  display: inline-flex; align-items: center; gap: .5rem; color: #fff;
  font-weight: 800; font-size: 1.15rem; letter-spacing: .04em;
  margin: .35rem 0 .15rem; text-decoration: none;
}
.footer-integra-brand:hover { color: #fff; }
.footer-integra-brand img,
.footer-integra-brand svg { height: 30px; width: auto; display: block; flex-shrink: 0; }
.footer-integra-credit { margin: .15rem 0 0; font-size: .75rem; color: rgba(255,255,255,.9); }
.footer-integra-credit a { color: #fff; font-weight: 600; text-decoration: underline; }
.footer-integra-credit a:hover { color: #fff; opacity: .85; }
@media (max-width: 768px) {
  .footer-integra { padding: 1.1rem 0; }
  .footer-integra-line { font-size: .75rem; }
  .footer-integra .fi-sep { margin: 0 .25rem; }
  .footer-integra-brand { font-size: 1.05rem; }
}

/* =============================================================================
   4) ANIMATION & FRONTEND POLISH
============================================================================= */
@keyframes ww-fade-up {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ww-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Hero entrance stagger */
.hero-inner .hero-badge     { animation: ww-fade-up 0.50s ease both 0.08s; }
.hero-inner .hero-title     { animation: ww-fade-up 0.55s ease both 0.22s; }
.hero-inner .hero-subtitle  { animation: ww-fade-up 0.55s ease both 0.38s; }
.hero-inner .hero-actions   { animation: ww-fade-up 0.50s ease both 0.52s; }
.hero-inner .hero-trust-row { animation: ww-fade-in 0.60s ease both 0.66s; }

/* Inner page hero entrance stagger */
.page-hero-inner .breadcrumb     { animation: ww-fade-up 0.45s ease both 0.05s; }
.page-hero-inner .page-title     { animation: ww-fade-up 0.55s ease both 0.18s; }
.page-hero-inner .page-hero-desc { animation: ww-fade-up 0.55s ease both 0.32s; }
.page-hero-inner .hero-actions   { animation: ww-fade-up 0.50s ease both 0.46s; }

/* Header scroll shrink */
.site-header { transition: background-color 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease; }
.site-header.is-scrolled .header-inner    { min-height: 80px; }
.site-header.is-scrolled .header-logo-img { height: 62px; }
@media (max-width: 768px) {
  .site-header.is-scrolled .header-inner    { min-height: 64px; }
  .site-header.is-scrolled .header-logo-img { height: 44px; }
}

/* Nav animated underline */
.nav-link { position: relative; }
.nav-link::after {
  content: ''; position: absolute; bottom: 2px;
  left: 0.9rem; right: 0.9rem; height: 2px;
  background: var(--yellow); border-radius: 2px;
  transform: scaleX(0); transform-origin: center; transition: transform 0.25s ease;
}
.nav-link:hover::after, .nav-link--active::after { transform: scaleX(1); }

/* Stagger delay classes */
.ww-stagger-1 { transition-delay: 0.00s; } .ww-stagger-2 { transition-delay: 0.08s; }
.ww-stagger-3 { transition-delay: 0.16s; } .ww-stagger-4 { transition-delay: 0.24s; }
.ww-stagger-5 { transition-delay: 0.32s; } .ww-stagger-6 { transition-delay: 0.40s; }
.ww-stagger-7 { transition-delay: 0.48s; } .ww-stagger-8 { transition-delay: 0.54s; }

/* Button focus */
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* =============================================================================
   5) PREMIUM AMBIENT ANIMATION — HERO SECTIONS
============================================================================= */

/* ── Keyframes ───────────────────────────────────────────────────────────── */
@keyframes ww-orbit-cw  { from { transform: rotate(0deg);  } to { transform: rotate(360deg);  } }
@keyframes ww-orbit-ccw { from { transform: rotate(0deg);  } to { transform: rotate(-360deg); } }

/* Hero glow breathe — uses scale on elliptical pseudo-element */
@keyframes ww-glow-breathe {
  0%, 100% { opacity: 0.42; transform: scale(1);    }
  50%       { opacity: 0.82; transform: scale(1.10); }
}

/* Section glow pulse — opacity only (full-coverage inset element) */
@keyframes ww-section-pulse {
  0%, 100% { opacity: 0.52; }
  50%       { opacity: 0.88; }
}

/* Particle float / drift */
@keyframes ww-float {
  0%, 100% { transform: translate(0, 0);         opacity: 0.55; }
  35%       { transform: translate(9px, -18px);  opacity: 0.90; }
  70%       { transform: translate(-6px, 12px);  opacity: 0.38; }
}
@keyframes ww-drift {
  0%, 100% { transform: translateX(0px);   opacity: 0.62; }
  50%       { transform: translateX(14px); opacity: 0.82; }
}

/* Node pulse — larger soft circles */
@keyframes ww-node-pulse {
  0%, 100% { opacity: 0.35; transform: scale(1);    }
  50%       { opacity: 0.72; transform: scale(1.30); }
}

/* ── Homepage .hero ──────────────────────────────────────────────────────── */
.hero::before {
  content: ''; position: absolute; left: -5%; top: 2%; width: 60%; height: 96%;
  background: radial-gradient(ellipse at 25% 45%,
    rgba(30, 144, 255, 0.34) 0%, rgba(0, 60, 160, 0.20) 30%, transparent 60%);
  border-radius: 50%; z-index: 3; pointer-events: none;
  animation: ww-glow-breathe 8s ease-in-out infinite; will-change: opacity, transform;
}
.hero::after {
  content: ''; position: absolute;
  left: calc(22% - 310px); top: calc(50% - 310px); width: 620px; height: 620px;
  border: 1px dashed rgba(30, 144, 255, 0.42); border-radius: 50%;
  z-index: 3; pointer-events: none;
  animation: ww-orbit-cw 28s linear infinite; will-change: transform;
}

/* ── Inner page .page-hero ───────────────────────────────────────────────── */
.page-hero { position: relative; overflow: hidden; }
.page-hero::before {
  content: ''; position: absolute; left: -8%; top: 2%; width: 60%; height: 96%;
  background: radial-gradient(ellipse at 25% 45%,
    rgba(30, 144, 255, 0.30) 0%, rgba(0, 60, 160, 0.17) 33%, transparent 62%);
  border-radius: 50%; z-index: 1; pointer-events: none;
  animation: ww-glow-breathe 9s ease-in-out 1.5s infinite; will-change: opacity, transform;
}
.page-hero::after {
  content: ''; position: absolute;
  left: calc(20% - 260px); top: calc(50% - 260px); width: 520px; height: 520px;
  border: 1px dashed rgba(30, 144, 255, 0.38); border-radius: 50%;
  z-index: 1; pointer-events: none;
  animation: ww-orbit-cw 33s linear infinite; will-change: transform;
}
/* Text always above decoration */
.page-hero-inner { position: relative; z-index: 2; }

/* =============================================================================
   6) PREMIUM LAYERED ANIMATION — DARK CONTENT SECTIONS
   Classes: .has-premium-animation (new full system) + .has-premium-ambient (alias)
   Layers: animated glow · faint grid texture · diagonal accent · orbit ring
============================================================================= */

/* ── .cta-banner dark navy background ───────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, #0b1f40 0%, #112a5e 50%, #0b1f40 100%);
  position: relative; overflow: hidden; padding: 4rem 0;
}
.cta-banner-inner {
  position: relative; z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
}
.cta-banner-text h2  { color: #fff; margin-bottom: .5rem; }
.cta-banner-text p   { color: rgba(255,255,255,.84); }
.cta-banner-actions  { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── Shared setup ────────────────────────────────────────────────────────── */
.has-premium-animation,
.has-premium-ambient { position: relative; overflow: hidden; }

.has-premium-animation > .container,
.has-premium-ambient  > .container { position: relative; z-index: 4; }

/* ── Animated glow + grid + diagonal accent (::before) ──────────────────── */
/* Excludes .cta-section because main.css line 648 already defines ::before on it */
.has-premium-animation:not(.cta-section)::before,
.has-premium-ambient:not(.cta-section)::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* Left-side luminous glow */
    radial-gradient(ellipse 55% 80% at 22% 50%,
      rgba(30, 144, 255, 0.36) 0%,
      rgba(0,   60, 160, 0.22) 36%,
      transparent 64%
    ),
    /* Diagonal accent band — suggests depth, not a network */
    linear-gradient(
      135deg,
      transparent 22%,
      rgba(30,  144, 255, 0.026) 44%,
      rgba(100, 180, 255, 0.034) 50%,
      rgba(30,  144, 255, 0.026) 56%,
      transparent 78%
    ),
    /* Vertical grid lines — very faint premium texture */
    repeating-linear-gradient(
      90deg,
      transparent, transparent 79px,
      rgba(30, 144, 255, 0.028) 79px, rgba(30, 144, 255, 0.028) 80px
    ),
    /* Horizontal grid lines */
    repeating-linear-gradient(
      0deg,
      transparent, transparent 79px,
      rgba(30, 144, 255, 0.028) 79px, rgba(30, 144, 255, 0.028) 80px
    );
  z-index: 0; pointer-events: none;
  animation: ww-section-pulse 12s ease-in-out infinite;
  will-change: opacity;
}

/* ── Orbit ring (::after) ────────────────────────────────────────────────── */
.has-premium-animation::after,
.has-premium-ambient::after {
  content: ''; position: absolute;
  left: calc(18% - 255px); top: calc(50% - 255px);
  width: 510px; height: 510px;
  border: 1px dashed rgba(30, 144, 255, 0.36);
  border-radius: 50%; z-index: 0; pointer-events: none;
  animation: ww-orbit-cw 44s linear infinite; will-change: transform;
}

/* .cta-section — orbit ring goes right-side (::before owned by main.css) */
.cta-section.has-premium-animation::after,
.cta-section.has-premium-ambient::after {
  left: auto;
  right: calc(14% - 235px); top: calc(50% - 235px);
  width: 470px; height: 470px;
  border-color: rgba(255, 255, 255, 0.14);
  animation-direction: reverse;
}

/* Content layers inside dark sections */
.cta-section { position: relative; overflow: hidden; }
.cta-section .cta-content { position: relative; z-index: 2; }
.process-teaser > .container,
.stats-section  > .container { position: relative; z-index: 4; }

/* =============================================================================
   7) SOFT LIGHTING — LIGHT / WHITE SECTIONS
   Very subtle blue + warm tonal depth. Static — no animation. Calm feel.
============================================================================= */
.has-soft-lighting { position: relative; }
.has-soft-lighting::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 42% 52% at  8% 28%, rgba(30,  144, 255, 0.055) 0%, transparent 70%),
    radial-gradient(ellipse 36% 46% at 90% 74%, rgba(244, 196,  48, 0.038) 0%, transparent 65%);
  z-index: 0; pointer-events: none;
}
.has-soft-lighting > .container { position: relative; z-index: 2; }

/* =============================================================================
   8) CARD DEPTH & ELEMENT LIGHTING
============================================================================= */

/* ── Base shadows for cards inside premium sections ──────────────────────── */
.has-premium-card-depth .feature-card {
  box-shadow: 0 2px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(30,144,255,0.07);
  border: 1px solid rgba(30,144,255,0.09);
}
.has-premium-card-depth .process-step    { box-shadow: 0 2px 18px rgba(0,0,0,0.06); }
.has-premium-card-depth .pet-type-card {
  box-shadow: 0 3px 18px rgba(0,0,0,0.07), 0 1px 4px rgba(30,144,255,0.06);
  border: 1px solid rgba(30,144,255,0.08);
}
.has-premium-card-depth .contact-detail-card { box-shadow: 0 3px 20px rgba(0,0,0,0.07); }
.has-premium-card-depth .contact-pickup-card { box-shadow: 0 3px 18px rgba(0,0,0,0.06); }
.has-premium-card-depth .faq-item            { box-shadow: 0 2px 14px rgba(0,0,0,0.05); }
.has-premium-card-depth .treatment-step      { box-shadow: 0 2px 14px rgba(0,0,0,0.05); }

/* ── Feature card hover — premium glow ───────────────────────────────────── */
.feature-card { transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease; }
.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 52px rgba(30,144,255,0.20), 0 0 0 1px rgba(30,144,255,0.30);
  border-color: rgba(30,144,255,0.42);
}
.feature-card--accent:hover {
  box-shadow: 0 22px 52px rgba(244,196,48,0.20), 0 0 0 1px rgba(244,196,48,0.38);
  border-color: rgba(244,196,48,0.44);
}

/* ── Other card hover states ─────────────────────────────────────────────── */
.rug-type-item, .pet-type-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.rug-type-item:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(30,144,255,0.14); }
.pet-type-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 46px rgba(30,144,255,0.18), 0 0 0 1px rgba(30,144,255,0.20);
}

.process-step { transition: transform 0.28s ease, box-shadow 0.28s ease, border-left-color 0.28s ease; }
.process-step:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 54px rgba(30,144,255,0.15);
  border-left-color: var(--yellow);
}
.process-number { transition: transform 0.25s ease; }
.process-step:hover .process-number { transform: scale(1.14); }

.stat-item { transition: transform 0.25s ease; }
.stat-item:hover { transform: translateY(-3px) scale(1.03); }

.faq-item { transition: box-shadow 0.25s ease; }
.faq-item:hover { box-shadow: 0 6px 28px rgba(30,144,255,0.10); }

/* ── Step number yellow glow ─────────────────────────────────────────────── */
.process-number, .step-number, .pms-num {
  text-shadow: 0 0 22px rgba(244, 196, 48, 0.60);
  transition: text-shadow 0.3s ease;
}
.process-step:hover .step-number { text-shadow: 0 0 32px rgba(244, 196, 48, 0.88); }
.tstep-num { text-shadow: 0 0 18px rgba(244, 196, 48, 0.52); transition: text-shadow 0.3s ease; }

/* ── Contact card hover ──────────────────────────────────────────────────── */
.contact-detail-card  { transition: box-shadow 0.28s ease, transform 0.28s ease; }
.contact-detail-card:hover {
  box-shadow: 0 10px 36px rgba(30,144,255,0.13), 0 0 0 1px rgba(30,144,255,0.14);
  transform: translateY(-2px);
}
.contact-pickup-card  { transition: box-shadow 0.28s ease; }
.contact-pickup-card:hover  { box-shadow: 0 8px 28px rgba(30,144,255,0.10); }

/* ── CTA button polish ───────────────────────────────────────────────────── */
.btn-cta-primary {
  background: var(--white); color: var(--blue); font-weight: 700;
  box-shadow: 0 4px 20px rgba(255,255,255,0.22);
  transition: box-shadow 0.25s, transform 0.25s, color 0.25s;
}
.btn-cta-primary:hover {
  color: var(--blue-dark);
  box-shadow: 0 0 42px rgba(255,255,255,0.34), 0 8px 24px rgba(0,0,0,0.22);
  transform: translateY(-3px);
}
.btn-cta-outline {
  border-color: rgba(255,255,255,0.62);
  transition: background 0.25s, box-shadow 0.25s, transform 0.25s;
}
.btn-cta-outline:hover {
  background: rgba(255,255,255,0.14);
  box-shadow: 0 0 22px rgba(255,255,255,0.14);
  transform: translateY(-3px);
}

/* =============================================================================
   9) JS-INJECTED DECORATION BASE STYLES
============================================================================= */
.ww-orbit-ring { position: absolute; border-radius: 50%; pointer-events: none; will-change: transform; }
.ww-particle   { position: absolute; border-radius: 50%; pointer-events: none; will-change: transform, opacity; }
.ww-node       { position: absolute; border-radius: 50%; pointer-events: none; will-change: transform, opacity; }

/* =============================================================================
   MOBILE — scale down and simplify all animation layers
============================================================================= */
@media (max-width: 768px) {
  /* Hero */
  .hero::before, .page-hero::before { width: 88%; height: 54%; top: 15%; left: -20%; }
  .hero::after {
    width: 260px; height: 260px;
    left: calc(50% - 130px); top: calc(50% - 130px); opacity: 0.48;
  }
  .page-hero::after {
    width: 220px; height: 220px;
    left: calc(50% - 110px); top: calc(50% - 110px); opacity: 0.44;
  }
  /* Dark sections */
  .has-premium-animation::after, .has-premium-ambient::after {
    width: 200px; height: 200px;
    left: calc(50% - 100px); top: calc(50% - 100px); opacity: 0.38;
  }
  .cta-section.has-premium-animation::after,
  .cta-section.has-premium-ambient::after {
    right: auto; left: calc(50% - 100px);
  }
  /* Soft lighting — even more subtle on mobile */
  .has-soft-lighting::before { opacity: 0.6; }
  /* CTA banner */
  .cta-banner { padding: 2.5rem 0; }
  .cta-banner-inner { flex-direction: column; text-align: center; }
  .cta-banner-actions { justify-content: center; }
}

/* =============================================================================
   PREFERS-REDUCED-MOTION — disable all motion, keep static depth
============================================================================= */
@media (prefers-reduced-motion: reduce) {
  /* Section 4 — entrance animations */
  .hero-inner .hero-badge, .hero-inner .hero-title, .hero-inner .hero-subtitle,
  .hero-inner .hero-actions, .hero-inner .hero-trust-row,
  .page-hero-inner .breadcrumb, .page-hero-inner .page-title,
  .page-hero-inner .page-hero-desc, .page-hero-inner .hero-actions {
    animation: none !important; opacity: 1 !important; transform: none !important;
  }
  .fade-in { opacity: 1 !important; transform: none !important; transition: none !important; }
  [class*="ww-stagger-"] { transition-delay: 0s !important; }

  /* Section 5 — hero ambient */
  .hero::before, .hero::after,
  .page-hero::before, .page-hero::after {
    animation: none !important; opacity: 0 !important; transform: none !important;
  }

  /* Section 6 — dark section animation */
  .has-premium-animation:not(.cta-section)::before,
  .has-premium-ambient:not(.cta-section)::before { animation: none !important; opacity: 0.5 !important; }
  .has-premium-animation::after, .has-premium-ambient::after {
    animation: none !important; opacity: 0 !important;
  }

  /* All JS-injected elements */
  .ww-orbit-ring, .ww-particle, .ww-node { display: none !important; }

  /* Card/element transitions — keep hover visible but no motion */
  .feature-card:hover, .pet-type-card:hover, .rug-type-item:hover,
  .process-step:hover, .stat-item:hover,
  .contact-detail-card:hover, .btn-cta-primary:hover, .btn-cta-outline:hover {
    transform: none !important;
  }
}
