/* bordfeld.art – nachgebaut nach der Wix-Seite (gemessen am 20.11.2026).
   Wix skaliert Abstände und Überschriften mit der Fensterbreite: Ränder 1,85vw, Galerie 58,5vw,
   Textspalte 36,1vw, Überschrift 3,28vw. Diese Werte sind hier übernommen. */

:root {
  --text: #333;
  --schwarz: #000;
  --rand: 1.85vw;
  --kopfhoehe: 67px;
  --rahmen: #8c8c8c;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 400 15px/28.5px "Wix Madefor Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

a { color: inherit; }
img { max-width: 100%; }

h1, h2 {
  font-family: "Wix Madefor Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  color: var(--schwarz);
}

.unsichtbar {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Fokus als Doppelring: sichtbar auf hellem und dunklem Grund */
:focus-visible {
  outline: 2px solid var(--schwarz);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #fff;
}

.springen {
  position: absolute;
  left: 8px; top: -60px;
  z-index: 200;
  padding: 8px 14px;
  background: var(--schwarz);
  color: #fff;
}
.springen:focus { top: 8px; }

/* ── Kopf ─────────────────────────────────────────────────────────── */
.kopf {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--kopfhoehe);
  padding: 0 var(--rand);
}
.kopf__name { text-decoration: none; font-size: 15px; }

.kopf__menueknopf {
  display: none;
  width: 50px; height: 50px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.kopf__striche,
.kopf__striche::before,
.kopf__striche::after {
  display: block;
  width: 30px; height: 2px;
  margin: 0 auto;
  background: var(--schwarz);
  content: "";
}
.kopf__striche { position: relative; }
.kopf__striche::before { position: absolute; top: -9px; left: 0; }
.kopf__striche::after { position: absolute; top: 9px; left: 0; }

/* Menü: bei Wix nur bis 1000 px Breite über den Knopf erreichbar, darüber gar nicht */
.menue {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  padding: 80px 24px 40px;
  background: #fff;
}
.menue[hidden] { display: none; }
.menue ul { margin: 0; padding: 0; list-style: none; text-align: center; }
.menue li a {
  display: inline-block;
  padding: 6px 0;
  font-size: 18px;
  line-height: 1.5;
  text-decoration: none;
}
.menue li a[aria-current="page"] { text-decoration: underline; }
.menue__zu {
  position: absolute;
  top: 9px; right: calc(var(--rand) - 10px);
  width: 50px; height: 50px;
  border: 0;
  background: none;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  color: var(--schwarz);
}

@media (max-width: 1000px) {
  .kopf__menueknopf { display: block; }
}

/* ── Fuß ──────────────────────────────────────────────────────────── */
.fuss {
  padding: 24px var(--rand) 36px;
  text-align: center;
  font-size: 15px;
}
.fuss a { text-decoration: underline; }

/* ── Startseite: Gallery Wall (SVG aus dem früheren Wix-HTML-Element) ── */
.wand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
/* --s = Kantenlänge der quadratischen Wand; Umschalter und Übersicht messen sich daran */
.wand__flaeche {
  --s: min(100vw, 100vh);
  position: relative;
  flex: none;
  width: var(--s);
  height: var(--s);
}
.wand__bild,
.wand__bild > svg {
  display: block;
  width: 100%;
  height: 100%;
}
.wand .vorschau {
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.wand .hotspot {
  fill: transparent;
  stroke: none;
  cursor: pointer;
}
.wand a:hover ~ .vorschau,
.wand a:focus-visible ~ .vorschau { opacity: 1; }
.wand a:focus { outline: none; box-shadow: none; }
.wand a:focus-visible .hotspot { stroke: #fff; stroke-width: 4; outline: none; }

/* ── Startseite: Umschalter im Schnee und Werkübersicht (Auftrag 20.11.2026) ──
   Ohne JavaScript bleibt alles wie bisher: nur die Wand, kein Umschalter. */
.schnee { display: none; }
.js .schnee {
  display: block;
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 16.5%;
}
.umschalter {
  --wahl: calc(var(--s) * 0.078);
  position: absolute;
  left: 50%;
  bottom: calc(var(--s) * 0.014);
  transform: translateX(-50%);
  display: flex;
  align-items: flex-start;
  gap: calc(var(--s) * 0.009);
}
.umschalter__wahl {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: var(--wahl);  /* bei kleiner Wand ist die Beschriftung breiter als das Symbol: nicht überlappen */
  color: #333;
  text-decoration: none;
}
.umschalter__wahl img {
  display: block;
  width: var(--wahl);
  height: var(--wahl);
  object-fit: cover;
  border: max(2px, calc(var(--s) * 0.003)) solid transparent;
  outline: 1px solid rgba(0, 0, 0, 0.18);
  transition: outline-color 0.2s ease;
}
.umschalter__wahl:hover img { outline-color: rgba(0, 0, 0, 0.5); }
.umschalter__wahl[aria-current] img { border-color: #fff; outline: 2px solid #333; }
.umschalter__wahl span {
  font-size: clamp(10px, calc(var(--s) * 0.0134), 14px);
  line-height: 1.2;
  white-space: nowrap;
}
.umschalter__wahl[aria-current] span { font-weight: 700; }
.umschalter__pfeil {
  flex: none;
  width: calc(var(--s) * 0.044);
  margin-top: calc((var(--wahl) - var(--s) * 0.0176) / 2);
}
/* Finger brauchen Fläche: Symbole mindestens 40 px auf Touch-Geräten */
@media (pointer: coarse) {
  .umschalter { --wahl: max(40px, calc(var(--s) * 0.078)); }
}

/* Übersicht: liegt als helle Tafel AUF der Wand, Wand mit „GALLERY WALL“, Schnee und Umschalter bleiben
   sichtbar (Hubertus' Vorschlag vom 20.11.2026). Erscheint und verschwindet weich statt hart. */
.werke {
  position: absolute;
  left: 11.5%;
  width: 77%;
  top: 14.9%;
  max-height: 64%;
  overflow-y: auto;
  padding: calc(var(--s) * 0.022) calc(var(--s) * 0.035);
  background: rgba(246, 245, 247, 0.96);
  box-shadow: 0 calc(var(--s) * 0.006) calc(var(--s) * 0.03) rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.985);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0s linear 0.45s;
}
.zeigt-werke .werke {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0s;
}
/* Niedrige Fenster (Telefon quer, kleiner Laptop): Wand unter 560 px, die Tafel darf dann
   über den Schriftzug reichen, sonst muss man in ihr blättern */
@media (max-height: 560px) and (min-width: 751px) {
  .werke { top: 3%; max-height: 79%; }
}
/* Letzte Reihe mittig wie in Hubertus' Vorschlag: Flex mit Umbruch statt Raster */
.werke ul {
  --spalt: calc(var(--s) * 0.025);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(var(--s) * 0.014) var(--spalt);
  margin: 0;
  padding: 0;
  list-style: none;
}
.werke li { width: calc((100% - 3 * var(--spalt)) / 4); min-width: 0; }
.werke__kachel {
  display: flex;
  flex-direction: column;
  gap: calc(var(--s) * 0.006);
  color: #333;
  text-decoration: none;
}
.werke__bild {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 4px;
  transition: transform 0.4s ease;
}
.werke__bild img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Überfahren wie in den Galerien: Schleier schwarz 30 %, leicht kleiner */
.werke__bild::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.werke__kachel:hover .werke__bild,
.werke__kachel:focus-visible .werke__bild { transform: scale(0.97); }
.werke__kachel:hover .werke__bild::after,
.werke__kachel:focus-visible .werke__bild::after { opacity: 1; }
.werke__name {
  font-size: clamp(10px, calc(var(--s) * 0.0135), 15px);
  line-height: 1.25;
  overflow-wrap: break-word;
}

@keyframes werke-ein { from { opacity: 0; } to { opacity: 1; } }
/* Safari auf dem iPhone: 100vh reicht unter die Werkzeugleiste. svh ist die sicher sichtbare Höhe,
   sonst sitzt der Umschalter im Querformat hinter der Leiste. */
@supports (height: 100svh) {
  .wand__flaeche { --s: min(100vw, 100svh); }
}

/* Telefon hochkant: Wand oben, Umschalter darunter; Übersicht in zwei Spalten über die volle Breite.
   In der Übersicht läuft der Umschalter unten am Bildrand mit (Daumen, wie im Entwurf; Holger 20.11.2026).
   Unten etwas Luft, falls Safaris schwebende Adressleiste den Rand überdeckt. */
@media (max-width: 750px) {
  .wand { height: auto; min-height: 100vh; min-height: 100svh; overflow: visible; }
  .wand__flaeche { height: auto; }
  .wand__bild { height: var(--s); }
  .js .schnee {
    position: relative;
    z-index: 2;
    height: auto;
    padding: 14px 0;
    background: #fff;
  }
  .js .zeigt-werke .schnee {
    position: sticky;
    bottom: 0;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);
  }
  .umschalter { --wahl: 52px; position: static; transform: none; justify-content: center; gap: 14px; }
  .umschalter__wahl span { font-size: 12px; }
  .umschalter__pfeil { width: 36px; margin-top: calc((52px - 14.4px) / 2); }

  /* Auf dem Telefon wäre die Tafel auf der kleinen Wand winzig: Übersicht hier als Liste, weich eingeblendet */
  .zeigt-werke .wand__bild { display: none; }
  .werke,
  .zeigt-werke .werke {
    position: static;
    width: auto;
    max-height: none;
    overflow: visible;
    padding: 20px 16px 8px;
    background: none;
    box-shadow: none;
    transform: none;
    transition: none;
  }
  .werke { display: none; }
  .zeigt-werke .werke { display: block; animation: werke-ein 0.45s ease; }
  .werke ul { --spalt: 12px; justify-content: flex-start; gap: 18px 12px; }
  .werke li { width: calc((100% - 12px) / 2); }
  .werke__kachel { gap: 6px; }
  .werke__name { font-size: 14px; }
}

/* ── Galerieseiten ────────────────────────────────────────────────── */
.galerieseite {
  display: grid;
  grid-template-columns: 58.5vw 36.1vw;
  column-gap: var(--rand);
  align-items: start;
  padding-left: var(--rand);
}
/* Anordnung je Galerie wie bei Wix (Raster, Masonry oder Collage): Wix rechnet die Kacheln
   für 1450 px Breite vor, hier stehen sie in Prozent (Positionen im style-Attribut).
   --flaeche = Höhe der Galerie im Verhältnis zur Breite. */
.galerie {
  position: relative;
  height: 0;
  margin: 0;
  padding: 0 0 var(--flaeche);
  list-style: none;
}
.galerie > li { position: absolute; }
.galerie__kachel {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.galerie__kachel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.galerie--einpassen .galerie__kachel img { object-fit: contain; }

/* Überfahren wie bei Wix: Schleier schwarz 30 %, Titel weiß 700 16/20 px mittig, Bild schrumpft leicht */
.galerie__kachel::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.galerie__titel {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.galerie__kachel:hover::after,
.galerie__kachel:focus-visible::after,
.galerie__kachel:hover .galerie__titel,
.galerie__kachel:focus-visible .galerie__titel { opacity: 1; }
.galerie__kachel:hover img,
.galerie__kachel:focus-visible img { transform: scale(0.97); }
.galerie__kachel:focus-visible { outline-offset: -4px; }

.galerieseite__text h1 {
  margin: 0 0 0.6vw;
  font-size: 3.28vw;
  line-height: 1;
  overflow-wrap: break-word;
  hyphens: auto;
}
.galerieseite__text p { margin: 0; }

/* Handy: Wix quetscht hier Text und Galerie nebeneinander (Galerie unsichtbar).
   Hier stattdessen untereinander, Überschrift mit Mindestgröße. */
@media (max-width: 750px) {
  .galerieseite {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
  .galerieseite__text { order: -1; margin-bottom: 20px; }
  .galerieseite__text h1 { font-size: 26px; margin-bottom: 8px; }
  /* Auf dem Telefon ein einfaches Zweierraster statt der Wix-Anordnung */
  .galerie {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    height: auto;
    padding: 0;
  }
  .galerie > li {
    position: static;
    width: auto !important;
    height: auto !important;
  }
  .galerie__kachel { aspect-ratio: var(--handy-verhaeltnis, 1); }
  .kopf { padding: 0 16px; }
}

/* ── Leuchtkasten (Lightbox), weiß wie bei Wix ───────────────────── */
.leuchtkasten {
  width: 100vw; height: 100vh;
  height: 100dvh;
  max-width: none; max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #fff;
  color: var(--schwarz);
}
.leuchtkasten::backdrop { background: #fff; }
.leuchtkasten[open] { display: flex; align-items: center; justify-content: center; }
.leuchtkasten__bild {
  max-width: calc(100vw - 160px);
  max-height: calc(100vh - 100px);
  max-height: calc(100dvh - 100px);
  object-fit: contain;
  user-select: none;
}
.leuchtkasten button {
  position: absolute;
  width: 48px; height: 48px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.leuchtkasten button::before {
  display: block;
  margin: auto;
  content: "";
  background: var(--schwarz);
  -webkit-mask: var(--symbol) center / contain no-repeat;
  mask: var(--symbol) center / contain no-repeat;
}
.leuchtkasten__zu { top: 20px; right: 20px; }
.leuchtkasten__zu::before {
  width: 22px; height: 22px;
  --symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 2l20 20M22 2L2 22' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E");
}
.leuchtkasten__voll { top: 20px; left: 20px; }
.leuchtkasten__voll::before {
  width: 18px; height: 18px;
  --symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Cpath d='M14 2h8v8M22 2l-9 9M10 22H2v-8M2 22l9-9'/%3E%3C/svg%3E");
}
.leuchtkasten__zurueck { left: 24px; top: calc(50% - 24px); }
.leuchtkasten__weiter { right: 24px; top: calc(50% - 24px); }
.leuchtkasten__zurueck::before,
.leuchtkasten__weiter::before {
  width: 14px; height: 26px;
  --symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 26' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Cpath d='M1 1l12 12L1 25'/%3E%3C/svg%3E");
}
.leuchtkasten__zurueck::before { transform: scaleX(-1); }
.leuchtkasten button[hidden] { display: none; }

@media (max-width: 750px) {
  /* Pfeile mittig an den Rändern statt unten: Unten liegt bei Safari die Adressleiste darüber
     und schneidet sie ab (Holgers iPhone, 20.11.2026) */
  .leuchtkasten__bild { max-width: 100vw; max-height: calc(100vh - 120px); max-height: calc(100dvh - 120px); }
  /* doppelte Klasse: schlägt .leuchtkasten button (Element + Klasse) */
  .leuchtkasten .leuchtkasten__zurueck, .leuchtkasten .leuchtkasten__weiter {
    top: calc(50% - 22px);
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
  }
  .leuchtkasten .leuchtkasten__zurueck { left: 8px; }
  .leuchtkasten .leuchtkasten__weiter { right: 8px; }
  .leuchtkasten__voll { display: none; }
}

/* ── Kontakt ──────────────────────────────────────────────────────── */
.kontakt {
  width: min(593px, calc(100vw - 32px));
  margin: 0 auto;
  padding-top: 18px;
}
.kontakt h1 { margin: 0 0 24px; font-size: 22px; line-height: 1.3; }
.kontakt__formular {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 38px;
}
.feld { display: flex; flex-direction: column; min-width: 0; }
.feld--breit { grid-column: 1 / -1; }
.feld label { margin-bottom: 8px; font-size: 14px; line-height: 1.4; color: var(--schwarz); }
.feld input, .feld textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--rahmen);
  border-radius: 1px;
  background: transparent;
  color: var(--schwarz);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
}
.feld textarea { min-height: 74px; resize: vertical; }
.feld--falle { position: absolute; left: -9999px; }
.kontakt__senden {
  justify-self: start;
  width: 285px;
  max-width: 100%;
  height: 41px;
  border: 0;
  background: var(--schwarz);
  color: #fff;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}
.kontakt__meldung { margin: 0 0 20px; padding: 10px 14px; border: 1px solid currentColor; }
.kontakt__meldung--fehler { color: #a00; }

@media (max-width: 750px) {
  .kontakt { padding-top: 24px; }
  .kontakt__formular { grid-template-columns: 1fr; }
  .kontakt__senden { width: 100%; }
}

/* ── Impressum, Datenschutz ──────────────────────────────────────── */
.rechtstext { padding: 0 var(--rand); }
.rechtstext p, .rechtstext ul { margin: 0; }
.rechtstext a { overflow-wrap: anywhere; }
/* Impressum steht bei Wix schmal und etwas eingerückt (x 179, Breite 576 bei 1024 px) */
.rechtstext--impressum { width: min(576px, 100%); margin-left: 17.5vw; padding: 0; }
.rechtstext--datenschutz { max-width: 1000px; }
/* Eigener Datenschutztext: Überschriften fett in Textgröße wie bei Wix, Abstand eine Leerzeile */
.rechtstext--datenschutz > * + * { margin-top: 0.95em; }
.rechtstext--datenschutz h1, .rechtstext--datenschutz h2, .rechtstext--datenschutz h3 { font: inherit; font-weight: 700; margin: 0; }
.rechtstext--datenschutz > h2 { margin-top: 1.9em; }
.rechtstext--datenschutz > h3 { margin-top: 1.4em; }
.rechtstext--datenschutz ul { padding-left: 1.5em; }
.rechtstext--datenschutz .rechtstext__stand { margin-top: 1.9em; }

@media (max-width: 750px) {
  .rechtstext, .rechtstext--impressum { margin-left: 0; padding: 0 16px; }
}

.vorschau-hinweis {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 2px solid #b00;
  color: #700;
  background: #fff4f4;
}

/* Wer im System weniger Bewegung eingestellt hat, bekommt die Übersicht ohne Überblendung */
@media (prefers-reduced-motion: reduce) {
  .werke, .zeigt-werke .werke { transition: none; animation: none; transform: none; }
}
