/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;

    display: grid;
    grid-template-columns:
        minmax(170px, 1fr) auto minmax(170px, 1fr);
    align-items: center;
    column-gap: 32px;

    height: 76px;
    padding: 0 max(4vw, 20px);

    background: var(--header-background);
    border-bottom: 1px solid var(--line);

    backdrop-filter: blur(16px);

    transition:
        background-color 0.25s ease,
        border-color 0.25s ease;
}

/* Logo */

.brand {
    display: flex;
    align-items: center;
    justify-self: end;
    gap: 11px;

    font-family: var(--font-main);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-mark {
    position: relative;

    width: 30px;
    height: 30px;

    border: 2px solid var(--blue);
    border-radius: 9px;

    transform: rotate(45deg);
}

.brand-mark i {
    position: absolute;

    width: 5px;
    height: 5px;

    background: var(--blue);
    border-radius: 50%;
}

.brand-mark i:first-child {
    top: 5px;
    left: 5px;
}

.brand-mark i:nth-child(2) {
    top: 5px;
    right: 5px;
}

.brand-mark i:last-child {
    right: 5px;
    bottom: 5px;
}

/* Hauptnavigation */

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;

    font-family: var(--font-main);
    font-size: 0.88rem;
    font-weight: 600;
}

.main-nav a {
    padding: 9px 2px;

    color: var(--muted);
    white-space: nowrap;

    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--blue);
}

.main-nav .nav-contact {
    padding: 9px 16px;

    border: 1px solid var(--line);
    border-radius: 9px;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.main-nav .nav-contact:hover {
    color: var(--blue);
    background: rgba(36, 119, 245, 0.06);
    border-color: var(--blue);
}

/* Hell-/Dunkelmodus-Schalter */

.theme-toggle {
    display: grid;
    place-items: center;
    justify-self: start;

    width: 42px;
    height: 42px;
    padding: 0;

    color: var(--ink);
    background: var(--surface);

    border: 1px solid var(--line);
    border-radius: 10px;

    cursor: pointer;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.theme-toggle:hover {
    color: var(--blue);
    border-color: var(--blue);

    transform: translateY(-1px);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle .moon-icon {
    display: block;
}

.theme-toggle .sun-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}

/* Mobiler Menübutton */

.menu-button {
    display: none;

    width: 42px;
    height: 42px;
    padding: 0;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 9px;

    cursor: pointer;

    place-content: center;
    gap: 4px;
}

.menu-button span {
    display: block;

    width: 18px;
    height: 2px;

    background: var(--ink);
    border-radius: 2px;
}

/* Buttons */

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;

    padding: 14px 20px;

    border-radius: 10px;

    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 600;

    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.button.primary {
    color: #ffffff;
    background: var(--blue);

    box-shadow:
        0 10px 25px rgba(36, 119, 245, 0.24);
}

.button.primary:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
}

.button.secondary {
    color: var(--ink);
    background: var(--surface);

    border: 1px solid var(--line);
}

.button.secondary:hover {
    color: var(--blue);
    border-color: var(--blue);

    transform: translateY(-2px);
}

/* Bereichsüberschriften */

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 40px;

    max-width: var(--max);
    margin: 0 auto 54px;
}

.section-heading>p {
    max-width: 390px;
    margin-bottom: 14px;

    color: var(--muted);
}

/* Unterseiten-Header */

.page-hero {
    max-width: 1000px;
    padding: 90px max(7vw, 24px) 60px;
}

.page-hero h1 {
    margin: 20px 0;
}

.page-hero>p:last-child {
    max-width: 760px;

    color: var(--muted);

    font-size: 1.15rem;
    line-height: 1.75;
}

/* Kleine technische Überschrift */

.eyebrow {
    color: var(--muted);

    font-family: var(--font-code);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.eyebrow span {
    display: inline-block;

    width: 7px;
    height: 7px;
    margin-right: 8px;

    background: var(--green);
    border-radius: 50%;

    box-shadow:
        0 0 0 4px rgba(53, 198, 143, 0.12);
}

/* Footer */

.site-footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;

    padding: 34px max(5vw, 24px);

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

    border-top: 1px solid var(--line);

    font-family: var(--font-main);
    font-size: 0.78rem;

    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease;
}

.site-footer p {
    margin: 0;
}

.site-footer p:nth-child(2) {
    text-align: center;
}

.site-footer p:last-child {
    text-align: right;
}

/* Tablet und mobile Navigation */

@media (max-width: 950px) {
    .site-header {
        display: flex;
        gap: 10px;

        height: 68px;
    }

    .brand {
        order: 1;

        justify-self: auto;
        margin-right: auto;
    }

    .theme-toggle {
        order: 2;

        justify-self: auto;

        width: 40px;
        height: 40px;
    }

    .menu-button {
        order: 3;

        display: grid;
    }

    .main-nav {
        position: absolute;
        top: 67px;
        right: 18px;
        left: 18px;

        order: 4;

        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;

        padding: 12px;

        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 12px;

        box-shadow: var(--shadow);
    }

    .main-nav.open {
        display: flex;
    }

    .main-nav a {
        padding: 11px 12px;
    }

    .main-nav .nav-contact {
        padding: 11px 12px;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Smartphone */

@media (max-width: 620px) {
    .page-hero {
        padding:
            68px 22px 38px;
    }

    .button-row {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .site-footer {
        grid-template-columns: 1fr;
        gap: 12px;

        text-align: center;
    }

    .site-footer .brand {
        justify-content: center;
        margin-right: 0;
    }

    .site-footer p:nth-child(2),
    .site-footer p:last-child {
        text-align: center;
    }
}

/* Kleine Smartphones */

@media (max-width: 420px) {
    .site-header {
        padding-right: 14px;
        padding-left: 14px;
    }

    .brand {
        font-size: 1.1rem;
    }

    .brand-mark {
        width: 27px;
        height: 27px;
    }

    .theme-toggle,
    .menu-button {
        width: 38px;
        height: 38px;
    }
}

/* Reduzierte Animationen */

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

    .button,
    .theme-toggle,
    .main-nav a,
    .site-header,
    .site-footer {
        transition: none;
    }
}