/* Bildergalerie – Bilderwand im echten Größenverhältnis, Farbpunkte aus Bildausschnitten,
   weiche Übergänge. --cm = Pixel pro Zentimeter Leinwand (ein 200-cm-Bild passt immer in die Breite). */
:root {
  --cm: min(2.5px, calc((100vw - 2 * var(--pad)) / 205));
  --weich: cubic-bezier(.22, .8, .24, 1);
  --schatten: 0 2px 4px rgba(0,0,0,.07), 0 18px 38px -16px rgba(0,0,0,.32);
  --schatten-hoch: 0 4px 10px rgba(0,0,0,.08), 0 30px 56px -20px rgba(0,0,0,.36);
}

/* Einstieg */
.galerie-kopf { padding: clamp(60px, 8vw, 130px) var(--pad) 0; display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 110px); align-items: start; }
.galerie-kopf h1 { font-size: clamp(38px, 4.2vw, 72px); }
.galerie-kopf .kicker { margin-bottom: 18px; }
.galerie-text { color: var(--text); font-size: 18px; max-width: 36em; padding-top: .6em; }
.galerie-text p + p { margin-top: 1em; }

/* ---------- Auswahl: ruhig, mittig, ohne Kästen ---------- */
.auswahl { margin: clamp(80px, 9vw, 140px) var(--pad) 0; text-align: center; }
.auswahl-frage { font-weight: 250; font-size: clamp(24px, 2.4vw, 36px); letter-spacing: -.02em; line-height: 1.2; }

.farbpunkte { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px 20px; margin: 34px auto 0; max-width: 760px; }
.punkt { position: relative; width: 50px; height: 50px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background-color: var(--farbe); background-position: center; background-size: cover;
  box-shadow: 0 2px 5px rgba(0,0,0,.12), 0 8px 18px -8px rgba(0,0,0,.3);
  transition: transform .6s var(--weich), box-shadow .6s var(--weich), filter .6s var(--weich); }
.punkt:hover { transform: translateY(-4px) scale(1.08); box-shadow: 0 4px 8px rgba(0,0,0,.12), 0 16px 26px -10px rgba(0,0,0,.35); }
.punkt::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; border: 2.5px solid var(--ink); opacity: 0; transform: scale(.85); transition: opacity .5s var(--weich), transform .5s var(--weich); }
.punkt[aria-pressed="true"]::after { opacity: 1; transform: scale(1); }
/* Gewählte Farbe: Ring + Häkchen. Die übrigen Farben bleiben immer voll sichtbar (Wunsch Silvia). */
.punkt::before { content: ''; position: absolute; top: -9px; right: -9px; z-index: 1; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
  opacity: 0; transform: scale(.4); transition: opacity .4s var(--weich), transform .5s var(--weich); }
.punkt[aria-pressed="true"]::before { opacity: 1; transform: scale(1); }
.punkt[aria-pressed="true"] .punkt-name { font-weight: 600; color: var(--ink); }
.punkt:focus-visible { outline: none; }
.punkt:focus-visible::after { opacity: .5; transform: scale(1); }
.punkt-name { position: absolute; left: 50%; top: calc(100% + 12px); transform: translate(-50%, -4px); font-size: 13px; white-space: nowrap; color: var(--text); opacity: 0; pointer-events: none; transition: opacity .4s var(--weich), transform .4s var(--weich); }
.punkt:hover .punkt-name, .punkt:focus-visible .punkt-name, .punkt[aria-pressed="true"] .punkt-name { opacity: 1; transform: translate(-50%, 0); }

.auswahl-weiter { display: grid; gap: 14px; margin-top: 58px; }
.wahlreihe { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; }
.wahl { font: inherit; background: none; border: 0; cursor: pointer; padding: 6px 2px; color: var(--muted); font-size: 16px; position: relative; display: inline-flex; align-items: baseline; gap: 7px; transition: color .4s var(--weich); }
.wahl small { font-size: 12.5px; color: #a8a49d; transition: color .4s; }
.wahl::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); transform: scaleX(0); transition: transform .5s var(--weich); }
.wahl:hover { color: var(--ink); }
.wahl[aria-pressed="true"] { color: var(--ink); }
.wahl[aria-pressed="true"]::after { transform: scaleX(1); }
.wahl:focus-visible { outline: none; }
.wahl:focus-visible::after { transform: scaleX(.5); }

.auswahl-ergebnis { margin-top: 44px; display: flex; justify-content: center; align-items: baseline; gap: 22px; font-size: 15px; }
#galerie-anzahl { font-weight: 600; }
.filter-reset { font: inherit; font-size: 15px; background: none; border: 0; border-bottom: 1px solid currentColor; padding: 0 0 1px; color: var(--muted); cursor: pointer; transition: color .3s; }
.filter-reset:hover { color: var(--ink); }
.filter-reset[hidden] { display: none; }
.massstab-hinweis { margin-top: 10px; font-size: 13.5px; color: #a8a49d; }

/* ---------- Bilderwand: gemeinsame Mittellinie, Schildchen darunter ---------- */
.galerie-wand { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(56px, 6vw, 110px) clamp(38px, 4.5vw, 84px); padding: clamp(70px, 8vw, 120px) var(--pad) 0; }
.bild { margin: 0; width: calc((var(--b) * var(--n, 1) + var(--fuge) * (var(--n, 1) - 1)) * var(--cm)); min-width: 88px; max-width: 100%;
  transition: opacity .38s var(--weich), transform .38s var(--weich); }
.bild[hidden] { display: none; }
.bild.geht, .bild.kommt { opacity: 0; transform: translateY(14px) scale(.97); }
.bild.kommt { transition: none; }
.bild-knopf { display: flex; gap: calc(var(--fuge) * var(--cm)); width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.leinwand { flex: 1 1 0; display: block; aspect-ratio: var(--b) / var(--h); background: #f4f3f0; overflow: hidden; box-shadow: var(--schatten);
  transition: transform .8s var(--weich), box-shadow .8s var(--weich); }
.leinwand img { width: 100%; height: 100%; object-fit: cover; }
/* Beim Überfahren hebt sich das ganze Bild leicht an */
.bild-knopf:hover .leinwand { transform: translateY(-6px) scale(1.018); box-shadow: var(--schatten-hoch); }
.bild-knopf:focus-visible { outline: none; }
.bild-knopf:focus-visible .leinwand { outline: 2px solid var(--ink); outline-offset: 5px; }

/* Schildchen – feste Höhe, damit alle Bilder auf derselben Linie hängen */
.schild { display: flex; flex-direction: column; gap: 1px; margin-top: 18px; height: 5.6em; font-size: 13.5px; line-height: 1.35; color: var(--muted); }
.schild strong { font-weight: 600; font-size: 14.5px; color: var(--ink); letter-spacing: -.005em; }
.schild .verkauft { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }
.schild .verkauft::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #c8352c; }
.schild .datei { font-size: 11.5px; color: #a8a49d; }

.galerie-leer { text-align: center; color: var(--text); padding: 60px var(--pad) 0; }
.galerie-ende { padding: clamp(100px, 11vw, 170px) var(--pad) 0; text-align: center; }
.galerie-ende p { color: var(--text); max-width: 32em; margin: 22px auto 36px; }
/* Auftragsarbeiten unter „Ihr Bild ist nicht dabei?“ */
.galerie-auftrag { padding-top: clamp(100px, 11vw, 170px); }

/* ---------- Großansicht ---------- */
.gross-offen { overflow: hidden; }
.grossansicht { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0;
  background: #fff; opacity: 0; transition: opacity .45s var(--weich); }
.grossansicht::backdrop { background: transparent; }
.grossansicht.sichtbar { opacity: 1; }
.gross-buehne { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 70px 110px 40px; }
.gross-inhalt { display: flex; flex-direction: column; align-items: center; max-width: 100%;
  transition: opacity .38s var(--weich), transform .5s var(--weich); }
.grossansicht:not(.sichtbar) .gross-inhalt { transform: scale(.97); }
.gross-inhalt.raus-links  { opacity: 0; transform: translateX(-40px); }
.gross-inhalt.raus-rechts { opacity: 0; transform: translateX(40px); }
.gross-inhalt.ohne-uebergang { transition: none; }
.gross-bilder { display: flex; gap: 18px; justify-content: center; }
.gross-bilder img { width: auto; max-width: calc((100vw - 240px) / var(--n, 1)); max-height: calc(100dvh - 260px); object-fit: contain; box-shadow: var(--schatten-hoch); }
.gross-info { display: grid; grid-template-columns: auto minmax(0, 34em) auto; gap: 8px 44px; align-items: start; margin-top: 26px; width: 100%; max-width: 1100px; }
.gross-info .schild { height: auto; margin: 0; min-width: 12em; }
.gross-text { color: var(--text); font-size: 15px; line-height: 1.6; }
.gross-anfrage { justify-self: end; align-self: end; white-space: nowrap; font-size: 14px; }

.gross-knopf { position: fixed; z-index: 2; width: 54px; height: 54px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(255,255,255,.9); color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.06), 0 10px 24px -10px rgba(0,0,0,.22);
  transition: transform .5s var(--weich), box-shadow .5s var(--weich); }
.gross-knopf .icon { width: 24px; height: 24px; }
.gross-knopf:hover { transform: scale(1.08); box-shadow: 0 4px 10px rgba(0,0,0,.08), 0 16px 30px -12px rgba(0,0,0,.28); }
.gross-knopf:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.gross-zurueck { left: clamp(14px, 2.5vw, 40px); top: 50%; margin-top: -27px; }
.gross-weiter  { right: clamp(14px, 2.5vw, 40px); top: 50%; margin-top: -27px; }
.gross-zu      { right: clamp(14px, 2.5vw, 40px); top: clamp(14px, 2.5vw, 30px); }

@media (max-width: 900px) {
  .galerie-kopf { grid-template-columns: 1fr; gap: 24px; }
  .gross-buehne { padding: 70px 16px 100px; }
  .gross-bilder img { max-width: calc((100vw - 32px) / var(--n, 1)); max-height: calc(100dvh - 330px); }
  .gross-info { grid-template-columns: 1fr; }
  .gross-anfrage { justify-self: start; }
  .gross-zurueck, .gross-weiter { top: auto; bottom: 22px; margin-top: 0; }
}
@media (max-width: 560px) {
  .punkt { width: 44px; height: 44px; }
  .farbpunkte { gap: 38px 14px; }
  .wahlreihe { gap: 4px 18px; }
  .wahl { font-size: 15px; }
  .galerie-wand { gap: 44px 22px; }
  .bild { min-width: 70px; }
  .schild { font-size: 12.5px; }
  .schild strong { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .bild, .leinwand, .gross-inhalt, .grossansicht, .punkt { transition: none; }
}
.galerie-kopf .nowrap { white-space: nowrap; }
