/* ELLIPSE – Grundlayout
   Schrift: Avenir Next, lokal eingebunden (keine Google Fonts). */

@font-face {
    font-family: "Avenir Next";
    src: url("../fonts/avenirnext-ultralight.woff2") format("woff2");
    font-weight: 200;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Avenir Next";
    src: url("../fonts/avenirnext-light.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Avenir Next";
    src: url("../fonts/avenirnext-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bar-h: 110px;      /* Leiste bis zur Trennlinie */
    --claim-h: 30px;     /* Zeile mit dem Claim darunter */
    --kopf-h: 140px;     /* beides zusammen, für Abstände im Inhalt */
    --bar-bg: rgba(18, 18, 18, .51);
    --bar-line: rgba(255, 255, 255, .45);
    --ink: #ffffff;
    --ink-dim: rgba(255, 255, 255, .72);
    --bg: #0d0d0d;
    --font: "Avenir Next", "Avenir", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-weight: 300;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.sr {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: .7rem 1.2rem;
    background: #000;
}
.skip:focus { left: 0; }

:focus-visible {
    outline: 1px solid var(--ink);
    outline-offset: 4px;
}

/* ---------- Kopfleiste ---------- */

.kopf {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
}

.topbar {
    position: relative;
    /* Höhe folgt dem Logo, die Trennlinie ist die Unterkante der Leiste */
    min-height: var(--bar-h);
    padding: 6px 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Grundton plus feiner Verlauf nach oben, damit das Logo auch über
       hellem Himmel sicher lesbar bleibt */
    background: linear-gradient(rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)), var(--bar-bg);
    border-bottom: 1px solid var(--bar-line);
}

.topbar-left {
    position: absolute;
    left: 88px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 28px;
}

.burger {
    display: block;
    padding: 8px 0;
    border: 0;
    background: none;
    cursor: pointer;
    color: inherit;
}

.burger-lines {
    display: block;
    width: 46px;
}

.burger-lines i {
    display: block;
    height: 1px;
    background: currentColor;
    transition: transform .28s ease, opacity .2s ease;
}
.burger-lines i + i { margin-top: 9px; }

.burger[aria-expanded="true"] .burger-lines i:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.burger[aria-expanded="true"] .burger-lines i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] .burger-lines i:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

.social svg {
    width: 26px; height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.3;
}
.social svg .dot { fill: currentColor; stroke: none; }
.social { opacity: .9; transition: opacity .2s ease; }
.social:hover { opacity: 1; }

/* Logo mittig, im normalen Fluss: es gibt die Höhe der Leiste vor. */
.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.brand-mark {
    display: block;
    width: 150px;      /* die Grafik überragt den Schriftzug, wie im Entwurf */
    height: auto;
    margin-bottom: 2px;
}

.brand-name {
    font-size: 26px;
    font-weight: 200;
    letter-spacing: .30em;
    text-indent: .30em;
    line-height: 1;
}

.claim {
    margin: 0;
    /* weicher Auslauf, damit der Text auch über hellen Bildstellen lesbar
       bleibt – die Trennlinie darüber bleibt eine klare Kante */
    background: linear-gradient(rgba(16, 16, 16, .58), rgba(16, 16, 16, 0));
    padding: 9px 26px 20px;
    text-align: center;
    font-size: 9px;
    font-weight: 300;
    letter-spacing: .14em;
    text-indent: .14em;
    line-height: 1.2;
    color: rgba(255, 255, 255, .82);
    text-shadow: 0 1px 3px rgba(0, 0, 0, .85), 0 0 14px rgba(0, 0, 0, .6);
}

.topbar-mark {
    position: absolute;
    right: 42px;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    width: 100px;
}
.topbar-mark img {
    width: 100%;
    height: auto;
    opacity: .85;
}

/* ---------- Menü ---------- */

.menu {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(18, 15, 13, .62);
    opacity: 0;
    transition: opacity .3s ease;
}
.menu[hidden] { display: none; }
.menu.is-open { opacity: 1; }

.menu-liste {
    margin: 0;
    padding: calc(var(--kopf-h) + 24px) 0 0 88px;
    list-style: none;
    text-align: left;
}

.menu a {
    display: inline-block;
    padding: .55em 0;
    font-size: clamp(.95rem, 1.05vw, 1.05rem);
    font-weight: 300;
    letter-spacing: .18em;
    text-indent: .18em;
    text-transform: uppercase;
    color: var(--ink);
    opacity: .9;
    transition: opacity .2s ease;
}
.menu a:hover,
.menu a:focus-visible,
.menu a[aria-current="page"] { opacity: 1; }

/* letzter Eintrag etwas abgesetzt */
.menu-liste li:last-child a { margin-top: .5em; }

/* ---------- Hintergrund-Slideshow ---------- */

.hintergrund {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: #1a1a1a;
}

/* Der dunkle Layer liegt fest über dem Bild und scrollt nie weg.
   Auf der Startseite bleibt das Bild unangetastet. */
body:not(.page-home) .hintergrund::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(14, 13, 12, .55);
}

.slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    transition: opacity 1.6s ease;
}
.slide.is-active { opacity: 1; }

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- Inhalt über dem Bild ---------- */

main {
    position: relative;
    z-index: 10;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.ueberlagerung {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--kopf-h) + 50px) 26px 60px;
}

.inhalt-block {
    width: min(760px, 100%);
    text-align: center;
}

.inhalt-block h1 {
    margin: 0 0 1.8em;
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    font-weight: 300;
    letter-spacing: .2em;
    text-indent: .2em;
    text-transform: uppercase;
    color: var(--ink);
}

.inhalt-block p {
    margin: 0 0 1.7em;
    font-size: clamp(.94rem, 1.05vw, 1.02rem);
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, .93);
    text-shadow: 0 1px 14px rgba(0, 0, 0, .45);
}
.inhalt-block p:last-child { margin-bottom: 0; }

/* Aufzählungen linksbündig, der Block bleibt mittig */
.inhalt-block p.liste {
    display: inline-block;
    text-align: left;
}

.inhalt-block a {
    border-bottom: 1px solid rgba(255, 255, 255, .45);
}

.footline {
    position: relative;
    z-index: 10;
    padding: 0 26px 22px;
    text-align: center;
    font-size: .7rem;
    letter-spacing: .12em;
    color: rgba(255, 255, 255, .5);
}
.footline p { margin: 0; }

/* Startseite: nur Bild und Kopfleiste, kein Layer, kein Text */
.page-home .footline { text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 900px) {
    :root { --bar-h: 84px; --claim-h: 24px; --kopf-h: 108px; }

    .topbar-left { left: 22px; gap: 20px; }
    .burger-lines { width: 34px; }
    .burger-lines i + i { margin-top: 7px; }
    .burger[aria-expanded="true"] .burger-lines i:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .burger[aria-expanded="true"] .burger-lines i:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .social svg { width: 22px; height: 22px; }

    .brand-mark { width: 100px; }
    .brand-name { font-size: 17px; }
    .claim { padding: 7px 20px 16px; font-size: 7.5px; }

    .topbar-mark { display: none; }

    .menu-liste { padding-left: 24px; }
    .menu a { font-size: .88rem; letter-spacing: .16em; text-indent: .16em; }

    .ueberlagerung {
        padding: calc(var(--kopf-h) + 26px) 22px 50px;
        align-items: flex-start;
    }

    /* Auf dem Handy insgesamt eine Stufe kleiner */
    .inhalt-block h1 { font-size: .92rem; margin-bottom: 1.6em; }
    .inhalt-block p  { font-size: .83rem; line-height: 1.75; margin-bottom: 1.4em; }
    .inhalt-block .ort,
    .inhalt-block .zurueck { font-size: .66rem; }

    .projekt-text h2 { font-size: .95rem; }
    .projekt-text p  { font-size: .83rem; line-height: 1.75; }
    .projekt-text .ort,
    .projekt-text .mehr a { font-size: .68rem; }

    .footline { font-size: .62rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* ---------- Hintergrundvideo ---------- */

.hintergrund-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.hintergrund-video.is-active { opacity: 1; }

/* ---------- Projekte ---------- */

.projektliste {
    position: relative;
    z-index: 10;
    padding: 0 26px 110px;
}

.projekt {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(28px, 5vw, 80px);
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, .16);
}

/* jedes zweite Projekt spiegelverkehrt */
.projekt:nth-child(even) .projekt-bild { order: 2; }

.projekt-bild {
    display: block;
    overflow: hidden;
}
.projekt-bild img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 1.2s ease;
}
.projekt-bild:hover img { transform: scale(1.04); }

.projekt-text .ort,
.inhalt-block .ort {
    margin: 0 0 .9em;
    font-size: .72rem;
    letter-spacing: .24em;
    text-indent: .24em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
}

.projekt-text h2 {
    margin: 0 0 .8em;
    font-size: clamp(1.05rem, 1.5vw, 1.3rem);
    font-weight: 300;
    letter-spacing: .16em;
    text-indent: .16em;
    text-transform: uppercase;
}
.projekt-text h2 a { text-decoration: none; }

.projekt-text p {
    margin: 0 0 1.4em;
    font-size: .95rem;
    font-weight: 300;
    line-height: 1.8;
    color: rgba(255, 255, 255, .88);
}

.projekt-text .mehr a {
    font-size: .74rem;
    letter-spacing: .24em;
    text-indent: .24em;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, .5);
}
.projekt-text .mehr a:hover { border-color: var(--ink); }

/* Detailseite */
.inhalt-block .zurueck {
    margin: 0 0 2.4em;
    font-size: .72rem;
    letter-spacing: .22em;
}
.inhalt-block .zurueck a { border-bottom: 0; opacity: .75; }
.inhalt-block .zurueck a:hover { opacity: 1; }

.galerie {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 26px;
    padding: 0 26px 110px;
}
.galerie figure { margin: 0; }
.galerie img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

@media (max-width: 900px) {
    /* Bilder randlos über die volle Breite, Text behält seinen Rand */
    .projektliste { padding: 0 0 80px; }

    .projekt {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 34px 0;
    }
    .projekt:nth-child(even) .projekt-bild { order: 0; }

    .projekt-bild img { aspect-ratio: 3 / 2; }

    .projekt-text {
        padding: 0 22px;
        text-align: center;
    }

    .galerie {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 0 0 80px;
    }
}

/* ---------- Kontaktformular ---------- */

.kontaktformular {
    max-width: 520px;
    margin: 2.6em auto 0;
    text-align: left;
}

.kontaktformular label {
    display: block;
    margin-bottom: 18px;
}

.kontaktformular label > span {
    display: block;
    margin-bottom: 6px;
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .7);
}

.kontaktformular input[type=text],
.kontaktformular input[type=email],
.kontaktformular textarea {
    width: 100%;
    padding: 11px 13px;
    font: 300 .95rem/1.6 var(--font);
    color: var(--ink);
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 2px;
}
.kontaktformular textarea { resize: vertical; }
.kontaktformular input:focus,
.kontaktformular textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, .75);
    background: rgba(255, 255, 255, .12);
}

.kontaktformular .zustimmung {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    margin-bottom: 24px;
}
.kontaktformular .zustimmung input { margin-top: 3px; }
.kontaktformular .zustimmung span {
    font-size: .8rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .8);
}

.kontaktformular button {
    padding: 13px 34px;
    font: 300 .78rem var(--font);
    letter-spacing: .22em;
    text-indent: .22em;
    text-transform: uppercase;
    color: var(--ink);
    background: none;
    border: 1px solid rgba(255, 255, 255, .55);
    cursor: pointer;
    transition: background .25s ease;
}
.kontaktformular button:hover { background: rgba(255, 255, 255, .14); }

/* Falle für automatische Skripte – für Menschen unsichtbar */
.kontaktformular .falle {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.formular-meldung {
    margin: 2em auto 0;
    max-width: 520px;
    padding: 13px 17px;
    font-size: .88rem;
    border: 1px solid;
}
.formular-meldung.ok     { border-color: rgba(150, 200, 150, .6); background: rgba(40, 70, 40, .35); }
.formular-meldung.fehler { border-color: rgba(220, 150, 140, .6); background: rgba(80, 40, 35, .35); }
