/* ==========================================================================
   IMPORTAÇÃO DE FONTES CUSTOMIZADAS (@font-face)
   ========================================================================== */
@font-face {
    font-family: 'Gobold Light';
    src: url('../fonts/Gobold Light.otf') format('opentype'); 
    font-display: swap;
}

@font-face {
    font-family: 'Gobold High Bold';
    src: url('../fonts/Gobold High Bold.otf') format('opentype'); 
    font-display: swap;
}

/* ==========================================================================
   VARIÁVEIS & RESET
   ========================================================================== */
:root {
    --color-blue: #0023e3;
    --color-blue-dark: #001ba8;
    --color-blue-darker: #00127a;
    --color-red: #d50000;
    --color-green-wpp: #25D366;
    --color-bg-light: #f7f8fa;
    --color-text: #222222;
    
    /* Tipografia Core */
    --font-main: 'Montserrat', sans-serif;
    --font-quote: 'Caveat', cursive;
    
    /* Tipografia Custom/Brand */
    --font-inter: 'Inter', sans-serif;
    --font-gobold: 'Gobold Thin', sans-serif;
    --font-bright: 'Bright Moment', cursive;
}

/* Reset necessário para o cálculo correto de altura pelo engine do Lenis Scroll */
html.lenis, html.lenis body {
    height: auto;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-light);
    color: var(--color-text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased; /* Otimização de antialiasing para webkit */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   PRELOADER
   ========================================================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-blue);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.77, 0, 0.175, 1), visibility 0.8s;
}

.loader-content {
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.heart-pulse {
    position: relative;
    font-size: 4rem;
    color: var(--color-red);
    animation: heartBeat 1.5s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.heart-pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background-color: var(--color-red);
    border-radius: 50%;
    z-index: -1;
    filter: blur(25px);
    opacity: 0.6;
    animation: heartGlow 1.5s infinite alternate;
}

.loader-content p {
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    animation: fadeInOut 2s infinite ease-in-out;
}

@keyframes heartBeat {
    0% { transform: scale(0.95); }
    5% { transform: scale(1.1); }
    39% { transform: scale(0.85); }
    45% { transform: scale(1); }
    60% { transform: scale(0.95); }
    100% { transform: scale(0.9); }
}

@keyframes heartGlow {
    from { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 0.8; transform: translate(-50%, -50%) scale(1.5); }
}

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

/* Classe injetada via JS para trigger de transição de saída do DOM */
.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100%;
    background-color: var(--color-blue);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-container img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-actions {
    position: absolute; 
    bottom: -35px;
    width: 100%; 
    display: flex;
    justify-content: center; 
    z-index: 10;
}

@media (min-width: 992px) {
    .hero-image-container img {
        height: 90vh; 
        max-height: 900px; 
        object-fit: cover;
        object-position: center bottom; 
    }
}

/* ==========================================================================
   HERO LOGOS
   ========================================================================== */
.hero-logos {
    position: absolute; 
    top: 35px; 
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    z-index: 20; 
}

.hero-logos img {
    height: 30px; 
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

.hero-logos a:hover img,
.footer-logos a:hover img {
    transform: scale(1.15) rotate(-2deg); 
}

/* ==========================================================================
   COMPONENT: BUTTON NEO-BRUTALISM
   ========================================================================== */
.btn-brutal {
    position: relative;
    display: inline-flex;
    text-decoration: none;
    color: #fff;
    margin-left: 8px; 
    margin-bottom: 8px;
    z-index: 1;
    user-select: none; 
}

.btn-brutal .btn-inner {
    display: flex;
    align-items: stretch; 
    background-color: var(--color-blue);
    border: 3px solid #fff;
    position: relative;
    z-index: 2;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-brutal .icon-box {
    background-color: var(--color-blue-darker);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 3px solid #fff;
}

.btn-brutal .icon-box i {
    color: #fff;
    background-color: var(--color-green-wpp);
    font-size: 1.8rem;
    padding: 6px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    transition: transform 0.3s ease;
}

.btn-brutal .text-box {
    padding: 15px 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
}

.btn-brutal::before {
    content: '';
    position: absolute;
    top: 8px;
    left: -8px;
    width: 100%;
    height: 100%;
    background-color: var(--color-blue-darker);
    border: 3px solid #fff;
    z-index: 0;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-brutal:hover .btn-inner {
    transform: translate(-4px, 4px); 
}

.btn-brutal:hover .icon-box i {
    transform: rotate(15deg) scale(1.1);
}

.btn-brutal:active .btn-inner {
    transform: translate(-8px, 8px); 
}

/* ==========================================================================
   FAUSTINA SECTION
   ========================================================================== */
.faustina-section {
    padding: 100px 0 0 0; 
    background-color: #f7f8fa; 
    position: relative; 
    /* Contexto de empilhamento (stacking context) para aplicar a textura em ::before */
    z-index: 1;
}

.faustina-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Geração de noise texture via SVG in-line. Opacidade ajustada (0.18) para equilíbrio visual. */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.18'/%3E%3C/svg%3E");
    pointer-events: none; /* Previne bloqueio de interações de ponteiro nas camadas inferiores */
    z-index: -1; 
}

.faustina-section .container,
.faustina-section .quote-container {
    position: relative;
    z-index: 2;
}

.layout-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.text-content {
    flex: 1;
    min-width: 300px;
}

.text-content h2 {
    color: var(--color-blue);
    font-family: var(--font-gobold);
    font-size: 3.5rem;
    font-weight: normal; /* Font-weight normal mandatório para renderização correta da variante Thin */
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.heading-image {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    display: block;
}

.highlight-red {
    color: var(--color-red);
    font-style: italic;
}

.blue-line {
    border: none;
    height: 4px;
    background-color: var(--color-blue);
    width: 60px;
    margin-bottom: 20px;
    transition: width 0.5s ease;
}

.text-content:hover .blue-line {
    width: 100px; /* Expansão da linha decorativa on-hover */
}

.description {
    font-family: var(--font-inter);
    font-weight: 500; 
    font-size: 1.0rem;
    line-height: 1.4;
    max-width: 400px;
}

.image-content {
    flex: 1;
    min-width: 300px;
    text-align: center;
    position: relative;
}

.image-content img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.1));
}

.quote-container {
    text-align: center;
    margin-top: 80px;
    padding-bottom: 0; /* Reset de padding inferior para alinhamento fluído com o footer */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Margem negativa e controle de z-index para sobreposição cross-section (faustina-section -> footer) */
.quote-container .btn-brutal {
    margin-bottom: -35px; 
    z-index: 10;
}

.quote-image {
    max-width: 950px; 
    width: 100%;
    height: auto;
    margin: 0 auto 50px auto; 
    display: block;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.1)); 
    transform: rotate(-1deg);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease;
    border-radius: 4px; 
}

.quote-image:hover {
    transform: rotate(0deg) translateY(-5px);
    filter: drop-shadow(0 25px 45px rgba(0, 35, 227, 0.15));
}

.quote span {
    display: block;
    color: var(--color-red);
    font-family: var(--font-bright);
    font-size: 1.4rem;
    font-weight: normal;
    font-style: normal;
    
    /* Posicionamento absoluto para extração do elemento base do flow do DOM (overlapping visual) */
    position: absolute;
    bottom: -45px; 
    left: 0;
    width: 100%;
    text-align: center;
    margin-top: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background-color: var(--color-red);
    padding: 70px 20px 40px 20px; /* Top padding modificado para acomodar o overlapping do CTA anterior */
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-logos img {
    height: 45px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

/* ==========================================================================
   COMPONENT: BACK-TO-TOP
   ========================================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-blue);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--color-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(213, 0, 0, 0.4);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
.float-anim {
    animation: floating 5s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.pulse-effect {
    animation: brutalPulse 2.5s infinite;
}

@keyframes brutalPulse {
    0% { filter: drop-shadow(0 0 0 rgba(37, 211, 102, 0.5)); }
    50% { filter: drop-shadow(0 0 20px rgba(37, 211, 102, 0.8)); }
    100% { filter: drop-shadow(0 0 0 rgba(37, 211, 102, 0)); }
}

/* Curva bezier customizada para deceleration effect em entrance animations */
.hidden-animate {
    opacity: 0;
    transition: all 1s cubic-bezier(0.25, 1, 0.5, 1); 
    will-change: transform, opacity;
}

.fade-up { transform: translateY(60px); }
.fade-left { transform: translateX(-60px); }
.fade-right { transform: translateX(60px); }

.show-animate {
    opacity: 1;
    transform: translate(0);
}

/* ==========================================================================
   MEDIA QUERIES (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    /* Correção de aspect ratio do Hero Banner para viewports menores */
    .hero-image-container img {
        height: 65vh; 
        min-height: 450px; /* Safe min-height constraint */
        object-fit: cover; 
        object-position: 25% center; /* Alteração do focal point prioritário */
    }

    /* Refatoração estrutural (flex-direction) dos logos no mobile */
    .hero-logos {
        top: 20px;
        flex-direction: column; 
        gap: 12px;
    }

    .hero-logos img {
        height: 25px; 
    }

    /* Ajustes tipográficos - Escalonamento de view */
    .text-content h2 { font-size: 2.2rem; }

    
    .quote-container {
        margin-top: 30px; 
    }

    .quote-image { 
        width: 100%;
        max-width: 420px; 
        margin-bottom: 25px; 
        transform: rotate(-1deg) scale(1.1); 
    }

    .layout-grid { flex-direction: column; text-align: center; }
    .blue-line { margin: 0 auto 20px auto; }
    .description { margin: 0 auto; }
    
    /* Escalonamento das propriedades do botão Neo-Brutalista em resoluções <= 768px */
    .btn-brutal .text-box {
        padding: 8px 12px; 
        font-size: 0.8rem; 
        white-space: nowrap; 
        text-align: center;
    }
    
    .btn-brutal .icon-box {
        padding: 6px 10px;
    }
    
    .btn-brutal .icon-box i {
        width: 26px;
        height: 26px;
        font-size: 1rem;
        padding: 4px;
        border-width: 1.5px; 
    }

    .btn-brutal::before,
    .btn-brutal .btn-inner {
        border-width: 2px; /* Redução do stroke width para proporção com viewport */
    }

    .btn-brutal::before {
        top: 5px;
        left: -5px;
    }

    /* Recálculo do offset-Y negativo referenciado na nova altura do botão nas transições entre seções */
    .hero-actions {
        bottom: -18px; 
    }

    .quote-container .btn-brutal {
        margin-bottom: -18px;
    }

    /* Refatoração de espaçamentos verticais (Y-axis) */
    .faustina-section {
        padding-top: 60px;
    }

    .footer {
        padding-top: 50px;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}