
/* ==========================================
   CERZ — SISTEMA VISUAL V11
   ========================================== */

:root {
    --bg: #111111;
    --fg: #f4f1eb;
    --line: rgba(244, 241, 235, 0.55);

    --margin: clamp(20px, 5vw, 80px);
    --axis: clamp(110px, 14vw, 215px);
    --logo-size: clamp(105px, 16vw, 230px);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: Arial, Helvetica, sans-serif;
}

/* ESTRUCTURA */

.page {
    height: 100vh;
    height: 100dvh;

    display: grid;
    grid-template-rows:
        55px
        minmax(0, 1fr)
        48px;

    padding:
        clamp(12px, 3vh, 35px)
        var(--margin)
        clamp(10px, 2vh, 22px);
}

/* HEADER */

.header {
    position: relative;
    min-height: 0;
    border-bottom: 1px solid var(--line);
}

.header-brand {
    position: absolute;
    left: 0;
    bottom: 12px;

    color: var(--fg);
    text-decoration: none;

    font-size: 28px;
    font-weight: 500;
    letter-spacing: 0.06em;
    line-height: 1;
}

/* RETÍCULA 3 × 3 */

.main-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    grid-template-rows:
        repeat(3, minmax(0, 1fr));

    gap: 12px;

    min-width: 0;
    min-height: 0;
}

/* LOGO */

.identity {
    grid-column: 1;
    grid-row: 1;

    position: relative;
    min-width: 0;
    min-height: 0;
}

.logo {
    position: absolute;

    top: clamp(12px, 4vh, 48px);
    left: var(--axis);

    transform: translateX(-50%);

    display: block;

    width: var(--logo-size);
    height: auto;

    max-height: calc(100% - 12px);
    object-fit: contain;
}

/* MENÚ */

.navigation {
    grid-column: 3;
    grid-row: 3;

    align-self: end;
    justify-self: stretch;

    width: 100%;
    min-width: 0;
    min-height: 0;

    position: relative;
    z-index: 2;
}

.nav-item {
    display: grid;

    grid-template-columns:
        38px minmax(0, 1fr) 24px;

    gap: 10px;
    align-items: center;

    min-height: min(7dvh, 70px);
    padding: 5px 0;

    border-top: 1px solid var(--line);

    color: var(--fg);
    text-decoration: none;
}

.nav-number {
    font-size: 13px;
    letter-spacing: 0.12em;
}

.nav-name {
    min-width: 0;

    border-left: 1px solid var(--line);
    padding-left: 12px;

    font-size: clamp(10px, 0.95vw, 15px);
    letter-spacing: 0.10em;

    white-space: nowrap;
}

.nav-item:hover,
.nav-item:focus-visible {
    background: #252525;
}

/* FLECHA VECTORIAL — SIN EMOJIS */

.nav-arrow {
    position: relative;
    display: block;

    width: 17px;
    height: 17px;

    justify-self: end;
}

.nav-arrow::before {
    content: "";

    position: absolute;
    top: 3px;
    right: 2px;

    width: 11px;
    height: 11px;

    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
}

.nav-arrow::after {
    content: "";

    position: absolute;
    top: 4px;
    right: 3px;

    width: 15px;
    height: 1px;

    background: currentColor;

    transform: rotate(-45deg);
    transform-origin: right center;
}

/* FOOTER */

.footer {
    position: relative;
    min-height: 0;
    border-top: 1px solid var(--line);
}

.copyright {
    position: absolute;
    top: 15px;
    left: 0;

    font-size: 12px;
    letter-spacing: 0.12em;
}

/* CURSOR */

.custom-cursor {
    display: none;
}

@media (hover: hover) and (pointer: fine) {

    body,
    a {
        cursor: none;
    }

    .custom-cursor {
        display: block;

        position: fixed;
        top: 0;
        left: 0;

        width: 18px;
        height: 18px;

        border: 1px solid white;
        border-radius: 50%;
        background: white;

        transform: translate(-50%, -50%);

        pointer-events: none;
        z-index: 9999;
        opacity: 0;
    }

    .custom-cursor.is-hovering {
        width: 32px;
        height: 32px;
        background: transparent;
    }
}

/* TABLET */

@media (max-width: 1100px) {

    .identity {
        grid-column: 1 / 3;
    }

    .navigation {
        grid-column: 2 / 4;
        justify-self: end;

        width: min(100%, 430px);
    }
}

/* CELULAR */

@media (max-width: 600px) {

    :root {
        --margin: 24px;
    }

    .page {
        grid-template-rows:
            45px
            minmax(0, 1fr)
            42px;

        padding-top: 12px;
        padding-bottom: 12px;
    }

    .header-brand {
        font-size: 21px;
    }

    .main-grid {
        gap: 8px;
    }

    /* LOGO CENTRADO */

    .identity {
        grid-column: 1 / 4;
        grid-row: 1 / 4;

        pointer-events: none;
    }

    .logo {
        position: fixed;

        top: 50%;
        left: 50%;

        width: clamp(105px, 28vw, 160px);
        max-height: none;

        transform: translate(-50%, -50%);
    }

    /* MENÚ ABAJO */

    .navigation {
        grid-column: 1 / 4;
        grid-row: 3;

        justify-self: stretch;
        width: 100%;
    }

    .nav-item {
        grid-template-columns:
            30px minmax(0, 1fr) 20px;

        gap: 7px;
        min-height: min(7dvh, 65px);
    }

    .nav-number {
        font-size: 11px;
    }

    .nav-name {
        padding-left: 9px;

        font-size: clamp(9px, 2.7vw, 12px);
        letter-spacing: 0.05em;
    }

    .copyright {
        font-size: 9px;
        letter-spacing: 0.03em;
        line-height: 1.4;
    }
}

/* PANTALLAS MUY BAJAS */

@media (max-height: 500px) {

    .page {
        height: auto;
        min-height: 500px;
    }

    .main-grid {
        min-height: 340px;
    }
}
