/**
 * Tierhilfe Wolfsburg e.V. — Special Effects Stylesheet
 * Version: 1.0.0
 * Created: 2026-03-07 — Design Agent + Frontend Agent
 *
 * Effects:
 *   1. Hero Parallax — photo moves slower than scroll
 *   2. Staggered card animations — sequential fade-in
 *   3. Trust counter animation — numbers count up
 *   4. CTA Band parallax — subtle background shift
 *   5. Scroll reveal variants — fade-left, fade-right, scale-up, blur-in
 *   6. Decorative floating accents — CSS-only ambient motion
 *   7. Section title accent line grow — underline animates width
 *   8. Enhanced card hover effects — lift + glow
 *
 * Performance:
 *   - Only transform + opacity (GPU-accelerated, no layout/paint)
 *   - will-change used sparingly (removed after animation)
 *   - IntersectionObserver for triggers (no scroll-per-pixel listeners)
 *   - requestAnimationFrame for parallax (throttled to 60fps)
 *   - prefers-reduced-motion fully respected
 *
 * IMPORTANT (wisdom.md):
 *   - NO style="" — CSP blocks inline styles!
 *   - All animations use classList add/remove
 */


/* =============================================================================
   1. HERO PARALLAX
   ============================================================================= */

.hero-section {
    overflow: hidden;
    position: relative;
}

.hero-photo-block {
    will-change: transform;
}

/* Hero photo scales up slightly to allow parallax movement without gaps */
.hero-photo-block.fx-parallax-ready .hero-photo {
    transform: scale(1.15);
    transform-origin: center center;
}

/* Hero text entrance animation — staggered */
.hero-text-block .hero-badge,
.hero-text-block .hero-title,
.hero-text-block .hero-subtitle,
.hero-text-block .hero-actions {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-text-block .hero-badge    { transition-delay: 0.15s; }
.hero-text-block .hero-title    { transition-delay: 0.35s; }
.hero-text-block .hero-subtitle { transition-delay: 0.55s; }
.hero-text-block .hero-actions  { transition-delay: 0.75s; }

/* When loaded, reveal hero text elements */
.fx-hero-revealed .hero-badge,
.fx-hero-revealed .hero-title,
.fx-hero-revealed .hero-subtitle,
.fx-hero-revealed .hero-actions {
    opacity: 1;
    transform: translateY(0);
}


/* =============================================================================
   2. SCROLL REVEAL VARIANTS (extends .animate-on-scroll)
   ============================================================================= */

/* Fade from left */
.fx-fade-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fx-fade-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade from right */
.fx-fade-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fx-fade-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale up from center */
.fx-scale-up {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fx-scale-up.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Blur-in reveal */
.fx-blur-in {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(16px);
    transition: opacity 0.7s ease,
                filter 0.7s ease,
                transform 0.7s ease;
}

.fx-blur-in.is-visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Rotate in slightly */
.fx-rotate-in {
    opacity: 0;
    transform: rotate(-3deg) translateY(24px);
    transition: opacity 0.6s ease,
                transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fx-rotate-in.is-visible {
    opacity: 1;
    transform: rotate(0) translateY(0);
}


/* =============================================================================
   3. STAGGERED GRID ANIMATIONS
   ============================================================================= */

/* Children of grids get stagger delays when parent has .fx-stagger */
.fx-stagger > *:nth-child(1) { transition-delay: 0s; }
.fx-stagger > *:nth-child(2) { transition-delay: 0.1s; }
.fx-stagger > *:nth-child(3) { transition-delay: 0.2s; }
.fx-stagger > *:nth-child(4) { transition-delay: 0.3s; }
.fx-stagger > *:nth-child(5) { transition-delay: 0.4s; }
.fx-stagger > *:nth-child(6) { transition-delay: 0.5s; }

/* Stagger children start hidden */
.fx-stagger > .animate-on-scroll,
.fx-stagger > .fx-fade-left,
.fx-stagger > .fx-fade-right,
.fx-stagger > .fx-scale-up {
    /* Inherits from the variant classes above */
}


/* =============================================================================
   4. TRUST SECTION — COUNTER ANIMATION + PARALLAX
   ============================================================================= */

.section-trust {
    position: relative;
    overflow: hidden;
}

/* Subtle parallax background layer */
.section-trust::before {
    content: '';
    position: absolute;
    inset: -30% 0;
    background: linear-gradient(
        135deg,
        var(--color-trust-bg) 0%,
        rgba(156, 192, 38, 0.08) 50%,
        var(--color-trust-bg) 100%
    );
    z-index: 0;
    will-change: transform;
}

.section-trust .container {
    position: relative;
    z-index: 1;
}

/* Trust items: start state for counter reveal */
.trust-item {
    opacity: 0;
    transform: translateY(24px) scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.trust-item:nth-child(1) { transition-delay: 0s; }
.trust-item:nth-child(2) { transition-delay: 0.12s; }
.trust-item:nth-child(3) { transition-delay: 0.24s; }
.trust-item:nth-child(4) { transition-delay: 0.36s; }

.trust-item.fx-counted {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Trust number glow pulse after counter finishes */
.trust-number.fx-glow {
    animation: fx-number-glow 0.6s ease forwards;
}

@keyframes fx-number-glow {
    0%   { text-shadow: none; }
    50%  { text-shadow: 0 0 20px rgba(156, 192, 38, 0.5); }
    100% { text-shadow: none; }
}


/* =============================================================================
   5. CTA BAND — PARALLAX + SHIMMER
   ============================================================================= */

.home-cta-band {
    position: relative;
    overflow: hidden;
}

/* Animated shimmer line across the CTA band */
.home-cta-band::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(156, 192, 38, 0.06) 40%,
        rgba(156, 192, 38, 0.12) 50%,
        rgba(156, 192, 38, 0.06) 60%,
        transparent 100%
    );
    animation: fx-shimmer 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes fx-shimmer {
    0%   { left: -100%; }
    50%  { left: 150%; }
    100% { left: 150%; }
}


/* =============================================================================
   6. SECTION TITLE — ACCENT LINE GROW ANIMATION
   ============================================================================= */

/* Override the static ::after with an animated version */
.fx-title-grow .section-title::after {
    width: 0;
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition-delay: 0.3s;
}

.fx-title-grow.is-visible .section-title::after {
    width: 48px;
}


/* =============================================================================
   7. DECORATIVE FLOATING ACCENTS
   Subtle floating dots/shapes near section transitions
   ============================================================================= */

.fx-accent-float {
    position: absolute;
    border-radius: 50%;
    background: var(--color-accent);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

/* Dot variants positioned via classes */
.fx-accent-float--1 {
    width: 180px;
    height: 180px;
    top: -60px;
    right: -40px;
    animation: fx-float-1 8s ease-in-out infinite;
}

.fx-accent-float--2 {
    width: 120px;
    height: 120px;
    bottom: -30px;
    left: -20px;
    animation: fx-float-2 10s ease-in-out infinite;
}

.fx-accent-float--3 {
    width: 80px;
    height: 80px;
    top: 30%;
    right: 5%;
    animation: fx-float-3 7s ease-in-out infinite;
}

@keyframes fx-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(-15px, 20px) scale(1.05); }
    66%      { transform: translate(10px, -10px) scale(0.95); }
}

@keyframes fx-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(20px, -15px) scale(1.08); }
}

@keyframes fx-float-3 {
    0%, 100% { transform: translate(0, 0); }
    25%      { transform: translate(-8px, 12px); }
    75%      { transform: translate(12px, -8px); }
}


/* =============================================================================
   8. ENHANCED CARD HOVER EFFECTS
   ============================================================================= */

/* Tier cards: enhanced lift + shadow bloom */
.tier-kachel {
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.35s ease;
}

.tier-kachel:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(45, 30, 15, 0.15),
                0 0 0 1px rgba(156, 192, 38, 0.15);
}

/* Tier card photo zoom on hover */
.tier-kachel-foto {
    overflow: hidden;
}

.tier-kachel-img {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tier-kachel:hover .tier-kachel-img {
    transform: scale(1.08);
}

/* Engagement cards: glow on hover */
.engagement-card {
    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.engagement-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(45, 30, 15, 0.12),
                0 0 0 2px rgba(156, 192, 38, 0.2);
}

/* Engagement icon pulse on card hover */
.engagement-card:hover .engagement-icon {
    animation: fx-icon-pulse 0.5s ease;
}

@keyframes fx-icon-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Blog cards: image zoom + lift */
.blog-card {
    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(45, 30, 15, 0.12);
}

.blog-card-img-wrap {
    overflow: hidden;
}

.blog-card-img {
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-img {
    transform: scale(1.06);
}

/* Happy-end cards: same treatment */
.happy-end-card {
    transition: transform 0.3s ease,
                box-shadow 0.3s ease;
}

.happy-end-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(45, 30, 15, 0.12);
}

.happy-end-card-img-wrap {
    overflow: hidden;
}

.happy-end-card-img {
    transition: transform 0.5s ease;
}

.happy-end-card:hover .happy-end-card-img {
    transform: scale(1.06);
}


/* =============================================================================
   9. SCROLL PROGRESS INDICATOR (green line at top)
   ============================================================================= */

.fx-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark));
    z-index: 10001;
    transform-origin: left;
    transform: scaleX(0);
    transition: none;
    pointer-events: none;
}


/* =============================================================================
   10. FOOTER REVEAL — Slide-up with accent line grow
   ============================================================================= */

.site-footer {
    position: relative;
}

/* Footer accent line animates width on scroll reveal */
.footer-accent-line {
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.site-footer.fx-footer-visible .footer-accent-line {
    transform: scaleX(1);
}


/* =============================================================================
   REDUCED MOTION — Disable ALL effects
   ============================================================================= */

/* Utility: make sections relative for floating accents */
.fx-section-relative {
    position: relative;
    overflow: hidden;
}


@media (prefers-reduced-motion: reduce) {
    .hero-text-block .hero-badge,
    .hero-text-block .hero-title,
    .hero-text-block .hero-subtitle,
    .hero-text-block .hero-actions {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .fx-fade-left,
    .fx-fade-right,
    .fx-scale-up,
    .fx-blur-in,
    .fx-rotate-in {
        opacity: 1;
        transform: none;
        filter: none;
        transition: none;
    }

    .trust-item {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .fx-accent-float {
        animation: none;
    }

    .home-cta-band::after {
        animation: none;
        display: none;
    }

    .fx-title-grow .section-title::after {
        width: 48px;
        transition: none;
    }

    .footer-accent-line {
        transform: scaleX(1);
        transition: none;
    }

    .tier-kachel,
    .engagement-card,
    .blog-card,
    .happy-end-card {
        transition: none;
    }

    .tier-kachel-img,
    .blog-card-img,
    .happy-end-card-img {
        transition: none;
    }

    .hero-photo-block.fx-parallax-ready .hero-photo {
        transform: none;
    }

    .fx-scroll-progress {
        display: none;
    }
}
