/* Julia Boxberger Fotografie — Stylesheet
   Ein warm-cremiges, modernes Layout mit Fokus auf großen Bildern.
*/

:root {
    --bg: #faf7f2;
    --bg-soft: #f1ebe1;
    --text: #2a2520;
    --text-muted: #7d7268;
    --accent: #b08968;
    --accent-dark: #8c6b50;
    --line: #e7ded2;
    --white: #ffffff;
    --shadow-sm: 0 4px 16px rgba(42, 37, 32, 0.06);
    --shadow-md: 0 12px 32px rgba(42, 37, 32, 0.10);
    --serif: "Cormorant Garamond", "Times New Roman", serif;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --radius: 4px;
    --wrap: 1240px;       /* Gesamtbreite des Seiten-Containers */
    --wrap-pad: 24px;     /* horizontaler Innenabstand von .wrap; Inhaltsbreite = --wrap − 2×--wrap-pad */
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }

a {
    color: var(--text);
    text-decoration: none;
    transition: color .2s ease, opacity .2s ease;
}
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: -0.005em;
    line-height: 1.15;
    color: var(--text);
    margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.05rem; font-family: var(--sans); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

p { margin: 0 0 1em; }

.muted { color: var(--text-muted); }

.eyebrow {
    font-family: var(--sans);
    font-weight: 500;
    font-size: .8rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 1rem;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 var(--wrap-pad);
}

.section-head {
    text-align: center;
    margin: 0 auto 3rem;
    max-width: 640px;
    text-wrap: balance;
}

.section-head h1, .section-head h2 { margin-bottom: .25em; }

.btn {
    display: inline-block;
    padding: 14px 28px;
    font-family: var(--sans);
    font-size: .85rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid currentColor;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.btn--solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--solid:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--bg); }
.btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn--ghost:hover { background: var(--white); color: var(--text); }

/* ---------------- Header ---------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 247, 242, 0.92);
    backdrop-filter: saturate(150%) blur(8px);
    border-bottom: 1px solid var(--line);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
}

.brand { display: flex; flex-direction: column; line-height: 1; }
.brand__name {
    font-family: var(--serif);
    font-size: 1.6rem;
    font-weight: 500;
    letter-spacing: .01em;
}
.brand__tag {
    font-size: .65rem;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}

.nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 32px;
}
.nav__list a {
    font-size: .85rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--text);
    position: relative;
}
.nav__list a:after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -6px;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.nav__list a:hover:after { transform: scaleX(1); }

.nav__toggle {
    display: none;
    background: none;
    border: 0;
    width: 40px; height: 40px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}
.nav__toggle span {
    display: block;
    width: 22px; height: 1.5px;
    background: var(--text);
    transition: transform .25s ease, opacity .25s ease;
}

@media (max-width: 720px) {
    .nav__toggle { display: flex; }
    .nav__list {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        padding: 16px 24px 24px;
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: transform .25s ease, opacity .25s ease;
    }
    .nav__list li { border-bottom: 1px solid var(--line); }
    .nav__list li:last-child { border-bottom: 0; }
    .nav__list a { display: block; padding: 14px 0; }
    .nav.is-open .nav__list {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

/* ---------------- Hero ---------------- */

.hero {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: var(--white);
}
.hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.04);
    transition: transform 8s ease;
}
.hero:hover .hero__bg { transform: scale(1); }

/* Slideshow: mehrere gestapelte Layer, per Keyframe (inline) überblendet.
   Standardmäßig unsichtbar - nur das aktive Bild wird per Animation eingeblendet. */
.hero--slideshow .hero__bg {
    opacity: 0;
    transform: scale(1.06);
    transition: none;
    animation: heroKen var(--hero-duration, 24s) linear infinite;
    will-change: opacity, transform;
}
.hero--slideshow:hover .hero__bg { transform: none; } /* Animation behält Kontrolle */

@media (prefers-reduced-motion: reduce) {
    /* Bewegungsempfindlich: kein Wechsel, nur das erste Bild statisch zeigen */
    .hero--slideshow .hero__bg { animation: none; opacity: 0; transform: scale(1.04); }
    .hero--slideshow .hero__bg:first-of-type { opacity: 1; }
}

.hero__bg--placeholder {
    background: linear-gradient(135deg, #c4a486 0%, #8c6b50 60%, #54453a 100%);
}
.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.55) 100%);
}
.hero__content {
    position: relative;
    z-index: 2;
    padding: 120px 24px;
    max-width: 880px;
}
.hero__headline {
    color: var(--white);
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-style: italic;
    font-weight: 400;
    margin-bottom: .25em;
}
.hero__subline {
    font-size: 1.15rem;
    color: rgba(255,255,255,.88);
    max-width: 560px;
    margin: 0 0 2rem;
}

/* ---------------- Intro ---------------- */

.intro {
    padding: 100px 0;
    text-align: center;
}
.intro__inner {
    max-width: 760px;
    margin: 0 auto;
}
.intro__text {
    font-family: var(--serif);
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    font-style: italic;
    color: var(--text);
    line-height: 1.5;
}

/* ---------------- Galerien Tiles ---------------- */

.galleries { padding: 40px 0 120px; }
.galleries__more { text-align: center; margin-top: 48px; }

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.tile {
    display: block;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .35s ease, box-shadow .35s ease;
}
.tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.tile__img {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--bg-soft);
    display: block;
}
.tile__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease;
}
.tile:hover .tile__img img { transform: scale(1.04); }
.tile__img--empty {
    background: linear-gradient(135deg, var(--bg-soft), var(--line));
}

.tile__caption {
    padding: 22px 24px 26px;
    text-align: center;
}
.tile__caption h3 {
    margin: 0;
    font-size: 1.5rem;
}
.tile__caption .muted {
    margin: 6px 0 0;
    font-size: .85rem;
    letter-spacing: .04em;
}

.empty {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 0;
}

/* ---------------- CTA ---------------- */

.cta {
    background: var(--bg-soft);
    padding: 100px 0;
    text-align: center;
}
.cta__inner h2 { margin-bottom: .25em; }
.cta__inner p { margin-bottom: 2rem; color: var(--text-muted); }

/* ---------------- Galerieseite ---------------- */

.gallery-head {
    padding: 80px 0 30px;
    text-align: center;
}
.gallery-head h1 { margin-bottom: .25em; }
.gallery-head__desc {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.25rem;
    max-width: 640px;
    margin: 1.2em auto 0;
    color: var(--text);
}
.masonry-wrap { padding: 40px 0 120px; }

/* No-JS-Fallback: einfache vertikale Liste. JS schaltet auf Spalten um. */
.masonry {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.masonry.is-laid-out {
    flex-direction: row;
    align-items: flex-start;
}
.masonry__col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.masonry__item {
    display: block;
    margin: 0;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-soft);
    cursor: zoom-in;
    transition: transform .3s ease;
}
.masonry__item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 1s ease, opacity .4s ease;
    /* width/height-Attribute am <img> liefern die aspect-ratio - der Browser
       reserviert den Platz vor dem Laden, kein Layout-Shift mehr beim Lazy-Load. */
}
.masonry__item:hover img { transform: scale(1.02); }

/* Preview-Galerie: Bildlabel als Overlay */
.masonry__item { position: relative; }
.masonry__label {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 4px 10px;
    font-size: .72rem;
    letter-spacing: .08em;
    color: var(--white);
    background: rgba(0, 0, 0, 0.55);
    border-radius: 3px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease;
}
.masonry__item:hover .masonry__label,
.masonry__item:focus-visible .masonry__label { opacity: 1; }
.masonry--preview .masonry__label { opacity: .85; }

.preview-hint {
    max-width: 560px;
    margin: 1.4em auto 0;
    font-size: 1rem;
    line-height: 1.5;
    border-left: 3px solid var(--accent);
    padding: 4px 0 4px 16px;
    text-align: left;
}

/* Entwurfs-Hinweis (nur für den Admin sichtbar, wenn Galerie nicht veröffentlicht) */
.draft-banner {
    background: #f6e2c4;
    color: #6b4a1f;
    border-bottom: 1px solid #e2c79b;
    padding: 12px 24px;
    text-align: center;
    font-size: .95rem;
    line-height: 1.5;
}

/* 404 / Galerie nicht gefunden */
.notfound { padding: 130px 0; text-align: center; }
.notfound h1 { margin: .15em 0 .35em; }
.notfound .muted { max-width: 460px; margin: 0 auto 28px; line-height: 1.6; }

/* Passwort-Gate für geschützte Vorschau-Galerien */
.gallery-gate { padding: 110px 0; text-align: center; }
.gallery-gate h1 { margin: .15em 0 .4em; }
.gallery-gate .muted { max-width: 440px; margin: 0 auto; }
.gate-form { display: flex; gap: 10px; justify-content: center; max-width: 420px; margin: 26px auto 0; }
.gate-form input {
    flex: 1; padding: 12px 14px; font-size: 1rem;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
}
.gate-form input:focus { outline: none; border-color: var(--accent); }
.gate-error { color: #b5503f; margin-top: 14px; font-weight: 500; }

/* ---------------- Inhaltsseiten (Preise etc.) ---------------- */

.page-section { padding: 80px 0 100px; }
.richtext { max-width: none; margin: 0; }
.richtext .lead { font-size: 1.2rem; line-height: 1.6; color: var(--text); margin-bottom: 1.6em; }
.richtext h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 1.6em 0 .35em; }
.richtext h3 { margin: 1.4em 0 .3em; }
.richtext p { margin: 0 0 1em; }
.richtext a:not(.btn) { color: var(--accent-dark); text-decoration: underline; }
.richtext ul, .richtext ol { margin: 0 0 1em 1.3em; }
.richtext li { margin-bottom: .3em; }
.richtext img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1.2em 0; box-shadow: var(--shadow-sm); }
.richtext > :first-child { margin-top: 0; }
.richtext blockquote { margin: 1.4em 0; padding: .2em 0 .2em 1.1em; border-left: 3px solid var(--accent); color: var(--muted); font-style: italic; }
.richtext table { border-collapse: collapse; width: 100%; margin: 1.4em 0; }
/* Kein erzwungener Rahmen: Linien kommen nur, wenn im Editor-Dialog gesetzt. */
.richtext th, .richtext td { padding: .5em .7em; text-align: left; vertical-align: top; }
/* Veraltetes border="1"-Attribut (Alt-Tabellen) ausschalten – sonst zwingt die Browser-
   Standardregel den Zellen einen inset-Rahmen auf, den der Dialog nicht entfernt. */
.richtext table[border] { border-style: none; }
.richtext table[border] > * > tr > td, .richtext table[border] > * > tr > th { border-style: none; }

/* ---------------- Lightbox ---------------- */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(20, 17, 14, 0.94);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .25s ease;
    /* Waagerechte Gesten gehören uns (Bildwechsel), senkrechtes Ziehen und Zoomen
       bleiben beim Browser. Die zweite Zeile überschreibt die erste, wo sie
       unterstützt wird - so bleibt das Zoomen erhalten, ohne die erste zu riskieren. */
    touch-action: pan-y;
    touch-action: pan-y pinch-zoom;
}
.lightbox[hidden] { display: none; }
.lightbox.is-visible { opacity: 1; }
.lightbox__figure {
    margin: 0;
    max-width: min(92vw, 1000px);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.lightbox__imgwrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}
.lightbox__img {
    max-width: min(92vw, 1000px);
    max-height: 76vh;
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0,0,0,.5);
}

/* Nachbarbilder, die nur während einer Wischgeste existieren. Sie werden vom JS
   per position:fixed auf den Mittelpunkt des aktuellen Bildes gesetzt und dann
   um eine Bildschirmbreite nach links bzw. rechts geschoben. */
.lightbox__ghost {
    position: fixed;
    max-width: min(92vw, 1000px);
    max-height: 76vh;
    object-fit: contain;
    box-shadow: 0 30px 80px rgba(0,0,0,.5);
    pointer-events: none;
    will-change: transform;
}
.lightbox__caption {
    color: rgba(255,255,255,.7);
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.lightbox__open {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    backdrop-filter: blur(6px);
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
/* Nur für Geräte mit echtem Mauszeiger. Auf Touchgeräten bleibt :hover nach einem
   Tipp am Element kleben, bis woanders hin getippt wird - die zuletzt benutzte
   Schaltfläche sähe dann dauerhaft anders aus als ihr Gegenstück. */
@media (hover: hover) {
    .lightbox__open:hover {
        color: var(--white);
        background: rgba(0, 0, 0, 0.7);
        border-color: rgba(255, 255, 255, 0.7);
        transform: scale(1.06);
    }
}
.lightbox__open[hidden] { display: none; }

.lightbox__close,
.lightbox__nav {
    position: absolute;
    /* Ohne z-index entscheidet die Reihenfolge im Markup, und dort stehen die
       Schaltflächen VOR dem <figure>. Das Bild lag dadurch obenauf und fing die
       Klicks ab - unterhalb von etwa 1144px Fensterbreite reicht es bis in die
       Ecken und machte die Pfeile unbedienbar. */
    z-index: 3;
    /* Runder Träger wie bei der Lupe (.lightbox__open). Ohne ihn steht das Symbol
       je nach Bildformat halb auf dem Foto und halb daneben und wirkt verloren;
       auf hellen Fotos war es zudem kaum zu erkennen. */
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px);
    color: rgba(255, 255, 255, 0.85);
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
/* display:block nimmt dem SVG den Zeilenabstand unter der Grundlinie - sonst
   säße das Symbol trotz Flex-Zentrierung ein paar Pixel zu hoch. */
.lightbox__close svg,
.lightbox__nav svg { display: block; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav--prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 16px; top: 50%; transform: translateY(-50%); }

/* Siehe oben: :hover nur dort, wo es einen Mauszeiger gibt. Sonst bliebe der
   zuletzt angetippte Pfeil hervorgehoben stehen und die beiden Pfeile sähen
   nach jedem Tipp unterschiedlich aus. */
@media (hover: hover) {
    .lightbox__close:hover,
    .lightbox__nav:hover {
        color: var(--white);
        background: rgba(0, 0, 0, 0.7);
        border-color: rgba(255, 255, 255, 0.7);
    }
    .lightbox__close:hover { transform: scale(1.06); }
    .lightbox__nav--prev:hover { transform: translate(-4px, -50%) scale(1.06); }
    .lightbox__nav--next:hover { transform: translate(4px, -50%) scale(1.06); }
}

/* Mobile Browser legen beim Antippen ein blaues Rechteck über die Schaltfläche
   (-webkit-tap-highlight-color). Das ignoriert den runden Rand und sieht neben
   dem Foto unschön aus. Wir schalten es ab und geben stattdessen selbst eine
   Rückmeldung: der Kreis wird kurz heller und sinkt leicht ein.
   Die :active-Regeln stehen bewusst NACH den :hover-Regeln - beide haben dieselbe
   Spezifität, also entscheidet die Reihenfolge. Auf Touchgeräten bleibt :hover
   nach einem Tipp gern hängen und würde den Druck sonst überdecken. */
.lightbox__close,
.lightbox__nav,
.lightbox__open {
    -webkit-tap-highlight-color: transparent;
}
.lightbox__close:active,
.lightbox__nav:active,
.lightbox__open:active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.85);
}
.lightbox__close:active { transform: scale(.9); }
.lightbox__nav--prev:active { transform: translateY(-50%) scale(.9); }
.lightbox__nav--next:active { transform: translateY(-50%) scale(.9); }
.lightbox__open:active { transform: scale(.9); }

/* Der Fokusring soll bei Tastaturbedienung erhalten bleiben, aber nicht nach
   einem Fingertipp stehen bleiben - genau das leistet :focus-visible. */
.lightbox__close:focus,
.lightbox__nav:focus,
.lightbox__open:focus { outline: none; }
.lightbox__close:focus-visible,
.lightbox__nav:focus-visible,
.lightbox__open:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .9);
    outline-offset: 3px;
}

/* ---------------- Über mich ---------------- */

.about { padding: 100px 0; }
.about__inner {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 80px;
    align-items: start;
}
@media (max-width: 860px) {
    .about__inner { grid-template-columns: 1fr; gap: 40px; }
}
.about__facts {
    background: var(--bg-soft);
    padding: 32px;
    border-radius: var(--radius);
}
.about__facts h2 { font-size: 1.4rem; margin-bottom: 1.2em; }
.about__facts dl { margin: 0; }
.about__facts dt {
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-top: 1em;
}
.about__facts dd { margin: .25em 0 0; font-size: 1.05rem; }

/* ---------------- Kontakt ---------------- */

.contact { padding: 50px 0; }
.contact__inner { max-width: 1000px; margin: 0 auto; }
.social { display: flex; gap: 16px; }
.social a { font-size: .95rem; }

/* Maskierte Kontaktangaben (E-Mail/Telefon) - Wert kommt aus CSS-Fragmenten */
.mask { cursor: pointer; word-break: break-word; }
.mask--phone { color: inherit; }
.mask--phone:hover { color: var(--accent); }
.mask-wrap { display: inline-flex; align-items: center; gap: 8px; }
.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 0;
    border-radius: var(--radius);
    transition: color .2s ease;
}
.copy-btn:hover { color: var(--accent); }
.copy-btn.is-copied { color: var(--accent); }

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 40px;
}
.contact__form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.contact__form span {
    font-size: .72rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.contact__form input,
.contact__form select,
.contact__form textarea {
    background: var(--white);
    border: 1px solid var(--line);
    padding: 12px 14px;
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--text);
    border-radius: var(--radius);
    transition: border-color .2s ease;
}
.contact__form input:focus,
.contact__form select:focus,
.contact__form textarea:focus {
    outline: none;
    border-color: var(--accent);
}
/* Eigener Dropdown-Pfeil mit genug Abstand zum rechten Rand */
.contact__form select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%237d7268' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.contact__form button { align-self: center; margin-top: 8px; }
.contact__form button[disabled] { opacity: .5; cursor: not-allowed; }

/* Das "hidden"-Attribut wirkt nur über das Browser-Stylesheet und wird von jeder
   Autoren-Regel überstimmt - ohne diese Zeile bliebe der Button wegen
   ".btn { display: inline-block }" sichtbar und hinge auf "Wird gesendet ...". */
.btn[hidden] { display: none; }

/* Einwilligung: Checkbox neben laufendem Text, deshalb kein Flex-Column wie oben */
.contact__consent {
    flex-direction: row !important;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}
.contact__consent input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--accent);
}
.contact__consent span {
    font-size: .9rem;
    letter-spacing: normal;
    text-transform: none;
    line-height: 1.5;
}

/* Honeypot: aus dem Blickfeld schieben statt display:none - Bots, die auf
   versteckte Felder prüfen, füllen es dann trotzdem aus und verraten sich. */
.hp-field {
    position: absolute !important;
    left: -10000px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Liegt im Formular selbst (Flex-Spalte mit eigenem gap), deshalb kein Rand. */
.form-feedback {
    margin: 0;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    font-size: .95rem;
    line-height: 1.5;
}
.form-feedback--success {
    background: var(--bg-soft);
    border-color: var(--accent);
}
.form-feedback--error {
    background: #fdf3f1;
    border-color: #d9a79b;
    color: #8a3a26;
}

.contact__fallback { margin-top: 40px; }

.legal { padding: 90px 0 110px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.legal__inner { max-width: 760px; }
.legal__head { margin-bottom: 2.5rem; }
.legal__head h2 { margin: .15em 0 .25em; }
.legal__head .muted { margin: 0; }

/* Pflichtangaben als Info-Karte (Tabelle: robust im WYSIWYG, Label/Wert-Raster) */
.legal__facts {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 3rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) * 2);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.legal__facts th,
.legal__facts td {
    text-align: left;
    vertical-align: top;
    padding: 22px 32px;
    border-bottom: 1px solid var(--line);
    line-height: 1.6;
}
.legal__facts tr:last-child th,
.legal__facts tr:last-child td { border-bottom: none; }
.legal__facts th {
    width: 220px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    line-height: 1.5;
}
.legal__facts td .muted { display: block; font-size: .85rem; margin-top: 2px; }
.legal__line { display: block; }
.legal__line + .legal__line { margin-top: 4px; }

/* Rechtstexte: ruhige, gut lesbare Spalte */
.legal__prose h3 {
    font-family: var(--sans);
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 2.4rem 0 .6rem;
    padding-top: 1.6rem;
    border-top: 1px solid var(--line);
}
.legal__prose h3:first-child { padding-top: 0; border-top: none; margin-top: 0; }
.legal__prose p { color: var(--text); margin: 0; max-width: 64ch; }

@media (max-width: 600px) {
    /* Label/Wert-Tabelle stapeln: Label oben, Wert darunter -
       sonst quetscht die feste th-Spalte den Wert auf schmalen Screens. */
    .legal__facts tr {
        display: block;
        border-bottom: 1px solid var(--line);
    }
    .legal__facts tr:last-child { border-bottom: none; }
    .legal__facts th,
    .legal__facts td {
        display: block;
        width: auto;
        border-bottom: none;
        overflow-wrap: break-word;
    }
    .legal__facts th { padding: 18px 20px 0; }
    .legal__facts td { padding: 2px 20px 18px; }
}

/* ---------------- Footer ---------------- */

.site-footer {
    background: var(--text);
    color: rgba(255,255,255,.85);
    padding: 40px 0 24px;
    margin-top: 0;
}
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: var(--white); }

/* Flache Kontaktzeile: E-Mail · Telefon · Social über drei Spalten */
.site-footer__inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: center;
}
@media (max-width: 640px) { .site-footer__inner { grid-template-columns: 1fr; gap: 16px; } }

/* Label und Wert auf einer Zeile, je Spalte zentriert */
.site-footer__col { display: flex; align-items: center; justify-content: center; gap: .7em; }

.site-footer__label {
    color: var(--white);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    white-space: nowrap;
}

.site-footer__social { display: flex; gap: 12px; }
.site-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 50%;
    font-size: 1.05rem;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.site-footer__social a:hover {
    background: var(--white);
    border-color: var(--white);
    color: var(--text);
}

.site-footer__legal {
    margin-top: 30px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.1);
    text-align: center;
    color: rgba(255,255,255,.55);
}
.site-footer__legal a { color: rgba(255,255,255,.7); }

/* ---------------- Back-to-Top ---------------- */

.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 40;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--text);
    color: var(--bg);
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(42, 37, 32, 0.18);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.back-to-top:hover {
    background: var(--accent-dark);
}

/* ---------------- Bild-Lazy-Fade ---------------- */

img[loading="lazy"] { opacity: 0; transition: opacity .6s ease; }
img[loading="lazy"].is-loaded,
img[loading="lazy"].loaded { opacity: 1; }
