/* ============================================================
   PETS ALIVE INDIANA — WOW Visual Enhancement Layer
   Applied AFTER style.css. All rules are additive overrides.
   ============================================================ */

/* ------------------------------------------------------------
   0. Enhanced Custom Properties
   ------------------------------------------------------------ */
:root {
  --wow-gradient: linear-gradient(135deg, var(--color-secondary), var(--color-cta));
  --wow-gradient-text: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 40%, var(--color-cta) 100%);
  --wow-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wow-blur-start: 8px;
}

/* ------------------------------------------------------------
   1. Enhanced Selection & Focus
   ------------------------------------------------------------ */
::selection {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

*:focus-visible {
  outline: 2px solid var(--color-cta) !important;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ------------------------------------------------------------
   2. Scroll Progress — Gradient
   ------------------------------------------------------------ */
.scroll-progress {
  background: linear-gradient(90deg,
    var(--color-primary),
    var(--color-secondary),
    var(--color-cta),
    var(--color-secondary),
    var(--color-primary));
  background-size: 200% 100%;
  height: 3px;
}

/* ------------------------------------------------------------
   3. Enhanced Navigation — Frosted Glass
   ------------------------------------------------------------ */
.nav {
  backdrop-filter: blur(12px) saturate(1.8);
  -webkit-backdrop-filter: blur(12px) saturate(1.8);
  background: rgba(255, 255, 255, 0.85);
  transition: background-color 0.4s var(--wow-ease),
              box-shadow 0.4s var(--wow-ease),
              backdrop-filter 0.3s ease;
}

.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(2);
  -webkit-backdrop-filter: blur(20px) saturate(2);
  box-shadow: 0 1px 20px rgba(45, 90, 61, 0.08);
}

/* ------------------------------------------------------------
   4. Hero — Cinematic Dark Overlay + Parallax Support
   ------------------------------------------------------------ */
.hero {
  min-height: 80vh;
}

.hero::before {
  background: linear-gradient(
    135deg,
    rgba(45, 90, 61, 0.88) 0%,
    rgba(30, 61, 42, 0.78) 40%,
    rgba(232, 148, 44, 0.2) 100%
  );
}

.hero h1 {
  color: var(--color-white);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.hero p,
.hero-subtitle {
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-trust {
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* Urgency Badge — Frosted Glass */
.hero__urgency-badge {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--color-white);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-block;
  margin-bottom: var(--space-lg);
  letter-spacing: 0.01em;
}

/* Floating Ambient Orb */
.hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 148, 44, 0.12) 0%, transparent 70%);
  top: -200px;
  right: -150px;
  z-index: 0;
  pointer-events: none;
}

/* Parallax container for JS */
.hero__bg {
  transition: none;
}

/* ------------------------------------------------------------
   5. Hero Entrance — Staggered Blur-to-Sharp
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  @keyframes wowHeroIn {
    from {
      opacity: 0;
      transform: translateY(30px);
      filter: blur(var(--wow-blur-start));
    }
    to {
      opacity: 1;
      transform: translateY(0);
      filter: blur(0);
    }
  }

  .hero h1 {
    animation: wowHeroIn 1s var(--wow-ease) 0.1s both;
  }

  .hero__urgency-badge {
    animation: wowHeroIn 0.8s var(--wow-ease) 0s both;
  }

  .hero-subtitle {
    animation: wowHeroIn 1s var(--wow-ease) 0.25s both;
  }

  .hero-buttons {
    animation: wowHeroIn 1s var(--wow-ease) 0.4s both;
  }

  .hero-trust {
    animation: wowHeroIn 0.8s var(--wow-ease) 0.6s both;
  }
}

/* ------------------------------------------------------------
   6. Stats Bar — Gradient Text + Dividers
   ------------------------------------------------------------ */
.stat-number {
  background: var(--wow-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat:not(:last-child)::after {
  background: linear-gradient(180deg, transparent, var(--color-gray-200), transparent);
}

/* ------------------------------------------------------------
   7. Section Headers — Gradient Underline Accent
   ------------------------------------------------------------ */
.section-header h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--wow-gradient);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

/* Also for standalone h2s on about page etc */
.container--narrow > h2::after,
.about-hero-image + h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--wow-gradient);
  margin: 0.75rem 0 0;
  border-radius: 2px;
}

/* ------------------------------------------------------------
   8. Cards — Gradient Top Border + Enhanced Hover
   ------------------------------------------------------------ */
.card {
  border-top: 3px solid transparent;
  background-image: linear-gradient(var(--color-white), var(--color-white)),
                    var(--wow-gradient);
  background-origin: border-box, border-box;
  background-clip: padding-box, border-box;
  transition: transform 0.4s var(--wow-ease),
              box-shadow 0.4s var(--wow-ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(45, 90, 61, 0.12);
}

.card:hover .card-image {
  filter: saturate(1.15);
  transform: scale(1.03);
}

.card-image {
  transition: transform 0.5s var(--wow-ease),
              filter 0.5s var(--wow-ease);
}

/* Highlighted card variant */
.card--highlighted {
  border-top: 3px solid transparent;
  background-image: linear-gradient(var(--color-white), var(--color-white)),
                    var(--wow-gradient);
  background-origin: border-box, border-box;
  background-clip: padding-box, border-box;
}

/* ------------------------------------------------------------
   9. Testimonials — Gradient Border + Glow
   ------------------------------------------------------------ */
.testimonial {
  border-left: 4px solid transparent;
  border-image: linear-gradient(180deg, var(--color-cta), var(--color-secondary)) 1;
  transition: transform 0.4s var(--wow-ease),
              box-shadow 0.4s var(--wow-ease);
}

.testimonial:hover {
  box-shadow: 0 8px 32px rgba(232, 148, 44, 0.12);
}

/* Avatar gradient background */
.testimonial__avatar {
  background: var(--wow-gradient);
  color: var(--color-white);
  box-shadow: 0 2px 8px rgba(45, 90, 61, 0.15);
}

/* ------------------------------------------------------------
   10. Donation Section — Gradient Text + Glow
   ------------------------------------------------------------ */
.donation-amount {
  background: var(--wow-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.donation-tier {
  transition: transform 0.4s var(--wow-ease),
              box-shadow 0.4s var(--wow-ease),
              border-color 0.3s ease;
}

.donation-tier:hover {
  box-shadow: 0 8px 32px rgba(232, 148, 44, 0.2);
}

/* Featured tier gradient border */
.donation-tier--featured {
  border: 2px solid transparent;
  background-image: linear-gradient(var(--color-white), var(--color-white)),
                    var(--wow-gradient);
  background-origin: border-box, border-box;
  background-clip: padding-box, border-box;
}

/* ------------------------------------------------------------
   11. CTA Buttons — Light Sweep Animation
   ------------------------------------------------------------ */
.btn-cta {
  position: relative;
  overflow: hidden;
  z-index: 0;
}

.btn-cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 60%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
  transition: left 0.6s var(--wow-ease);
}

@media (prefers-reduced-motion: no-preference) {
  .btn-cta:hover::after {
    left: 200%;
  }
}

/* ------------------------------------------------------------
   12. Scroll Animations — Blur-to-Sharp Transitions
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    filter: blur(4px);
    transition: opacity 0.7s var(--wow-ease),
                transform 0.7s var(--wow-ease),
                filter 0.7s var(--wow-ease);
  }

  .fade-up.is-visible {
    filter: blur(0);
  }

  .fade-left {
    filter: blur(4px);
    transition: opacity 0.7s var(--wow-ease),
                transform 0.7s var(--wow-ease),
                filter 0.7s var(--wow-ease);
  }

  .fade-left.is-visible {
    filter: blur(0);
  }

  .fade-right {
    filter: blur(4px);
    transition: opacity 0.7s var(--wow-ease),
                transform 0.7s var(--wow-ease),
                filter 0.7s var(--wow-ease);
  }

  .fade-right.is-visible {
    filter: blur(0);
  }

  .scale-up {
    filter: blur(4px);
    transition: opacity 0.7s var(--wow-ease),
                transform 0.7s var(--wow-ease),
                filter 0.7s var(--wow-ease);
  }

  .scale-up.is-visible {
    filter: blur(0);
  }
}

/* ------------------------------------------------------------
   13. Email Community — Deep Gradient + Orb
   ------------------------------------------------------------ */
.email-community {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    #1e5035 30%,
    var(--color-secondary) 100%
  );
  position: relative;
  overflow: hidden;
}

.email-community::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 148, 44, 0.15) 0%, transparent 70%);
  top: -150px;
  right: -100px;
  pointer-events: none;
}

.email-community h2,
.email-community p,
.email-community__trust {
  position: relative;
  z-index: 1;
}

.email-community__inner {
  position: relative;
  z-index: 1;
}

/* ------------------------------------------------------------
   14. Footer — Animated Gradient Top Border
   ------------------------------------------------------------ */
.footer {
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--color-primary),
    var(--color-secondary),
    var(--color-cta),
    var(--color-secondary),
    var(--color-primary)
  );
  background-size: 200% 100%;
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes footerGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }

  .footer::before {
    animation: footerGradientShift 8s ease infinite;
  }
}

/* ------------------------------------------------------------
   15. Donation Urgency Dot — Pulse
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  @keyframes urgencyPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
  }

  .donation-urgency__dot {
    animation: urgencyPulse 2s ease-in-out infinite;
  }
}

/* ------------------------------------------------------------
   16. By the Numbers (About page) — Gradient Values
   ------------------------------------------------------------ */
.by-the-numbers__value {
  background: var(--wow-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ------------------------------------------------------------
   17. Impact Calculator — Enhanced Slider
   ------------------------------------------------------------ */
.impact-calculator__slider::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(232, 148, 44, 0.2);
  transition: box-shadow 0.3s ease;
}

.impact-calculator__slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 8px rgba(232, 148, 44, 0.15);
}

/* ------------------------------------------------------------
   18. Monthly Giving Badge — Gradient
   ------------------------------------------------------------ */
.monthly-giving__badge {
  background: var(--wow-gradient);
  color: var(--color-white);
}

/* ------------------------------------------------------------
   19. Card Highlighted Hover (Executive Director card)
   ------------------------------------------------------------ */
.card--highlighted:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(45, 90, 61, 0.12);
}

/* ------------------------------------------------------------
   20. Blog Post Images — Enhanced
   ------------------------------------------------------------ */
.post-hero-image,
.about-hero-image {
  transition: filter 0.5s ease;
}

.post-hero-image:hover,
.about-hero-image:hover {
  filter: saturate(1.1);
}

/* ------------------------------------------------------------
   21. Custom Scrollbar Enhancement
   ------------------------------------------------------------ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-secondary), var(--color-cta));
  border-radius: var(--radius-full);
  border: 2px solid var(--color-cream);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--color-primary), var(--color-cta-dark));
}

/* ------------------------------------------------------------
   22. Ambient float for hero orb
   ------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  @keyframes ambientFloat {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(20px, -15px); }
    66% { transform: translate(-10px, 10px); }
  }

  .hero::after {
    animation: ambientFloat 20s ease-in-out infinite;
  }
}

/* ------------------------------------------------------------
   23. Wave Divider Enhanced
   ------------------------------------------------------------ */
.wave-divider svg {
  transition: fill 0.3s ease;
}

/* ------------------------------------------------------------
   24. Board Member Cards — Enhanced
   ------------------------------------------------------------ */
.card-image--square {
  transition: transform 0.5s var(--wow-ease),
              filter 0.5s var(--wow-ease);
}

.card:hover .card-image--square {
  filter: saturate(1.1);
  transform: scale(1.03);
}

/* ------------------------------------------------------------
   25. Partner Bar — Subtle Enhancement
   ------------------------------------------------------------ */
.partner-bar img {
  transition: filter 0.3s ease, transform 0.3s ease;
}

.partner-bar img:hover {
  filter: saturate(1.2);
  transform: scale(1.05);
}

/* ------------------------------------------------------------
   26. Hero Button Overrides (dark background)
   ------------------------------------------------------------ */
.hero .btn-outline {
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.6);
}

.hero .btn-outline:hover {
  background-color: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
}

/* Hero trust text */
.hero-trust {
  font-size: 0.85rem;
  margin-top: var(--space-lg);
  opacity: 0.85;
}

/* Hero small pages keep light theme + compact layout */
.hero.hero-small,
.hero-small {
  min-height: auto !important;
  padding: 2rem 0 1.5rem;
  color: var(--color-text);
}

.hero-small h1 {
  color: var(--color-primary);
  text-shadow: none;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.25rem;
}

.hero-small .hero-subtitle {
  color: var(--color-gray-600);
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* Section padding reduction */
.section {
  padding-block: 3.5rem;
}

.section--sm {
  padding-block: 2.5rem;
}

/* ------------------------------------------------------------
   27. Mobile Responsiveness
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .hero::after,
  .email-community::before {
    width: 300px;
    height: 300px;
  }

  .hero {
    min-height: 70vh;
  }
}
