/* ========================================
   FINFREE LANDING PAGE STYLES
   ======================================== */

/* 1. VARIÁVEIS E RESET GLOBAL */
:root {
    --bg-color: #0F0F0F;
    --card-color: #1A1A1A;
    --text-color: #F0F0F0;
    --text-faded: #888;
    --primary-color: #8A2BE2;
    --primary-hover: #9F4BFF;
    /* Gradientes */
    --gradient-1-start: #1A0F2B;
    --gradient-1-end: #0F0F0F;
    --gradient-2-start: #0F0F0F;
    --gradient-2-end: #1A0F2B;
    /* Cores alternativas para seções */
    --section-alt-bg: #151515;
    /* Tipografia */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
 
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
}

/* 2. TIPOGRAFIA (FONTES GRANDES) */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 10vw, 5.5rem);
}

h2 {
    font-size: clamp(2rem, 8vw, 3.5rem);
}

h3 {
    font-size: clamp(1.2rem, 5vw, 1.5rem);
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-faded);
}

p, li, blockquote {
    font-size: clamp(1rem, 4vw, 1.1rem);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

.highlight {
    color: var(--primary-color);
}

/* 3. LAYOUT DAS SEÇÕES */
main {
    width: 100%;
}

section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 80vh;
    padding: 100px 10%;
}

.nao-precisa-cartao {
    margin-top: 20px;
    color: #ffffff47;
}

.section-content {
    margin: 0 auto;
    width: 100%;
}

    .section-content h2 {
        text-align: center;
        margin-top: 10px;
    }

/* 4. BOTÃO CTA (CALL TO ACTION) */
.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 1.5rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

    .cta-button:hover {
        background-color: var(--primary-hover);
        transform: translateY(-3px);
    }

    .cta-button.secondary {
        background-color: transparent;
        border: 2px solid var(--primary-color);
        color: var(--primary-color);
    }

        .cta-button.secondary:hover {
            background-color: var(--primary-color);
            color: #FFF;
        }

/* 5. ESTILOS DAS SEÇÕES & CORES/GRADIENTES */

.section-gradient-1 {
    background: linear-gradient(135deg, var(--gradient-1-start), var(--gradient-1-end));
}

.section-gradient-2 {
    background: linear-gradient(45deg, var(--gradient-2-start), var(--gradient-2-end));
}

.section-dark-alt {
    background-color: var(--section-alt-bg);
}

/* Seção 2: Barreira */
.barrier-section blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    font-size: 1rem;
    color: var(--text-faded);
    font-style: italic;
    max-width: 1100px;
    margin: 30px auto;
}

/* Seção 3: Como Funciona */
.how-it-works-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 4rem;
}

.how-it-works-card {
    background: var(--card-color);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #222;
}

/* Seção 4: Planos */
.plans-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 4rem;
    align-items: center;
}

.plan-card {
    background: var(--card-color);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 1px solid #333;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
}

    .plan-card.highlight {
        border: 2px solid var(--primary-color);
        box-shadow: 0 0 20px rgba(138, 43, 226, 0.3);
    }

.plan-tag {
    background: var(--primary-color);
    color: #FFF;
    font-family: var(--font-heading);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
    align-self: flex-start;
    margin-bottom: 1rem;
}

.plan-card.highlight .plan-tag {
    background: var(--primary-color);
}

.plan-card:not(.highlight) .plan-tag {
    background: var(--text-faded);
}

.plan-card h3 {
    font-size: 2rem;
    color: var(--text-color);
}

.plan-description {
    color: var(--text-faded);
    min-height: 3.5rem;
}

.plan-card ul {
    list-style: none;
    margin: 1.5rem 0;
    flex-grow: 1;
}

.plan-card li {
    margin-bottom: 0.75rem;
}

.faded-note {
    color: var(--text-faded);
    font-style: italic;
    font-size: 0.9rem;
}

.plan-card .cta-button {
    width: 100%;
}

/* Seção 5: Missão */
.mission-section {
    text-align: center;
}

    .mission-section p {
        font-size: 1.2rem;
        color: var(--text-faded);
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }

/* Seção 6: CTA Final */
.cta-section {
    text-align: center;
}

    .cta-section .section-content {
        background: var(--card-color);
        padding: 50px 30px;
        border-radius: 12px;
    }

/* 6. ANIMAÇÕES DE SCROLL */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

    .animate-on-scroll.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

/* 7. SEÇÃO DEMO: Mockups de Celular */
.demo-section {
    background: var(--bg-color);
    min-height: auto;
    padding: 80px 5%;
}

.demo-container {
    display: flex;
    flex-direction: column;
    margin-top: 3rem;
    align-items: center;
}

.demo-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 40px;
    position: relative;
}

.telegram-demo {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    box-shadow: 0 30px 80px rgba(0, 136, 204, 0.3);
}

.whatsapp-demo {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: 0 30px 80px rgba(37, 211, 102, 0.3);
}

.demo-header {
    text-align: center;
    margin-bottom: 3rem;
}

    .demo-header h3 {
        font-family: var(--font-heading);
        font-size: 1.8rem;
        color: #fff;
        margin-bottom: 0.5rem;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .demo-header p {
        color: rgba(255, 255, 255, 0.9);
        font-size: 1rem;
    }

/* Mockup do Celular */
.phone-mockup {
    width: 100%;
    max-width: 360px;
    height: 700px;
    border-radius: 45px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 12px solid #1a1a1a;
}

    .phone-mockup::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 150px;
        height: 25px;
        background: #000;
        border-radius: 0 0 20px 20px;
        z-index: 1000;
    }

.telegram-theme {
    background: #17212b;
}

.whatsapp-theme {
    background: #ece5dd;
}

.phone-header {
    display: flex;
    align-items: center;
    padding: 50px 16px 12px 16px;
    gap: 12px;
    position: relative;
    z-index: 100;
}

.telegram-theme .phone-header {
    background: #527da3;
}

.whatsapp-theme .phone-header {
    background: #075e54;
}

.back-btn {
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    margin-right: 5px;
}

.chat-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.chat-name {
    color: #fff;
    font-weight: 600;
    font-size: 17px;
}

.phone-chat {
    flex: 1;
    padding: 20px 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

.telegram-theme .phone-chat {
    background: #0e1621;
    background-image: repeating-linear-gradient( 45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.02) 10px, rgba(255, 255, 255, 0.02) 20px );
}

.whatsapp-theme .phone-chat {
    background: #ece5dd;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0c16.569 0 30 13.431 30 30 0 16.569-13.431 30-30 30C13.431 60 0 46.569 0 30 0 13.431 13.431 0 30 0z' fill='%23d5d0c9' fill-opacity='0.15'/%3E%3C/svg%3E");
}

.message {
    display: flex;
    margin-bottom: 4px;
}

.user-message {
    justify-content: flex-end;
}

.bot-message {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 78%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14.5px;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.telegram-theme .user-message .message-bubble {
    background: #2b5278;
    color: #fff;
    border-radius: 12px 12px 4px 12px;
}

.whatsapp-theme .user-message .message-bubble {
    background: #dcf8c6;
    color: #000;
    border-radius: 8px 8px 0 8px;
}

.telegram-theme .bot-message .message-bubble {
    background: #182533;
    color: #fff;
    border-radius: 12px 12px 12px 4px;
}

.whatsapp-theme .bot-message .message-bubble {
    background: #fff;
    color: #303030;
    border-radius: 8px 8px 8px 0;
}

.message-bubble strong {
    font-weight: 600;
}

.telegram-theme .message-bubble strong {
    color: #5ca3d9;
}

.whatsapp-theme .message-bubble strong {
    color: #075e54;
}

.phone-input {
    padding: 8px 12px 20px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.telegram-theme .phone-input {
    background: #17212b;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.whatsapp-theme .phone-input {
    background: #f0f0f0;
}

.phone-input span {
    flex: 1;
    padding: 12px 16px;
    border-radius: 24px;
    font-size: 15px;
}

.telegram-theme .phone-input span {
    background: #0e1621;
    color: #707579;
}

.whatsapp-theme .phone-input span {
    background: #fff;
    color: #667781;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Mensagens com Imagem */
.message-image {
    padding: 4px !important;
    max-width: 85% !important;
    background: transparent !important;
}

    .message-image img {
        width: 100%;
        max-width: 250px;
        height: auto;
        border-radius: 8px;
        display: block;
        margin-bottom: 4px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

.whatsapp-theme .message-image img {
    border-radius: 8px 8px 0 0;
}

.image-caption {
    display: block;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 0 0 8px 8px;
}

.whatsapp-theme .user-message .image-caption {
    background: #dcf8c6;
    color: #000;
}

.telegram-theme .user-message .image-caption {
    background: #2b5278;
    color: #fff;
}

.whatsapp-theme .user-message .message-image {
    background: #dcf8c6 !important;
    border-radius: 8px;
    overflow: hidden;
    padding: 0 !important;
}

.telegram-theme .user-message .message-image {
    background: #2b5278 !important;
    border-radius: 12px;
    overflow: hidden;
    padding: 0 !important;
}

/* 8. ANIMAÇÕES DAS MENSAGENS */
.msg-animated {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
}

.demo-section.demo-active .msg-animated {
    animation: messageSlideIn 0.5s ease forwards;
}

@keyframes messageSlideIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Indicador de Digitando */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    border-radius: 18px;
    width: fit-content;
    opacity: 0;
}

.demo-section.demo-active .typing-indicator {
    animation: messageSlideIn 0.5s ease forwards;
}

.telegram-theme .typing-indicator {
    background: #182533;
}

.whatsapp-theme .typing-indicator {
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.demo-section.demo-active .typing-dot {
    animation: typingDot 1.4s infinite ease-in-out;
}

.telegram-typing .typing-dot {
    background: #5ca3d9;
}

.whatsapp-typing .typing-dot {
    background: #8696a0;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.demo-section.demo-active .msg-animated.typing-indicator {
    animation: typingFadeOut 0.5s ease forwards;
    animation-delay: inherit;
}

@keyframes typingFadeOut {
    0% {
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        display: none;
        height: 0;
        padding: 0;
        margin: 0;
    }
}

.demo-section.demo-active .message-bubble strong {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* 9. MEDIA QUERY (DESKTOP) */

@media (min-width: 1024px) {

    /* Ajusta o padding das seções no desktop */
    section {
        padding: 100px 5%;
        padding-left: calc(var(--nav-width-desktop) + (var(--nav-padding-desktop) * 2) + 30px);
        min-height: 100vh;
    }

    /* Ajusta layouts de grid */
    .how-it-works-container {
        flex-direction: row;
        justify-content: space-between;
    }

    .how-it-works-card {
        flex: 1;
        max-width: 48%;
    }

    .plans-container {
        flex-direction: row;
        justify-content: center;
        align-items: stretch;
    }

    .plan-card {
        flex: 1;
        margin: 0 15px;
    }

    /* Demo Section */
    .demo-container {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
    }

    .demo-card {
        width: 100%;
    }

    .phone-mockup {
        max-width: 380px;
        height: 740px;
    }
}
