/* =========================================================================
   style-project.css — Projektseite
   Mobil und Desktop teilen sich dieselben Bausteine:
   - Startbild füllt die ganze Seite (fixiert), wird beim Scrollen unscharf und dunkler
   - Textspalte nach dem Vorbild der e-flux Artikelseiten: schmal, kleine Schrift,
     Bilder in Spaltenbreite, kleine Bildunterschriften
   - Galerie-Carousel mit Unterstrich-Anzeige (wie der Unterstrich von "missing link_")
   Am Desktop (ab 1024px) steht links eine feste, nicht scrollende Spalte.
   main.css, lang.css bleiben unverändert und werden hier gezielt überschrieben.
   ========================================================================= */

:root {
    --p: 0;                                   /* Scroll-Fortschritt 0..1, setzt script.js */
    --title-size: 1.5rem;                     /* Größe von "missing link_" und den Galerie-Strichen */
    --pad: clamp(20px, 6vw, 36px);            /* seitlicher Rand der Textspalte */
    --gap: calc(var(--title-size) * 0.28);    /* Abstand zwischen Bildern = halbe Breite eines Unterstrichs */
    --peek: 3.25rem;                          /* mobil: so viel vom nächsten Bild bleibt sichtbar */
    --item: calc(100% - var(--peek));         /* Breite eines Galeriebilds */
    --footer-icon: 1.3rem;                    /* Größe von Home- und Globus-Icon in der Fußzeile */
}

/* Hilfsklassen: Basis vor den Media-Queries, sonst gewinnt die Reihenfolge */
.desktop-only, footer ul.site-nav li.desktop-only { display: none; }
.sidebar-info { display: none; }

html { background: #000; }
body { background: #000; margin: 0; }

/* ---------- Startbild ---------- */
.hero-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #000; }
.hero-bg picture { display: block; width: 100%; height: 100%; }
.hero-bg img {
    display: block; width: 100%; height: 100%; max-width: none; margin: 0; object-fit: cover;
    transform: scale(1.06);
    filter: blur(calc(var(--p) * 18px)) brightness(calc(1 - var(--p) * 0.72));
}

/* ---------- Kopf: Titel liegt über dem Bild ---------- */
header {
    position: absolute; top: 0; left: 0; right: 0; z-index: 5;
    height: auto; margin: 0; display: flex; justify-content: flex-end;
    padding: max(2vh, 14px) 5.5vw 0; box-sizing: border-box;
}
.page-title { margin: 0; font-size: var(--title-size); font-weight: 400; line-height: 1.2; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45); }
#page-title { padding: 0; }
.page-title .underscore { position: static; z-index: auto; }

/* ---------- Inhalt ---------- */
main { position: relative; z-index: 2; width: auto; margin: 0; padding: 0; display: block; }

.hero-spacer, .article {
    max-width: calc(40rem + 2 * var(--pad)); margin-inline: auto; padding-inline: var(--pad); box-sizing: border-box;
}
.hero-spacer { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 9vh; }
.article { padding-bottom: 4rem; }

.hero-spacer .page-heading {
    margin: 0; padding: 0; font-size: clamp(1.9rem, 8vw, 2.4rem); line-height: 1.1; font-weight: 500; letter-spacing: -0.01em;
    color: #fff; text-align: start; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}
.hero-spacer #header-caption, .hero-spacer .hero-caption { margin: 0.9rem 0 0; color: rgba(255, 255, 255, 0.8);  padding: 0; font-size: 0.8rem; }

.article .text {
    width: auto; max-width: none; margin: 0 0 1.3rem; padding: 0;
    font-size: 1.0625rem; line-height: 1.55; font-weight: 400; color: #f1f1f1;
}
.article h2 { margin: 4rem 0 1.25rem; padding: 0; font-size: 1.45rem; line-height: 1.2; font-weight: 500; color: #fff; }
.caption { margin: 0.55rem 0 0; padding: 0; font-size: 0.8rem; line-height: 1.4; font-style: normal; color: #a9a9a9; }
.article .caption { margin-bottom: 0; }

.figure { margin: 2rem 0 0; }
.figure img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0; padding: 0; border-radius: 0; }

/* ---------- Galerie-Carousel ---------- */
.gallery { margin: 2rem 0 0; }
.gal-viewport { position: relative; margin-right: calc(-1 * var(--pad)); }
.gal-track {
    position: relative; display: flex; gap: var(--gap); overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.gal-track::-webkit-scrollbar { display: none; }
.gal-track::after { content: ""; flex: 0 0 calc(100% - var(--item) - var(--gap)); }   /* Platz, damit auch das letzte Bild links einrastet */
.gal-img {
    flex: 0 0 var(--item); width: var(--item); max-width: none; height: auto; margin: 0; padding: 0; display: block;
    aspect-ratio: 3 / 4; object-fit: cover; scroll-snap-align: start; border-radius: 0;
}
.gal-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    width: 44px; height: 64px; padding: 0; border: 0; border-radius: 0; background: none; color: #fff;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.6)); transition: opacity 0.2s ease;
}
.gal-prev { left: 0; }
.gal-next { right: calc(100% - var(--item)); }
.gal-arrow[data-off] { opacity: 0; pointer-events: none; }

.gal-dashes { display: flex; gap: 0.16em; margin-top: 0.55rem; font-size: var(--title-size); line-height: 1; }
.dash {
    margin: 0; padding: 0; border: 0; background: none; color: #fff; font: inherit; font-weight: 400; line-height: 1;
    opacity: 0.5; cursor: pointer; transition: opacity 0.25s ease;
}
.dash[aria-current="true"] { opacity: 1; }

/* ---------- Aufklappbare Redetexte (reines CSS) ---------- */
.speech-accordion { list-style: none; margin: 0; padding: 0; width: 100%; }
.speech-accordion-item { position: relative; margin: 0 0 0.45rem; background: rgba(255, 255, 255, 0.08); border-radius: 0; }
.speech-accordion-item input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }
.speech-accordion-item label {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0; padding: 0.95rem 1.1rem;
    cursor: pointer; font-size: 1.05rem; font-weight: 400; color: #fff;
}
.speech-accordion-item .arrow-icon { font-style: normal; transition: transform 0.3s ease; flex-shrink: 0; }
.speech-accordion-item input:checked + label .arrow-icon { transform: rotate(180deg); }
.speech-accordion-item .speech-content { max-height: 0; overflow: hidden; transition: max-height 0.4s ease; padding: 0 1.1rem; }
.speech-accordion-item input:checked ~ .speech-content { max-height: 400vh; padding: 0 1.1rem 1.2rem; }
.speech-content .text { margin: 0; color: #dcdcdc; }
.speech-accordion-item input:focus-visible + label { outline: 2px solid #fff; outline-offset: -2px; }

.navigation { margin: 3rem 0 0; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.navigation ul, .navigation ul li { margin: 0; padding: 0; border: 0; list-style: none; }
.navigation ul li:hover { border: 0; }
.navigation ul li + li { margin-top: 0.35rem; }
.navigation h4 { margin: 0; font-size: 1.5rem; font-weight: 300; line-height: 1.2; }
.navigation .navigation-link { color: rgba(255, 255, 255, 0.5); text-decoration: none; }
.navigation .navigation-link:hover { color: #fff; }

/* ---------- Fußzeile mobil: Home + Globus links, Künstler + Impressum rechts, alles auf einer Höhe ---------- */
footer {
    position: relative; margin: 0; width: 100%; box-sizing: border-box; z-index: 2; background: #000; border-top: 1px solid rgba(255, 255, 255, 0.14);
    padding: 1.5rem var(--pad) calc(1.5rem + env(safe-area-inset-bottom, 0px));
}
footer ul.site-nav { display: flex; align-items: center; justify-content: flex-start; gap: 0.95rem; margin: 0; padding: 0; list-style: none; }
footer ul.site-nav li { display: flex; align-items: center; margin: 0; padding: 0; font-size: 1.05rem; line-height: 1; color: #fff; }
footer ul.site-nav li:first-of-type { padding-left: 0; }
footer ul.site-nav li a { font-size: inherit; display: flex; align-items: center; color: #fff; text-decoration: none; }
footer ul.site-nav li a:hover { color: #bdbdbd; }
.nav-home svg, .language-toggle svg { width: var(--footer-icon); height: var(--footer-icon); display: block; fill: currentColor; }
.language-toggle { color: #fff; }
.language-toggle:hover { color: #bdbdbd; }
footer ul.site-nav { width: 100%; }
footer ul.site-nav li.imprint-item { margin-inline-start: auto; }



/* ---------- Historische Hintergründe: zusätzliche Bausteine ---------- */
/* Seitenkopf als normaler Fluss (kein Vollbild-Startbild): Bild scrollt einfach mit hoch */
.hero-flow { min-height: 0; justify-content: flex-start; padding-top: 5.5rem; padding-bottom: 2.5rem; }
.hero-flow .hero-title { position: static; margin: 0 0 1.6rem; }
.hero-flow .hero-figure { order: -1; margin: 0 0 2rem; }
.hero-figure img { display: block; width: 100%; height: auto; margin: 0; border-radius: 0; }
.hero-figure .caption { margin-top: 0.55rem; }
.speech-accordion { margin-bottom: 2.6rem; }
.reveal-stack { position: relative; }
.reveal-stack img { display: block; width: 100%; height: auto; }
.reveal-stack .reveal-dark { position: absolute; inset: 0; height: 100%; opacity: var(--r, 0); }
.article .caption + .text, .article .figure + .text { margin-top: 1.6rem; }
.article .figure + .figure { margin-top: 1rem; }
.article h3 { font-style: normal; margin: 2.4rem 0 0.9rem; padding: 0; font-size: 1.15rem; line-height: 1.3; font-weight: 500; color: #fff; }
.article .text.quote { font-style: italic; margin-left: 0; padding-left: 1.1rem; border-left: 1px solid rgba(255, 255, 255, 0.35); color: #e4e4e4; }
.speech-content .text.quote { border-left: 0; padding-left: 0; font-style: normal; }
.article .text.quote i, .article .text.quote em { font-style: italic; }

.audio { display: flex; align-items: center; gap: 0.9rem; margin: 2rem 0 0; }
.audio-play { flex: 0 0 auto; width: 2.4rem; height: 2.4rem; padding: 0; border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 50%; background: none; color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s ease; }
.audio-play:hover { background: rgba(255, 255, 255, 0.12); }
.audio-play svg { width: 1.05rem; height: 1.05rem; display: block; }
.audio-play .ico-pause { display: none; }
.audio.playing .ico-pause { display: block; }
.audio.playing .ico-play { display: none; }
.audio-bar { flex: 1 1 auto; height: 1.4rem; display: flex; align-items: center; cursor: pointer; position: relative; }
.audio-bar::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: rgba(255, 255, 255, 0.3); }
.audio-progress { position: relative; height: 2px; width: 0; background: #fff; }
.audio-time { flex: 0 0 auto; min-width: 2.6em; font-size: 0.8rem; color: #a9a9a9; text-align: right; font-variant-numeric: tabular-nums; }
.audio + .caption { margin-bottom: 0.9rem; }

.article video { display: block; width: 100%; height: auto; margin: 0; background: #000; }

.teaser { display: block; margin: 3.5rem 0 0; padding: 1.1rem 0 0; border-top: 1px solid rgba(255, 255, 255, 0.14); color: #fff; text-decoration: none; }
.teaser h3 { margin: 0 0 0.7rem; }
.teaser .text { margin-bottom: 0.8rem; color: #cfcfcf; }
.teaser-more { margin: 0; font-size: 0.95rem; color: rgba(255, 255, 255, 0.55); }
.teaser-more::after { content: " →"; }
[dir="rtl"] .teaser-more::after { content: " ←"; }
.teaser:hover .teaser-more { color: #fff; }


/* ---------- Sprachauswahl (index.html) ---------- */
.hero-bg.is-blurred img { transform: scale(1.12); filter: blur(7px) brightness(0.42); }
.lang-select { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center; }
.lang-list { list-style: none; margin: 0; padding: 0; text-align: center; }
.lang-list li { margin: 0 0 1.15rem; padding: 0; }
.lang-list a { font-size: clamp(1.5rem, 3vh, 2rem); font-weight: 300; line-height: 1.2; color: rgba(255, 255, 255, 0.78); text-decoration: none; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5); transition: color 0.2s ease; }
.lang-list a:hover, .lang-list a:focus-visible { color: #fff; }

/* ---------- Künstler: Text und Portrait nebeneinander in der Textspalte ---------- */
.artist-head.hero-flow { padding-bottom: 1.5rem; }
.artist-layout { display: flex; flex-direction: column-reverse; gap: 1.6rem; }
.artist-layout .text { margin: 0; }
.artist-portrait { margin: 0; }
.artist-portrait img { display: block; width: 100%; height: auto; border-radius: 0; }

/* =========================================================================
   Desktop ab 1024px: feste linke Spalte, rechts scrollt der Inhalt
   ========================================================================= */
@media (min-width: 1024px) {
    :root { --pad: 32px; --title-size: 1.5rem; --item: 64%; --gap: calc(var(--title-size) * 0.28); }

    html { overflow: hidden; }
    body {
        display: grid; grid-template-columns: 400px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto;
        grid-template-areas: "side-top main" "side-bottom main"; height: 100vh; overflow: hidden;
    }

    .hero-bg::after {
        content: ""; position: absolute; inset: 0;
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.3) 420px, rgba(0, 0, 0, 0) 680px);
    }

    /* Linke Spalte, oben: Titel, Grafik, Texte. Kein Scrollen, nichts wird gescrollt. */
    header {
        position: static; grid-area: side-top; z-index: auto; display: flex; flex-direction: column; align-items: flex-start;
        justify-content: flex-start; min-height: 0; overflow: hidden; padding: 4vh 28px 1vh 36px;
    }
    header .page-title { margin: 0 0 3vh; }

    .sidebar-info { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; width: 100%; }
    .sidebar-figure { flex: 0 0 auto; min-height: 0; margin: 0 0 2.4vh; mix-blend-mode: screen; position: relative; z-index: 1; }
    .sidebar-graphic { display: block; width: 100%; height: auto; max-width: none; margin: 0; }
    .sidebar-text { position: relative; z-index: 1; margin: 0 0 1.5vh; padding: 0; font-size: clamp(11px, 1.45vh, 13.5px); line-height: 1.45; color: #ececec; }

    /* Linke Spalte, unten: Navigation, darunter Globus und Impressum rechtsbündig */
    footer { grid-area: side-bottom; background: transparent; border-top: 0; padding: 0 28px 3.5vh 36px; }
    footer ul.site-nav { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 1.1vh 0; }
    footer ul.site-nav li { font-size: clamp(1.05rem, 2.3vh, 1.5rem); }
    footer ul.site-nav li > * { position: relative; z-index: 1; }
    .mobile-only, footer ul.site-nav li.mobile-only { display: none; }
    footer ul.site-nav li.desktop-only, footer ul.site-nav li.artist-item { display: flex; flex: 0 0 100%; }
    footer ul.site-nav li a, footer ul.site-nav li.sidebar-nav-current { color: rgba(255, 255, 255, 0.5); }
    footer ul.site-nav li a:hover { color: #fff; }
    footer ul.site-nav li.sidebar-nav-current { color: #fff; }
    footer ul.site-nav li.artist-item { margin-inline-start: 0; }
    footer ul.site-nav li.imprint-item { margin-inline-start: 0; }
    /* letzte Zeile: Impressum links, Globus rechts, gleiche Höhe */
    footer ul.site-nav li.imprint-item { order: 10; margin-inline-end: auto; margin-top: 2.2vh; }
    footer ul.site-nav li.language-selector-item { order: 11; margin-top: 2.2vh; }
    .nav-home { display: none; }
    footer ul.site-nav li.imprint-item { font-size: 0.95rem; }
    footer ul.site-nav li.imprint-item a { font-weight: 400; }
    .language-toggle svg { width: 1.05rem; height: 1.05rem; }
    .language-toggle { padding: 0; }

    /* Rechte Spalte */
    main { grid-area: main; height: 100%; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.25) transparent; }
    .hero-spacer { min-height: 100vh; padding-bottom: 8vh; }
    .hero-spacer .page-heading { font-size: clamp(2rem, 3vw, 2.6rem); }
    main { overflow-x: hidden; }
    .lang-select { grid-area: 1 / 1 / -1 / -1; min-height: 100%; pointer-events: none; }
    .lang-list { pointer-events: auto; }
    .lang-list li { margin-bottom: 1.5rem; }
    .hero-spacer.hero-flow.artist-head { min-height: 0; padding-bottom: 1.6rem; }
    .artist-layout { flex-direction: row; align-items: flex-start; gap: 2rem; }
    .artist-layout .text { flex: 1 1 0; min-width: 0; }
    .artist-portrait { flex: 0 0 34%; }
    :root { --item: 28rem; }
    .gal-viewport { margin-right: calc((100% - (100vw - 400px)) / 2); }
    .gal-next { right: auto; left: calc(var(--item) - 44px); }
    .gal-track::after { flex-basis: 60vw; }
    /* Titel + Fotocredit: oben, bleiben stehen bis der Text sie erreicht, dann scrollen sie mit */
    .hero-spacer { justify-content: flex-start; padding-top: 4vh; padding-bottom: 0; }
    .hero-title { position: sticky; top: 4vh; z-index: 3; margin-bottom: 9vh; }
    .hero-spacer { position: relative; }
    .hero-spacer:not(.hero-flow) > .hero-caption { position: absolute; inset-inline-start: var(--pad); bottom: 3.5vh; margin: 0; }
    .hero-spacer.hero-flow { min-height: 100vh; padding-top: 4vh; padding-bottom: 2rem; }
    .hero-flow .hero-title { position: static; margin: 0 0 3.4rem; }
    .hero-flow .hero-figure { order: 0; width: 100%; margin: 0; display: flex; flex-direction: column; align-items: center; }
    .hero-flow .hero-figure img { width: auto; max-width: 100%; max-height: calc(100vh - 16.5rem); }
    .hero-flow .hero-figure .caption { align-self: center; text-align: center; }
}

/* ---- Kralik-Seite (gleicher Stil wie Historie) ---- */
footer ul.site-nav li.sidebar-nav-current a { color: #fff; }
.article .author { margin-top: 1.6rem; font-weight: 500; color: #fff; }
.article hr.sep { border: 0; border-top: 1px solid rgba(255,255,255,.25); margin: 2.4rem 0 1.4rem; }
.article .notes-head { font-style: italic; }
.article ol.notes { margin: 0 0 2rem; padding-inline-start: 1.4rem; font-size: .9rem; line-height: 1.5; color: rgba(255,255,255,.7); }
.article ol.notes li { margin: 0 0 .6rem; }

/* ---- Mobile Startseite (schwarz, Inhalt der linken Desktop-Spalte) ---- */
body.page-start { background: #000; }
body.page-start .sidebar-info { display: flex; flex-direction: column; margin: 0.4rem 0 0; }
body.page-start .sidebar-figure { margin: 0 0 1.4rem; mix-blend-mode: screen; }
body.page-start .sidebar-graphic { display: block; width: 100%; height: auto; }
body.page-start .sidebar-text { margin: 0 0 1rem; font-size: .9rem; line-height: 1.5; color: #ececec; }
.start-nav ul { list-style: none; margin: 2.2rem 0 1rem; padding: 0; }
.start-nav li { margin: 0 0 1.1rem; }
.start-nav a { font-size: clamp(1.6rem, 7vw, 2.1rem); font-weight: 300; line-height: 1.2; color: #fff; text-decoration: none; }
.start-nav a:hover { opacity: .7; }
@media (min-width: 1024px) { body.page-start .sidebar-info { display: none; } }
@media (max-width: 1023px) { body.page-start main { padding: 3.6rem 24px 1rem; } }
@media (max-width: 1023px) {
  body.page-start main { padding-top: 3rem; }
  body.page-start .sidebar-info { margin: 0; }
  body.page-start .sidebar-figure { margin: 0 0 1.6rem; }
  body.page-start .sidebar-graphic { width: 100%; max-height: 78vh; object-fit: cover; object-position: center bottom; }
}
