/* ============================================================
   animations.css — Vrindav Enterprises
   All animation & motion declarations — separate from layout
   Linked after style.css in header.php
============================================================ */

/* ============================================================
   1. KEYFRAMES
============================================================ */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-32px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(32px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.88); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-10px); }
}

@keyframes floatReverse {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(10px); }
}

@keyframes pulse-ring {
    0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
    70%  { transform: scale(1); box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

@keyframes shine-sweep {
    0%   { left: -60%; }
    100% { left: 120%; }
}

@keyframes underline-grow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@keyframes bounce-in {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.12); opacity: 1; }
    80%  { transform: scale(0.96); }
    100% { transform: scale(1); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

@keyframes count-bar {
    from { width: 0; }
    to   { width: var(--bar-width, 100%); }
}

@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes eyebrow-pop {
    0%   { opacity: 0; transform: translateY(-8px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hero-badge-pop {
    0%   { opacity: 0; transform: translateY(20px) scale(0.9); }
    70%  { transform: translateY(-4px) scale(1.03); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   2. PAGE LOAD — body fade-in
============================================================ */
body {
    animation: fadeIn 0.4s ease forwards;
}

/* ============================================================
   3. HERO SECTION ANIMATIONS
============================================================ */
.hero__eyebrow {
    animation: eyebrow-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.hero__title {
    animation: fadeInUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

.hero__subtitle {
    animation: fadeInUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.hero__actions {
    animation: fadeInUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}

.hero__trust {
    animation: fadeInUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.65s both;
}

/* Hero visual */
.hero__img-main {
    animation: scaleIn 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

.hero__img-card--bottom {
    animation: hero-badge-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s both;
}

.hero__img-card--top {
    animation: hero-badge-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.85s both;
}

/* Floating hero cards — continuous */
.hero__img-card--bottom {
    animation: hero-badge-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.7s both,
               float 4s ease-in-out 1.4s infinite;
}
.hero__img-card--top {
    animation: hero-badge-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.85s both,
               floatReverse 4.5s ease-in-out 1.5s infinite;
}

/* ============================================================
   4. PAGE HERO (inner pages)
============================================================ */
.page-hero__eyebrow {
    animation: eyebrow-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}
.page-hero__title {
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.page-hero__subtitle {
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

/* ============================================================
   5. SECTION EYEBROW — animated underline accent
============================================================ */
.section__eyebrow {
    position: relative;
    display: inline-flex;
}

/* ============================================================
   6. WHY CARDS — icon hover pulse + card stagger
============================================================ */
.why-card__icon {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.25s ease,
                color 0.25s ease;
}
.why-card:hover .why-card__icon {
    transform: scale(1.15) rotate(-5deg);
}

/* ============================================================
   7. PRODUCT CARD — shine sweep on hover
============================================================ */
.product-card {
    position: relative;
    overflow: hidden;
}
.product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 60%
    );
    pointer-events: none;
    transition: none;
    opacity: 0;
}
.product-card:hover::after {
    opacity: 1;
    animation: shine-sweep 0.55s ease forwards;
}

/* ============================================================
   8. BUTTONS — micro interactions
============================================================ */
.btn {
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.45s ease, height 0.45s ease, opacity 0.45s ease;
    opacity: 0;
    pointer-events: none;
}
.btn:active::before {
    width: 280px;
    height: 280px;
    opacity: 1;
}

/* WhatsApp button — scale on hover */
.btn--wa {
    transition: background-color 0.25s ease,
                border-color 0.25s ease,
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease;
}
.btn--wa:hover {
    transform: translateY(-2px) scale(1.03);
}
.btn--wa:active {
    transform: scale(0.97);
}

/* Primary button — lift */
.btn--primary {
    transition: background-color 0.25s ease,
                border-color 0.25s ease,
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.25s ease;
}
.btn--primary:hover {
    transform: translateY(-2px);
}
.btn--primary:active {
    transform: translateY(0) scale(0.98);
}

/* ============================================================
   9. FLOATING WHATSAPP — pulse ring
============================================================ */
.wa-float {
    animation: pulse-ring 2.4s cubic-bezier(0.66, 0, 0, 1) 2s infinite;
}
.wa-float:hover {
    animation: none;
    transform: scale(1.12);
}

/* ============================================================
   10. STATS BAR — slide up
============================================================ */
.stats-bar__item {
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.stats-bar__item:nth-child(1) { animation-delay: 0.05s; }
.stats-bar__item:nth-child(2) { animation-delay: 0.15s; }
.stats-bar__item:nth-child(3) { animation-delay: 0.25s; }
.stats-bar__item:nth-child(4) { animation-delay: 0.35s; }

/* ============================================================
   11. TRUST STRIP — mobile marquee scroll
============================================================ */
@media (max-width: 768px) {
    .trust-strip {
        overflow: hidden;
    }
    .trust-strip__inner {
        display: flex;
        flex-wrap: nowrap;
        width: max-content;
        animation: marquee 18s linear infinite;
        gap: var(--space-10);
    }
    .trust-strip__inner:hover {
        animation-play-state: paused;
    }
}

/* ============================================================
   12. CATEGORY CARDS — stagger
============================================================ */
.category-card {
    animation: fadeInUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.category-card:nth-child(1) { animation-delay: 0.05s; }
.category-card:nth-child(2) { animation-delay: 0.15s; }
.category-card:nth-child(3) { animation-delay: 0.25s; }
.category-card:nth-child(4) { animation-delay: 0.35s; }

/* ============================================================
   13. TESTIMONIAL CARDS
============================================================ */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover {
    transform: translateY(-6px);
}

/* Stars shimmer on hover */
.testimonial-card:hover .testimonial-card__stars i {
    animation: bounce-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.testimonial-card:hover .testimonial-card__stars i:nth-child(1) { animation-delay: 0.00s; }
.testimonial-card:hover .testimonial-card__stars i:nth-child(2) { animation-delay: 0.06s; }
.testimonial-card:hover .testimonial-card__stars i:nth-child(3) { animation-delay: 0.12s; }
.testimonial-card:hover .testimonial-card__stars i:nth-child(4) { animation-delay: 0.18s; }
.testimonial-card:hover .testimonial-card__stars i:nth-child(5) { animation-delay: 0.24s; }

/* ============================================================
   14. ABOUT SNIPPET IMAGE — reveal on scroll
============================================================ */
.about-snippet__img-wrap {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}
.about-snippet__img-wrap:hover {
    transform: scale(1.015);
}

.about-snippet__img-badge {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.about-snippet__img-wrap:hover .about-snippet__img-badge {
    transform: translateY(-4px) scale(1.04);
}

/* ============================================================
   15. CTA BANNER — gradient animation
============================================================ */
.cta-banner {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
    background-image: linear-gradient(135deg, #B91C1C 0%, #991B1B 35%, #7F1D1D 65%, #B91C1C 100%);
}

/* ============================================================
   16. MISSION CARDS — icon rotation on hover
============================================================ */
.mission-card__icon {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.25s ease,
                color 0.25s ease;
}
.mission-card:hover .mission-card__icon {
    transform: rotate(8deg) scale(1.1);
}

/* ============================================================
   17. OFFER CARDS — number badge pop on hover
============================================================ */
.offer-card__num {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.25s ease;
}
.offer-card:hover .offer-card__num {
    transform: scale(1.15) rotate(-3deg);
    background-color: var(--color-accent);
}

/* ============================================================
   18. SERVE CARDS — lift + icon nudge
============================================================ */
.serve-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.serve-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.09);
}
.serve-card i {
    transition: transform 0.25s ease, color 0.25s ease;
}
.serve-card:hover i {
    transform: translateY(-3px);
}

/* ============================================================
   19. CONTACT — WA block hover
============================================================ */
.contact-wa-block__icon {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.contact-wa-block:hover .contact-wa-block__icon {
    transform: scale(1.2) rotate(-8deg);
    display: inline-block;
}

/* ============================================================
   20. PROCESS STEPS — icon spin on hover
============================================================ */
.process-step__icon {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.25s ease,
                color 0.25s ease;
}
.process-step:hover .process-step__icon {
    transform: scale(1.15) rotate(12deg);
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* ============================================================
   21. FOOTER SOCIAL LINKS
============================================================ */
.footer__social-link {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.25s ease,
                color 0.25s ease;
}
.footer__social-link:hover {
    transform: translateY(-4px) scale(1.1);
}

/* ============================================================
   22. BACK TO TOP — spin on click
============================================================ */
.back-to-top {
    transition: opacity 0.3s ease,
                background-color 0.25s ease,
                color 0.25s ease,
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
                border-color 0.25s ease;
}
.back-to-top:hover {
    transform: translateY(-3px);
}
.back-to-top:active {
    transform: scale(0.92);
}

/* ============================================================
   23. NAV LINK — animated underline
============================================================ */
.nav__link {
    position: relative;
}
.nav__link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    right: 50%;
    height: 2px;
    background-color: var(--color-primary);
    border-radius: var(--radius-full);
    transition: left 0.25s ease, right 0.25s ease;
}
.nav__link:hover::after,
.nav__link--active::after {
    left: 8px;
    right: 8px;
}

/* ============================================================
   24. TOPBAR LINK — subtle hover
============================================================ */
.topbar__link {
    transition: color 0.2s ease, transform 0.2s ease;
}
.topbar__link:hover {
    transform: translateX(2px);
}

/* ============================================================
   25. PRODUCT DETAIL — image scale on load
============================================================ */
.product-detail__img {
    animation: scaleIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.product-detail__info {
    animation: fadeInRight 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* ============================================================
   26. BREADCRUMB — fade in
============================================================ */
.breadcrumb {
    animation: fadeInDown 0.45s ease 0.05s both;
}

/* ============================================================
   27. SCROLL-TRIGGERED UTILITY CLASSES
   Applied via JS IntersectionObserver
============================================================ */
.anim-ready {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.anim-ready.anim-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger helpers */
.anim-delay-1 { transition-delay: 0.07s; }
.anim-delay-2 { transition-delay: 0.14s; }
.anim-delay-3 { transition-delay: 0.21s; }
.anim-delay-4 { transition-delay: 0.28s; }
.anim-delay-5 { transition-delay: 0.35s; }
.anim-delay-6 { transition-delay: 0.42s; }
.anim-delay-7 { transition-delay: 0.49s; }
.anim-delay-8 { transition-delay: 0.56s; }

/* Variants */
.anim-left {
    transform: translateX(-28px);
}
.anim-left.anim-visible {
    transform: translateX(0);
}
.anim-right {
    transform: translateX(28px);
}
.anim-right.anim-visible {
    transform: translateX(0);
}
.anim-scale {
    transform: scale(0.9);
}
.anim-scale.anim-visible {
    transform: scale(1);
}

/* ============================================================
   28. PRODUCT CARD TAG — hover tint
============================================================ */
.product-card__tag {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.product-card:hover .product-card__tag {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary-light);
}

/* ============================================================
   29. CONTACT INFO ITEMS — slide in from left
============================================================ */
.contact-info__item {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.contact-info__icon {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 0.25s ease,
                color 0.25s ease;
}
.contact-info__item:hover .contact-info__icon {
    transform: scale(1.12) rotate(-5deg);
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* ============================================================
   30. HERO BACKGROUND — handled in organic-bg.css
============================================================ */
.hero__bg {
    animation: fadeIn 1.2s ease forwards;
}

/* ============================================================
   31. FAQ ITEM — transition polish
============================================================ */
.faq-item {
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.faq-item.open {
    border-color: var(--color-primary-light);
    box-shadow: 0 4px 16px rgba(185,28,28,0.06);
}
.faq-item__question {
    transition: color 0.2s ease, background-color 0.2s ease;
}
.faq-item.open .faq-item__question {
    color: var(--color-primary);
    background-color: var(--color-primary-light);
}

/* ============================================================
   32. FILTER BUTTONS — bounce on active
============================================================ */
.filter-btn {
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.filter-btn:active {
    transform: scale(0.94);
}
.filter-btn.active {
    animation: bounce-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ============================================================
   33. PRODUCT CARD WRAP — filter fade transition
============================================================ */
.product-card-wrap {
    transition: opacity 0.3s ease;
}

/* ============================================================
   34. HEADER LOGO — subtle hover
============================================================ */
.header__logo {
    transition: opacity 0.2s ease;
}
.header__logo:hover {
    opacity: 0.85;
}


/* ============================================================
   35. DROPDOWN — refined entrance
============================================================ */
.dropdown {
    transform-origin: top left;
    transition: opacity 0.2s ease,
                visibility 0.2s ease,
                transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav__item--dropdown:hover .dropdown {
    transform: translateY(0) scale(1);
}

/* ============================================================
   36. REDUCE MOTION — respect user preference
============================================================ */
@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;
    }
}