/* =========================================================
   LYNK & CO
   Sistema visual base
   ========================================================= */


/* =========================================================
   TIPOGRAFÍA — LYNKCOTYPE
   ========================================================= */

@font-face {
    font-family: 'LynkcoType';
    src        : url('../fonts/LynkcoType-Light.woff2') format('woff2'),
        url('../fonts/LynkcoType-Light.woff') format('woff');
    font-weight : 300;
    font-style  : normal;
    font-display: swap;
}

@font-face {
    font-family: 'LynkcoType';
    src        : url('../fonts/LynkcoType-Regular.woff2') format('woff2'),
        url('../fonts/LynkcoType-Regular.woff') format('woff');
    font-weight : 400;
    font-style  : normal;
    font-display: swap;
}

@font-face {
    font-family: 'LynkcoType';
    src        : url('../fonts/LynkcoType-Medium.woff2') format('woff2'),
        url('../fonts/LynkcoType-Medium.woff') format('woff');
    font-weight : 500;
    font-style  : normal;
    font-display: swap;
}

@font-face {
    font-family: 'LynkcoType';
    src        : url('../fonts/LynkcoType-Bold.woff2') format('woff2'),
        url('../fonts/LynkcoType-Bold.woff') format('woff');
    font-weight : 700;
    font-style  : normal;
    font-display: swap;
} 


/* =========================================================
   VARIABLES
   ========================================================= */

:root {

    /* Colores */
    --color-black   : #000000;
    --color-white   : #ffffff;
    --color-dark    : #111111;
    --color-gray-900: #1a1a1a;
    --color-gray-700: #444444;
    --color-gray-500: #777777;
    --color-gray-300: #d9d9d9;
    --color-gray-100: #f5f5f5;

    /* Tipografía */
    --font-primary: 'LynkcoType', Arial, Helvetica, sans-serif;
    /* LynkCo Type Light,
    Arial,
    Helvetica,
    sans-serif */
    /* Tamaños */
    --container-width: 1440px;

    /* Espaciado */
    --space-xs : 0.5rem;
    --space-sm : 1rem;
    --space-md : 1.5rem;
    --space-lg : 2rem;
    --space-xl : 3rem;
    --space-2xl: 5rem;

    /* Transiciones */
    --transition-fast  : 0.2s ease;
    --transition-normal: 0.3s ease;

    /* Header */
    --header-height: 80px;
}




/* =========================================================
   RESET
   ========================================================= */

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


html {
    scroll-behavior: smooth;
}


body {
    min-height: 100vh;

    margin: 0;

    font-family: var(--font-primary);

    font-size  : 16px;
    line-height: 1.5;

    color           : var(--color-dark);
    background-color: var(--color-white);

    -webkit-font-smoothing : antialiased;
    -moz-osx-font-smoothing: grayscale;
}


img {
    display  : block;
    max-width: 100%;
    height   : auto;
}


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


button {
    border    : 0;
    background: none;
    cursor    : pointer;
}


a {
    color          : inherit;
    text-decoration: none;
}


ul,
ol {
    list-style: none;
}


/* =========================================================
   ACCESIBILIDAD
   ========================================================= */

:focus-visible {
    outline       : 2px solid var(--color-black);
    outline-offset: 4px;
}


/* =========================================================
   CONTENEDOR GLOBAL
   ========================================================= */

.site-header__container,
.models-menu__container {

    width: min(calc(100% - 48px),
            var(--container-width));

    margin-inline: auto;
}


/* =========================================================
   RESPONSIVE BASE
   ========================================================= */

@media (max-width: 1024px) {

    :root {
        --header-height: 72px;
    }

}


@media (max-width: 768px) {

    .site-header__container,
    .models-menu__container {

        width: min(calc(100% - 32px),
                var(--container-width));

    }

}


@media (max-width: 480px) {

    .site-header__container,
    .models-menu__container {

        width: calc(100% - 24px);

    }

}


/* =========================================================
   REDUCIR MOVIMIENTO
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration      : 0.01ms !important;
        animation-duration       : 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}






/* =========================================================
   HEADER — DESKTOP
========================================================= */

.site-header {
    position        : sticky;
    top             : 0;
    z-index         : 1000;
    width           : 100%;
    background-color: var(--color-black);
    border-bottom   : 1px solid #222222;
}

.site-header__container {
    position       : relative;
    display        : flex;
    align-items    : center;
    justify-content: space-between;
    min-height     : var(--header-height);
}


/* =========================================================
   LOGO
========================================================= */

.site-header__logo {
    display    : inline-flex;
    align-items: center;
    flex-shrink: 0;
    height     : 28px;
}

.site-header__logo img {
    width     : auto;
    height    : 50px;
    object-fit: contain;
}


/* =========================================================
   NAVEGACIÓN DESKTOP
========================================================= */

.site-header__navigation {
    display    : flex;
    align-items: center;
    height     : 100%;
}

.site-header__menu {
    display    : flex;
    align-items: center;
    gap        : 2.5rem;
    height     : 100%;
}

.site-header__item {
    position   : static;
    display    : flex;
    align-items: center;
    height     : 100%;
}

.site-header__link {
    position: relative;

    display    : inline-flex;
    align-items: center;

    height: var(--header-height);

    padding: 0;

    border    : 0;
    background: transparent;

    font-family   : inherit;
    font-size     : 16px;
    font-weight   : 700;
    line-height   : 30px;
    letter-spacing: 0.02em;

    color: var(--color-white);

    cursor: pointer;

    transition:
        opacity var(--transition-fast),
        color var(--transition-fast);
}

.site-header__link:hover {
    opacity: 0.65;
}


/* =========================================================
   HOVER DESKTOP
========================================================= */

.site-header__link::after {
    content: "";

    position: absolute;

    left  : 0;
    right : 0;
    bottom: 0;

    height: 2px;

    background-color: var(--color-white);

    transform       : scaleX(0);
    transform-origin: center;

    transition: transform var(--transition-normal);
}

.site-header__link:hover::after {
    transform: scaleX(1);
}


/* =========================================================
   BOTÓN MODELOS MÓVIL
   OCULTO EN DESKTOP
========================================================= */

.site-header__models-toggle {
    display: none;
}


/* =========================================================
   MEGA MENÚ DESKTOP
========================================================= */

.site-header__item--models {
    position: static;
}

.models-menu {
    position: absolute;

    top : 100%;
    left: 0;

    width: 100%;

    padding: 2rem 0 2.5rem;

    background-color: var(--color-black);

    border-top   : 1px solid #222222;
    border-bottom: 1px solid #222222;

    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);

    opacity   : 0;
    visibility: hidden;

    transform: translateY(-8px);

    transition:
        opacity var(--transition-normal),
        visibility var(--transition-normal),
        transform var(--transition-normal);
}

.site-header__item--models:hover .models-menu {
    opacity   : 1;
    visibility: visible;

    transform: translateY(0);
}


/* =========================================================
   CONTENIDO MEGA MENÚ
========================================================= */

.models-menu__container {
    display       : flex;
    flex-direction: column;
    gap           : 1.5rem;
}

.models-menu__header {
    display        : flex;
    align-items    : center;
    justify-content: space-between;
}

.models-menu__header span,
.models-menu__header a {
    color: var(--color-white);
}

.models-menu__header span {
    font-size     : 14px;
    font-weight   : 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.models-menu__header a {
    font-size  : 14px;
    font-weight: 500;

    text-decoration      : underline;
    text-underline-offset: 4px;
}

.models-menu__grid {
    display: grid;

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

    gap: 1.5rem;
}


/* =========================================================
   TARJETAS MODELOS DESKTOP
========================================================= */

.model-menu-card {
    min-width: 0;
}

.model-menu-card__link {
    display: block;
    color  : var(--color-white);
}

.model-menu-card__image {
    position: relative;

    width: 100%;

    aspect-ratio: 16 / 9;

    overflow: hidden;

    background-color: #111111;
}

.model-menu-card__image img {
    width : 100%;
    height: 100%;

    object-fit: contain;

    transition: transform var(--transition-normal);
}

.model-menu-card__link:hover .model-menu-card__image img {
    transform: scale(1.04);
}

.model-menu-card__content {
    display: flex;

    align-items    : center;
    justify-content: space-between;

    gap: 1rem;

    padding-top: 1rem;
}

.model-menu-card__content h3 {
    font-size  : 18px;
    font-weight: 500;
    line-height: 1.2;
}

.model-menu-card__content span {
    flex-shrink: 0;

    font-size  : 12px;
    font-weight: 400;

    opacity: 0.7;

    transition: opacity var(--transition-fast);
}

.model-menu-card__link:hover .model-menu-card__content span {
    opacity: 1;
}


/* =========================================================
   BOTÓN HAMBURGUESA
   OCULTO EN DESKTOP
========================================================= */

.site-header__toggle {
    display: none;
}


/* =========================================================
   MENÚ MÓVIL
========================================================= */

.mobile-models-menu {
    display: none;
}


/* =========================================================
   RESPONSIVE — MÓVIL
========================================================= */

@media (max-width: 768px) {


    /* -----------------------------------------
       HEADER
    ----------------------------------------- */

    .site-header__container {
        min-height: 70px;
    }

    .site-header__logo {
        height: 28px;
    }


    /* -----------------------------------------
       HAMBURGUESA
    ----------------------------------------- */

    .site-header__toggle {
        display: flex;

        flex-direction : column;
        justify-content: center;
        align-items    : center;

        gap: 5px;

        width : 42px;
        height: 42px;

        padding: 0;

        border: 0;

        background: transparent;

        cursor: pointer;
    }

    .site-header__toggle span {
        display: block;

        width : 22px;
        height: 2px;

        background-color: var(--color-white);

        transition:
            transform var(--transition-normal),
            opacity var(--transition-normal);
    }


    /* -----------------------------------------
       NAVEGACIÓN PRINCIPAL
    ----------------------------------------- */

    .site-header__navigation {
        position: absolute;

        top : 70px;
        left: 0;

        width: 100%;

        height    : calc(100vh - 70px);
        max-height: calc(100vh - 70px);

        overflow-y                : auto;
        overflow-x                : hidden;
        -webkit-overflow-scrolling: touch;

        background-color: var(--color-black);

        border-top: 1px solid #222222;

        opacity   : 0;
        visibility: hidden;

        transform: translateY(-10px);

        transition:
            opacity var(--transition-normal),
            visibility var(--transition-normal),
            transform var(--transition-normal);
    }

    .site-header__navigation.is-open {
        opacity   : 1;
        visibility: visible;

        transform: translateY(0);
    }


    /* -----------------------------------------
       LISTA PRINCIPAL
    ----------------------------------------- */

    .site-header__menu {
        flex-direction: column;

        align-items: stretch;

        gap: 0;

        /* height: auto; */
        width  : 100%;
        padding: 1rem 0;
    }

    .site-header__item {
        display: block;

        height: auto;
    }


    /* -----------------------------------------
       LINKS
    ----------------------------------------- */

    .site-header__link {
        display: flex;

        align-items: center;

        width : 100%;
        height: auto;

        padding: 1rem 1.5rem;

        font-size: 16px;
    }

    .site-header__link::after {
        display: none;
    }


    /* -----------------------------------------
       MODELOS — BOTÓN MÓVIL
    ----------------------------------------- */

    .site-header__models-toggle {
        display: flex;

        align-items    : center;
        justify-content: space-between;

        width: 100%;

        border: 0;

        background: transparent;

        text-align: left;

        font-family: inherit;

        color: var(--color-white);

        cursor: pointer;
        margin: 0;
    }


    /* -----------------------------------------
       FLECHA
    ----------------------------------------- */

    .site-header__models-arrow {
        display: flex;

        align-items    : center;
        justify-content: center;

        width : 24px;
        height: 24px;

        flex-shrink: 0;
    }

    .site-header__models-arrow span {
        display: block;

        width : 9px;
        height: 9px;

        border-right : 1.5px solid var(--color-white);
        border-bottom: 1.5px solid var(--color-white);

        transform: rotate(45deg);

        transition: transform var(--transition-normal);
    }

    .site-header__models-toggle.is-open .site-header__models-arrow span {
        transform: rotate(225deg);
    }


    /* -----------------------------------------
       SUBMENÚ MODELOS
    ----------------------------------------- */

    .mobile-models-menu {
        display: none;

        width: 100%;

        margin : 0;
        padding: 0 1.5rem 0.75rem;

        position: static;
        height  : auto;
    }

    .mobile-models-menu.is-open {
        display: flex;

        flex-direction: column;

        margin     : 0;
        padding-top: 0;
    }

    .mobile-models-menu__link {
        display: flex;

        align-items: center;

        gap: 1rem;

        width: 100%;

        padding: 0.75rem 0;

        color: var(--color-white);

        border-bottom: 1px solid #222222;
    }

    .mobile-models-menu__link:last-child {
        border-bottom: 0;
    }


    /* -----------------------------------------
       IMAGEN MODELO
    ----------------------------------------- */

    .mobile-models-menu__image {
        width : 110px;
        height: 75px;

        flex-shrink: 0;

        overflow        : hidden;
        object-fit      : cover;
        background-color: #111111;
    }

    .mobile-models-menu__image img {
        width : 100%;
        height: 100%;

        object-fit: contain;
    }


    /* -----------------------------------------
       NOMBRE MODELO
    ----------------------------------------- */

    .mobile-models-menu__name {
        font-size  : 15px;
        font-weight: 400;

        color: var(--color-white);
    }


    /* -----------------------------------------
       OCULTAR MEGA MENÚ DESKTOP
    ----------------------------------------- */

    .models-menu {
        display: none;
    }

    .site-header__models-link {
        display: none;
    }
}