/* Gemeinsame Grundlage aller Versionen: Aufbau, Formular, Großansicht, Bewegung.
   Farben, Schriften und Layout stehen in der styles.css der jeweiligen Version. */

:root {
  --rand: clamp(1rem, 4vw, 3.5rem);
  /* Eine gemeinsame Kurve für alles, was erscheint oder reagiert: startet schnell, landet weich */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 1.125rem;
  line-height: 1.55;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; }

h1, h2, h3 {
  font-family: var(--schrift-titel);
  font-weight: var(--titel-gewicht, 700);
  font-stretch: var(--titel-breite, 100%);
  letter-spacing: var(--titel-laufweite, 0);
  line-height: 1.02;
  margin: 0;
}
p { margin: 0; }

.innen { max-width: var(--breite, 76rem); margin-inline: auto; padding-inline: var(--rand); }
.nur-vorleser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
section[id] { scroll-margin-top: 4.5rem; }

/* ---------- Kopf ---------- */
.kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1rem; }
.marke { display: flex; align-items: center; gap: 0.75rem; font-family: var(--schrift-titel); font-weight: 700; font-size: 1.3rem; line-height: 1.1; text-decoration: none; }
.marke img { width: 3rem; height: auto; flex: none; transition: width 0.3s var(--ease-out); }
.marke small { display: block; font-family: var(--schrift); font-weight: 400; font-size: 0.8125rem; letter-spacing: 0; }
.kopf nav ul { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.kopf nav a {
  text-decoration: none; padding-block: 0.4rem; display: inline-block;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.2s var(--ease-out);
}
.kopf nav a:hover, .kopf nav a:focus-visible { background-size: 100% 2px; }
.kopf nav .telefon { font-weight: 700; }

.kopfleiste {
  position: absolute; inset: 0 0 auto 0; z-index: 20;
  background: var(--leiste-grund-start, transparent);
  color: var(--leiste-text-start, inherit);
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.kopfleiste .kopf { transition: padding 0.3s var(--ease-out); }
@media (min-width: 54.01rem) {
  .kopfleiste { position: fixed; }
  .kopfleiste.gescrollt {
    background: var(--leiste-grund);
    color: var(--leiste-text);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px -20px rgba(0, 0, 0, 0.55);
  }
  .kopfleiste.gescrollt .kopf { padding-block: 0.55rem; }
  .kopfleiste.gescrollt .marke img { width: 2.4rem; }
}

/* ---------- Knöpfe ---------- */
.aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.knopf {
  display: inline-block; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  padding: 0.8rem 1.4rem;
  border: 2px solid var(--knopf-rand, transparent);
  border-radius: var(--radius, 0);
  background: var(--knopf-grund); color: var(--knopf-text);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.16s var(--ease-out);
}
.knopf:hover { background: var(--knopf-grund-aktiv); color: var(--knopf-text-aktiv); border-color: var(--knopf-grund-aktiv); }
.knopf:active { transform: scale(0.97); }
.knopf[disabled] { opacity: 0.6; cursor: progress; }

.anschrift { font-style: normal; }
.anschrift p + p { margin-top: 0.75rem; }

/* ---------- Galerie und Großansicht ---------- */
.galerie { list-style: none; margin: 0; padding: 0; }
.galerie figure { position: relative; margin: 0; height: 100%; }
.bild { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #ccd6e0; cursor: zoom-in; overflow: hidden; border-radius: var(--radius, 0); font: inherit; }
.bild img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s var(--ease-out); }
.bild:focus-visible img { transform: scale(1.03); }
/* Hover-Bewegung nur mit echter Maus: auf dem Handy bliebe der Zoom nach dem Antippen hängen */
@media (hover: hover) and (pointer: fine) { .bild:hover img { transform: scale(1.03); } }
/* ---------- Fuß ---------- */
.fuss { background: var(--fuss-grund); color: var(--fuss-text); font-size: 0.9375rem; }
.fuss .innen { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.5rem; }
.fuss ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }

/* ---------- Rechtstexte ---------- */
.rechtstext { padding-block: clamp(2rem, 6vw, 4rem) clamp(3rem, 8vw, 6rem); }
.rechtstext h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); margin-bottom: 2rem; hyphens: auto; }
.rechtstext h2 { font-size: 1.6rem; margin: 2.5rem 0 0.75rem; color: var(--zwischentitel, inherit); }
.rechtstext p, .rechtstext ul { max-width: 44rem; margin-block: 0 0.9rem; }
.rechtstext ul { padding-left: 1.2rem; }
.rechtstext mark { background: #9fd2f7; color: #0d2242; padding: 0 0.25em; }

/* ---------- Bewegung ---------- */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
::view-transition-old(root) { animation: 0.25s ease both seite-raus; }
::view-transition-new(root) { animation: 0.35s ease both seite-rein; }
@keyframes seite-raus { to { opacity: 0; } }
@keyframes seite-rein { from { opacity: 0; transform: translateY(10px); } }
::view-transition-group(foto) { animation-duration: 0.4s; animation-timing-function: var(--ease-out); }

.gleit {
  opacity: 0;
  transform: translate(var(--dx, 0), var(--dy, 1rem));
  transition: opacity 0.5s ease-out, transform 0.6s var(--ease-out);
  transition-delay: var(--verz, 0s);
}
.gleit.von-links { --dx: -1.5rem; --dy: 0; }
.gleit.von-rechts { --dx: 1.5rem; --dy: 0; }
.gleit.sichtbar { opacity: 1; transform: none; }

.wort { display: inline-block; overflow: hidden; padding-block: 0.14em; margin-block: -0.14em; vertical-align: top; }
.wort > span { display: inline-block; transform: translateY(118%); animation: wort-auf 0.7s var(--ease-out) both; animation-delay: calc(0.1s + var(--i) * 0.05s); }
@keyframes wort-auf { to { transform: none; } }
/* Unterzeile und Anruf-Knopf folgen der Überschrift dicht: nach 0,5 s ist der Knopf bedienbar */
.nachzug { animation: nachzug 0.6s var(--ease-out) 0.4s both; }
.nachzug + .nachzug { animation-delay: 0.48s; }
@keyframes nachzug { from { opacity: 0; transform: translateY(1rem); } }

/* Animationen im Betriebssystem abgeschaltet: nur sanft einblenden */
html.ruhig { scroll-behavior: auto; }
html.ruhig .nachzug, html.ruhig .bewegt { animation: none !important; }
html.ruhig .gleit { transform: none; transition: opacity 0.4s ease; transition-delay: var(--verz, 0s); }
html.ruhig .bild:hover img, html.ruhig .knopf:active { transform: none; }
html.ruhig::view-transition-group(*), html.ruhig::view-transition-old(*), html.ruhig::view-transition-new(*) { animation: none !important; }

