﻿/* 
   CantaPraMin - Sistema de Design Responsivo (Mobile-First)
   Focado em Viewports Granulares conforme solicitado.
*/

:root {
    --primary: #ef4444;
    --secondary: #f97316;
    --touch-target: 44px;

    /* Espaçamentos Fluidos */
    --space-sm: clamp(0.5rem, 1vw, 1rem);
    --space-md: clamp(1rem, 2vw, 2rem);
    --space-lg: clamp(2rem, 4vw, 4rem);
}

.lazy-section {
    will-change: opacity, transform;
}

/* --- Global Reset & Overflow Protection --- */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Espaçamentos Fluidos Negativos (para grids) */
.grid-gap-fluid {
    gap: clamp(1rem, 3vw, 2rem);
}

/* --- Logo Styles --- */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-symbol {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.2));
}

.logo-symbol-lg {
    width: 140px;
    height: 140px;
    margin: 0 auto;
}

.logo-animation-pulse {
    animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {

    0%,
    100% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.05);
        filter: brightness(1.1);
    }
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 1rem 0;
    pointer-events: none;
    color: var(--primary);
    opacity: 0.6;
}

.scroll-indicator .material-symbols-rounded {
    font-size: 2.5rem;
    animation: scroll-indicator-pulse 2s ease-in-out infinite;
}

@keyframes scroll-indicator-pulse {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }

    50% {
        transform: translateY(6px) scale(1.1);
        opacity: 1;
    }
}

/* --- Base (Mobile Default: até 360px) --- */
body {
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1 {
    font-size: clamp(2rem, 12vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 10vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 8vw, 1.75rem);
}

/* Garantia de área de toque mínima */
button,
a,
.touch-target {
    min-height: var(--touch-target);
    min-width: var(--touch-target);
}

header nav {
    padding-left: 1rem;
    padding-right: 1rem;
}

.material-symbols-rounded {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(239, 68, 68, 0.1));
}

.brand-shadow {
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.3);
}

/* --- Efeitos de Neon (Moderados) --- */
.neon-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.neon-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4), 0 0 40px rgba(239, 68, 68, 0.2);
}

.neon-hover-secondary:hover {
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.4), 0 0 40px rgba(249, 115, 22, 0.2);
}

/* --- Botões Gradient --- */
.btn-brand-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-brand-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.btn-brand-gradient:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
}

.btn-brand-gradient:hover::before {
    opacity: 1;
}

/* --- Breakpoint: 361px a 390px --- */
@media (min-width: 361px) {
    .container-padding {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* --- Breakpoint: 391px a 414px --- */
@media (min-width: 391px) {
    .section-spacing {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* --- Breakpoint: 415px a 430px --- */
@media (min-width: 415px) {
    p {
        font-size: 1.05rem;
    }
}

@media (min-width: 900px) {
    .plans-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2rem !important;
    }

    /* Grid do Hero (Benefícios) - Tornando mais compacto e flexível */
    .hero-features-grid {
        display: flex !important;
        justify-content: center !important;
        gap: 1.25rem !important;
        flex-wrap: wrap;
    }

    /* Grid de Depoimentos */
    .testimonials-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 2rem !important;
    }

    h1 {
        font-size: 4rem;
    }

    h2 {
        font-size: 3rem;
    }
}

/* Refinamento para Desktop Real (1024px+) */
@media (min-width: 1024px) {
    .max-w-7xl {
        max-width: 80rem;
        /* 1280px */
        margin-left: auto;
        margin-right: auto;
    }

    .section-spacing-lg {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* --- Utilitários de Layout Adaptável --- */
.flex-adaptive {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .flex-adaptive {
        flex-direction: row;
    }
}

/* Efeito de Vidro (Refinado por @frontend-specialist) */
.glass-panel {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Ajustes Específicos para Seções Complexas */
.qr-card-container {
    perspective: 1000px;
}

.rotated-card {
    transition: transform 0.3s ease;
}

@media (max-width: 430px) {
    .rotated-card {
        transform: rotate(0) !important;
        /* Remove rotação em telas pequenas para evitar overflow */
        margin-bottom: 1.5rem;
    }
}

/* Imagens Responsivas */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Estilos de Planos (Refinados conforme screenshot) --- */
.plan-card {
    border-radius: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: #fff;
}

.plan-card-premium {
    border: 3px solid var(--primary);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.3);
    transform: scale(1.05);
    z-index: 10;
}

.plan-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.plan-badge-secondary {
    background: #f43f5e;
    /* Tom levemente diferente para o recomendado se desejar */
}

.plan-price {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.plan-check {
    color: var(--primary);
    font-size: 1.25rem;
}

.btn-plan {
    border-radius: 1.5rem;
    padding: 1rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-basic {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.btn-premium {
    background: linear-gradient(135deg, #ef4444, #f43f5e);
}

@media (max-width: 430px) {
    .plan-card-premium {
        transform: scale(1);
        margin: 1.5rem 0;
    }
}

/* Fix para Seção Final (CTA) */
.cta-section h2 {
    font-size: clamp(2rem, 12vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

/* --- Timeline "Como Funciona" --- */
.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 4rem auto 2rem auto;
    padding: 2rem 0 0 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, #fee2e2, #fee2e2, transparent);
    z-index: 0;
}

.timeline-item {
    position: relative;
    width: 100%;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-content {
    width: 45%;
    padding: 1.5rem;
}

.timeline-number-wrapper {
    position: relative;
    z-index: 10;
    margin: 0 2rem;
}

.timeline-number {
    width: 3.5rem;
    height: 3.5rem;
    background: white;
    border: 3px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
    transition: all 0.3s ease;
}

.timeline-item .timeline-content:empty {
    display: block !important;
    visibility: hidden;
}

.timeline-item:hover .timeline-number {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.5);
}

/* --- Animações de Entrada (Scroll) --- */
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-animation-tag {
    display: none !important;
}

@media (max-width: 767px) {
    .timeline-container::before {
        left: 20px;
        transform: none;
    }

    .timeline-item {
        justify-content: flex-start;
        padding-left: 50px;
        margin-bottom: 2rem;
    }

    .timeline-content {
        width: 100% !important;
        text-align: left !important;
    }

    .timeline-item .timeline-content:empty {
        display: none !important;
    }

    .timeline-number-wrapper {
        position: absolute;
        left: -18px;
        margin: 0;
    }

    .timeline-number {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.1rem;
    }
}

/* --- Se��o Cart�o M�gico --- */
@keyframes scan-vertical {
    0% {
        top: 0;
    }

    50% {
        top: 100%;
    }

    100% {
        top: 0;
    }
}

.scan-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: scan-vertical 3s linear infinite;
}

.magic-card-float {
    transition: transform 0.3s ease;
}

.magic-card-float:hover {
    transform: translateY(-5px) rotate(8deg);
}