/* Villa Schwalbe – Grundlagen: Farben, Schrift, Kopf, Wasser, Fuß */

:root {
  /* Original-Farben der Villa Schwalbe */
  --tuerkis: #1cbac8;
  --weiss: #ffffff;
  --flaeche: #f6f6f6;
  --linie: #e0e0e0;
  --text-kopf: #393939;
  --text: #555555;

  /* Wasser: vom Tiefen ins Flache */
  --petrol-tief: #083f4d;
  --petrol: #0d6676;
  --petrol-mitte: #13919f;
  --petrol-hell: #107a89;
  /* Ostsee (aus dem Warnemünde-Foto abgeleitet): blaue Tiefe, grünliches Ufer */
  --see-tief: #093d58;
  --see-blau: #0b4c6c;
  --see-mitte: #0f6470;
  --see-ufer: #1f8478;
  --see-flach: #5aa79a;
  --see-gischt: #d6ebe5;
  --see-hell: #eef6f3;
  --aqua: #79d6dd;
  --mint: #c8f1e6;
  --flach: #e9faf5;
  --tinte: #0a3b46;

  /* Zweitfarben (gemessen an der alten Startseite), nur als Seiten-Code */
  --see: #79d6dd;
  --sued: #adc16a;
  --west: #c27295;
  --see-text: #17707a;
  --sued-text: #5b6b22;
  --west-text: #8a3d60;

  --font-kopf: "Alegreya Sans", "Mulish", system-ui, sans-serif;
  --font-text: "Mulish", system-ui, sans-serif;

  --text-basis: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-gross: clamp(1.08rem, 1rem + 0.4vw, 1.22rem);
  --h1: clamp(2.6rem, 1.4rem + 4.6vw, 5.4rem);
  --h1-band: clamp(2.3rem, 1.5rem + 3vw, 4rem);
  --h2: clamp(1.95rem, 1.4rem + 2vw, 3.1rem);
  --h3: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);

  --rand: clamp(1rem, 4vw, 3rem);
  --breite: 1320px;
  --abschnitt: clamp(4rem, 3rem + 5vw, 8rem);
  --radius: 16px;
  --radius-klein: 10px;
  --schatten: 0 18px 40px -20px rgba(8, 63, 77, 0.42), 0 2px 6px rgba(8, 63, 77, 0.07);
  --schatten-leicht: 0 10px 26px -18px rgba(8, 63, 77, 0.45);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --kopf-hoehe: 88px;
}

/* ---------- Grundlage ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--kopf-hoehe) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  background: var(--weiss);
  color: var(--text);
  font: 400 var(--text-basis)/1.65 var(--font-text);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--petrol); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--petrol-tief); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-kopf); color: var(--text-kopf); font-weight: 500; line-height: 1.08; text-wrap: balance; }
h2 { font-size: var(--h2); letter-spacing: -0.01em; }
h3 { font-size: var(--h3); line-height: 1.2; }
p { text-wrap: pretty; }
strong { color: var(--text-kopf); font-weight: 700; }
::selection { background: var(--aqua); color: var(--tinte); }
:focus-visible { outline: 3px solid var(--tuerkis); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: #b9dfe2 var(--weiss); }

.icon { width: 1.15em; height: 1.15em; flex: none; }
.wrap { max-width: var(--breite); margin-inline: auto; padding-inline: var(--rand); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: fixed; left: 1rem; top: -4rem; z-index: 100;
  background: var(--weiss); color: var(--tinte); padding: .7rem 1rem; border-radius: 10px; font-weight: 700;
  box-shadow: var(--schatten); transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.abschnitt { padding-block: var(--abschnitt); }
.abschnitt-kopf { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.abschnitt-kopf p { margin-top: 1rem; font-size: var(--text-gross); max-width: 40rem; }
.text-gross { font-size: var(--text-gross); }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .85rem 1.5rem; border-radius: 999px; border: 0;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  background: var(--petrol); color: var(--weiss);
  transition: background-color .3s var(--ease-out), transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.knopf:hover { background: var(--petrol-tief); color: var(--weiss); }
.knopf:active { transform: translateY(1px); }
.knopf .icon { transition: transform .35s var(--ease-out); }
.knopf:hover .icon-pfeil { transform: translateX(3px); }
.knopf--hell { background: var(--weiss); color: var(--tinte); box-shadow: var(--schatten-leicht); }
.knopf--hell:hover { background: var(--flach); color: var(--tinte); }
.knopf--rand { background: transparent; color: var(--petrol); box-shadow: inset 0 0 0 1.5px currentColor; }
.knopf--rand:hover { background: var(--flach); color: var(--petrol-tief); }
.link-pfeil { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; text-decoration: none; }
.link-pfeil:hover .icon { transform: translateX(3px); }
.link-pfeil .icon { transition: transform .35s var(--ease-out); }

/* ---------- Kopfzeile ---------- */
.kopf {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  color: var(--weiss);
  transition: background-color .4s var(--ease-out), box-shadow .4s var(--ease-out), color .4s var(--ease-out);
}
.kopf-innen {
  max-width: var(--breite); margin-inline: auto; padding-inline: var(--rand);
  height: var(--kopf-hoehe); display: flex; align-items: center; gap: 2rem;
}
.marke { display: block; flex: none; }
.marke img { height: 56px; width: auto; }
.hauptmenue { margin-left: auto; }
.hauptmenue ul { list-style: none; padding: 0; display: flex; gap: clamp(1rem, 2vw, 1.9rem); }
.hauptmenue a {
  color: inherit; text-decoration: none; font-weight: 600; font-size: .98rem;
  padding-block: .35rem; border-bottom: 1.5px solid transparent;
  transition: border-color .3s var(--ease-out);
}
.hauptmenue a:hover { border-color: currentColor; color: inherit; }
.hauptmenue a[aria-current="page"] { border-color: currentColor; }
.kopf-tel {
  display: inline-flex; align-items: center; gap: .55rem; flex: none;
  min-height: 48px; padding: .55rem 1.15rem; border-radius: 999px;
  color: inherit; text-decoration: none; font-weight: 700; font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38);
  transition: background-color .3s var(--ease-out);
}
.kopf-tel:hover { background: rgba(255, 255, 255, .24); color: inherit; }
.menue-knopf { display: none; }

.kopf.ist-gescrollt { background: rgba(255, 255, 255, .97); color: var(--tinte); box-shadow: inset 0 -3px 0 var(--tuerkis), 0 10px 30px -24px rgba(8, 63, 77, .5); }
.kopf.ist-gescrollt .kopf-tel { background: var(--petrol); color: var(--weiss); box-shadow: none; }
.kopf.ist-gescrollt .kopf-tel:hover { background: var(--petrol-tief); }

@media (max-width: 980px) {
  :root { --kopf-hoehe: 72px; }
  .marke img { height: 44px; }
  .kopf-innen { gap: .6rem; }
  .kopf-tel { margin-left: auto; padding: .55rem; width: 48px; justify-content: center; }
  .kopf-tel span { display: none; }
  .menue-knopf {
    display: inline-flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 999px; border: 0; cursor: pointer;
    background: transparent; color: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38);
  }
  .kopf.ist-gescrollt .menue-knopf { box-shadow: inset 0 0 0 1px var(--linie); }
  .hauptmenue {
    position: fixed; inset: var(--kopf-hoehe) 0 auto 0; margin: 0;
    background: var(--weiss); color: var(--tinte);
    padding: 1rem var(--rand) 1.6rem; box-shadow: 0 24px 40px -24px rgba(8, 63, 77, .5);
    border-top: 1px solid var(--linie);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), visibility 0s .3s;
  }
  .kopf.menue-offen { background: var(--weiss); color: var(--tinte); box-shadow: inset 0 -3px 0 var(--tuerkis); }
  .kopf.menue-offen .menue-knopf { box-shadow: inset 0 0 0 1px var(--linie); }
  .kopf.menue-offen .kopf-tel { background: var(--petrol); color: var(--weiss); box-shadow: none; }
  .kopf.menue-offen .hauptmenue { transform: none; opacity: 1; visibility: visible; transition-delay: 0s; }
  .hauptmenue ul { flex-direction: column; gap: 0; }
  .hauptmenue a { display: flex; padding: .95rem 0; border-bottom: 1px solid var(--linie); font-size: 1.12rem; }
  .hauptmenue li:last-child a { border-bottom: 0; }
  .hauptmenue a[aria-current="page"] { color: var(--petrol); border-color: var(--linie); }
}

/* ---------- Wasser ---------- */
.wasser {
  position: relative; isolation: isolate; overflow: hidden;
  color: var(--weiss);
  padding-top: var(--kopf-hoehe);
  background:
    radial-gradient(120% 70% at 85% 105%, rgba(238, 246, 243, .8) 0%, rgba(238, 246, 243, 0) 55%),
    linear-gradient(178deg, var(--see-tief) 0%, var(--see-blau) 24%, var(--see-mitte) 50%, var(--see-ufer) 66%, var(--see-flach) 80%, var(--see-gischt) 93%, var(--see-hell) 100%);
}
.wasser h1, .wasser h2 { color: var(--weiss); }
.wasser--band {
  padding-bottom: 7.5rem;
  background:
    linear-gradient(to top, var(--see-gischt) 0, var(--see-flach) 34px, var(--see-ufer) 70px, var(--see-mitte) 110px, var(--see-blau) 55%, var(--see-tief) 100%);
}
.band-inhalt { max-width: var(--breite); margin-inline: auto; padding: clamp(1.6rem, 3.5vw, 2.8rem) var(--rand) 0; position: relative; z-index: 1; }
.band-inhalt h1 { font-size: var(--h1-band); letter-spacing: -0.012em; max-width: 18ch; }
.band-inhalt p { margin-top: 1rem; max-width: 40rem; font-size: var(--text-gross); color: rgba(255, 255, 255, .93); }

.ufer { position: absolute; left: 0; right: 0; bottom: -1px; height: clamp(60px, 9vw, 130px); z-index: 0; pointer-events: none; }
.ufer svg { width: 100%; height: 100%; }
[data-bewegung] .ufer .gischt { animation: atmen 6s ease-in-out infinite alternate; }
[data-bewegung] .ufer .gischt + .gischt { animation-duration: 7.5s; animation-delay: -2s; }
@keyframes atmen { from { transform: translateY(0); } to { transform: translateY(9px); } }

.bewegung-aus .gischt, .wasser.ist-unsichtbar .gischt { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .gischt { animation: none !important; }
  .bewegung-knopf { display: none !important; }
}
.bewegung-knopf {
  position: fixed; z-index: 45; left: 1rem; bottom: 1rem; box-shadow: 0 6px 18px -10px rgba(8, 63, 77, .5);
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 40px; padding: .4rem .85rem; border: 0; border-radius: 999px; cursor: pointer;
  font-size: .82rem; font-weight: 700; color: var(--tinte);
  background: rgba(255, 255, 255, .7); backdrop-filter: blur(6px);
  transition: background-color .3s var(--ease-out);
}
.bewegung-knopf:hover { background: var(--weiss); }
.bewegung-knopf .icon { width: 1rem; height: 1rem; }

/* ---------- Schlussband (Kontakt) ---------- */
.schluss { padding: clamp(3rem, 5vw, 4.5rem) 0 clamp(4.5rem, 8vw, 7rem); background:
  linear-gradient(180deg, var(--see-hell) 0, var(--see-flach) 40px, var(--see-ufer) 80px, var(--see-mitte) 130px, var(--see-blau) 230px, var(--see-tief) 100%); position: relative; overflow: hidden; isolation: isolate; color: var(--weiss); }
.schluss .ufer-oben { position: absolute; top: -1px; left: 0; right: 0; height: clamp(50px, 7vw, 100px); }
.schluss .ufer-oben svg { width: 100%; height: 100%; }
.schluss-inhalt { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2.5rem 4rem; align-items: end; padding-top: 6rem; }
.schluss h2 { color: var(--weiss); font-size: clamp(2.2rem, 1.4rem + 3vw, 4.2rem); max-width: 14ch; }
.schluss p { margin-top: 1rem; color: rgba(255, 255, 255, .93); max-width: 34rem; font-size: var(--text-gross); }
.schluss-kontakt { display: grid; gap: .8rem; }
.schluss-kontakt a {
  display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; border-radius: var(--radius);
  background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
  color: var(--weiss); text-decoration: none; transition: background-color .3s var(--ease-out);
}
.schluss-kontakt a:hover { background: rgba(255, 255, 255, .2); color: var(--weiss); }
.schluss-kontakt .icon { width: 1.5rem; height: 1.5rem; }
.schluss-kontakt small { display: block; font-size: .85rem; opacity: .85; }
.schluss-kontakt b { font-size: clamp(1.1rem, 1rem + .6vw, 1.45rem); font-variant-numeric: tabular-nums; }
.schluss-kontakt .anfrage-link { background: var(--weiss); color: var(--tinte); box-shadow: none; }
.schluss-kontakt .anfrage-link:hover { background: var(--flach); color: var(--tinte); }
.schluss-kontakt .anfrage-link .icon-pfeil { margin-left: auto; }

/* ---------- Fuß ---------- */
.fuss { background: var(--flaeche); color: var(--text); padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; font-size: .96rem; }
.fuss-raster { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 2rem 3rem; }
.fuss img { height: 52px; width: auto; margin-bottom: 1rem; }
.fuss h2 { font-size: 1.15rem; margin-bottom: .7rem; }
.fuss ul { list-style: none; padding: 0; display: grid; gap: .4rem; }
.fuss a { color: var(--text-kopf); text-decoration: none; }
.fuss a:hover { color: var(--petrol); text-decoration: underline; }
.fuss address { font-style: normal; }
.fuss-unten { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--linie); display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: space-between; font-size: .86rem; }

/* ---------- Handy-Kontaktleiste ---------- */
.handyleiste { display: none; }
@media (max-width: 760px) {
  body { padding-bottom: 76px; }
  .handyleiste {
    display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--linie);
  }
  .handyleiste a {
    display: flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: 50px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: .95rem;
    background: var(--flaeche); color: var(--tinte);
  }
  .handyleiste .anfragen { background: var(--petrol); color: var(--weiss); }
  .bewegung-knopf { bottom: calc(84px + env(safe-area-inset-bottom)); left: .75rem; }
  /* Solange das Anfrageformular im Startbild zu sehen ist, macht die Leiste ihm Platz (main.js) */
  .handyleiste { transition: transform .35s var(--ease-out), visibility 0s; }
  .handyleiste.ist-versteckt { transform: translateY(110%); visibility: hidden; transition: transform .35s var(--ease-out), visibility 0s .35s; }
  .bewegung-knopf { transition: opacity .3s, visibility 0s; }
  body:has(.handyleiste.ist-versteckt) .bewegung-knopf { opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
}

/* ---------- Platzhalter-Kennzeichnung ---------- */
.platzhalter-marke {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .76rem; font-weight: 700; color: var(--tinte);
  background: rgba(255, 255, 255, .92); padding: .25rem .6rem; border-radius: 999px;
}
.hinweis-bestaetigen {
  display: inline-flex; align-items: baseline; gap: .3rem;
  font-size: .82rem; font-weight: 600; color: var(--west-text);
}
.bild { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--flaeche); }
.bild img { width: 100%; height: 100%; object-fit: cover; }
.bild .platzhalter-marke { position: absolute; left: .8rem; bottom: .8rem; }

@media (max-width: 900px) {
  .schluss-inhalt { grid-template-columns: 1fr; }
  .fuss-raster { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .fuss-raster { grid-template-columns: 1fr; }
}

/* ---------- Datumsfelder ---------- */
.datum-feld { position: relative; display: block; }
.datum-anzeige {
  display: none; position: absolute; top: 0; bottom: 0; left: var(--datum-einzug, 0); right: var(--datum-rechts, 0); padding-right: 1.9rem;
  background: url("../img/kalender.svg") right center / 20px no-repeat;
  align-items: center; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-weight: 600; color: var(--tinte); font-variant-numeric: tabular-nums;
}
.datum-anzeige.ist-leer { color: #5f6b6d; font-weight: 500; }
.zeigt-anzeige .datum-anzeige { display: flex; }
/* Das echte Feld wird ganz ausgeblendet (Firefox zeigt sonst „TT.MM.JJJJ“ durch); Kästchen und Rahmen zeichnet die Hülle */
.zeigt-anzeige input { opacity: 0; }
.datum-feld input { display: block; }
input[type="date"]::-webkit-calendar-picker-indicator {
  width: 20px; height: 20px; cursor: pointer; opacity: 1; color: transparent;
  background: url("../img/kalender.svg") center / 20px no-repeat;
}

input[type="date"] { min-width: 0; max-width: 100%; }
input[type="date"]::-webkit-calendar-picker-indicator { margin: 0; }

@media (max-width: 760px) {
  .bewegung-knopf { left: auto; right: .75rem; width: 40px; height: 40px; min-height: 40px; padding: 0; justify-content: center; opacity: .85; }
  .bewegung-knopf span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
