@charset "UTF-8";

/* ========================================
   GLOBAL NAVIGATION
   Liquid Glass Header + Mobile Menu
   ======================================== */

/* Navigation variables */

.nav-shell {
    --nav-height: 80px;
    --nav-text: #171717;
    --nav-muted: #6f6f6f;
    --nav-border: #deded8;
    --nav-edge: rgba(255, 255, 255, 0.16);
    --nav-dropdown-radius: 18px;
    /* untere Ecken der Projekt-Lasche */
    --nav-dropdown-fillet: 16px;
    /* weicher Übergang Leiste → Lasche */
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--nav-height);
    transition: transform 0.3s ease;
}

.nav-shell,
.nav-shell * {
    box-sizing: border-box;
}

/* Hide complete navigation while scrolling down */

.nav-shell.nav-hidden {
    transform: translateY(calc(-100% - 24px));
}

/* ========================================
   One continuous Liquid Glass surface
   ======================================== */

.nav-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.52) 0, rgba(255, 255, 255, 0.28) var(--nav-height), rgba(255, 255, 255, 0.28) 100%);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.16), 0 8px 24px rgba(0, 0, 0, 0.025);
    transition: background 0.38s ease, box-shadow 0.38s ease;
}

/* Glass highlight */

.nav-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(105deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.04) 40%, rgba(255, 255, 255, 0.12) 100%);
    transition: background 0.38s ease;
}

/* Soft blur fade below complete navigation */

.nav-panel::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 24px;
    pointer-events: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.65) 45%, rgba(0, 0, 0, 0.25) 75%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.65) 45%, rgba(0, 0, 0, 0.25) 75%, rgba(0, 0, 0, 0) 100%);
}

/* Navigation content above glass effects */

.nav-panel>* {
    position: relative;
    z-index: 1;
}

/* ========================================
   Header
   ======================================== */

.nav-shell .header {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6vw;
    background: transparent;
}

/* Logo */

.nav-shell .logo {
    color: var(--nav-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Desktop Navigation */

.nav-shell .navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-shell .navigation a {
    position: relative;
    color: var(--nav-text);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-shell .navigation a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.25s ease;
}

.nav-shell .navigation a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Compact project submenu
   Sichtbarkeit per JS (.project-menu-open), damit Inhalt
   und Glasform immer synchron laufen. */

.nav-shell .navigation-projects {
    position: relative;
    display: flex;
    align-items: center;
    height: var(--nav-height);
}

.nav-shell .navigation-projects-menu {
    position: absolute;
    top: calc(100% - 12px);
    left: 50%;
    display: flex;
    min-width: 190px;
    flex-direction: column;
    gap: 2px;
    /* Die Menübox ist gleichzeitig die Größe der Glas-Lasche.
       8px Link-Radius + 10px Abstand = 18px Laschenradius. */
    padding: 16px 10px 10px;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -8px);
    transition: opacity 0.2s ease, transform 0.3s ease;
}

.nav-shell.project-menu-open .navigation-projects-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
    transition-delay: 0.08s;
}

.nav-shell .navigation-projects-menu a {
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-shell .navigation-projects-menu a::after {
    display: none;
}

.nav-shell .navigation-projects-menu a:hover {
    background: rgba(255, 255, 255, 0.16);
}

.nav-shell a:focus-visible,
.nav-shell button:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 5px;
}

/* ========================================
   Projekt-Lasche: Form der Glasfläche (Desktop)

   Nur solange das Menü offen ist bzw. animiert:
   .nav-panel wird nach unten verlängert und per
   clip-path (aus navigation.js) auf Leiste + Lasche
   zugeschnitten – eine einzige, durchgehende Fläche.
   ======================================== */

.nav-shape-shadow,
.nav-shape-edge {
    display: none;
}

@media (min-width: 1101px) {

    .nav-shell.nav-shape-active .nav-panel {
        padding-bottom: var(--nav-dropdown-space, 0px);
        transition: background 0.38s ease;
    }

    /* Rechteckige box-shadows würden abgeschnitten –
       Kante und Schatten übernehmen die SVG-Ebenen. */
    .nav-shell.nav-shape-active .nav-panel,
    .nav-shell.nav-shape-active.nav-contextual:not(.nav-standard) .nav-panel {
        box-shadow: none;
    }

    .nav-shell.nav-shape-active .nav-shape-shadow,
    .nav-shell.nav-shape-active .nav-shape-edge {
        display: block;
    }

    /* Schatten hinter dem Glas, folgt der Form. */
    .nav-shell .nav-shape-shadow {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: calc(var(--nav-height) + var(--nav-dropdown-space, 0px));
        overflow: visible;
        pointer-events: none;
        filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.025));
        transition: filter 0.38s ease;
    }

    .nav-shell .nav-shape-shadow path {
        fill: #000;
    }

    /* Feine Lichtkante entlang der gesamten Unterkontur. */
    .nav-shell .nav-panel>.nav-shape-edge {
        position: absolute;
        inset: 0;
        z-index: 0;
        width: 100%;
        height: 100%;
        overflow: visible;
        pointer-events: none;
    }

    .nav-shell .nav-shape-edge path {
        fill: none;
        stroke: var(--nav-edge);
        stroke-width: 2;
        /* äußere Hälfte wird abgeschnitten = 1px innen */
        transition: stroke 0.38s ease;
    }

}

/* Mobile elements hidden on desktop */

.nav-shell .menu-button,
.nav-shell .mobile-menu {
    display: none;
}

/* ========================================
   Tablet / Mobile Navigation
   ======================================== */

@media (max-width: 1100px) {

    .nav-shell .header {
        padding: 0 24px;
    }

    /* Hide desktop navigation */

    .nav-shell .navigation {
        display: none;
    }

    /* Menu Button */

    .nav-shell .menu-button {
        position: relative;
        width: 76px;
        height: 34px;
        display: block;
        padding: 0;
        border: 1px solid var(--nav-border);
        border-radius: 100px;
        background: rgba(255, 255, 255, 0.18);
        color: var(--nav-text);
        font-family: inherit;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        overflow: hidden;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    /* Menu / Close text animation */

    .nav-shell .menu-button-text {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.25s ease, transform 0.3s ease;
    }

    .nav-shell .menu-open-text {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-shell .menu-close-text {
        opacity: 0;
        transform: translateY(8px);
    }

    .nav-shell .menu-button.open .menu-open-text {
        opacity: 0;
        transform: translateY(-8px);
    }

    .nav-shell .menu-button.open .menu-close-text {
        opacity: 1;
        transform: translateY(0);
    }

    /* ========================================
       Mobile Dropdown
       Same glass surface as header
       ======================================== */

    .nav-shell .mobile-menu {
        display: flex;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        padding: 0 24px;
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: max-height 0.4s ease, opacity 0.25s ease, transform 0.35s ease, padding 0.35s ease;
    }

    .nav-shell .mobile-menu.open {
        max-height: 480px;
        padding: 14px 24px 8px;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Mobile Menu Links */

    .nav-shell .mobile-menu a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 0;
        border-bottom: 1px solid var(--nav-border);
        color: var(--nav-text);
        text-decoration: none;
        font-size: 18px;
        font-weight: 600;
    }

    .nav-shell .mobile-menu a::after {
        content: "\2192";
        /* → */
        color: var(--nav-muted);
        font-size: 14px;
        font-weight: 400;
    }

    .nav-shell .mobile-menu a:last-child {
        border-bottom: 0;
    }

    /* Mobile project submenu */

    .nav-shell .mobile-projects {
        border-bottom: 1px solid var(--nav-border);
    }

    .nav-shell .mobile-projects summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 0;
        color: var(--nav-text);
        font-size: 18px;
        font-weight: 600;
        cursor: pointer;
        list-style: none;
    }

    .nav-shell .mobile-projects summary::-webkit-details-marker {
        display: none;
    }

    .nav-shell .mobile-projects summary::after {
        content: "+";
        color: var(--nav-muted);
        font-size: 20px;
        font-weight: 400;
    }

    .nav-shell .mobile-projects.is-open summary::after {
        content: "\2212";
        /* − */
    }

    .nav-shell .mobile-projects-links {
        max-height: 0;
        overflow: hidden;
        padding: 0 0 0 16px;
        opacity: 0;
        transform: translateY(-8px);
        transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.35s ease, padding 0.35s ease;
    }

    .nav-shell .mobile-projects.is-open .mobile-projects-links {
        max-height: 220px;
        padding-bottom: 8px;
        opacity: 1;
        transform: translateY(0);
    }

    .nav-shell .mobile-projects-links a {
        padding: 11px 0;
        border-bottom: 0;
        color: var(--nav-text);
        font-size: 16px;
        font-weight: 500;
    }

}

/* ========================================
   Small Mobile
   ======================================== */

@media (max-width: 600px) {

    .nav-shell {
        --nav-height: 70px;
    }

    .nav-shell .header {
        padding: 0 24px;
    }

}

/* ========================================
   Page Transitions
   ======================================== */

.page-transition-overlay {
    position: fixed;
    inset: 0;
    z-index: 900;
    pointer-events: none;
    background: var(--bg, #f7f7f5);
    opacity: 0;
    transition: opacity 220ms ease;
}

.page-transition-overlay.is-visible {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .page-transition-overlay {
        transition: none;
    }
}

/* ========================================
   Contextual Hero Glass (explicit opt-in)
   ======================================== */

.nav-shell {
    view-transition-name: none;
}


/* Hero-Farbe auch hinter dem Header beim Seitenstart. */

[data-nav-theme-boundary][data-nav-theme="contextual"] {
    --contextual-nav-height: 80px;
    position: relative;
}

[data-nav-theme-boundary][data-nav-theme="contextual"]::before {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 100%;

    height: var(--contextual-nav-height);

    background: inherit;

    pointer-events: none;
}


/* Kontextueller Zustand: nur solange der markierte Hero aktiv ist. */

.nav-shell.nav-contextual:not(.nav-standard) {
    --nav-text: var(--hero-nav-text, #f3f3f1);
    --nav-muted: var(--hero-nav-muted, #aaaaa6);
    --nav-border: var(--hero-nav-border, rgba(255, 255, 255, 0.18));
    --nav-edge: rgba(255, 255, 255, 0.07);
}

.nav-shell.nav-contextual:not(.nav-standard) .nav-panel {
    background: var(--hero-nav-glass-background,
            linear-gradient(to bottom,
                rgba(27, 27, 27, 0.52) 0,
                rgba(27, 27, 27, 0.28) var(--nav-height),
                rgba(27, 27, 27, 0.28) 100%));

    box-shadow:
        inset 0 -1px 0 rgba(255, 255, 255, 0.07),
        0 12px var(--hero-nav-depth-size, 28px) var(--hero-nav-depth, rgba(0, 0, 0, 0.24));
}


/* Dezenter Lichtreflex auf dem dunklen Glas. */

.nav-shell.nav-contextual:not(.nav-standard) .nav-panel::before {
    background: var(--hero-nav-glass-highlight,
            linear-gradient(105deg,
                rgba(255, 255, 255, 0.055) 0%,
                rgba(255, 255, 255, 0.01) 40%,
                rgba(255, 255, 255, 0.04) 100%));
}

.nav-shell.nav-contextual:not(.nav-standard) .menu-button {
    background: var(--hero-nav-button, rgba(255, 255, 255, 0.07));
}

/* Schatten der Projekt-Lasche im dunklen Zustand. */

@media (min-width: 1101px) {

    .nav-shell.nav-contextual:not(.nav-standard) .nav-shape-shadow {
        filter: drop-shadow(0 12px var(--hero-nav-depth-size, 28px) var(--hero-nav-depth, rgba(0, 0, 0, 0.24)));
    }

}


/* Passend zur bestehenden mobilen Headerhöhe. */

@media (max-width: 600px) {

    [data-nav-theme-boundary][data-nav-theme="contextual"] {
        --contextual-nav-height: 70px;
    }

}

/* ========================================
   Logo (SVG)
   ======================================== */

.nav-shell .logo {
    display: block;
    --logo-accent: var(--accent);
}

.nav-shell .logo svg {
    display: block;
    height: 24px;
    width: auto;
}

.nav-shell.nav-contextual:not(.nav-standard) .logo {
    --logo-accent: var(--accent-on-dark);
}

@media (max-width: 600px) {
    .nav-shell .logo svg {
        height: 19px;
    }
}
