/* Patroda premium animations — lightweight CSS only. Do not change design tokens. */

:root {
    --patroda-anim-duration: 0.65s;
    --patroda-anim-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --patroda-anim-distance: 28px;
}

/* -------------------------------------------------------------------------- */
/* Keyframes                                                                  */
/* -------------------------------------------------------------------------- */

@keyframes patroda-fade-up {
    from {
        opacity: 0;
        transform: translate3d(0, var(--patroda-anim-distance), 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes patroda-slide-in-right {
    from {
        opacity: 0;
        transform: translate3d(40px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes patroda-float {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -8px, 0);
    }
}

@keyframes patroda-float-slow {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -6px, 0);
    }
}

@keyframes patroda-pulse-dot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.65;
        transform: scale(0.88);
    }
}

@keyframes patroda-grid-drift {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(40px, 40px, 0);
    }
}

@keyframes patroda-glow-drift {
    0%,
    100% {
        opacity: 0.55;
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        opacity: 0.85;
        transform: translate3d(12px, -8px, 0) scale(1.04);
    }
}

/* -------------------------------------------------------------------------- */
/* 1. Header scroll effect                                                    */
/* -------------------------------------------------------------------------- */

.site-header {
    transition:
        background-color 0.35s var(--patroda-anim-ease),
        box-shadow 0.35s var(--patroda-anim-ease),
        backdrop-filter 0.35s var(--patroda-anim-ease);
}

.site-header.is-scrolled {
    background-color: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 24px rgba(11, 15, 25, 0.08);
}

/* -------------------------------------------------------------------------- */
/* 2. Hero entrance (once on load)                                            */
/* -------------------------------------------------------------------------- */

.hero-section.patroda-hero-ready .patroda-hero-title {
    animation: patroda-fade-up 0.85s var(--patroda-anim-ease) both;
}

.hero-section.patroda-hero-ready .patroda-hero-accent {
    animation: patroda-fade-up 0.85s var(--patroda-anim-ease) 0.18s both;
}

.hero-section.patroda-hero-ready .patroda-hero-text {
    animation: patroda-fade-up 0.85s var(--patroda-anim-ease) both;
}

.hero-section.patroda-hero-ready .patroda-hero-text:nth-of-type(1) {
    animation-delay: 0.32s;
}

.hero-section.patroda-hero-ready .patroda-hero-text:nth-of-type(2) {
    animation-delay: 0.44s;
}

.hero-section.patroda-hero-ready .patroda-hero-actions {
    animation: patroda-fade-up 0.85s var(--patroda-anim-ease) 0.56s both;
}

.hero-section.patroda-hero-ready .patroda-hero-visual {
    animation: patroda-slide-in-right 1s var(--patroda-anim-ease) 0.28s both;
}

.hero-section:not(.patroda-hero-ready) .patroda-hero-title,
.hero-section:not(.patroda-hero-ready) .patroda-hero-accent,
.hero-section:not(.patroda-hero-ready) .patroda-hero-text,
.hero-section:not(.patroda-hero-ready) .patroda-hero-actions,
.hero-section:not(.patroda-hero-ready) .patroda-hero-visual {
    opacity: 0;
}

/* -------------------------------------------------------------------------- */
/* 3. Hero floating effect                                                    */
/* -------------------------------------------------------------------------- */

.hero-section.patroda-hero-ready .hero-card,
.hero-section.patroda-hero-ready .patroda-hero-float {
    animation: patroda-float 7s ease-in-out infinite;
    will-change: transform;
}

/* -------------------------------------------------------------------------- */
/* 4. Scroll reveal                                                           */
/* -------------------------------------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition:
        opacity var(--patroda-anim-duration) var(--patroda-anim-ease),
        transform var(--patroda-anim-duration) var(--patroda-anim-ease);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

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

.reveal.reveal-fade {
    transform: none;
}

.reveal.reveal-fade.is-visible {
    transform: none;
}

/* -------------------------------------------------------------------------- */
/* 5. Service card hover                                                      */
/* -------------------------------------------------------------------------- */

.patroda-card,
.patroda-ai-card,
.patroda-ai-services-grid > .wp-block-group,
.patroda-challenge-card,
.patroda-challenge-grid > .wp-block-group,
.patroda-dm-card,
.patroda-dm-grid > .wp-block-group,
#web-creative .grid > .wp-block-group {
    transition:
        transform 0.35s var(--patroda-anim-ease),
        box-shadow 0.35s var(--patroda-anim-ease),
        border-color 0.35s var(--patroda-anim-ease),
        background-color 0.35s ease;
}

.patroda-card:hover,
.patroda-ai-card:hover,
.patroda-ai-services-grid > .wp-block-group:hover,
.patroda-challenge-card:hover,
.patroda-challenge-grid > .wp-block-group:hover,
.patroda-dm-card:hover,
.patroda-dm-grid > .wp-block-group:hover,
#web-creative .grid > .wp-block-group:hover {
    transform: translate3d(0, -6px, 0);
    box-shadow: 0 16px 40px rgba(11, 15, 25, 0.1);
    border-color: rgba(229, 46, 46, 0.35) !important;
}

.patroda-card:hover .w-12.rounded-xl,
#ai-services > .wp-block-group:hover .w-12.rounded-xl,
#ai-services > .patroda-service-card:hover .w-12.rounded-xl,
.patroda-service-card:hover .w-12.rounded-xl,
#web-creative .grid > .wp-block-group:hover .w-12.rounded-xl {
    background-color: rgba(229, 46, 46, 0.16);
}

/* -------------------------------------------------------------------------- */
/* 6. Digital Marketing dark section                                          */
/* -------------------------------------------------------------------------- */

#digital-marketing .patroda-dm-glow {
    animation: patroda-glow-drift 10s ease-in-out infinite alternate;
    will-change: transform, opacity;
}

#digital-marketing .patroda-dm-glow:nth-child(2) {
    animation-delay: -5s;
}

#digital-marketing .grid > .wp-block-group {
    transition:
        transform 0.35s var(--patroda-anim-ease),
        box-shadow 0.35s var(--patroda-anim-ease),
        border-color 0.35s var(--patroda-anim-ease),
        background-color 0.35s ease;
}

#digital-marketing .grid > .wp-block-group:hover {
    transform: translate3d(0, -5px, 0);
    box-shadow: 0 12px 36px rgba(229, 46, 46, 0.18), 0 0 0 1px rgba(229, 46, 46, 0.25);
}

/* -------------------------------------------------------------------------- */
/* 7. CTA section                                                             */
/* -------------------------------------------------------------------------- */

.patroda-cta-grid {
    animation: patroda-grid-drift 28s linear infinite;
    will-change: transform;
}

.patroda-cta-bot {
    animation: patroda-float-slow 6s ease-in-out infinite;
    will-change: transform;
}

.patroda-pulse-dot,
.cta-section .animate-pulse.rounded-full,
.hero-section .animate-pulse.rounded-full {
    animation: patroda-pulse-dot 2.4s ease-in-out infinite !important;
}

/* -------------------------------------------------------------------------- */
/* 8. Button hover                                                            */
/* -------------------------------------------------------------------------- */

.patroda-theme a.inline-flex.items-center[class*="bg-brand-red"],
.patroda-theme a.inline-flex.items-center[class*="bg-brand-dark"],
.patroda-theme a.inline-flex.items-center[class*="bg-white"],
.patroda-theme a.inline-flex.items-center.border-2 {
    transition:
        transform 0.3s var(--patroda-anim-ease),
        box-shadow 0.3s var(--patroda-anim-ease),
        background-color 0.3s ease,
        color 0.3s ease;
}

.patroda-theme a.inline-flex.items-center[class*="bg-brand-red"]:hover,
.patroda-theme a.inline-flex.items-center[class*="bg-brand-dark"]:hover,
.patroda-theme a.inline-flex.items-center[class*="bg-white"]:hover,
.patroda-theme a.inline-flex.items-center.border-2:hover {
    transform: translate3d(0, -3px, 0);
}

.patroda-theme a.inline-flex.items-center [data-lucide="arrow-right"],
.patroda-theme a.inline-flex.items-center [data-lucide="phone"] {
    transition: transform 0.3s var(--patroda-anim-ease);
}

.patroda-theme a.inline-flex.items-center:hover [data-lucide="arrow-right"] {
    transform: translate3d(4px, 0, 0);
}

/* -------------------------------------------------------------------------- */
/* 9. Dropdown animation                                                      */
/* -------------------------------------------------------------------------- */

.patroda-nav-dropdown-panel {
    transition:
        opacity 0.28s var(--patroda-anim-ease),
        transform 0.28s var(--patroda-anim-ease),
        visibility 0.28s;
}

.patroda-nav-dropdown-panel > div {
    transition: transform 0.28s var(--patroda-anim-ease);
}

.group:hover .patroda-nav-dropdown-panel > div,
.patroda-nav-dropdown:focus-within .patroda-nav-dropdown-panel > div {
    transform: translate3d(0, 0, 0);
}

/* -------------------------------------------------------------------------- */
/* 10. Blog card hover                                                        */
/* -------------------------------------------------------------------------- */

#blog article,
.patroda-blog-card {
    transition:
        transform 0.35s var(--patroda-anim-ease),
        box-shadow 0.35s var(--patroda-anim-ease);
}

#blog article:hover,
.patroda-blog-card:hover {
    transform: translate3d(0, -6px, 0);
    box-shadow: 0 20px 44px rgba(11, 15, 25, 0.12);
}

#blog article .wp-block-post-featured-image,
#blog article .wp-block-post-featured-image a,
.patroda-blog-card .patroda-blog-image {
    overflow: hidden;
    display: block;
    border-radius: 1rem;
}

#blog article .wp-block-post-featured-image img,
#blog article img,
.patroda-blog-card .patroda-blog-image img,
.patroda-blog-card img {
    transition: transform 0.5s var(--patroda-anim-ease);
}

#blog article:hover .wp-block-post-featured-image img,
#blog article:hover img,
.patroda-blog-card:hover .patroda-blog-image img,
.patroda-blog-card:hover img {
    transform: scale3d(1.05, 1.05, 1);
}

#blog article .wp-block-read-more,
#blog article a[class*="text-brand-red"],
.patroda-blog-card a[class*="text-brand-red"] {
    transition:
        color 0.25s ease,
        gap 0.25s ease,
        transform 0.25s var(--patroda-anim-ease);
}

#blog article:hover .wp-block-read-more,
#blog article:hover a[class*="text-brand-red"],
.patroda-blog-card:hover a[class*="text-brand-red"] {
    transform: translate3d(4px, 0, 0);
}

/* -------------------------------------------------------------------------- */
/* Accessibility — respect reduced motion                                       */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-section:not(.patroda-hero-ready) .patroda-hero-title,
    .hero-section:not(.patroda-hero-ready) .patroda-hero-accent,
    .hero-section:not(.patroda-hero-ready) .patroda-hero-text,
    .hero-section:not(.patroda-hero-ready) .patroda-hero-actions,
    .hero-section:not(.patroda-hero-ready) .patroda-hero-visual {
        opacity: 1;
    }

    .site-header.is-scrolled {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .patroda-card:hover,
    .patroda-ai-card:hover,
    #web-creative .grid > .wp-block-group:hover,
    #digital-marketing .grid > .wp-block-group:hover,
    #blog article:hover,
    .patroda-theme a.inline-flex.items-center:hover {
        transform: none;
    }
}
