/* ==============================================================
   Reset e Configurações Globais
   ============================================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    background-color: #111111;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden; /* Remove rolagem do body para focar apenas no <main> */
}

/* Esconder as barras de rolagem nativas */
* {
    -ms-overflow-style: none; /* IE e Edge */
    scrollbar-width: none;    /* Firefox */
}
*::-webkit-scrollbar {
    display: none;            /* Chrome, Safari e Opera */
}


/* ==============================================================
   Preloader (Line Drawing Animation)
   ============================================================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #111111;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-in-out;
}

#preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

#preloader-logo {
    width: 300px;
    max-width: 80vw;
}

/* Configuração inicial das animações dos paths (stroke) */
.anim-stroke {
    fill: transparent;
    stroke: #ffffff;
    stroke-width: 2.5;
    /* Valores bem altos para garantir que cobre todo o path */
    stroke-dasharray: 6000;
    stroke-dashoffset: 6000;
    /* A animação de desenho (draw) dura 2.5s. Após desenhar, ocorre o fillIn em 0.5s */
    animation: draw 2.5s ease-in-out forwards, fillInStroke 0.5s 2.5s ease forwards;
}

/* Configuração da animação do texto (fill) */
.anim-fill {
    fill: transparent;
    animation: fillInText 0.5s 2.5s ease forwards;
}

/* Keyframes - Efeito de traçado da linha */
@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Keyframes - Preenchimento suave dos caminhos SVG (paths) */
@keyframes fillInStroke {
    from {
        fill: transparent;
        stroke: #ffffff;
    }
    to {
        fill: #111111; /* Cor de preenchimento idêntica ao fundo, para criar contraste com a logo se usar as cores reais? Não. O preenchimento da cor oficial é escuro (#0c0c0c) mas isso ficaria invisível no #111111. Então preenchemos de branco */
        fill: #ffffff;
        stroke: transparent;
    }
}

/* Keyframes - Preenchimento suave do texto */
@keyframes fillInText {
    from {
        fill: transparent;
    }
    to {
        fill: #ffffff;
    }
}


/* ==============================================================
   Mobile Block (Restrição de Tela para Celular)
   ============================================================== */
#mobile-block {
    display: none; /* Inativo no Desktop */
}


/* ==============================================================
   Container Principal e CSS Scroll Snap
   ============================================================== */
main {
    width: 100vw;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

/* Controle de cada seção / slide */
.slide {
    width: 100vw;
    height: 100vh;
    scroll-snap-align: start; /* Alinha o slide perfeitamente no Viewport */
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #111111;
}

/* Comportamento das Mídias dentro do Slide */
.slide img,
.slide video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Faz com que as mídias ocupem 100% sem distorção */
    display: block;
}


/* ==============================================================
   Media Query (Dispositivos Móveis e Tablets < 768px)
   ============================================================== */
@media (max-width: 768px) {
    
    /* Configuração do Bloqueio de Tela para Mobile */
    #mobile-block {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: #eec802;
        z-index: 10000;
        text-align: center;
        padding: 2rem;
        box-sizing: border-box;
    }

    #mobile-block .mobile-logo {
        width: 160px;
        margin-bottom: 2rem;
    }

    #mobile-block p {
        color: #111111;
        font-family: inherit;
        font-size: 1.25rem;
        font-weight: 600;
        line-height: 1.5;
        max-width: 90%;
        margin: 0;
    }

    /* Ocultar obrigatoriamente apresentação principal e preloader original no Mobile */
    main, #preloader {
        display: none !important;
    }
}
