﻿/* ===== Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --nav-h: 72px;
    --container-max: 1200px;
    --label-col: 160px;
    --content-gap: 48px;
    --text-w: 640px;

    --fg: rgba(255, 255, 255, 0.92);
    --fg-dim: rgba(255, 255, 255, 0.70);
    --bg: #000;
    --panel: rgba(230, 230, 240, 0.92);
    --panel-2: rgba(230, 230, 240, 0.78);

    --shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth; /* smooth by default; JS adds offset handling */
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--fg);
    overflow-x: hidden;
}

/* Ensure anchors account for fixed navbar */
section {
    scroll-margin-top: calc(var(--nav-h) + 24px);
}

/* ===== Parallax background ===== */
:root {
    --bg-start: 420px; /* wird per JS überschrieben */
    --mask-h: 420px;   /* wird per JS überschrieben */
}

.parallax-bg {
    position: fixed;
    inset: 0;
    z-index: -2;      /* ganz hinten */
    overflow: hidden;
    background: #000;
}

.bg-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--mask-h); /* verdeckt den oberen Bereich */
    background: #000;
    z-index: -1;      /* vor dem Background, aber hinter Content */
    pointer-events: none;
}

.parallax-track {
    position: absolute;
    top: 0;                 /* wichtig: entkoppelt von der Maske */
    left: 0;
    width: 100%;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.parallax-tile {
    display: block;
    width: 100vw;
    height: auto;
    user-select: none;
    pointer-events: none;
}

.parallax-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.parallax-tile {
    display: block;
    width: 100vw;
    height: auto;
    user-select: none;
    pointer-events: none;
    opacity: 0.5;
}

/* Mobile performance mode: use background images instead of moving DOM images */
@media (max-width: 768px), (pointer: coarse) {
    .parallax-track { display: none; }
    .bg-mask { display: none; }
    .parallax-bg {
        height: 100%;
        top: 600px;
        overflow: hidden;
        position: absolute;
        background-image: url("/assets/bubble_mobile.jpg");
        background-repeat: repeat-y;
        background-position: center 0px;
        background-size: 100% auto;
    }
}

/* ===== Header / Nav ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: #000;
    z-index: 1000;
}

.nav {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    gap: 24px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    padding: 8px 10px;
    background: #fff;
    color: #000;
    border-radius: 4px;
}
.skip-link:focus {
    left: 12px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.nav-right {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 45vw;
}

.nav-meta {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-dim);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.nav-link {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg);
    text-decoration: none;
    padding: 10px 0;
}
.nav-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 3px;
}

/* Burger button (hidden on desktop) */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
}
.nav-toggle__bar {
    display: block;
    height: 2px;
    background: rgba(255, 255, 255, 0.85);
    margin: 5px 0;
    border-radius: 2px;
}

/* Mobile menu overlay */
.mobile-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(6px);
    z-index: 999;
}

.mobile-menu__links {
    list-style: none;
    padding: 18px 28px;
    margin: 0;
    display: grid;
    gap: 10px;
}

.mobile-link {
    display: block;
    padding: 16px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--fg);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 13px;
}

/* ===== Main layout ===== */
.site-main {
    padding-top: var(--nav-h);
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 28px;
}

.section {
    position: relative;
    padding: 70px 0 110px;
    min-height: 70vh;
}

.section--project {
    padding-top: 44px;
}

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 34px 0 50px;
}

.logo-placeholder {
    width: min(960px, 100%);
    height: 340px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

/* Section grid: left sticky label + content */
.section-grid {
    display: grid;
    grid-template-columns: var(--label-col) 1fr;
    column-gap: var(--content-gap);
    align-items: start;
}

.section-label {
    position: relative;
}

.section-label span {
    position: sticky;
    top: calc(var(--nav-h) + 28px);
    display: inline-block;

    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg);
}

.section-content {
    position: relative;
}

.text-block {
    width: min(var(--text-w), 100%);
    font-size: 13px;
    line-height: 1.55;
    color: var(--fg);
}

.text-block p {
    margin: 0 0 14px;
}

.text-block--narrow {
    margin-top: 22px;
}

.pull-quote {
    margin: 26px 0 0;
    font-size: 12px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    line-height: 1.45;
    width: min(520px, 100%);
    color: rgba(255, 255, 255, 0.88);
}

/* Placeholder image blocks */
.image-placeholder {
    background: var(--panel-2);
    box-shadow: var(--shadow);
}

.image-placeholder--large {
    width: 100%;
    max-width: 920px;
    height: 320px;
}

/* Partner grid */
.partner-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    width: min(840px, 100%);
    margin-top: 10px;
}

.partner-cell {
    aspect-ratio: 1 / 1;
    background: rgba(245, 245, 250, 0.96);
    color: rgba(0, 0, 0, 0.65);
    display: grid;
    place-items: center;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: var(--shadow);
    user-select: none;
}

.text-block a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Wireframe graphics (simple CSS approximation) */
.wire-graphic {
    position: absolute;
    pointer-events: none;
    mix-blend-mode: lighten;
}

.wire-graphic::before {
    content: "";
    display: block;
    width: 512px;
    aspect-ratio: 1024 / 634;
    height: auto;

    background: url("/assets/grid.jpg") center / contain no-repeat;
    mix-blend-mode: lighten;
    opacity: 0.5;
}

.wire-graphic--left {
    left: -512px;
    bottom: -80px;
}
.wire-graphic--bottom-left {
    left: -256px;
    bottom: -55px;
}
.wire-graphic--right {
    right: -240px;
    top: 0px;
}

.key-figure {
    margin: 0;
    width: min(480px, 100%);
}

.key-image {
    display: block;
    width: 100%;
    height: auto;              /* keine Verzerrung */
    aspect-ratio: 926 / 697;  /* 4:3, stabil vor dem Laden */
}

.team-figure {
    margin: 0;
    width: min(var(--text-w), 100%); /* wie .text-block */
    box-shadow: var(--shadow);

    /* keine Rechtsausrichtung mehr */
    margin-left: 0;
    margin-right: 0;
}

.team-image {
    max-width: 640px;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1024 / 683;
    background: var(--panel-2);
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
    .nav-right { display: none; }
    :root { --content-gap: 30px; --label-col: 140px; }
    .partner-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

    .section-grid {
        grid-template-columns: 1fr;
        row-gap: 18px;
    }

    .section-label span {
        position: static;
        opacity: 0.9;
    }

    .partner-grid { grid-template-columns: repeat(2, 1fr); width: 100%; }
    .logo-placeholder { height: 240px; }
    .image-placeholder--large { height: 240px; }
}

@media (max-width: 420px) {
    .container { padding: 0 18px; }
    .nav { padding: 0 18px; }
}
