/* * PIPS Pegue Monte - Animações e Efeitos Visuais
* Complemento ao styles-optimized.css
* ATUALIZAÇÃO: Conversão TOTAL para REM (Base 16px)
*/

/* ===== ANIMAÇÕES DE ENTRADA ===== */

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-3.125rem); /* -50px */
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(3.125rem); /* 50px */
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* ===== ANIMAÇÕES DE HOVER ===== */

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 0.3125rem rgba(255, 159, 67, 0.3); /* 5px */
    }
    50% {
        box-shadow: 0 0 0.9375rem rgba(255, 159, 67, 0.6); /* 15px */
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-0.625rem); /* -10px */
    }
}

/* ===== ANIMAÇÕES DE LOADING ===== */

@keyframes shimmer {
    0% {
        background-position: -62.5rem 0; /* -1000px */
    }
    100% {
        background-position: 62.5rem 0; /* 1000px */
    }
}

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

/* ===== APLICAÇÃO DE ANIMAÇÕES ===== */

/* Hero Section */
.hero-content h1 {
    animation: fadeInUp 0.8s ease-out;
}

.hero-content p {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-content .btn {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Section Titles */
.section-title {
    animation: fadeInUp 0.6s ease-out;
}

/* Kit Cards */
.kit-card {
    animation: scaleIn 0.5s ease-out;
}

.kit-card:hover {
    animation: pulse 0.6s ease-in-out;
}

/* Timeline Items */
.timeline-item {
    animation: slideInLeft 0.6s ease-out;
}

.timeline-item:nth-child(even) {
    animation: slideInRight 0.6s ease-out;
}

/* Step Icons */
.step-icon {
    transition: all 0.3s ease;
}

.step:hover .step-icon {
    animation: pulse 0.6s ease-in-out;
    background: linear-gradient(135deg, #7dd4b8 0%, #a8e6cf 100%);
}

/* CTA Button */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* WhatsApp Float */
.whatsapp-float {
    animation: slideInUp 0.6s ease-out 0.8s both;
}

.whatsapp-float:hover {
    animation: pulse 0.6s ease-in-out;
}

/* Rating Stars */
.rating-stars .star {
    animation: scaleIn 0.4s ease-out;
}

.rating-stars .star:nth-child(1) { animation-delay: 0s; }
.rating-stars .star:nth-child(2) { animation-delay: 0.1s; }
.rating-stars .star:nth-child(3) { animation-delay: 0.2s; }
.rating-stars .star:nth-child(4) { animation-delay: 0.3s; }
.rating-stars .star:nth-child(5) { animation-delay: 0.4s; }

/* Instagram Grid */
.insta-item {
    animation: scaleIn 0.5s ease-out;
}

.insta-item:nth-child(1) { animation-delay: 0s; }
.insta-item:nth-child(2) { animation-delay: 0.1s; }
.insta-item:nth-child(3) { animation-delay: 0.2s; }
.insta-item:nth-child(4) { animation-delay: 0.3s; }
.insta-item:nth-child(5) { animation-delay: 0.4s; }
.insta-item:nth-child(6) { animation-delay: 0.5s; }

/* ===== EFEITOS DE INTERAÇÃO ===== */

/* Botões */
.btn {
    position: relative;
    transition: all 0.3s ease;
}

.btn:active {
    transform: scale(0.98);
}

/* Links */
a {
    position: relative;
}

/* Cards */
.kit-card,
.step,
.insta-item {
    transition: all 0.3s ease;
}

/* ===== EFEITOS DE SCROLL ===== */

/* Fade in ao scroll */
[data-aos] {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

[data-aos="fade-up"] {
    animation: fadeInUp 0.8s ease-out forwards;
}

[data-aos="fade-left"] {
    animation: slideInLeft 0.8s ease-out forwards;
}

[data-aos="fade-right"] {
    animation: slideInRight 0.8s ease-out forwards;
}

/* ===== EFEITOS ESPECIAIS ===== */

/* Glow effect para elementos importantes */
.btn-primary {
    box-shadow: 0 0.25rem 0.9375rem rgba(255, 159, 67, 0.2); /* 0 4px 15px */
    transition: box-shadow 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 0.5rem 1.5625rem rgba(255, 159, 67, 0.4); /* 0 8px 25px */
}

/* Underline animation para links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 0.125rem; /* 2px */
    background-color: var(--cta-orange);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 70%;
}

/* ===== TRANSIÇÕES SUAVES ===== */

/* Transição de cor */
.social-links a {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.social-links a:hover {
    background: linear-gradient(135deg, var(--cta-orange) 0%, var(--cta-orange-hover) 100%);
}

/* ===== MEDIA QUERIES PARA ANIMAÇÕES ===== */

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

@media (max-width: 768px) {
    /* Animações mais rápidas em mobile */
    [data-aos] {
        animation-duration: 0.6s;
    }
    
    .kit-card {
        animation-duration: 0.4s;
    }
}

/* ===== KEYFRAMES ADICIONAIS ===== */

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(3.125rem); /* 50px */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-3.125rem); /* -50px */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: rotate(0deg);
    }
}

@keyframes flipIn {
    from {
        opacity: 0;
        transform: perspective(25rem) rotateY(90deg); /* 400px */
    }
    to {
        opacity: 1;
        transform: perspective(25rem) rotateY(0deg); /* 400px */
    }
}

/* ===== EFEITOS DE BACKGROUND ===== */

/* Gradient animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animated gradient para seções */
.hero {
    background-attachment: fixed;
}

/* ===== EFEITOS DE TEXTO ===== */

/* Typing effect (opcional) */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Blink effect */
@keyframes blink {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0;
    }
}

/* ===== EFEITOS DE SOMBRA ===== */

/* Shadow lift */
@keyframes shadowLift {
    0% {
        box-shadow: 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.1); /* 0 2px 5px */
    }
    100% {
        box-shadow: 0 0.625rem 1.5625rem rgba(0, 0, 0, 0.15); /* 0 10px 25px */
    }
}

.kit-card:hover {
    animation: shadowLift 0.3s ease-out forwards;
}

/* ===== EFEITOS DE TRANSFORMAÇÃO ===== */

/* Rotate on hover */
.step-icon:hover {
    transform: rotate(10deg) scale(1.1);
}

/* Skew effect */
@keyframes skewIn {
    from {
        opacity: 0;
        transform: skewX(-10deg);
    }
    to {
        opacity: 1;
        transform: skewX(0deg);
    }
}

/* ===== EFEITOS DE APARIÇÃO ===== */

/* Stagger effect para listas */
.kit-card:nth-child(1) { animation-delay: 0s; }
.kit-card:nth-child(2) { animation-delay: 0.1s; }
.kit-card:nth-child(3) { animation-delay: 0.2s; }
.kit-card:nth-child(4) { animation-delay: 0.3s; }
.kit-card:nth-child(5) { animation-delay: 0.4s; }

/* ===== EFEITOS DE FEEDBACK ===== */

/* Click feedback */
.btn:active {
    transform: scale(0.98);
}

/* Focus state */
.btn:focus {
    outline: 0.125rem solid var(--cta-orange); /* 2px */
    outline-offset: 0.125rem; /* 2px */
}

/* ===== EFEITOS DE PARALLAX ===== */

/* Parallax effect (opcional) */
.hero {
    background-attachment: fixed;
    background-position: center;
}

@media (max-width: 768px) {
    .hero {
        background-attachment: scroll;
    }
}

/* ===== SMOOTH SCROLL ===== */

html {
    scroll-behavior: smooth;
}

/* ===== EFEITOS FINAIS ===== */

/* Overlay effect */
.kit-overlay,
.insta-overlay {
    transition: opacity 0.3s ease;
}

/* Transition for all interactive elements */
button,
a,
input,
select,
textarea {
    transition: all 0.3s ease;
}

/* ===== ACESSIBILIDADE ===== */

/* Respeitar preferência de movimento reduzido */
@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;
    }
}

/* Focus visible para acessibilidade */
:focus-visible {
    outline: 0.125rem solid var(--cta-orange); /* 2px */
    outline-offset: 0.125rem; /* 2px */
}

/* ===== PERFORMANCE ===== */

/* Use will-change para elementos animados */
.kit-card,
.step,
.btn-primary,
.whatsapp-float {
    will-change: transform;
}

/* Usar transform e opacity para melhor performance */
.kit-card:hover {
    transform: translateY(-0.5rem); /* -8px */
}

.btn-primary:hover {
    transform: translateY(-0.1875rem); /* -3px */
}
