/* Lightweight scroll reveal & micro-animations — GPU-friendly, no libraries */

.reveal {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: opacity, transform;
}

.reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.reveal--d1 { transition-delay: 0.06s; }
.reveal--d2 { transition-delay: 0.12s; }
.reveal--d3 { transition-delay: 0.18s; }
.reveal--d4 { transition-delay: 0.24s; }
.reveal--d5 { transition-delay: 0.3s; }

/* Hero: show immediately, animate children on load */
.hero .reveal {
    opacity: 1;
    transform: none;
}

.hero .reveal.is-visible .hero__badge {
    animation: motionBadgePop 0.45s ease;
}

@keyframes motionBadgePop {
    0% { transform: scale(0.94); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

/* Subtle hero atmosphere — transform/opacity only */
.hero {
    position: relative;
}

.hero::before,
.hero::after {
    animation: motionHeroDrift 14s ease-in-out infinite alternate;
}

@keyframes motionHeroDrift {
    0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
    100% { transform: translate3d(8px, -10px, 0) scale(1.04); opacity: 1; }
}

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

.page-hero::before {
    content: "";
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(184, 146, 58, 0.12) 0%, transparent 68%);
    top: -80px;
    right: -60px;
    pointer-events: none;
    animation: motionHeroDrift 16s ease-in-out infinite alternate;
}

.page-hero .wrap {
    position: relative;
    z-index: 1;
}

.page-hero .reveal {
    opacity: 1;
    transform: none;
}

.page-hero .reveal.is-visible .page-hero__badge {
    animation: motionBadgePop 0.45s ease;
}

.page-hero .reveal.is-visible h1 {
    animation: motionFadeUp 0.5s ease 0.06s backwards;
}

.page-hero .reveal.is-visible p {
    animation: motionFadeUp 0.5s ease 0.14s backwards;
}

/* Service catalog stagger when section enters view */
@keyframes motionFadeUp {
    from {
        opacity: 0;
        transform: translate3d(0, 14px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.services-catalog.is-visible .svc-catalog-item {
    animation: motionFadeUp 0.42s ease backwards;
}

.services-catalog.is-visible .svc-catalog-item:nth-child(1) { animation-delay: 0.02s; }
.services-catalog.is-visible .svc-catalog-item:nth-child(2) { animation-delay: 0.05s; }
.services-catalog.is-visible .svc-catalog-item:nth-child(3) { animation-delay: 0.08s; }
.services-catalog.is-visible .svc-catalog-item:nth-child(4) { animation-delay: 0.11s; }
.services-catalog.is-visible .svc-catalog-item:nth-child(5) { animation-delay: 0.14s; }
.services-catalog.is-visible .svc-catalog-item:nth-child(6) { animation-delay: 0.17s; }
.services-catalog.is-visible .svc-catalog-item:nth-child(7) { animation-delay: 0.2s; }
.services-catalog.is-visible .svc-catalog-item:nth-child(8) { animation-delay: 0.23s; }
.services-catalog.is-visible .svc-catalog-item:nth-child(9) { animation-delay: 0.26s; }
.services-catalog.is-visible .svc-catalog-item:nth-child(10) { animation-delay: 0.29s; }
.services-catalog.is-visible .svc-catalog-item:nth-child(n+11) { animation-delay: 0.32s; }

.svc-catalog-item {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.svc-catalog-item:hover {
    transform: translate3d(0, -3px, 0);
}

/* About page cards */
.about-page .story-card,
.about-page .value-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.about-page .story-card:hover,
.about-page .value-card:hover {
    transform: translate3d(0, -4px, 0);
}

.about-page .founder-photo-frame {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.about-page .founder-photo-wrap.is-visible .founder-photo-frame {
    animation: motionScaleIn 0.55s ease;
}

@keyframes motionScaleIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.about-page .stats-strip .stat-item {
    transition: transform 0.25s ease;
}

.about-page .stats-strip.is-visible .stat-item {
    animation: motionFadeUp 0.45s ease backwards;
}

.about-page .stats-strip.is-visible .stat-item:nth-child(1) { animation-delay: 0.05s; }
.about-page .stats-strip.is-visible .stat-item:nth-child(2) { animation-delay: 0.12s; }
.about-page .stats-strip.is-visible .stat-item:nth-child(3) { animation-delay: 0.19s; }
.about-page .stats-strip.is-visible .stat-item:nth-child(4) { animation-delay: 0.26s; }

.about-page .stats-strip.is-visible .stat-item:hover {
    transform: translate3d(0, -2px, 0);
}

/* Home sections — gentle card lift */
.home-blog__card,
.step-card,
.testimonial-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.home-blog__card:hover,
.step-card:hover {
    transform: translate3d(0, -3px, 0);
}

.cta-banner {
    transition: transform 0.3s ease;
}

.cta-banner.is-visible,
.about-page .cta-strip.is-visible {
    animation: motionFadeUp 0.55s ease;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
        will-change: auto;
    }

    .hero::before,
    .hero::after,
    .page-hero::before {
        animation: none;
    }

    .hero .reveal.is-visible .hero__badge,
    .page-hero .reveal.is-visible .page-hero__badge,
    .page-hero .reveal.is-visible h1,
    .page-hero .reveal.is-visible p,
    .services-catalog.is-visible .svc-catalog-item,
    .about-page .stats-strip.is-visible .stat-item,
    .about-page .founder-photo-wrap.is-visible .founder-photo-frame,
    .cta-banner.is-visible {
        animation: none;
    }

    .about-page .cta-strip.is-visible {
        animation: none;
    }

    .svc-catalog-item:hover,
    .about-page .story-card:hover,
    .about-page .value-card:hover,
    .home-blog__card:hover,
    .step-card:hover {
        transform: none;
    }
}
