/* ===========================================================================
   FOTOGRAFIE & BILDBEARBEITUNG
   Header, Typografie, Tags, Meta-Zeile, Kontakt und Footer sind identisch
   zu posterDesign.css. Neu: Vorher/Nachher-Slider und Natur-Collage.
   =========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible+Next:wght@400;500;700&family=Bricolage+Grotesque:opsz,wght@12..96,400..800&display=swap");

:root {
    --paper: #F3F4FA;
    --surface: #FFFFFF;
    --ink: #16172E;
    --ink-soft: #4A4C66;
    --line: #D9DBEA;
    --blue: #0004E0;
    --on-blue: #FFFFFF;
    --blue-tint: #E4E5FF;
    --band: #0004E0;
    --on-band: #FFFFFF;

    --font-display: 'Bricolage Grotesque', 'Helvetica Neue', Arial, sans-serif;
    --font-body: 'Atkinson Hyperlegible Next', 'Segoe UI', system-ui, sans-serif;

    --page-x: clamp(2rem, 6vw, 9rem);
    --header-h: 7.6rem;
    --radius-md: 1.4rem;
    --radius-lg: 2.4rem;

    --bg-color: var(--paper);
    --text-color: var(--ink);
    --main-color: var(--blue);
    --white-color: var(--surface);
    --border: var(--line);
}

.dark-mode {
    --paper: #0B0C24;
    --surface: #14163A;
    --ink: #E8E9F7;
    --ink-soft: #A9ABC9;
    --line: #2A2D5A;
    --blue: #2f34d4;
    --on-blue: #0B0C24;
    --blue-tint: #1D2060;
    --band: #1F23B8;
    --on-band: #FFFFFF;
}

/* ---------- Basis ---------- */

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

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    font-family: var(--font-body);
    font-size: 1.7rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper);
    overflow-x: clip;
    transition: background-color .3s ease, color .3s ease;
}

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
    border-radius: 6px;
}

.content-width {
    margin-left: var(--page-x);
    margin-right: var(--page-x);
}

/* ---------- Header (wie auf den anderen Seiten) ---------- */

.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--header-h);
    padding: 0 var(--page-x);
    display: flex;
    align-items: center;
    gap: 2.4rem;
    transition: background-color .3s ease, box-shadow .3s ease;
}

.header.sticky {
    background: color-mix(in srgb, var(--paper) 85%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--line);
}

.logo {
    margin-right: auto;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.6rem;
    letter-spacing: -0.05em;
    color: var(--blue);
}

#btn2,
#darkMode-icon {
    flex-shrink: 0;
    width: 4.2rem;
    height: 4.2rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    transition: border-color .2s ease, color .2s ease;
}

#btn2 { font-size: 2.2rem; margin-right: -1.2rem; }
#darkMode-icon { font-size: 2rem; }

#btn2:hover { border-color: var(--blue); color: var(--blue); }
#darkMode-icon:hover { border-color: var(--ink); }

#menu-icon {
    display: none;
    font-size: 3.2rem;
    color: var(--ink);
}

.navbar {
    display: flex;
    gap: 3.2rem;
}

.navbar a {
    position: relative;
    padding: .4rem 0;
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--ink);
    transition: color .2s ease;
}

.navbar a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -.2rem;
    height: 2px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}

.navbar a:hover::after,
.navbar a.active::after { transform: scaleX(1); }

.navbar a.active { color: var(--blue); }

.lang-switch {
    display: flex;
    align-items: center;
    padding: .3rem;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.lang-switch .lang-option {
    padding: .5rem 1.1rem;
    border-radius: 999px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--ink-soft);
    transition: background-color .2s ease, color .2s ease;
}

.lang-switch .lang-option:hover { color: var(--ink); }

.lang-switch .lang-option.active {
    background: var(--ink);
    color: var(--paper);
}

.lang-switch .lang-sep { display: none; }

/* ---------- Typografie ---------- */

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--ink);
    text-align: left;
}

h1 span, h2 span { color: var(--blue); }

h1 {
    font-size: clamp(4rem, 4.6vw, 6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

h2 {
    margin-bottom: 2.4rem;
    font-size: clamp(3rem, 3.4vw, 4.4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-top: 23.7rem;
}

h3 {
    margin-bottom: 1.2rem;
    font-size: clamp(2rem, 1.8vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ---------- Tags ---------- */

.projekt-tags-header {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 2.4rem;
}

.tag {
    padding: .4rem 1.2rem;
    border-radius: 999px;
    font-size: 1.25rem;
    font-weight: 500;
    background: var(--blue-tint);
    border: 1px solid transparent;
    color: var(--blue);
}

.tag-highlight {
    background: transparent;
    border-color: var(--line);
    color: var(--ink-soft);
}

/* ---------- Meta-Zeile ---------- */

.meta-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 0;
    margin-bottom: 0;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.meta-item {
    min-width: 0;
    padding: 2rem 2.4rem;
    background: var(--surface);
}

.meta-label {
    margin-bottom: .4rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--blue);
}

.meta-value {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--ink);
}

/* ---------- Kontakt + Footer (wie auf den anderen Seiten) ---------- */

.contact {
    margin-top: 8rem;
    padding: 12rem var(--page-x) 10rem;
    border-radius: 4rem 4rem 0 0;
    background: var(--band);
    color: var(--on-band);
}

.contact .contact-heading {
    margin: 0 0 3.2rem;
    font-size: clamp(4rem, 5.5vw, 6.4rem);
    line-height: 1;
    letter-spacing: -0.035em;
    color: inherit;
}

.contact .contact-heading span { color: inherit; }

.contact-mail {
    display: inline-block;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(0.7rem, 1.7vw, 3.1rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
    opacity: .85;
    transition: opacity .2s ease;
}

.contact-mail:hover { opacity: 1; }

.contact-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.6rem 3.6rem;
    margin-top: 4rem;
    font-size: 1.8rem;
}

.contact-meta a {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    opacity: .85;
    transition: opacity .2s ease;
}

.contact-meta a:hover { opacity: 1; }
.contact-meta i { font-size: 2.4rem; }

.contact :focus-visible { outline-color: var(--on-band); }

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.4rem var(--page-x);
    background: var(--band);
    color: var(--on-band);
    border-top: 1px solid color-mix(in srgb, var(--on-band) 20%, transparent);
    font-size: 1.4rem;
}

.footer-iconTop a {
    width: 4.4rem;
    height: 4.4rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--on-band);
    font-size: 2.2rem;
    transition: transform .25s ease;
}

.footer-iconTop a:hover { transform: translateY(-3px); }
#pfeiloben { color: var(--band); }

.mobile-hint { display: none; }

/* ---------- Intro (wie auf der Ad-Alliance-Seite) ---------- */

.intro-row {
    display: flex;
    align-items: flex-start;
    gap: 4rem;
    margin-top: calc(var(--header-h) + 8rem);
    margin-bottom: 10rem;
}

.intro-text {
    flex: 0 0 51%;
    min-width: 0;
}

.intro-copy p {
    max-width: 66ch;
    margin-top: 2rem;
    font-size: 1.65rem;
    line-height: 1.7;
    color: var(--ink);
}

.intro-media {
    flex: 1;
    min-width: 0;
    margin-top: 1rem;
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 15.3 / 13.7;
    background: var(--blue-tint);
}

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

/* ---------- Abschnitte ---------- */

.ph-section {
    margin-bottom: 7rem;
}

.ph-lead {
    max-width: 194ch;
    margin: -.8rem 0 3.2rem;
    font-size: 1.65rem;
    line-height: 1.7;
    color: var(--ink-soft);
}

/* ===========================================================================
   VORHER / NACHHER
   Das Nachher-Bild liegt im normalen Fluss und bestimmt die Höhe.
   Das Vorher-Bild liegt exakt darüber und wird per clip-path von links
   bis --pos aufgedeckt. Ein unsichtbarer Range-Regler über der ganzen
   Fläche übernimmt Ziehen, Tippen und Pfeiltasten.
   =========================================================================== */

.ba-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24.5rem;
    align-items: start;
}

.ba-card {
    padding: 1.6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    margin-bottom: -17rem;
}

.ba {
    --pos: 0%;
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--blue-tint);
    user-select: none;
    -webkit-user-select: none;
}

.ba img {
    -webkit-user-drag: none;
    pointer-events: none;
}

.ba-after {
    width: 100%;
    height: auto;
}

.ba-before {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.ba-grid {
    max-width: 190rem;
}

/* Trennlinie */
.ba::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    z-index: 2;
    width: 2px;
    margin-left: -1px;
    background: #fff;
    box-shadow: 0 0 1.2rem rgba(0, 0, 0, .35);
    pointer-events: none;
}

/* runder Griff mittig auf der Linie */
.ba-handle {
    position: absolute;
    top: 50%;
    left: var(--pos);
    z-index: 3;
    width: 4.6rem;
    height: 4.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #fff;
    color: #0004E0;
    font-size: 2rem;
    box-shadow: 0 .4rem 1.6rem rgba(0, 0, 0, .3);
    pointer-events: none;
    transition: transform .2s ease;
}

.ba-handle i { margin: 0 -.3rem; }

.ba:hover .ba-handle {
    transform: translate(-50%, -50%) scale(1.08);
}

.ba:has(.ba-range:focus-visible) .ba-handle {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}

/* Beschriftungen */
.ba-label {
    position: absolute;
    top: 1.2rem;
    z-index: 2;
    padding: .4rem 1.1rem;
    border-radius: 999px;
    background: rgba(22, 23, 46, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    pointer-events: none;
    transition: opacity .3s ease;
}

.ba-label--before { left: 1.2rem; opacity: 0; }
.ba-label--after  { right: 1.2rem; }

/* "Vorher" erst zeigen, sobald etwas vom Original zu sehen ist */
.ba.is-revealed .ba-label--before { opacity: 1; }

/* Unsichtbarer Regler über der ganzen Fläche */
.ba-range {
    position: absolute;
    inset: 0;
    z-index: 4;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

.ba-caption {
    padding: 2rem .8rem .4rem;
}

.ba-caption h3 {
    margin-bottom: .6rem;
    font-size: clamp(1.9rem, 1.6vw, 2.2rem);
}

.ba-caption p {
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--ink-soft);
}

/* ===========================================================================
   NATUR-COLLAGE
   Desktop:  A A B C      Tablet/Handy:  A A
             A A D C                     B C
             E F F C                     D C
                                         E F
   Zeilenhöhe = der clamp()-Wert, zum Justieren einfach ändern.
   =========================================================================== */

.collage {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(3, clamp(16rem, 17vw, 28rem));
    grid-template-areas:
        "a a b c"
        "a a d c"
        "e f f c";
    gap: 1.6rem;
}

.collage-item {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--blue-tint);
}

.collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.collage-item:hover img {
    transform: scale(1.05);
}

.collage-a { grid-area: a; }
.collage-b { grid-area: b; }
.collage-c { grid-area: c; }
.collage-d { grid-area: d; }
.collage-e { grid-area: e; }
.collage-f { grid-area: f; }

/* ---------- Responsive ---------- */

@media (max-width: 1350px) {
    .intro-row {
        flex-direction: column;
        gap: 2.4rem;
        margin-top: calc(var(--header-h) + 5rem);
        margin-bottom: 7rem;
    }

    .intro-text { display: contents; }

    .intro-row .projekt-titel-wrapper { order: 1; }
    .intro-row .intro-media           { order: 2; width: 100%; max-width: 64rem; margin-top: 0; }
    .intro-row .intro-copy            { order: 3; }
    .intro-row .projekt-tags-header   { order: 4; margin-top: 0; }

    .intro-copy p { margin-top: 0; }
}

@media (max-width: 900px) {
    .header { gap: 1.2rem; }

    #btn2 { margin-right: 0; }

    #menu-icon { display: block; }

    .navbar {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 1rem var(--page-x) 2.4rem;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 1.2rem 2.4rem rgba(22, 23, 46, .08);
    }

    .navbar.active { display: flex; }

    .navbar a {
        padding: 1.4rem 0;
        font-family: var(--font-display);
        font-size: 2.4rem;
        font-weight: 600;
    }

    .navbar a::after { display: none; }

    .ba-grid { grid-template-columns: 1fr; }

    .collage {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: clamp(22rem, 55vw, 42rem) repeat(3, clamp(14rem, 36vw, 28rem));
        grid-template-areas:
            "a a"
            "b c"
            "d c"
            "e f";
        gap: 1.2rem;
    }

    .contact { border-radius: 2.8rem 2.8rem 0 0; padding-top: 9rem; }

        .ba-after {
        max-height: 60svh;
        object-fit: cover;
    }

        .ba {
        max-width: 34rem;
        margin: 0;
    }
}

@media (max-width: 768px) {
    .ph-section { margin-bottom: 7rem; }

    .ba-card { padding: 1.2rem; border-radius: 2rem; }

    .meta-row { grid-template-columns: 1fr; }

    .contact { margin-top: 6rem; }
}

@media (max-width: 480px) {
    .lang-switch .lang-option { padding: .4rem .8rem; }
    #darkMode-icon, #btn2 { width: 3.8rem; height: 3.8rem; }

    .ba-handle { width: 4rem; height: 4rem; font-size: 1.8rem; }

    .footer {
        flex-direction: column-reverse;
        gap: 1.6rem;
    }
}

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

/* "Nachher" ausblenden, wenn das Bild komplett auf Vorher steht */
.ba.is-all-before .ba-label--after {
    opacity: 0;
}


/* ===========================================================================
   COMPOSING & 3D-VISUALISIERUNG
   Galerie wie am Ende der BA-Seite. Die Logik (automatischer Wechsel alle
   5 Sekunden, Pfeile) kommt aus script.js, hier steht nur die Optik.
   =========================================================================== */

.viz-panel {
    padding: 1.6rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

/* Breite Bildschirme: Galerie links, Text rechts */
@media (min-width: 1200px) {
    .viz-panel {
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        gap: 3.2rem;
        align-items: start;
    }

    .viz-text { padding: .8rem .8rem .8rem 0; }
    .viz-text h3 { margin-top: 0; }

    @media (min-width: 1200px) {
    .viz-panel {
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
        gap: 3.2rem;
        align-items: start;
    }

    .viz-panel .viz-text    { padding: 0 .8rem .8rem 0; }
    .viz-panel .viz-text h3 { margin-top: 0; }
}
}

.final-concept-hero {
    position: relative;
    aspect-ratio: 13 / 9;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--blue-tint);
}

.mini-gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
}

.mini-gallery-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

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

/* Schritt-Label unten links im Bild */
.viz-step {
    position: absolute;
    left: 1.7rem;
    bottom: 1.7rem;
    padding: .5rem 1.2rem;
    border-radius: 999px;
    background: rgba(22, 23, 46, .55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
}

/* Pfeile wie die Bedienelemente im Rest der Seite */
.mini-gallery-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 3.7rem;
    height: 3.7rem;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border-radius: 50%;
    background: rgba(22, 23, 46, .45);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 2rem;
    transition: background-color .2s ease;
}

.mini-gallery-arrow:hover { background: var(--blue); }

.mini-gallery-arrow-prev { left: 1.6rem; }
.mini-gallery-arrow-next { right: 1.6rem; }

.viz-text {
    padding: 2.4rem .8rem .8rem;
}

.viz-text h3 {
    margin-bottom: .4rem;
    font-size: clamp(1.9rem, 1.6vw, 2.2rem);
    margin-top: 1rem;
}

.viz-text p {
    max-width: 105ch;
    margin-top: 0rem;
    font-size: 1.5rem;
    line-height: 1.75;
    color: var(--ink-soft);
}

@media (max-width: 768px) {
    .viz-panel { padding: 1.2rem; border-radius: 2rem; }
    .final-concept-hero { aspect-ratio: 4 / 3; }
    .mini-gallery-arrow { width: 3.8rem; height: 3.8rem; font-size: 2rem; }
    .mini-gallery-arrow-prev { left: 1rem; }
    .mini-gallery-arrow-next { right: 1rem; }
    .viz-step { left: 1rem; bottom: 1rem; font-size: 1.2rem; }
}