/* ================================================================
   base.css — Animações, utilitários e componentes reutilizáveis
   Projeto: BASTA! Landing Page
   ================================================================ */

/* ========== ANIMAÇÕES & KEYFRAMES ========== */
@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
    0%   { background-position: -1000px 0; }
    100% { background-position:  1000px 0; }
}

@keyframes wa-pulse-ring {
    0%   { transform: scale(1);    opacity: 0.8;  }
    70%  { transform: scale(1.75); opacity: 0.15; }
    100% { transform: scale(1.75); opacity: 0;    }
}

@keyframes cron-pulse {
    0%, 100% { opacity: 1;    }
    50%       { opacity: 0.35; }
}

/* Shine sweep para cards parceiros/clientes */
@keyframes cardShine {
    0%   { left: -75%; }
    100% { left: 125%; }
}

/* Glow pulse suave */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(212,56,142,0.15); }
    50%      { box-shadow: 0 0 22px rgba(212,56,142,0.35), 0 0 40px rgba(123,45,142,0.12); }
}

/* Float sutil */
@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* Fade-in ao rolar */
.fade-in-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.fade-in-element.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Animações escalonadas */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}
.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Smooth transitions globais — apenas propriedades seguras.
   Nota: `*` não seleciona ::before/::after, logo não interfere
   com @keyframes que usam transform/opacity nesses pseudo-elementos. */
* {
    transition-property: transform, opacity, box-shadow;
    transition-duration: 0.3s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Respeita preferência de acessibilidade — sem loop no DOM via JS */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ========== ACESSIBILIDADE ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========== CONTAINER ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: var(--radius-lg);
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform, box-shadow;
}

/* Ripple effect */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}
.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-purple {
    background: var(--purple);
    color: white;
    box-shadow: 0 4px 15px rgba(123,45,142,0.3);
}
.btn-purple:hover {
    background: var(--purple-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(123,45,142,0.4);
}

.btn-gold {
    background: var(--gold);
    color: var(--purple-dark);
    box-shadow: 0 4px 15px rgba(245,197,24,0.3);
}
.btn-gold:hover {
    background: #e6b800;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245,197,24,0.4);
}

.btn-outline {
    background: transparent;
    color: var(--purple);
    border: 2px solid var(--purple);
}
.btn-outline:hover {
    background: var(--purple);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(123,45,142,0.3);
}

/* ========== SEÇÕES E TÍTULOS ========== */
section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2.8rem;
    color: var(--purple-dark);
}
.section-title.white { color: #fff; }
.section-title.left  { text-align: left; margin-bottom: 30px; }

.section-title-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto 7% auto;
    object-fit: contain;
}
.section-title-image.left {
    margin: 0 0 30px 0;
}

/* Títulos em texto (alternativa às imagens) */
.section-title-text {
    display: block;
    font-family: 'Montserrat', 'Arial Black', sans-serif;
    font-weight: 900;
    font-size: 3.5rem;
    color: #5B0163;
    text-align: center;
    margin: 0 auto 7% auto;
    max-width: 90%;
    line-height: 1.2;
    letter-spacing: -0.5px;
    text-transform: none;
    transition: opacity 0.15s ease;
}
.section-title-text.left {
    text-align: left;
    margin: 0 0 30px 0;
}
.section-title-text.white {
    color: #ffffff;
}

/* Transição suave para elementos traduzidos */
[data-i18n] {
    transition: opacity 0.15s ease;
}

body {
    transition: opacity 0.15s ease;
}

/* ========== ELEMENTOS DECORATIVOS ========== */
.deco-circle {
    position: absolute;
    border-radius: 50%;
    border: 3px solid var(--gold);
    opacity: 0.3;
    z-index: 0;
}
.deco-circle-filled {
    position: absolute;
    border-radius: 50%;
    background: var(--gold);
    opacity: 0.15;
    z-index: 0;
}

/* ========== EFEITOS INTERATIVOS MODERNOS ========== */

/* Parallax suave em seções */
.parallax-section {
    will-change: transform;
}

/* Tilt 3D sutil em cards */
.tilt-card {
    transition: transform 0.25s ease-out;
    will-change: transform;
}

/* Magnetic button hover */
.btn-magnetic {
    transition: transform 0.2s ease-out;
}

/* Reveal de seções ao scroll */
.reveal-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-section.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Cursor glow follower */
.cursor-glow {
    position: fixed;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(123,45,142,0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.cursor-glow.active { opacity: 1; }

/* Gradient border animated (para títulos/seções) */
.gradient-border {
    position: relative;
}
.gradient-border::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--purple), var(--magenta), var(--gold), var(--purple));
    background-size: 300% 100%;
    animation: gradientSlide 4s ease infinite;
    border-radius: 2px;
}
@keyframes gradientSlide {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Stagger reveal para grids */
.stagger-reveal > * {
    opacity: 0;
    transform: translateY(25px) scale(0.97);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger-reveal.is-revealed > *:nth-child(1)  { transition-delay: 0.05s; }
.stagger-reveal.is-revealed > *:nth-child(2)  { transition-delay: 0.1s; }
.stagger-reveal.is-revealed > *:nth-child(3)  { transition-delay: 0.15s; }
.stagger-reveal.is-revealed > *:nth-child(4)  { transition-delay: 0.2s; }
.stagger-reveal.is-revealed > *:nth-child(5)  { transition-delay: 0.25s; }
.stagger-reveal.is-revealed > *:nth-child(6)  { transition-delay: 0.3s; }
.stagger-reveal.is-revealed > *:nth-child(7)  { transition-delay: 0.35s; }
.stagger-reveal.is-revealed > *:nth-child(8)  { transition-delay: 0.4s; }
.stagger-reveal.is-revealed > *:nth-child(9)  { transition-delay: 0.45s; }
.stagger-reveal.is-revealed > *:nth-child(10) { transition-delay: 0.5s; }
.stagger-reveal.is-revealed > *:nth-child(n+11) { transition-delay: 0.55s; }
.stagger-reveal.is-revealed > * {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Hover scale-up suave para section title images */
.section-title-image {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.section-title-image:hover {
    transform: scale(1.03);
}
