/* =========================================================
   ZBITVERSE
   GLOBAL LAYOUT
   layout.css

   Estructura global del sitio:
   - Container
   - Navbar
   - Navegación
   - Main
   - Sections
   - Responsive layout
   - Mobile navigation

   IMPORTANTE:
   Este archivo NO debe contener estilos específicos
   de una página individual.
========================================================= */


/* =========================================================
   01. GLOBAL DOCUMENT STRUCTURE
========================================================= */

html {
    width: 100%;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

main {
    width: 100%;
    position: relative;
}


/* =========================================================
   02. CONTAINER
========================================================= */

.container {
    width: min(
        1400px,
        calc(100% - 56px)
    );

    margin-left: auto;
    margin-right: auto;
}


/* =========================================================
   03. SECTIONS
========================================================= */

section {
    position: relative;
    width: 100%;
}


/* =========================================================
   04. NAVBAR
========================================================= */

.navbar {
    position: relative;

    width: 100%;

    min-height: 78px;

    z-index: 1000;
}


.navbar .container {
    width: min(
        1600px,
        calc(100% - 56px)
    );
}


.nav {
    position: relative;

    min-height: 78px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 2rem;
}


/* =========================================================
   05. LOGO
========================================================= */

.logo {
    display: inline-flex;

    align-items: center;

    flex-shrink: 0;

    text-decoration: none;

    white-space: nowrap;

    line-height: 1;
}


/* =========================================================
   06. PRIMARY NAVIGATION
========================================================= */

.nav-menu {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 2.75rem;

    margin: 0;

    padding: 0;

    list-style: none;

    flex: 1;
}


.nav-menu li {
    margin: 0;
    padding: 0;
}


.nav-menu a {
    position: relative;

    display: inline-flex;

    align-items: center;

    min-height: 40px;

    text-decoration: none;

    white-space: nowrap;

    transition:
        color .3s ease,
        opacity .3s ease;
}


/* =========================================================
   07. ACTIVE NAVIGATION
========================================================= */

.nav-menu a.active {
    color: #ffffff;
}


.nav-menu a.active::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;

    bottom: 2px;

    height: 1px;

    background: #2563eb;

    transform-origin: center;

    animation:
        nav-active-in .35s ease both;
}


@keyframes nav-active-in {

    from {
        opacity: 0;
        transform: scaleX(0);
    }

    to {
        opacity: 1;
        transform: scaleX(1);
    }

}


/* =========================================================
   08. NAVIGATION HOVER
========================================================= */

.nav-menu a:hover {
    color: #ffffff;
}


/* =========================================================
   09. NAVBAR CTA
========================================================= */

.nav > .btn {
    flex-shrink: 0;

    white-space: nowrap;
}


/* =========================================================
   10. MOBILE MENU BUTTON
========================================================= */

.menu-toggle {
    display: none;

    position: relative;

    width: 44px;
    height: 44px;

    padding: 0;

    border: 1px solid rgba(
        255,
        255,
        255,
        .12
    );

    border-radius: 10px;

    background: transparent;

    cursor: pointer;

    flex-shrink: 0;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    gap: 5px;

    color: inherit;
}


.menu-toggle span {
    display: block;

    width: 18px;
    height: 1px;

    background: currentColor;

    transition:
        transform .3s ease,
        opacity .3s ease;
}


/* =========================================================
   11. MOBILE MENU OPEN STATE
========================================================= */

.nav.is-open .menu-toggle span:nth-child(1) {
    transform:
        translateY(6px)
        rotate(45deg);
}


.nav.is-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}


.nav.is-open .menu-toggle span:nth-child(3) {
    transform:
        translateY(-6px)
        rotate(-45deg);
}


/* =========================================================
   12. PAGE LABEL
========================================================= */

.page-label {
    display: inline-flex;

    align-items: center;

    gap: .75rem;

    margin: 0;

    text-transform: uppercase;

    white-space: nowrap;
}


.page-label span {
    display: block;

    width: 7px;
    height: 7px;

    flex-shrink: 0;

    border-radius: 50%;

    background: #2563eb;
}


/* =========================================================
   13. CONTENT FLOW
========================================================= */

img,
svg,
video,
canvas {
    max-width: 100%;
}


a {
    -webkit-tap-highlight-color: transparent;
}


button,
input,
textarea,
select {
    font: inherit;
}


/* =========================================================
   14. BUTTON STRUCTURE
========================================================= */

.btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: .65rem;

    text-decoration: none;

    cursor: pointer;

    white-space: nowrap;

    transition:
        transform .3s ease,
        background-color .3s ease,
        border-color .3s ease,
        color .3s ease,
        box-shadow .3s ease;
}


.btn:hover {
    transform: translateY(-2px);
}


/* =========================================================
   15. PAGE TRANSITION SUPPORT
========================================================= */

body.page-transition {
    opacity: 0;

    transition:
        opacity .45s ease;
}


body.page-transition-ready {
    opacity: 1;
}


/* =========================================================
   16. RESPONSIVE — LARGE TABLET
========================================================= */

@media (max-width: 1100px) {

    .container {
        width: min(
            100%,
            calc(100% - 48px)
        );
    }


    .navbar .container {
        width: min(
            100%,
            calc(100% - 48px)
        );
    }


    .nav-menu {
        gap: 1.75rem;
    }

}


/* =========================================================
   17. RESPONSIVE — TABLET / MOBILE
========================================================= */

@media (max-width: 900px) {

    .navbar {
        min-height: 72px;
    }


    .nav {
        min-height: 72px;
    }


    .nav-menu {
        position: absolute;

        top: calc(100% + 10px);

        left: 0;
        right: 0;

        display: flex;

        flex-direction: column;

        align-items: stretch;

        justify-content: flex-start;

        gap: 0;

        padding: .75rem;

        border: 1px solid rgba(
            255,
            255,
            255,
            .10
        );

        border-radius: 14px;

        background:
            rgba(
                5,
                9,
                22,
                .97
            );

        backdrop-filter: blur(18px);

        -webkit-backdrop-filter: blur(18px);

        box-shadow:
            0 20px 60px
            rgba(
                0,
                0,
                0,
                .35
            );

        opacity: 0;

        visibility: hidden;

        transform:
            translateY(-10px);

        pointer-events: none;

        transition:
            opacity .3s ease,
            visibility .3s ease,
            transform .3s ease;
    }


    .nav-menu li {
        width: 100%;
    }


    .nav-menu a {
        width: 100%;

        min-height: 48px;

        padding:
            .75rem 1rem;

        border-radius: 8px;
    }


    .nav-menu a:hover {
        background:
            rgba(
                255,
                255,
                255,
                .04
            );
    }


    .nav-menu a.active::after {
        left: 1rem;
        right: auto;

        width: 24px;

        bottom: 6px;
    }


    .nav.is-open .nav-menu {
        opacity: 1;

        visibility: visible;

        transform:
            translateY(0);

        pointer-events: auto;
    }


    .nav > .btn {
        margin-left: auto;
    }


    .menu-toggle {
        display: inline-flex;
    }

}


/* =========================================================
   18. RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 640px) {

    .container {
        width: calc(100% - 32px);
    }


    .navbar .container {
        width: calc(100% - 32px);
    }


    .nav {
        gap: 1rem;
    }


    .nav > .btn {
        display: none;
    }


    .logo {
        font-size: .95rem;
    }


    .page-label {
        font-size: .65rem;
    }

}


/* =========================================================
   19. RESPONSIVE — SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .container {
        width: calc(100% - 24px);
    }


    .navbar .container {
        width: calc(100% - 24px);
    }


    .nav {
        min-height: 68px;
    }


    .navbar {
        min-height: 68px;
    }

}