/* ===========================================================
   Familienferienhaus Damp – Stylesheet (Neugestaltung)
   Stil: "Modern Coastal" – luftig, warm, einladend
   Palette: tiefes Ostsee-Petrol, Meerblau, warmer Sand, Creme, Koralle
   =========================================================== */

:root {
  /* Farben */
  --navy: #0b2f3f;      /* dunkelstes Petrol – Überschriften, Footer */
  --deep: #0d4a63;      /* Primärfarbe */
  --sea:  #2f93b8;      /* Akzent kühl */
  --sky:  #d7ecf3;      /* helles Himmelblau */
  --sand: #e7d9bd;
  --sand-soft: #f3ead7; /* warmer Abschnittshintergrund */
  --cream: #fbf7ef;     /* Seitenhintergrund */
  --ink: #15303b;       /* Fließtext */
  --muted: #5d7078;     /* Sekundärtext */
  --accent: #e8884a;    /* Koralle/Amber – Buttons, Highlights */
  --accent-dark: #d2733a;
  --line: rgba(13, 74, 99, .10); /* dezente Trennlinien/Ränder */
  --white: #ffffff;

  /* Radien */
  --radius: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;

  /* Weiche, mehrlagige Schatten für mehr Tiefe */
  --shadow-sm: 0 6px 20px -8px rgba(11, 47, 63, .20);
  --shadow-md: 0 18px 48px -14px rgba(11, 47, 63, .26);
  --shadow-lg: 0 34px 70px -22px rgba(11, 47, 63, .34);

  --maxw: 1180px;
  --header-h: 78px;

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--deep); text-decoration: none; }
a:hover { color: var(--sea); }

.container { width: min(100% - 2.6rem, var(--maxw)); margin-inline: auto; }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600; line-height: 1.12; color: var(--navy);
  letter-spacing: -.01em;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -3.5rem; z-index: 300;
  background: var(--navy); color: #fff; padding: .7rem 1.1rem; border-radius: 10px;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .2em;
  font-size: .76rem; font-weight: 700; color: var(--sea);
  margin: 0 0 .8rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .95rem 1.8rem; border-radius: 999px;
  font-family: inherit; font-weight: 600; font-size: 1rem; cursor: pointer;
  border: 2px solid transparent; text-align: center;
  transition: transform .18s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 12px 26px -10px rgba(232,136,74,.7); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 18px 34px -10px rgba(232,136,74,.75); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.55); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(255,255,255,.18); color: #fff; border-color: #fff; transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 247, 239, .72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: background .25s, border-color .25s, box-shadow .25s;
}
.site-header.scrolled {
  background: rgba(251, 247, 239, .92);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 24px -18px rgba(11,47,63,.5);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--navy); }
.brand-mark {
  display: grid; place-items: center; width: 46px; height: 46px; flex: none;
  border-radius: 14px; color: #fff;
  background: linear-gradient(150deg, var(--sea), var(--deep));
  box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-head); font-size: 1.1rem; }
.brand-text em { font-style: normal; font-size: .74rem; color: var(--muted); letter-spacing: .05em; }

.main-nav { display: flex; align-items: center; }
.nav-list { list-style: none; display: flex; align-items: center; gap: .25rem; margin: 0; padding: 0; }
.nav-list a {
  display: inline-block; padding: .58rem .9rem; border-radius: 11px;
  color: var(--ink); font-weight: 500; font-size: .96rem; transition: background .18s, color .18s;
}
.nav-list a:hover { background: rgba(13,74,99,.07); color: var(--deep); }
.nav-cta { background: var(--deep); color: #fff !important; }
.nav-cta:hover { background: var(--navy) !important; }

.nav-toggle {
  display: none; width: 46px; height: 46px; border: 1px solid var(--line);
  background: #fff; border-radius: 13px; cursor: pointer; position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 2px;
  background: var(--navy); transform: translate(-50%, -50%); transition: .25s; border-radius: 2px;
}
.nav-toggle-bar::before { transform: translate(-50%, -7px); }
.nav-toggle-bar::after { transform: translate(-50%, 5px); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translate(-50%, -50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  min-height: clamp(580px, 88vh, 840px);
  display: flex; align-items: flex-end;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  /* Verlauf liegt ZUERST (oben) und dunkelt das Foto ab → Schrift bleibt lesbar.
     Der Farbverlauf unten ist Fallback, falls das Bild nicht lädt. */
  background-image:
    linear-gradient(180deg, rgba(11,47,63,.30) 0%, rgba(11,47,63,.45) 45%, rgba(11,47,63,.86) 100%),
    url("images/hero.jpg"),
    radial-gradient(120% 90% at 70% 0%, #2f93b8 0%, var(--deep) 55%, var(--navy) 100%);
  background-size: cover, cover, cover;
  background-position: center, center 38%, center;
  background-repeat: no-repeat;
  transform: scale(1.03); /* minimaler Zoom, vermeidet harte Kanten */
}
/* Sanfte Welle als Übergang zum nächsten Abschnitt */
.hero::after {
  content: ""; position: absolute; left: -2%; right: -2%; bottom: -1px; z-index: 2;
  height: clamp(40px, 6vw, 90px); background: var(--cream);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero-inner {
  position: relative; z-index: 3;
  padding: clamp(4rem, 12vw, 8rem) 0 clamp(3.5rem, 8vw, 6rem);
  max-width: 780px;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.1rem); color: #fff; margin: 0 0 1.2rem; line-height: 1.05; }
.hero .eyebrow { color: var(--sky); }
.hero-lead {
  font-size: clamp(1.08rem, 1.6vw, 1.3rem); color: rgba(255,255,255,.94);
  max-width: 640px; margin: 0 0 2rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2.8rem; }

.hero-facts {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .9rem; max-width: 640px;
}
.hero-facts li {
  display: flex; flex-direction: column; gap: .2rem;
  padding: 1rem 1.1rem; border-radius: 16px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hero-facts strong { font-family: var(--font-head); font-size: 1.6rem; line-height: 1; }
.hero-facts span { font-size: .8rem; color: rgba(255,255,255,.88); }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }
.section-tint { background: var(--sand-soft); }
.section-head { max-width: 680px; margin: 0 auto clamp(2.4rem, 5vw, 3.6rem); text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 .9rem; }
.section-sub { color: var(--muted); margin: 0; font-size: 1.1rem; }

/* ---------- Split layout (Das Haus / Anfrage) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.2rem, 5vw, 4.5rem); align-items: center; }
.split-reverse .split-text { order: 2; }
.split-text h2 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); margin: 0 0 1.1rem; }
.split-text > p { color: var(--muted); margin: 0 0 1rem; }

/* Versetzte Bild-Collage.
   WICHTIG: height:auto ist zwingend! Die HTML-Attribute width/height am <img>
   wirken sonst als "presentational hint" und pinnen die Höhe auf den Pixelwert,
   wodurch das Bild zu einem schmalen, verzerrten Streifen wird. Mit height:auto
   gilt das natürliche Seitenverhältnis (beide Fotos sind 4:3) → kein Beschnitt,
   keine Verzerrung. */
.split-media { display: block; }
.media-card {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); background: var(--sky);
}
.media-1 { position: relative; z-index: 0; }
.media-2 {
  width: 58%; margin-left: auto; margin-top: -20%;
  position: relative; z-index: 1;
  border: 8px solid var(--cream); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.section-tint .media-2 { border-color: var(--sand-soft); }

.check-list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .8rem; }
.check-list li { position: relative; padding-left: 2.1rem; color: var(--ink); }
.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: .15rem;
  width: 1.45rem; height: 1.45rem; display: grid; place-items: center;
  background: var(--sea); color: #fff; border-radius: 50%; font-size: .82rem; font-weight: 700;
}

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2rem; box-shadow: var(--shadow-sm); transition: transform .22s, box-shadow .22s;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.feature-icon {
  display: inline-grid; place-items: center; width: 58px; height: 58px;
  border-radius: 16px; font-size: 1.6rem; margin-bottom: 1.1rem;
  background: linear-gradient(150deg, var(--sky), #bfe0ec);
}
.feature h3 { font-size: 1.25rem; margin: 0 0 .5rem; }
.feature p { margin: 0; color: var(--muted); font-size: .98rem; }

/* ---------- Location ---------- */
.location-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.3rem; }
.loc-card {
  background: #fff; border-radius: var(--radius-lg); padding: 1.8rem;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; transition: transform .22s, box-shadow .22s;
}
.loc-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.loc-card.highlight {
  background: linear-gradient(160deg, var(--deep), var(--navy)); color: #fff; border-color: transparent;
}
.loc-card.highlight h3, .loc-card.highlight .loc-distance { color: #fff; }
.loc-card.highlight p { color: rgba(255,255,255,.86); }
.loc-distance { font-family: var(--font-head); font-size: 1.7rem; color: var(--sea); font-weight: 600; margin-bottom: .45rem; }
.loc-card h3 { font-size: 1.18rem; margin: 0 0 .5rem; }
.loc-card p { margin: 0; color: var(--muted); font-size: .94rem; }

.location-note {
  margin-top: 1.8rem; background: #fff; border-left: 5px solid var(--accent);
  border-radius: 14px; padding: 1.3rem 1.6rem; color: var(--ink); font-size: 1.02rem;
  box-shadow: var(--shadow-sm);
}
.section-tint .location-note { background: #fff; }

/* ---------- Gallery (Masonry) ---------- */
/* column-width statt fixem Spalten-Grid → passt sich automatisch an die
   Breite an UND bewahrt die natürlichen Bild-Proportionen (kein Beschneiden). */
.gallery { column-width: 250px; column-gap: 1.2rem; }
.gallery-item {
  break-inside: avoid; margin: 0 0 1.2rem; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); position: relative;
}
.gallery-trigger {
  display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none;
  cursor: pointer; position: relative; border-radius: inherit; overflow: hidden;
}
.gallery-trigger img {
  width: 100%; height: auto; display: block; transition: transform .5s ease;
}
.gallery-trigger:hover img, .gallery-trigger:focus-visible img { transform: scale(1.05); }
.gallery-trigger:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem 1.1rem .9rem;
  color: #fff; font-size: .92rem; font-weight: 600; text-align: left;
  background: linear-gradient(transparent, rgba(11,47,63,.82)); pointer-events: none;
}

/* ---------- Lightbox ---------- */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(7, 22, 30, .94);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.lightbox-figure {
  margin: 0; max-width: min(1150px, 100%); max-height: 100%;
  display: flex; flex-direction: column; gap: .9rem; align-items: center;
}
.lightbox-img {
  max-width: 100%; max-height: 82vh; object-fit: contain;
  border-radius: var(--radius); box-shadow: 0 24px 70px rgba(0,0,0,.55); background: #0b2f3f;
}
.lightbox-caption { color: #fff; font-size: .98rem; text-align: center; margin: 0; }
.lightbox-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 54px; height: 54px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; cursor: pointer;
  font-size: 1.7rem; line-height: 1; display: grid; place-items: center; transition: background .2s;
}
.lightbox-btn:hover, .lightbox-btn:focus-visible { background: rgba(255,255,255,.32); }
.lightbox-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lightbox-prev { left: clamp(.5rem, 2vw, 1.6rem); }
.lightbox-next { right: clamp(.5rem, 2vw, 1.6rem); }
.lightbox-close { top: clamp(.5rem, 2vw, 1.2rem); right: clamp(.5rem, 2vw, 1.2rem); transform: none; width: 50px; height: 50px; font-size: 1.5rem; }
.lightbox-count { position: absolute; top: clamp(.8rem, 2vw, 1.4rem); left: clamp(.8rem, 2vw, 1.4rem); color: rgba(255,255,255,.85); font-size: .85rem; letter-spacing: .04em; }
@media (max-width: 560px) { .lightbox-btn { width: 46px; height: 46px; font-size: 1.4rem; } }

/* ---------- Inquiry / Contact ---------- */
.contact-list { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.contact-list li { display: flex; align-items: flex-start; gap: 1rem; }
.ci {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  background: var(--sky); border-radius: 12px; font-size: 1.1rem;
}
.split-form {
  background: #fff; border-radius: var(--radius-lg); padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: var(--shadow-md); border: 1px solid var(--line);
}
.inquiry-form { display: grid; gap: 1.05rem; }
.field { display: grid; gap: .45rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.05rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--navy); }
.field input, .field textarea {
  width: 100%; padding: .8rem .95rem; border: 1.5px solid #dde6ea; border-radius: 13px;
  font-family: inherit; font-size: .98rem; color: var(--ink); background: #fdfdfb;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px rgba(47,147,184,.16);
}
.field textarea { resize: vertical; }
.form-hint { margin: .3rem 0 0; font-size: .82rem; color: var(--muted); text-align: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: rgba(255,255,255,.82); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: space-between; padding: clamp(3rem, 6vw, 4.5rem) 0; }
.footer-brand { max-width: 380px; }
.footer-brand strong { font-family: var(--font-head); font-size: 1.3rem; color: #fff; display: block; margin-bottom: .6rem; }
.footer-brand p { margin: 0; font-size: .96rem; }
.footer-nav { display: grid; grid-auto-rows: min-content; gap: .7rem; align-content: start; }
.footer-nav a { color: rgba(255,255,255,.82); font-size: .96rem; transition: color .18s; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.13); }
.footer-bottom .container {
  display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between;
  padding: 1.3rem 0; font-size: .86rem;
}
.to-top { color: rgba(255,255,255,.82); }
.to-top:hover { color: #fff; }

/* ---------- Legal pages ---------- */
.legal { padding: clamp(3rem, 7vw, 5rem) 0; }
.legal .container { max-width: 780px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 1.6rem; }
.legal h2 { font-size: 1.35rem; margin: 2.2rem 0 .6rem; }
.legal p, .legal address { color: var(--ink); font-style: normal; margin: 0 0 1rem; }
.legal a { color: var(--sea); }
.back-link { display: inline-block; margin-bottom: 1.6rem; font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .location-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-list {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--cream); padding: 1rem 1.3rem 1.5rem;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .22s;
  }
  .nav-list.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-list a { padding: .85rem 1rem; }
  .split { grid-template-columns: 1fr; }
  .split-reverse .split-text { order: 0; }
  .media-2 { width: 58%; margin-top: -16%; }
}

@media (max-width: 560px) {
  .hero-facts { grid-template-columns: repeat(2, 1fr); }
  .feature-grid, .location-grid, .field-row { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; }
  .media-2 { width: 70%; margin-top: -18%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
  .hero-bg { transform: none; }
}
