/* ========================================
   NAVIGATION – HOLZBAU GROBEL
======================================== */


/* ========================================
   DESKTOP – AB 1024 PX
======================================== */

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    height: 78px;

    background-color: var(--color-cream);

    transition:
        height 300ms ease,
        background-color 300ms ease,
        box-shadow 300ms ease;
}

/* ---------- Header beim Scrollen ---------- */

.site-header.is-scrolled {
    height: 60px;

    background-color: var(--color-stone);
    box-shadow: 0 3px 15px rgba(25, 25, 25, 0.08);
}

/* ---------- Header-Container ---------- */

.header-container {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    height: 100%;
    gap: 2rem;
}


/* ========================================
   LOGO
======================================== */

.header-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo img {
    width: 125px;
    height: auto;

    transition: width 300ms ease;
}

/* ---------- Logo beim Scrollen ---------- */

.site-header.is-scrolled .header-logo img {
    width: 100px;
}


/* ========================================
   HAUPTNAVIGATION
======================================== */

.main-navigation {
    display: flex;
    align-items: center;

    gap: 2rem;
    margin-left: auto;
}

/* ---------- Navigationslinks ---------- */

.nav-links {
    display: flex;
    align-items: center;

    gap: 1.75rem;

    margin: 0;
    padding: 0;

    list-style: none;
}

.nav-links a {
    position: relative;

    color: var(--color-ink);

    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;

    transition: color 200ms ease;
}

/* ---------- Hover ---------- */

.nav-links a:hover {
    color: var(--color-wood);
}

/* ---------- Aktiver Menüpunkt ---------- */

.nav-links a::after {
    content: "";

    position: absolute;
    bottom: -12px;
    left: 0;

    width: 100%;
    height: 2px;

    background-color: var(--color-copper-hover);

    transform: scaleX(0);
    transform-origin: left;

    transition: transform 250ms ease;
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
    transform: scaleX(1);
}


/* ========================================
   PROJEKTANFRAGE BUTTON
======================================== */

.nav-contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 1rem;

    padding: 0.85rem 1.25rem;

    background-color: var(--color-wood);
    color: var(--color-white);

    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;

    transition: background-color 250ms ease;
}

.nav-contact-btn:hover {
    background-color: var(--color-brown);
}

/* ---------- Button-Pfeil ---------- */

.nav-contact-btn span {
    font-size: 1.25rem;
    line-height: 1;
}


/* ========================================
   HAMBURGER BUTTON – DESKTOP
======================================== */

.menu-toggle {
    display: none;
}


/* ========================================
   TABLET – BIS 1023 PX
======================================== */

@media (max-width: 1023px) {

    /* ---------- Header ---------- */

    .site-header {
        height: 76px;
    }

    .site-header.is-scrolled {
        height: 60px;
    }

    /* ---------- Logo ---------- */

    .header-logo img {
        width: 120px;
    }

    .site-header.is-scrolled .header-logo img {
        width: 100px;
    }

    /* ---------- Hamburger Button ---------- */

    .menu-toggle {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        width: 44px;
        height: 44px;

        gap: 5px;
        padding: 0;

        background: transparent;
        border: 0;

        color: var(--color-ink);
        cursor: pointer;

        flex-shrink: 0;
    }

    /* ---------- Hamburger Linien ---------- */

    .menu-toggle span {
        display: block;

        width: 24px;
        height: 2px;

        background-color: currentColor;

        transition:
            transform 300ms ease,
            opacity 200ms ease;
    }

    /* ---------- Hamburger zu X ---------- */

    .site-header.is-menu-open .menu-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .site-header.is-menu-open .menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    .site-header.is-menu-open .menu-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* ---------- Aufklappbare Navigation ---------- */

    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;

        display: flex;
        flex-direction: column;
        align-items: stretch;

        gap: 1.25rem;
        margin-left: 0;
        padding: 1.5rem;

        background-color: var(--color-cream);
        border: 1px solid var(--color-stone);

        box-shadow: 0 15px 25px rgba(25, 25, 25, 0.1);

        max-height: calc(100vh - 90px);
        overflow-y: auto;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transform: translateY(-10px);

        transition:
            opacity 250ms ease,
            transform 250ms ease,
            visibility 250ms;
    }

    /* ---------- Menü geöffnet ---------- */

    .site-header.is-menu-open .main-navigation {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;

        transform: translateY(0);
    }

    /* ---------- Navigationslinks ---------- */

    .nav-links {
        flex-direction: column;
        align-items: stretch;

        gap: 0;
    }

    .nav-links li {
        border-bottom: 1px solid var(--color-stone);
    }

    .nav-links a {
        display: block;

        padding: 1rem 0.75rem;

        font-size: 0.95rem;
        font-weight: 500;
    }

    /* ---------- Aktiver Menüpunkt ---------- */

    .nav-links a::after {
        display: none;
    }

    .nav-links a[aria-current="page"] {
        color: var(--color-wood);
        font-weight: 600;
    }

    /* ---------- Projektanfrage ---------- */

    .nav-contact-btn {
        width: 100%;
        min-height: 48px;

        padding: 1rem;

        font-size: 0.9rem;
    }

}


/* ========================================
   SMARTPHONE – BIS 767 PX
======================================== */

@media (max-width: 767px) {

    /* ---------- Header ---------- */

    .site-header {
        height: 70px;
    }

    .site-header.is-scrolled {
        height: 58px;
    }

    /* ---------- Header-Container ---------- */

    .header-container {
        gap: 1rem;
    }

    /* ---------- Logo ---------- */

    .header-logo img {
        width: 110px;
    }

    .site-header.is-scrolled .header-logo img {
        width: 92px;
    }

    /* ---------- Mobiles Menü ---------- */

    .main-navigation {
        gap: 1rem;

        padding: 1rem;

        max-height: calc(100vh - 80px);
    }

    /* ---------- Navigationslinks ---------- */

    .nav-links a {
        padding: 0.95rem 0.5rem;

        font-size: 0.9rem;
    }

    /* ---------- Projektanfrage ---------- */

    .nav-contact-btn {
        font-size: 0.85rem;
    }

}


/* ========================================
   KLEINE SMARTPHONES – BIS 359 PX
======================================== */

@media (max-width: 359px) {

    /* ---------- Logo ---------- */

    .header-logo img {
        width: 100px;
    }

    .site-header.is-scrolled .header-logo img {
        width: 85px;
    }

    /* ---------- Mobiles Menü ---------- */

    .main-navigation {
        padding: 0.85rem;
    }

}


/* ========================================
   BARRIEREFREIHEIT
======================================== */

/* ---------- Tastaturfokus ---------- */

.header-logo:focus-visible,
.menu-toggle:focus-visible,
.nav-links a:focus-visible,
.nav-contact-btn:focus-visible {
    outline: 3px solid var(--color-copper-hover);
    outline-offset: 4px;
}

/* ---------- Reduzierte Animationen ---------- */

@media (prefers-reduced-motion: reduce) {

    .site-header,
    .header-logo img,
    .menu-toggle span,
    .main-navigation,
    .nav-links a,
    .nav-links a::after,
    .nav-contact-btn {
        transition: none;
    }

}