/* Bausteine fuer alle Unterseiten. Die Startseite setzt die Massstaebe, hier liegen die wiederverwendbaren Teile.
   Neue Bausteine nur hier anlegen, nie in einer einzelnen Seite. */

/* Seitenkopf: Foto randlos unter der Kopfzeile, beim Scrollen zieht es sich zur Karte zusammen */
.phero { --len: 170vh; }
.phero .pin { background: var(--bg); }
.phero-shot { position: absolute; inset: 0; clip-path: inset(var(--t, 0%) var(--s, 0vw) var(--b, 0vh) var(--s, 0vw) round var(--r, 0px)); }
.phero-shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: translateY(calc(var(--t, 0%) * var(--oben, 0))) scale(var(--k, 1)); transform-origin: var(--fx, 50%) calc(50% - 50% * var(--oben, 0)); }
/* Gesichter bleiben drin (Chris 25.10.2026): --oben:1 haengt das Foto an die obere Kante der Karte, wenn das Gesicht weit oben sitzt, --fx:0% zoomt vom linken Rand aus */
.phero-shot::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, hsl(210 14% 8% / .55) 0%, hsl(210 14% 8% / .1) 38%, hsl(210 14% 8% / .85) 100%); }
.phero-copy { position: absolute; left: var(--s, 0vw); right: var(--s, 0vw); bottom: calc(48px + var(--b, 0vh) + env(safe-area-inset-bottom, 0px)); z-index: 2; color: var(--i-text); padding-left: calc(var(--s, 0vw) * .6); padding-right: calc(var(--s, 0vw) * .6); }
.phero-copy .eyebrow { color: var(--cu-hi); }
.phero-copy h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 9vw, 7.5rem); line-height: .94; letter-spacing: -.02em; margin: 12px 0 16px; max-width: 14ch; }
.phero-copy h1.long { font-size: clamp(2.5rem, 6.4vw, 5.25rem); max-width: 18ch; }
.phero-copy p { font-size: clamp(1.0625rem, 2vw, 1.3125rem); font-weight: 500; max-width: 36rem; color: hsl(36 30% 92%); }
.phero-copy .btn { margin-top: 24px; }

/* Seitenkopf ohne Foto, fuer Recht und Kontakt */
.plain-head { padding: calc(var(--navh) + 96px) 0 48px; }
.plain-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 8vw, 6rem); line-height: .95; letter-spacing: -.02em; margin: 12px 0 16px; }
.plain-head p { color: var(--muted); max-width: 40rem; font-size: 1.1875rem; }

/* Abschnitt mit Kopf */
.sec { padding: 96px 0; }
.sec.tight { padding: 64px 0; }
.sec.alt { background: var(--bg2); }
@media (max-width: 767px) { .sec { padding: 64px 0; } }
.sec-head { display: grid; gap: 16px; margin-bottom: 48px; max-width: 46rem; }
.sec-head.center { text-align: center; justify-items: center; margin-left: auto; margin-right: auto; }
.sec-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.5rem, 5.6vw, 4.5rem); line-height: .98; letter-spacing: -.02em; }
.sec-head h2.long { font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.05; }
.sec-head p { color: var(--muted); font-size: 1.125rem; }

/* Fliesstext, hoechstens 640 Pixel breit */
.prose { max-width: 40rem; display: grid; gap: 16px; color: var(--text); }
.prose p { color: var(--muted); }
.prose h3 { font-size: 1.375rem; margin-top: 16px; }
.prose ul, .prose ol { margin: 0; padding-left: 1.2em; color: var(--muted); display: grid; gap: 8px; }
.prose li::marker { color: var(--cu-text); }
.prose a { color: var(--text); text-decoration-color: var(--cu-text); text-underline-offset: 3px; }
.prose strong { color: var(--text); }

/* Bild und Text nebeneinander, .rev dreht die Seiten */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } .split.rev > :first-child { order: 2; } }
.split-pic { position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 5; }
.split-pic.wide { aspect-ratio: 3 / 2; }
.split-pic img { position: absolute; inset: -6% 0; width: 100%; height: 112%; object-fit: cover; }
.split-pic .tag { position: absolute; left: 16px; bottom: 16px; padding: 8px 12px; border-radius: 12px; background: hsl(210 14% 8% / .72); color: var(--i-text); font-size: .8125rem; font-weight: 600; }
/* Licht ohne Kabel auf /leistungen/: kleines, ruhiges Bild neben dem Text, folgt dem Grundumfang */
.split.licht { gap: 24px; margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--line); align-items: start; }
.split.licht .split-pic { width: 100%; max-width: 10rem; border-radius: 18px; }
.split.licht .sec-head h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.05; }
@media (min-width: 900px) { .split.licht { grid-template-columns: 15rem 1fr; gap: 48px; align-items: center; } .split.licht .split-pic { max-width: none; } }

/* Kartenraster mit Kupferzahl */
.tiles { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tiles.three { grid-template-columns: repeat(3, 1fr); } .tiles.four { grid-template-columns: repeat(4, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: inherit; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
a.tile:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px hsl(22 65% 55% / .55); }
.tile .no { font-family: var(--serif); font-size: 2.25rem; line-height: 1; }
.tile h3 { font-size: 1.25rem; }
.tile p { color: var(--muted); font-size: .9375rem; line-height: 1.6; }
.tile .lnk { margin-top: auto; min-height: 24px; }
.tile.wide { grid-column: 1 / -1; }

/* Ablauf als Zeitleiste, die Kupferlinie waechst beim Scrollen */
.steps { position: relative; display: grid; gap: 32px; padding-left: 40px; max-width: 46rem; }
.steps::before { content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.steps .bar { position: absolute; left: 11px; top: 8px; width: 2px; height: calc(100% - 16px); background: linear-gradient(180deg, var(--cu-hi), var(--cu-me)); transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
.step { position: relative; display: grid; gap: 8px; }
.step::before { content: ""; position: absolute; left: -36px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 0 0 2px var(--cu-text); }
.step .when { font-size: .8125rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cu-text); }
.step h3 { font-size: 1.375rem; }
.step p { color: var(--muted); }

/* Fragen und Antworten */
.faq { display: grid; gap: 8px; max-width: 52rem; }
.faq details { background: var(--surface); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 16px 24px; font-weight: 600; font-size: 1.0625rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: 0 0 auto; width: 12px; height: 12px; border-right: 2px solid var(--cu-text); border-bottom: 2px solid var(--cu-text); transform: rotate(45deg) translateY(-3px); transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.faq .a { padding: 0 24px 24px; color: var(--muted); display: grid; gap: 12px; }

/* Eine Kundenstimme gross */
.voice { background: var(--surface); border-radius: 28px; padding: 48px 32px; box-shadow: inset 0 0 0 1px var(--line); max-width: 52rem; margin: 0 auto; display: grid; gap: 16px; }
.voice .qm { font-family: var(--serif); font-size: 5rem; line-height: .5; height: 32px; color: var(--cu-deep); }
.voice blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.375rem, 2.6vw, 1.875rem); line-height: 1.3; }
.voice cite { font-style: normal; font-weight: 700; color: var(--petrol); }

/* Dunkle Insel als Abschnitt */
.island { background: var(--island); color: var(--i-text); }
.island .sec-head p, .island .prose p, .island .tile p { color: var(--i-muted); }
.island .tile { background: var(--island2); box-shadow: inset 0 0 0 1px var(--i-line); }
.island .eyebrow { color: var(--cu); }

/* Bildergalerie im Mauerwerk */
.gallery { columns: 1; column-gap: 12px; }
@media (min-width: 640px) { .gallery { columns: 2; } }
@media (min-width: 1000px) { .gallery { columns: 3; } }
.gallery figure { margin: 0 0 12px; break-inside: avoid; border-radius: 20px; overflow: hidden; position: relative; }
.gallery img { width: 100%; height: auto; }
.gallery figcaption { position: absolute; left: 12px; bottom: 12px; padding: 4px 8px; border-radius: 8px; background: hsl(210 14% 8% / .7); color: var(--i-text); font-size: .8125rem; }

/* Abschlusskarte am Seitenende, nicht angeheftet */
.cta-end { background: var(--island); color: var(--i-text); text-align: center; padding: 128px 0; }
.cta-end .in { display: grid; justify-items: center; gap: 24px; max-width: 44rem; margin: 0 auto; padding: 0 16px; }
.cta-end .eyebrow { color: var(--cu); }
.cta-end h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 8vw, 6.5rem); line-height: .94; letter-spacing: -.02em; }
.cta-end p { color: var(--i-muted); }
.cta-end .tel { font-weight: 600; color: var(--i-text); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }

/* Brotkrumen */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .8125rem; font-weight: 600; color: hsl(36 30% 88%); margin-bottom: 8px; }
.crumbs a { text-decoration: none; opacity: .85; }
.crumbs span[aria-hidden] { opacity: .5; }

/* Rechtstexte */
.legal { max-width: 46rem; display: grid; gap: 16px; }
.legal h2 { font-size: 1.5rem; margin-top: 32px; }
.legal h3 { font-size: 1.1875rem; margin-top: 16px; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 1.2em; margin: 0; display: grid; gap: 6px; }

/* Formular */
.form { display: grid; gap: 16px; max-width: 40rem; }
.form label { display: grid; gap: 8px; font-weight: 600; font-size: .9375rem; }
.form input, .form textarea, .form select { font: 400 1.0625rem/1.4 var(--font); color: var(--text); background: var(--surface); border: 0; border-radius: 12px; padding: 12px 16px; min-height: 48px; box-shadow: inset 0 0 0 1px var(--line); }
.form input:focus, .form textarea:focus, .form select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--cu-text); }
.form .row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form .row { grid-template-columns: 1fr 1fr; } }

/* Terminbuchung, gefuellt von assets/buchung.js */
.buchung { background: var(--surface); border-radius: 28px; padding: 24px; box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 24px; max-width: 52rem; }
@media (min-width: 768px) { .buchung { padding: 32px; } }
.bu-vorschau { padding: 8px 16px; border-radius: 12px; background: hsl(22 70% 55% / .12); color: var(--cu-text); font-weight: 600; font-size: .9375rem; }
.bu-arten { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bu-art { text-align: left; display: grid; gap: 4px; padding: 16px; border-radius: 20px; border: 0; background: var(--bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font: inherit; min-height: 44px; }
.bu-art b { font-size: 1.0625rem; } .bu-art span { color: var(--muted); font-size: .9375rem; }
.bu-art[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--cu-text); background: hsl(22 70% 55% / .08); }
.bu-kalender { display: grid; gap: 16px; }
.bu-kopf { display: flex; align-items: center; justify-content: space-between; font-weight: 600; }
.bu-blaettern { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--bg); color: var(--text); font-size: 1.5rem; cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.bu-tage { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.bu-tag { display: grid; gap: 2px; justify-items: center; padding: 8px 0; min-height: 56px; border-radius: 12px; border: 0; background: var(--bg); color: var(--text); font: 500 .8125rem/1.2 var(--font); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); }
.bu-tag b { font-size: .9375rem; }
.bu-tag:disabled { opacity: .35; cursor: default; }
.bu-tag[aria-pressed="true"] { color: #1B120C; background: linear-gradient(180deg, var(--cu-hi), var(--cu-gl) 45%, var(--cu-me)); box-shadow: none; }
.bu-zeiten { display: flex; flex-wrap: wrap; gap: 8px; }
.bu-tagname { width: 100%; font-weight: 600; margin-bottom: 4px; }
.bu-zeit { min-width: 76px; min-height: 44px; border-radius: 12px; border: 0; background: var(--bg); color: var(--text); font: 600 .9375rem/1 var(--font); cursor: pointer; box-shadow: inset 0 0 0 1px var(--line); font-variant-numeric: tabular-nums; }
.bu-zeit[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--cu-text); background: hsl(22 70% 55% / .1); }
.bu-wahl { font-weight: 700; color: var(--cu-text); }
.bu-hinweis { color: var(--muted); }
.bu-fehler { color: #B3261E; font-weight: 600; }
:root[data-theme="dark"] .bu-fehler { color: #F2B8B5; }
.bu-falle { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bu-check { display: flex !important; grid-template-columns: none; gap: 12px !important; align-items: flex-start; font-weight: 500 !important; }
.bu-check input { min-height: 0; width: 22px; height: 22px; margin-top: 2px; accent-color: var(--cu-deep); }
.bu-ok { padding: 24px; border-radius: 20px; background: hsl(22 70% 55% / .1); display: grid; gap: 8px; }
.bu-ok h3 { font-family: var(--serif); font-weight: 400; font-size: 2.25rem; }
.bu-sperre p { color: var(--muted); }
@media (max-width: 520px) { .bu-tage { grid-template-columns: repeat(7, minmax(40px, 1fr)); overflow-x: auto; } .bu-arten { grid-template-columns: 1fr; } }

/* Fotogalerie /fotos: Zeilen gleicher Hoehe, jedes Foto ganz und unbeschnitten (Breite folgt dem Seitenverhaeltnis --r).
   Klick oeffnet den Leuchtkasten aus assets/fotos.js */
.fotos-reiter { position: sticky; top: var(--navh); z-index: 20; background: rgb(var(--nav-rgb) / .86); backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px); border-bottom: 1px solid var(--line); }
@media (prefers-reduced-transparency: reduce) { .fotos-reiter { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; } }
.fotos-reiter ul { position: relative; list-style: none; margin: 0; padding: 8px 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.fotos-reiter ul::-webkit-scrollbar { display: none; }
.fotos-reiter a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; white-space: nowrap; font-size: .9375rem; font-weight: 600; text-decoration: none; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.fotos-reiter a span { font-size: .8125rem; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.fotos-reiter a[aria-current="true"] { color: #1B120C; background: linear-gradient(180deg, var(--cu-hi), var(--cu-gl) 45%, var(--cu-me)); box-shadow: none; }
.fotos-reiter a[aria-current="true"] span { color: #1B120C; opacity: .7; }
.fotos-sek { scroll-margin-top: calc(var(--navh) + 60px); }
.fotos-sek .sec-head { margin-bottom: 32px; }
.fotos-sek .sec-head .lnk { justify-self: start; }
.fotoraster { --zeile: 132px; display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 640px) { .fotoraster { --zeile: 210px; gap: 8px; } }
@media (min-width: 1100px) { .fotoraster { --zeile: 250px; } }
.fotoraster::after { content: ""; flex: 100 1 0; }
.ft { position: relative; margin: 0; flex: var(--r) 1 calc(var(--r) * var(--zeile)); min-width: 0; border-radius: 12px; overflow: hidden; background: var(--bg2); }
@media (min-width: 640px) { .ft { border-radius: 16px; } }
.ft img { display: block; width: 100%; height: auto; aspect-ratio: var(--r); transition: transform .5s var(--ease); }
.ft-auf { position: absolute; inset: 0; z-index: 2; width: 100%; border: 0; padding: 0; margin: 0; background: transparent; cursor: zoom-in; border-radius: inherit; }
.ft-auf:focus-visible { outline: 2px solid var(--cu-text); outline-offset: -2px; }
@media (hover: hover) { .ft:hover img { transform: scale(1.03); } }
@media (prefers-reduced-motion: reduce) { .ft img { transition: none; } .ft:hover img { transform: none; } }
.ft .credit { right: 2px; bottom: 2px; }
.ft .credit span { font-size: .6875rem; padding: 2px 7px; border-radius: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-ki { position: absolute; left: 6px; bottom: 6px; z-index: 3; pointer-events: none; padding: 2px 7px; border-radius: 6px; background: hsl(210 14% 8% / .7); color: #F3EEE6; font-size: .6875rem; font-weight: 600; }
@media (max-width: 639px) { .ft .credit span { max-width: 9.5rem; } }

/* Leuchtkasten: ganzes Bild, Pfeiltasten, Wischen, Escape */
.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: hsl(210 14% 5% / .97); color: #F3EEE6; overflow: hidden; }
.lb::backdrop { background: hsl(210 14% 5% / .9); }
.lb[open] { display: grid; grid-template-rows: 1fr auto; }
.lb-buehne { position: relative; min-height: 0; display: grid; place-items: center; padding: calc(56px + env(safe-area-inset-top, 0px)) 8px 8px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.lb-buehne img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 8px; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.lb-fuss { display: grid; gap: 4px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px)); max-width: 52rem; margin: 0 auto; width: 100%; text-align: center; }
.lb-text { font-size: .9375rem; color: #DCD6CC; }
.lb-meta { font-size: .8125rem; color: #AEB4BA; display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; }
.lb-meta a { color: #F3EEE6; text-decoration: underline; text-decoration-color: var(--cu); text-underline-offset: 3px; }
.lb-knopf { position: absolute; z-index: 2; width: 48px; height: 48px; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #F3EEE6; background: hsl(0 0% 100% / .1); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.lb-knopf:hover { background: hsl(0 0% 100% / .18); }
.lb-knopf:focus-visible { outline: 2px solid var(--cu); outline-offset: 2px; }
.lb-knopf svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lb-zu { top: calc(8px + env(safe-area-inset-top, 0px)); right: 8px; }
.lb-vor, .lb-zurueck { top: 50%; transform: translateY(-50%); }
.lb-zurueck { left: 8px; } .lb-vor { right: 8px; }
@media (max-width: 639px) { .lb-vor, .lb-zurueck { width: 40px; height: 40px; } .lb-zurueck { left: 4px; } .lb-vor { right: 4px; } }
@media (prefers-reduced-motion: reduce) { .lb-buehne img { transition: none; } }
html.lb-offen { overflow: hidden; }
