/* ═══════════════════════════════════════════════════
   NervoAlive — Animations & Effects
   ═══════════════════════════════════════════════════ */

/* ── Keyframes ─────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

@keyframes floatDelayed {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes orbitSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes badgeFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.04); }
}

/* Bottle float keyframes removed — replaced by heroProductFloat */

/* ── Hero Entrance Sequence ──────────────────── */

/* Text lines slide in from left with blur */
@keyframes heroLineIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

/* Authority micro-text fade in */
@keyframes heroAuthorityIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
        filter: blur(4px);
    }
    to {
        opacity: 0.85;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Subtitle + CTA fade up */
@keyframes heroTextIn {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* Trust pill cascade from left */
@keyframes heroPillIn {
    from {
        opacity: 0;
        transform: translateX(-20px) scale(0.9);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

/* Product dramatic reveal from below */
@keyframes heroProductIn {
    from {
        opacity: 0;
        transform: translateY(80px) scale(0.8);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

/* Product continuous float — smoother, 4s cycle */
@keyframes heroProductFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4))
                drop-shadow(0 20px 60px rgba(163, 22, 33, 0.6))
                drop-shadow(0 0 40px rgba(163, 22, 33, 0.3));
    }
    50% {
        transform: translateY(-14px) scale(1.01);
        filter: drop-shadow(0 12px 25px rgba(0, 0, 0, 0.5))
                drop-shadow(0 30px 75px rgba(163, 22, 33, 0.75))
                drop-shadow(0 0 55px rgba(163, 22, 33, 0.4));
    }
}

/* Badge pop-in with elastic bounce */
@keyframes heroBadgePopIn {
    0% {
        opacity: 0;
        transform: scale(0) translateY(10px);
    }
    60% {
        opacity: 1;
        transform: scale(1.15) translateY(-2px);
    }
    80% {
        transform: scale(0.95) translateY(1px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Badge continuous float with slight rotate */
@keyframes heroBadgeFloat1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(1.5deg); }
}

@keyframes heroBadgeFloat2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(-1.5deg); }
}

@keyframes heroBadgeFloat3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

/* Capsule drift in with rotation */
@keyframes heroCapsuleIn {
    from {
        opacity: 0;
        transform: scale(0.3) rotate(0deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(var(--capsule-rot, -25deg));
    }
}

/* Capsule continuous float */
@keyframes heroCapsuleFloat1 {
    0%, 100% { transform: translateY(0) rotate(-25deg); }
    50% { transform: translateY(-10px) rotate(-15deg); }
}

@keyframes heroCapsuleFloat2 {
    0%, 100% { transform: translateY(0) rotate(35deg); }
    50% { transform: translateY(-8px) rotate(42deg); }
}

@keyframes heroCapsuleFloat3 {
    0%, 100% { transform: translateY(0) rotate(-50deg); }
    50% { transform: translateY(-12px) rotate(-40deg); }
}

@keyframes heroScrollIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 0.4;
        transform: translateX(-50%) translateY(0);
    }
}

/* Glow circle entrance + organic pulse */
@keyframes heroGlowIn {
    from {
        opacity: 0;
        transform: scale(0.6);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pedestal glow breathe synced with product */
@keyframes heroPedestalBreathe {
    0%, 100% {
        opacity: 0.8;
        transform: translateX(-50%) scaleX(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scaleX(1.1);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 4px 24px rgba(163, 22, 33, 0.4); }
    50% { box-shadow: 0 4px 40px rgba(163, 22, 33, 0.7); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes countdownPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes redGlow {
    0%, 100% {
        filter: blur(40px) brightness(1);
        transform: scale(0.97);
    }
    50% {
        filter: blur(55px) brightness(1.3);
        transform: scale(1.03);
    }
}

/* ── Scroll Reveal (Enhanced) ────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    filter: blur(4px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    filter: blur(4px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    filter: blur(4px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
}

/* ── Reveal Scale (for cards/pricing) ────────── */
.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    filter: blur(4px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
}

/* ── Floating ──────────────────────────────────── */
.floating {
    animation: float 4s ease-in-out infinite;
}

.floating-delayed {
    animation: floatDelayed 4.5s ease-in-out infinite 0.8s;
}

/* ── Glow Pulse (CTA buttons) ─────────────────── */
.glow-btn {
    animation: glowPulse 3s ease-in-out infinite;
}

/* ── Hero CTA Glow Pulse ─────────────────────── */
@keyframes heroCTAGlow {
    0%, 100% { box-shadow: 0 6px 30px rgba(232, 98, 26, 0.5), 0 0 60px rgba(232, 98, 26, 0.15); }
    50% { box-shadow: 0 10px 50px rgba(232, 98, 26, 0.7), 0 0 90px rgba(232, 98, 26, 0.3); }
}

/* CTA shine sweep — continuous */
@keyframes heroCTAShine {
    0%, 85% { left: -100%; }
    100% { left: 100%; }
}

.btn-hero-cta {
    animation: heroCTAGlow 3s ease-in-out infinite;
}

.btn-hero-cta::before {
    animation: heroCTAShine 4s ease-in-out 2s infinite;
}

/* ── Hero Entrance Classes ───────────────────── */
/* Applied by JS after DOMContentLoaded to trigger sequenced entrance */

/* Authority micro-text — first element */
.hero-entrance .hero-authority {
    animation: heroAuthorityIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}

/* H1 lines — staggered slide from left */
.hero-entrance .hero-line-1 {
    animation: heroLineIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-entrance .hero-line-2 {
    animation: heroLineIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

.hero-entrance .hero-line-3 {
    animation: heroLineIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

/* Subtitle */
.hero-entrance .hero-sub {
    animation: heroTextIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

/* CTA button */
.hero-entrance .btn-hero-cta {
    animation: heroTextIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
}

/* Trust pills — cascade with stagger */
.hero-entrance .trust-pill:nth-child(1) {
    animation: heroPillIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.75s both;
}

.hero-entrance .trust-pill:nth-child(2) {
    animation: heroPillIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
}

.hero-entrance .trust-pill:nth-child(3) {
    animation: heroPillIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.95s both;
}

/* Glow circle — entrance + organic pulse */
.hero-entrance .hero-glow-circle {
    animation: heroGlowIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both, redGlow 5s ease-in-out 1.4s infinite;
}

/* Product — dramatic reveal + float */
.hero-entrance .hero-product {
    animation: heroProductIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both, heroProductFloat 4s ease-in-out 1.6s infinite;
}

/* Pedestal — entrance + breathe synced with product */
.hero-entrance .hero-pedestal-glow {
    animation: heroGlowIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both, heroPedestalBreathe 4s ease-in-out 1.6s infinite;
}

/* Floating badges — pop in with elastic bounce, then float */
.hero-entrance .hero-badge-ativos {
    animation: heroBadgePopIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.9s both, heroBadgeFloat1 3.5s ease-in-out 1.7s infinite;
}

.hero-entrance .hero-badge-natural {
    animation: heroBadgePopIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1.1s both, heroBadgeFloat2 4s ease-in-out 1.9s infinite;
}

.hero-entrance .hero-badge-selo {
    animation: heroBadgePopIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1.3s both, heroBadgeFloat3 4.5s ease-in-out 2.1s infinite;
}

/* Floating capsules — drift in then float */
.hero-entrance .hero-capsule-1 {
    animation: heroCapsuleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.0s both, heroCapsuleFloat1 3s ease-in-out 1.7s infinite;
}

.hero-entrance .hero-capsule-2 {
    animation: heroCapsuleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.15s both, heroCapsuleFloat2 3.8s ease-in-out 1.85s infinite;
}

.hero-entrance .hero-capsule-3 {
    animation: heroCapsuleIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.3s both, heroCapsuleFloat3 4.2s ease-in-out 2.0s infinite;
}

/* Scroll indicator */
.hero-entrance .hero-scroll-indicator {
    animation: heroScrollIn 0.6s ease 1.5s both, scrollFade 2.5s ease-in-out 2.1s infinite;
}

/* Initial hidden state for hero entrance elements */
#hero .hero-authority,
#hero .hero-line,
#hero .hero-sub,
#hero .btn-hero-cta,
#hero .trust-pill,
#hero .hero-glow-circle,
#hero .hero-product,
#hero .hero-pedestal-glow,
#hero .hero-scroll-indicator,
#hero .hero-badge,
#hero .hero-capsule {
    opacity: 0;
}

/* ── Countdown Separator Pulse ────────────────── */
.cd-sep {
    animation: countdownPulse 1s ease-in-out infinite;
}

/* ── Hero Glow Circle Animation ───────────────── */
.hero-glow-circle {
    animation: redGlow 4s ease-in-out infinite;
}

/* Bottle halo keyframes removed — replaced by heroProductFloat */

/* ── Product Glow Box Pulse ──────────────────── */
@keyframes productGlow {
    0%, 100% { box-shadow: inset 0 0 60px rgba(163, 22, 33, 0.2), 0 0 30px rgba(163, 22, 33, 0.1); }
    50% { box-shadow: inset 0 0 80px rgba(163, 22, 33, 0.3), 0 0 50px rgba(163, 22, 33, 0.15); }
}

.product-glow-box {
    animation: productGlow 4s ease-in-out infinite;
}

/* ── Section Divider Glow ────────────────────── */
@keyframes sectionGlow {
    0%, 100% { opacity: 0.04; }
    50% { opacity: 0.08; }
}

#sintomas-experts::before,
#causas-countdown::before,
#pricing::before,
#composicao-garantia::before {
    animation: sectionGlow 6s ease-in-out infinite;
}

/* ── Gold Ribbon Shimmer ──────────────────────── */
.gold-ribbon {
    background-size: 200% 100%;
    background-image: linear-gradient(
        90deg,
        var(--gold) 0%,
        #ffe066 40%,
        var(--gold) 60%,
        var(--gold-dark) 100%
    );
    animation: shimmer 3s ease-in-out infinite;
}

/* ── Gold Card Glow ───────────────────────────── */
.price-card--gold {
    animation: goldGlow 3s ease-in-out infinite;
}

@keyframes goldGlow {
    0%, 100% { box-shadow: 0 20px 60px rgba(245, 197, 24, 0.1), 0 0 60px rgba(163, 22, 33, 0.08); }
    50% { box-shadow: 0 20px 80px rgba(245, 197, 24, 0.2), 0 0 100px rgba(163, 22, 33, 0.15); }
}

/* ── Icon Hover Bounce ───────────────────────── */
@keyframes iconBounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.2); }
    60% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* ── Symptom Card Icon Hover ─────────────────── */
.symptom-card:hover .s-icon {
    animation: iconBounce 0.4s ease;
}

/* ── Ingredient Card Icon Hover ──────────────── */
.ing-card:hover .ing-card-icon {
    animation: iconBounce 0.4s ease;
}

/* ── Expert Card Hover Lift ──────────────────── */
.expert-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease,
                box-shadow 0.4s ease;
}

.expert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(163, 22, 33, 0.12);
}

/* ── Garantia Seal Hover ─────────────────────── */
.garantia-seal i {
    transition: transform 0.3s ease;
}

.garantia-card:hover .garantia-seal i {
    transform: scale(1.15) rotate(-8deg);
}

/* ── Timeline Dot Pulse on Hover ─────────────── */
.timeline-item:hover .tl-dot {
    animation: pulse 0.6s ease;
    box-shadow: 0 0 20px var(--red-glow);
}

/* ── Price Card Hover Glow ───────────────────── */
.price-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease,
                box-shadow 0.4s ease;
}

.price-card:hover {
    box-shadow: 0 16px 50px rgba(163, 22, 33, 0.15);
}

/* ── Button Press Effect ─────────────────────── */
.btn-cta:active,
.btn-price:active {
    transform: translateY(0) scale(0.97);
    transition: transform 0.1s ease;
}

/* ── Trust Pill Hover ────────────────────────── */
.trust-pill {
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.trust-pill:hover {
    transform: translateY(-3px) scale(1.04);
    background: rgba(232, 98, 26, 0.12);
    border-color: rgba(232, 98, 26, 0.4);
    box-shadow: 0 4px 20px rgba(232, 98, 26, 0.15);
}

/* ── Product Badge Hover ─────────────────────── */
.product-badge {
    transition: transform 0.3s ease, background 0.3s ease;
}

.product-badge:hover {
    transform: translateY(-2px) scale(1.03);
    background: rgba(255, 255, 255, 0.1);
}

/* ── Accordion Expand Smooth ─────────────────── */
.accordion-collapse {
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-button {
    transition: color 0.3s ease, padding-left 0.3s ease !important;
}

.accordion-button:not(.collapsed) {
    padding-left: 28px !important;
}

/* ── Stats Number Glow ───────────────────────── */
.stat-num {
    transition: text-shadow 0.4s ease;
}

.stat-item:hover .stat-num {
    text-shadow: 0 0 30px rgba(163, 22, 33, 0.4);
}

/* ── Urgency Badge Pulse ─────────────────────── */
@keyframes urgencyPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(163, 22, 33, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(163, 22, 33, 0); }
}

.urgency-badge {
    animation: urgencyPulse 2s ease-in-out infinite;
}

/* ── Scroll Indicator Fade ───────────────────── */
@keyframes scrollFade {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.9; transform: translateX(-50%) translateY(8px); }
}

.hero-scroll-indicator {
    animation: scrollFade 2.5s ease-in-out infinite;
}

/* ── Footer Logo Hover ───────────────────────── */
.footer-logo {
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.footer-logo:hover {
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(163, 22, 33, 0.4));
}

/* ── Countdown Box Tick ──────────────────────── */
@keyframes tick {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.cd-box span {
    transition: transform 0.15s ease;
}

/* ── Reduced Motion ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal-left,
    .reveal-right,
    .reveal-scale {
        transition: none;
        opacity: 1;
        transform: none;
        filter: none;
    }

    .floating,
    .floating-delayed {
        animation: none;
    }

    .glow-btn,
    .urgency-badge {
        animation: none;
    }

    .cd-sep {
        animation: none;
    }

    .gold-ribbon,
    .price-card--gold,
    .hero-glow-circle {
        animation: none;
    }

    .hero-product {
        animation: none;
        opacity: 1;
        filter: drop-shadow(0 20px 60px rgba(163, 22, 33, 0.5));
    }

    #hero .hero-authority,
    #hero .hero-line,
    #hero .hero-sub,
    #hero .btn-hero-cta,
    #hero .trust-pill,
    #hero .hero-glow-circle,
    #hero .hero-product,
    #hero .hero-pedestal-glow,
    #hero .hero-scroll-indicator,
    #hero .hero-badge,
    #hero .hero-capsule {
        opacity: 1;
    }

    .hero-badge,
    .hero-capsule {
        animation: none;
    }

    .product-glow-box {
        animation: none;
    }

    .hero-scroll-indicator {
        animation: none;
        opacity: 0.4;
    }

    #sintomas-experts::before,
    #causas-countdown::before,
    #pricing::before,
    #composicao-garantia::before {
        animation: none;
    }

    .symptom-card:hover .s-icon,
    .ing-card:hover .ing-card-icon,
    .timeline-item:hover .tl-dot {
        animation: none;
    }
}
