﻿/* =========================================================
   HEADER
========================================================= */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 105px;
    padding: 0 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
}


    /* =========================================================
   HEADER — SCROLLED
========================================================= */

    .header.scrolled {
        background: rgba(8, 8, 8, 0.75);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }


/* =========================================================
   BRAND
========================================================= */

.brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1;
    transition: transform 0.3s ease;
}
.brand {
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

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


/* =========================================================
   BRAND — NAME
========================================================= */

.brand-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--white);
    transition: color 0.3s ease;
}


/* =========================================================
   BRAND — DESCRIPTION
========================================================= */

.brand-description {
    margin-top: 5px;
    color: #777;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}


/* =========================================================
   BRAND — PERSON
========================================================= */

.brand-person {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 10px;
    color: #aaa;
    font-size: 11px;
    font-weight: 500;
}

    .brand-person span {
        color: var(--accent);
        font-size: 10px;
        font-weight: 500;
        letter-spacing: 0.6px;
    }


/* =========================================================
   BRAND — HOVER
========================================================= */

.brand:hover .brand-name {
    color: #fff;
}

.brand:hover .brand-description {
    color: #999;
}


/* =========================================================
   NAVIGATION
========================================================= */

.nav {
    display: flex;
    align-items: center;
    gap: 42px;
}

.nav-link {
    position: relative;
    color: #777;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

    .nav-link::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -8px;
        width: 0;
        height: 1px;
        background: var(--accent);
        transition: width 0.3s ease;
    }

    .nav-link:hover,
    .nav-link.active {
        color: var(--white);
    }

        .nav-link:hover::after,
        .nav-link.active::after {
            width: 100%;
        }


/* =========================================================
   MOBILE MENU BUTTON
========================================================= */

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

    .menu-button span {
        display: block;
        width: 25px;
        height: 2px;
        margin: 6px auto;
        background: var(--white);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }


    /* =========================================================
   MOBILE MENU — OPEN
========================================================= */

    .menu-button.open span:first-child {
        transform: translateY(4px) rotate(45deg);
    }

    .menu-button.open span:last-child {
        transform: translateY(-4px) rotate(-45deg);
    }


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .header {
        height: 90px;
        padding: 0 6%;
    }


    /* BRAND */

    .brand-name {
        font-size: 23px;
    }

    .brand-description {
        font-size: 9px;
    }

    .brand-person {
        font-size: 10px;
    }

        .brand-person span {
            font-size: 9px;
        }


    /* MENU BUTTON */

    .menu-button {
        display: block;
    }


    /* NAVIGATION */

    .nav {
        position: fixed;
        top: 90px;
        left: 0;
        width: 100%;
        padding: 35px 6%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
        background: rgba(8, 8, 8, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        transform: translateY(-130%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.4s ease, opacity 0.3s ease, visibility 0.4s ease;
    }

        .nav.open {
            transform: translateY(0);
            opacity: 1;
            visibility: visible;
        }

    .nav-link {
        font-size: 17px;
    }

        .nav-link::after {
            bottom: -6px;
        }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .header {
        height: 80px;
        padding: 0 6%;
    }

        .header:has(.nav.open) .brand {
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            pointer-events: none;
        }

    /* BRAND */

    .brand-name {
        font-size: 20px;
    }

    .brand-description {
        font-size: 8px;
        letter-spacing: 1.2px;
    }

    .brand-person {
        margin-top: 8px;
        font-size: 9px;
    }

        .brand-person span {
            font-size: 8px;
        }


    /* NAVIGATION */

    .nav {
        position: fixed;
        top: 0;
        left: 0;
    }

    .nav-link {
        font-size: 16px;
    }
}


/* =========================================================
   BRAND — LOGO (icona mv_)
========================================================= */

.brand {
    display: grid;
    grid-template-columns: auto auto;
    column-gap: 16px;
    row-gap: 4px;
    align-items: center;
    justify-content: start;
}

.brand-logo {
    grid-row: 1 / span 3;
    width: 52px;
    height: 52px;
    display: block;
}


/* =========================================================
   LINGUA — EN / IT
========================================================= */

.nav {
    margin-left: auto;
}

.lang-switch {
    position: relative;
    z-index: 1002;
    display: flex;
    gap: 2px;
    margin-left: 32px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

    .lang-switch button {
        min-width: 36px;
        height: 30px;
        padding: 0 10px;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: #8a8a8a;
        font: 600 11px/1 "Inter", sans-serif;
        letter-spacing: 1px;
        cursor: pointer;
        transition: background 0.2s ease, color 0.2s ease;
    }

        .lang-switch button:hover {
            color: #f5f5f5;
        }

        .lang-switch button[aria-pressed="true"] {
            background: #f5f5f5;
            color: #080808;
        }

        .lang-switch button:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }

@media (max-width: 900px) {
    .brand-logo {
        width: 44px;
        height: 44px;
    }

    .lang-switch {
        margin-left: auto;
        margin-right: 12px;
    }
}

@media (max-width: 600px) {
    .brand {
        column-gap: 12px;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
    }

    .brand-name {
        font-size: 17px;
        white-space: nowrap;
    }

    .lang-switch {
        margin-right: 8px;
    }

        .lang-switch button {
            min-width: 32px;
            height: 28px;
            padding: 0 8px;
        }
}

@media (max-width: 380px) {
    .brand-description {
        display: none;
    }

    .brand-name {
        font-size: 16px;
    }
}

@media (max-width: 420px) {
    .brand {
        column-gap: 10px;
    }

    .brand-logo {
        width: 34px;
        height: 34px;
    }

    .brand-name {
        font-size: 14px;
        letter-spacing: 1.5px;
    }

    .brand-person {
        font-size: 8px;
    }

    .lang-switch {
        margin-right: 4px;
    }

        .lang-switch button {
            min-width: 30px;
            padding: 0 7px;
        }
}
