/* =========================================================
   COMPONENTS
   Navegación principal de Japón
========================================================= */


/* =========================================================
   VARIABLES
========================================================= */

:root {

    --nav-white: #ffffff;

    --nav-dark: #111111;

    --nav-red: #c62828;

    --nav-red-hover: #e53935;

    --nav-border: rgba(255, 255, 255, 0.20);

    --nav-background: rgba(10, 10, 10, 0.72);

    --nav-background-solid: rgba(15, 15, 15, 0.96);

    --nav-transition: 0.3s ease;

    --nav-font:
        "Noto Sans JP",
        sans-serif;
}


/* =========================================================
   NAV PRINCIPAL
========================================================= */

.main-nav {

    position: fixed;

    top: 0;

    left: 0;

    width: 100%;

    height: 78px;

    z-index: 1000;

    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.65),
        rgba(0, 0, 0, 0)
    );

    transition:
        background var(--nav-transition),
        box-shadow var(--nav-transition),
        height var(--nav-transition);

}


/* =========================================================
   NAV AL HACER SCROLL
========================================================= */

.main-nav.scrolled {

    height: 70px;

    background: var(--nav-background-solid);

    box-shadow:
        0 4px 25px rgba(0, 0, 0, 0.20);

}


/* =========================================================
   CONTENEDOR
========================================================= */

.nav-container {

    width: min(1200px, 92%);

    height: 100%;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: space-between;

}


/* =========================================================
   LOGO
========================================================= */

.nav-logo {

    display: inline-flex;

    align-items: center;

    gap: 11px;

    color: var(--nav-white);

    text-decoration: none;

    white-space: nowrap;

    transition:
        opacity var(--nav-transition),
        transform var(--nav-transition);

}


.nav-logo:hover {

    opacity: 0.85;

    transform: translateY(-1px);

}


/* =========================================================
   KANJI DEL LOGO
========================================================= */

.nav-logo-japanese {

    font-family:
        "Noto Sans JP",
        sans-serif;

    font-size: 1.55rem;

    font-weight: 500;

    line-height: 1;

}


/* =========================================================
   TEXTO DEL LOGO
========================================================= */

.nav-logo-text {

    font-family:
        "Playfair Display",
        serif;

    font-size: 1.25rem;

    font-weight: 600;

    letter-spacing: 0.02em;

}


/* =========================================================
   MENÚ
========================================================= */

.nav-menu {

    display: flex;

    align-items: center;

    height: 100%;

}


/* =========================================================
   LISTA
========================================================= */

.nav-links {

    list-style: none;

    display: flex;

    align-items: center;

    gap: 6px;

    height: 100%;

}


/* =========================================================
   ELEMENTOS
========================================================= */

.nav-item {

    height: 100%;

    display: flex;

    align-items: center;

}


/* =========================================================
   ENLACES
========================================================= */

.nav-link {

    position: relative;

    height: 100%;

    padding: 0 18px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    color: rgba(255, 255, 255, 0.90);

    text-decoration: none;

    font-family: var(--nav-font);

    font-size: 0.86rem;

    font-weight: 400;

    letter-spacing: 0.025em;

    transition:
        color var(--nav-transition),
        background var(--nav-transition);

}


/* =========================================================
   TEXTO JAPONÉS
========================================================= */

.nav-link-japanese {

    font-size: 0.76rem;

    opacity: 0.75;

}


/* =========================================================
   LÍNEA INFERIOR
========================================================= */

.nav-link::after {

    content: "";

    position: absolute;

    left: 18px;

    right: 18px;

    bottom: 15px;

    height: 2px;

    background: var(--nav-red);

    transform: scaleX(0);

    transform-origin: center;

    transition:
        transform var(--nav-transition);

}


/* =========================================================
   HOVER
========================================================= */

.nav-link:hover {

    color: var(--nav-white);

}


.nav-link:hover::after {

    transform: scaleX(1);

}


/* =========================================================
   PÁGINA ACTIVA
========================================================= */

.nav-link.active {

    color: var(--nav-white);

}


.nav-link.active::after {

    transform: scaleX(1);

}


/* =========================================================
   BOTÓN MENÚ MÓVIL
========================================================= */

.nav-toggle {

    display: none;

    width: 42px;

    height: 42px;

    padding: 9px;

    border: 1px solid rgba(255, 255, 255, 0.30);

    border-radius: 2px;

    background: rgba(0, 0, 0, 0.20);

    cursor: pointer;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 5px;

}


/* =========================================================
   LÍNEAS DEL BOTÓN
========================================================= */

.nav-toggle span {

    display: block;

    width: 21px;

    height: 1px;

    background: var(--nav-white);

    transition:
        transform var(--nav-transition),
        opacity var(--nav-transition);

}


/* =========================================================
   BOTÓN ACTIVO
========================================================= */

.nav-toggle.active span:nth-child(1) {

    transform:
        translateY(6px)
        rotate(45deg);

}


.nav-toggle.active span:nth-child(2) {

    opacity: 0;

}


.nav-toggle.active span:nth-child(3) {

    transform:
        translateY(-6px)
        rotate(-45deg);

}


/* =========================================================
   TABLETS
========================================================= */

@media (max-width: 850px) {

    .nav-container {

        width: 92%;

    }


    .nav-link {

        padding-left: 12px;

        padding-right: 12px;

        font-size: 0.82rem;

    }


    .nav-link::after {

        left: 12px;

        right: 12px;

    }

}


/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 700px) {

    .main-nav {

        height: 70px;

    }


    .main-nav.scrolled {

        height: 65px;

    }


    .nav-container {

        width: 90%;

    }


    /* ---------------------------------------------------------
       BOTÓN
    ------------------------------------------------------ */

    .nav-toggle {

        display: flex;

        position: relative;

        z-index: 1002;

    }


    /* ---------------------------------------------------------
       MENÚ
    ------------------------------------------------------ */

    .nav-menu {

        position: fixed;

        top: 0;

        right: 0;

        width: min(320px, 85%);

        height: 100vh;

        padding: 100px 30px 40px;

        background: var(--nav-background-solid);

        box-shadow:
            -10px 0 35px rgba(0, 0, 0, 0.30);

        transform: translateX(100%);

        transition:
            transform 0.35s ease;

        overflow-y: auto;

    }


    /* ---------------------------------------------------------
       MENÚ ABIERTO
    ------------------------------------------------------ */

    .nav-menu.open {

        transform: translateX(0);

    }


    /* ---------------------------------------------------------
       LISTA
    ------------------------------------------------------ */

    .nav-links {

        width: 100%;

        height: auto;

        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 4px;

    }


    .nav-item {

        width: 100%;

        height: auto;

    }


    /* ---------------------------------------------------------
       ENLACES
    ------------------------------------------------------ */

    .nav-link {

        width: 100%;

        height: auto;

        min-height: 56px;

        justify-content: flex-start;

        padding: 14px 5px;

        font-size: 0.95rem;

        border-bottom:
            1px solid rgba(255, 255, 255, 0.10);

    }


    .nav-link::after {

        left: 0;

        right: auto;

        bottom: -1px;

        width: 35px;

    }


    .nav-link-japanese {

        font-size: 0.8rem;

    }

}


/* =========================================================
   MÓVILES PEQUEÑOS
========================================================= */

@media (max-width: 400px) {

    .nav-logo-text {

        font-size: 1.1rem;

    }


    .nav-logo-japanese {

        font-size: 1.35rem;

    }


    .nav-menu {

        width: 90%;

    }

}


/* =========================================================
   REDUCE MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .main-nav,
    .nav-link,
    .nav-link::after,
    .nav-toggle span,
    .nav-menu,
    .nav-logo {

        transition: none;

    }

}