/* =====================================================================
   Segelmanufaktur — gemeinsames Stylesheet (Entwurf Oktober 2026)
   Rein statisch: keine externen Schriften, keine Frameworks, kein JS.
   Akzentfarben = die Regenbogenfarben der Sonne aus dem Logo
   (Pixelwerte aus bilder/logo.png abgelesen).
   ===================================================================== */

:root {
  color-scheme: light;

  /* Sonnenfarben aus dem Logo */
  --rot: #e40210;
  --orange: #f07e00;
  --gelb: #feec00;
  --gruen: #17a02c;
  --blau: #26348c;
  --violett: #5d2683;
  --magenta: #de026e;
  --regenbogen: linear-gradient(90deg,
      var(--rot), var(--orange), var(--gelb), var(--gruen),
      var(--blau), var(--violett), var(--magenta));

  /* Grundtöne */
  --papier: #ffffff;
  --grund: #faf8f4;         /* heller, warmer Seitenhintergrund */
  --text: #1d1d1f;
  --text-2: #55585e;
  --linie: #e6e2da;
  --link: #26348c;
  --link-hover: #5d2683;

  --schrift: "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto,
             "Helvetica Neue", Arial, sans-serif;
  --breite: 1020px;
  --rand: 16px;
  --radius: 10px;
}

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

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.65;
  /* Fußbereich auch bei kurzen Seiten am unteren Rand */
  display: flex; flex-direction: column; min-height: 100vh;
}
body > .seite { flex: 1 0 auto; }

img { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--blau); outline-offset: 3px; border-radius: 3px; }

.rahmen {
  width: 100%;
  max-width: var(--breite);
  margin: 0 auto;
  padding: 0 var(--rand);
}

/* Nur für Screenreader sichtbar */
.nur-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.sprung {
  position: absolute; left: var(--rand); top: -60px; z-index: 200;
  background: var(--blau); color: #fff; padding: 8px 14px; border-radius: 6px;
}
.sprung:focus { top: 8px; color: #fff; }

/* ---------- Kopfbereich mit Logo (wie im Original oben) ---------- */

.kopf { background: var(--papier); }
.kopf .rahmen { padding-top: 18px; padding-bottom: 14px; }
.kopf a { display: block; width: fit-content; line-height: 0; }
/* Logo = Davids Datei „Schriftzug" (Sonne direkt neben dem Schriftzug),
   1303×216 px für hochauflösende Bildschirme, angezeigt mit 108 px Höhe;
   auf kleinen Bildschirmen proportional verkleinert. */
.kopf img { display: block; width: 652px; max-width: 100%; height: auto; }

/* Ruhige Fassung (24.10.2026, Davids Feedback „Regenbogen zu kitschig"):
   die Sonne im Logo bleibt der einzige Farbtupfer. */
.regenbogen { height: 1px; background: var(--linie); }

/* ---------- Bilderband unter dem Logo (wie die Diashow im Original) ----------
   Nur CSS, kein JavaScript. Takt wie im Original: 5 s stehen, 2 s überblenden
   → 7 s je Bild, 9 Bilder = 63 s Umlauf.
   Bild 1 liegt fest unten. Bild 2–8 blenden nacheinander darüber ein und
   verschwinden erst, wenn das nächste ganz eingeblendet ist (so wird das Bild
   beim Überblenden nicht flau). Bild 9 blendet am Ende aus und gibt Bild 1 frei.
   Verzögerung je Bild n: (n−1)·7 s − 2 s. */
.kopf .band { padding-top: 0; padding-bottom: 16px; }
.band div {
  position: relative; overflow: hidden;
  aspect-ratio: 958 / 219;
  border-radius: 6px;
  background: var(--linie);
}
.band img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
}
.band img:first-child { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .band img + img { animation: band-ein 63s linear infinite; }
  .band img:last-child { animation-name: band-letztes; }
  .band img:nth-child(2) { animation-delay: 5s; }
  .band img:nth-child(3) { animation-delay: 12s; }
  .band img:nth-child(4) { animation-delay: 19s; }
  .band img:nth-child(5) { animation-delay: 26s; }
  .band img:nth-child(6) { animation-delay: 33s; }
  .band img:nth-child(7) { animation-delay: 40s; }
  .band img:nth-child(8) { animation-delay: 47s; }
  .band img:nth-child(9) { animation-delay: 54s; }
  @keyframes band-ein {
    0%      { opacity: 0; }
    3.175%  { opacity: 1; }   /* 2 s einblenden */
    14.286% { opacity: 1; }   /* stehen, bis das nächste ganz da ist (9 s) */
    14.3%   { opacity: 0; }
    100%    { opacity: 0; }
  }
  @keyframes band-letztes {
    0%      { opacity: 0; }
    3.175%  { opacity: 1; }   /* 2 s einblenden */
    11.111% { opacity: 1; }   /* 5 s stehen */
    14.286% { opacity: 0; }   /* 2 s ausblenden → Bild 1 darunter */
    100%    { opacity: 0; }
  }
}

/* ---------- Hauptmenü ---------- */

.menue { background: var(--papier); border-bottom: 1px solid var(--linie); }
.menue ul {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 2px 6px;
  margin: 0 auto; padding: 6px var(--rand);
  max-width: var(--breite);
  list-style: none;
}
.menue li:nth-child(1) { --farbe: var(--rot); }
.menue li:nth-child(2) { --farbe: var(--orange); }
.menue li:nth-child(3) { --farbe: var(--gruen); }
.menue li:nth-child(4) { --farbe: var(--blau); }
.menue li:nth-child(5) { --farbe: var(--violett); }
.menue a {
  display: block;
  padding: 10px 14px 8px;
  border-bottom: 3px solid transparent;
  color: var(--text);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.menue a:hover { border-bottom-color: var(--linie); color: var(--text); }
.menue a[aria-current="page"] { border-bottom-color: var(--text); font-weight: 600; }

/* ---------- Seitenaufbau: Inhalt + Kontaktspalte rechts ---------- */

.seite { padding-top: 36px; padding-bottom: 56px; }
@media (min-width: 880px) {
  .seite {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 44px;
    align-items: start;
  }
}

main { min-width: 0; }

h1, h2, h3 { line-height: 1.25; font-weight: 600; color: var(--text); }
h1 { font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.25rem); margin: 0 0 18px; }
h2 { font-size: 1.4rem; margin: 44px 0 12px; }
h3 { font-size: 1.08rem; margin: 0 0 10px; }
p { margin: 0 0 14px; }
.einleitung { font-size: 1.15rem; color: var(--text); max-width: 62ch; }
.text { max-width: 62ch; }

/* ---------- Startseite ---------- */

.leitsaetze { text-align: center; padding: 8px 0 28px; }
.leitsatz {
  font-size: clamp(1.25rem, 1.05rem + 1vw, 1.6rem);
  line-height: 1.45;
  margin: 0 auto 18px;
  max-width: 30ch;
}
.leitsatz:last-child { margin-bottom: 0; }

.karten {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin: 24px 0 0; padding: 0; list-style: none;
}
.karte {
  display: block; height: 100%;
  background: var(--papier);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}
.karte:hover { color: var(--text); box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px); }
.karte img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.karte-text { display: block; padding: 14px 16px 16px; border-top: 1px solid var(--linie); }
.karte-titel { display: block; font-weight: 600; font-size: 1.15rem; margin-bottom: 4px; }
.karte-satz { display: block; color: var(--text-2); font-size: 0.98rem; line-height: 1.5; }
.karte-segel { --farbe: var(--orange); }
.karte-zelte { --farbe: var(--gruen); }
.karte-miete { --farbe: var(--blau); }

/* ---------- Bildergalerien ---------- */

.galerie { margin: 30px 0 0; scroll-margin-top: 16px; }
.galerie-titel { font-size: 1.08rem; margin: 0 0 10px; color: var(--text-2); font-weight: 500; }
.raster {
  display: grid; gap: 10px;
  /* Bilder je Reihe wie im Original: 3 (Sonnensegel, Zelte), auf der
     Vermietungsseite 4 nebeneinander (.raster-4; auf dem Handy 2 × 2).
     minmax(0, 1fr): lange Bildtexte dürfen die Spalten nicht verbreitern. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0; padding: 0; list-style: none;
}
.raster-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) {
  .raster-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 599px) {
  .raster { gap: 8px; }
}
.video { margin: 18px 0 0; max-width: 640px; }
.video-start, .video iframe {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9; border: 0; border-radius: 8px; overflow: hidden;
  background: #000; line-height: 0;
}
.video img { width: 100%; height: 100%; object-fit: cover; }
.video-knopf {
  position: absolute; left: 50%; top: 50%; width: 68px; height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 12px; background: rgba(20, 20, 24, 0.78);
}
.video-knopf::after {
  content: ""; position: absolute; left: 27px; top: 14px;
  border-style: solid; border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent #fff;
}
.video-start:hover .video-knopf, .video-start:focus-visible .video-knopf { background: rgba(20, 20, 24, 0.92); }
.video figcaption { margin-top: 8px; font-size: 0.95rem; color: var(--text-2); line-height: 1.5; }
.raster a { display: block; border-radius: 8px; overflow: hidden; background: var(--linie); line-height: 0; }
.raster img {
  display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover;
  transition: transform .3s ease;
}
.raster a:hover img { transform: scale(1.04); }
.raster figcaption, .bild-text {
  display: block; font-size: 0.9rem; line-height: 1.4; color: var(--text-2);
  margin-top: 6px;
}

/* Lightbox ohne JavaScript: Klick aufs Vorschaubild setzt den Anker,
   :target blendet das große Bild ein; „Schließen“ springt zurück zur Galerie. */
.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 100;
  background: rgba(14, 14, 18, 0.93);
  align-items: center; justify-content: center;
  padding: 56px 64px 24px;
}
.lightbox:target { display: flex; }
@media (prefers-reduced-motion: no-preference) {
  .lightbox:target { animation: einblenden .18s ease-out; }
  @keyframes einblenden { from { opacity: 0; } to { opacity: 1; } }
}
body:has(.lightbox:target) { overflow: hidden; }

.lb-hintergrund { position: absolute; inset: 0; }
.lightbox figure { position: relative; margin: 0; text-align: center; }
.lightbox img {
  display: block; margin: 0 auto;
  width: auto; height: auto;
  max-width: 100%; max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px);
  border-radius: 4px; background: #222;
}
.lightbox figcaption { color: #f2f2f2; font-size: 0.95rem; margin-top: 12px; line-height: 1.45; }
.lightbox figcaption .zaehler { color: #b8b8b8; white-space: nowrap; }

.lb-knopf {
  position: absolute; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff; text-decoration: none; font-size: 1.6rem; line-height: 1;
}
.lb-knopf:hover { background: rgba(255,255,255,.25); color: #fff; }
.lb-zu { top: 8px; right: 10px; font-size: 1.4rem; }
.lb-zurueck { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-weiter { right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 599px) {
  .lightbox { padding: 60px 8px 76px; }
  .lb-zurueck, .lb-weiter { top: auto; bottom: 14px; transform: none; }
  .lb-zurueck { left: calc(50% - 60px); }
  .lb-weiter { right: calc(50% - 60px); }
}

/* ---------- Kontaktspalte (wie die rechte Spalte im Original) ---------- */

.kontakt {
  background: var(--papier);
  position: relative;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 22px 20px 20px;
  margin-top: 40px;
  font-size: 0.98rem;
  line-height: 1.55;
}
@media (min-width: 880px) {
  .kontakt { margin-top: 6px; position: sticky; top: 20px; }
}
.kontakt h2 { font-size: 1.05rem; margin: 0 0 10px; }
.kontakt address { font-style: normal; margin: 0 0 12px; }
.kontakt p { margin: 0 0 6px; }
.kontakt .ust { color: var(--text-2); font-size: 0.9rem; margin-top: 12px; }
.kontakt a { overflow-wrap: anywhere; }

/* ---------- Hinweiskästen (Entwurf/Platzhalter) ---------- */

.hinweis {
  border: 2px solid var(--orange);
  background: #fff6ea;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 28px;
}
.hinweis strong:first-child { display: block; font-size: 1.1rem; margin-bottom: 6px; color: #8a3f00; }
.hinweis p:last-child, .hinweis ul:last-child { margin-bottom: 0; }
.hinweis ul { margin: 6px 0 0; padding-left: 1.2em; }

.platzhalter {
  border: 2px dashed var(--text-2);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  color: var(--text-2);
  font-size: 1.15rem;
  background: var(--papier);
}

/* ---------- Impressum ---------- */

.rechtstext { max-width: 70ch; }
.rechtstext h2 { font-size: 1.2rem; margin-top: 32px; }
.rechtstext h3 { margin-top: 20px; }
.rechtstext address { font-style: normal; margin-bottom: 14px; }
.angaben { margin: 0 0 14px; }
.angaben dt { font-weight: 600; margin-top: 12px; }
.angaben dd { margin: 2px 0 0; }
.klein { font-size: 0.9rem; color: var(--text-2); }

/* ---------- Fußbereich ---------- */

.fuss { background: var(--papier); border-top: 1px solid var(--linie); }
.fuss .rahmen {
  display: flex; flex-wrap: wrap; gap: 8px 28px;
  justify-content: space-between; align-items: baseline;
  padding-top: 22px; padding-bottom: 26px;
  font-size: 0.92rem; color: var(--text-2);
}
.fuss p { margin: 0; }
.fuss nav a { margin-right: 18px; }
.fuss nav a:last-child { margin-right: 0; }
.raster figure { margin: 0; }
.platzhalter strong { display: block; color: var(--text); }
.platzhalter p { margin: 8px 0 0; }
