/* ==========================================================================
   Monteurwohnungen Papenburg — öffentliche Seite
   Gestaltung: modern & warm. Alle Schriften lokal, keine externen Requests.
   ========================================================================== */

/* --- Schrift: Manrope, lokal (SIL Open Font License) ---------------------- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/manrope/manrope-v20-latin_latin-ext-regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/manrope/manrope-v20-latin_latin-ext-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/manrope/manrope-v20-latin_latin-ext-800.woff2') format('woff2');
}

/* --- Design-Tokens -------------------------------------------------------- */
:root {
  --bg: #faf6f1;          /* warmes Cremeweiß */
  --surface: #ffffff;
  --ink: #2b2118;         /* warmes Dunkelbraun statt Schwarz */
  --muted: #7a6a5c;
  --accent: #c4622d;      /* Terrakotta */
  --accent-dark: #9c4a1f;
  --free: #1e7a3c;        /* Grün fürs Frei-Banner */
  --free-bg: #e8f5ec;
  --busy-bg: #f3ede6;
  --radius: 14px;
  --shadow: 0 2px 16px rgba(43, 33, 24, .08);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --pad: 1.25rem;         /* seitlicher Innenabstand von .wrap */
  --line: rgba(43, 33, 24, .10);
  --err: #b3301f;
  --err-bg: #fbece8;
  --header-h: 100px;      /* Höhe des klebenden Kopfes für Anker-Sprünge */
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.06rem;
  font-weight: 400;
  line-height: 1.65;
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { list-style: none; padding: 0; }
a { color: var(--accent-dark); }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* --- Layout --------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.wrap-narrow { max-width: 720px; }

.section { padding: clamp(3rem, 8vw, 5rem) 0; }
.section-alt { background: var(--surface); }

.section h2 {
  position: relative;
  padding-top: 1.15rem;
  margin-bottom: 1.5rem;
  font-size: clamp(1.55rem, 3.6vw, 2.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
}
/* Strukturmerkmal: kurzer Terrakotta-Strich über jeder Sektionsüberschrift. */
.section h2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.lead {
  max-width: 56ch;
  margin-bottom: 1.75rem;
  color: var(--muted);
}

/* --- Kopf (klebend, mit Weichzeichner) ------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 246, 241, .85);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .site-header { background: var(--bg); }
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "brand lang"
    "nav   nav";
  align-items: center;
  gap: .1rem 1rem;
  padding-top: .3rem;
  padding-bottom: .3rem;
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.brand img { width: auto; height: 34px; }

.lang-switch {
  grid-area: lang;
  justify-self: end;
  display: flex;
  gap: .15rem;
  margin: 0;
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 .3rem;
  border-radius: 10px;
  color: var(--muted);
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-decoration: none;
}
.lang-switch a:hover { color: var(--ink); background: rgba(43, 33, 24, .05); }
.lang-switch a.active { color: var(--surface); background: var(--accent); }

/* Abschnittsnavigation: auf dem Handy als waagerecht scrollbare Pillenreihe. */
.section-nav {
  grid-area: nav;
  min-width: 0;            /* verhindert, dass die Pillenreihe das Raster aufsprengt */
  margin-left: calc(-1 * var(--pad));
  margin-right: calc(-1 * var(--pad));
}
.section-nav ul {
  display: flex;
  gap: .3rem;
  margin: 0 auto;
  padding: 0 var(--pad);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.section-nav ul::-webkit-scrollbar { display: none; }
.section-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .8rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: .94rem;
  font-weight: 600;
  text-decoration: none;
}
.section-nav a:hover { color: var(--accent-dark); background: rgba(196, 98, 45, .09); }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(76vh, 560px);
  padding: 4rem 0 5.25rem;
  overflow: hidden;
  background: var(--ink);
}
.hero-media { position: absolute; inset: 0; max-width: none; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(43, 33, 24, 0) 22%, rgba(43, 33, 24, .55) 100%);
}
.hero-copy { position: relative; z-index: 1; color: #fff; }

.hero-place {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .7rem;
  color: rgba(255, 255, 255, .88);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-shadow: 0 1px 12px rgba(43, 33, 24, .6);
}
.hero-place svg { flex: none; }

.hero h1 {
  max-width: 16ch;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -.03em;
  text-shadow: 0 2px 26px rgba(43, 33, 24, .5);
}
.hero-sub {
  max-width: 40ch;
  margin-top: .7rem;
  color: rgba(255, 255, 255, .92);
  font-size: clamp(1.06rem, 2.4vw, 1.25rem);
  text-shadow: 0 1px 18px rgba(43, 33, 24, .55);
}

/* --- Verfügbarkeit: das Kernstück der Seite ------------------------------- */
/* Formsprache: das emaillierte „Zimmer frei"-Schild einer Pension. Es schiebt
   sich über die Unterkante des Heros, damit die Statusfrage sofort beantwortet
   ist — ohne dass gescrollt werden muss. */
.avail {
  position: relative;
  z-index: 3;
  margin-top: -3rem;
}
.avail .wrap { max-width: 640px; }

.plate {
  padding: 1.35rem 1.15rem 1.15rem;
  border-radius: calc(var(--radius) + 4px);
  text-align: center;
}

.avail-free .plate {
  background: var(--free-bg);
  border: 2px solid var(--free);
  box-shadow:
    inset 0 0 0 4px var(--free-bg),
    inset 0 0 0 5px rgba(30, 122, 60, .32),
    0 12px 34px rgba(43, 33, 24, .16);
}
.avail-free strong {
  display: block;
  margin-bottom: .9rem;
  color: var(--free);
  font-size: clamp(1.3rem, 4.6vw, 1.85rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .14em;
  text-indent: .14em;      /* gleicht die Laufweite am rechten Rand aus */
  text-transform: uppercase;
}

.call-btn {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0 1rem;
  min-height: 76px;
  padding: .8rem 1.25rem;
  border-radius: var(--radius);
  background: var(--free);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(30, 122, 60, .3);
  transition: filter .18s ease, transform .08s ease;
}
.call-btn svg { grid-row: 1 / 3; }
.call-label {
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .1em;
  line-height: 1.3;
  text-align: left;
  text-transform: uppercase;
  opacity: .88;
}
.call-number {
  font-size: clamp(1.5rem, 6.2vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.01em;
  text-align: left;
  white-space: nowrap;
}
.call-btn:hover { filter: brightness(.93); }
.call-btn:active { transform: translateY(1px); }
.call-btn:focus-visible { outline-color: var(--ink); }

/* WhatsApp-Variante: erkennbares WhatsApp-Grün, abgedunkelt für AA-Kontrast mit Weiß */
.wa-btn { background: #0f7264; }
.wa-contact { margin: 0 0 .6rem; }
.wa-contact .wa-btn {
  display: inline-grid;
  min-height: 56px;
}
.wa-or {
  margin: .9rem 0 1.1rem;
  color: var(--ink);
  opacity: .75;
  font-weight: 600;
}

/* Warteliste: Checkbox im Formular + Aufruf im Belegt-Banner */
.field-check {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
}
.field-check input[type="checkbox"] {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: .1rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.field-check label { font-weight: 600; }
.busy-cta { margin-top: .9rem; }

/* Sprachwahl-Overlay beim ersten Besuch */
.lang-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(43, 33, 24, .55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lang-overlay[hidden] { display: none; }
.lang-box {
  width: min(30rem, 100%);
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(43, 33, 24, .35);
}
.lang-box-title {
  margin-bottom: 1.2rem;
  text-align: center;
  font-size: .92rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.5;
}
.lang-box-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
}
.lang-box-grid a {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 60px;
  padding: .8rem 1rem;
  border: 2px solid rgba(43, 33, 24, .12);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color .15s, transform .15s;
}
.lang-box-grid a:hover { border-color: var(--accent); transform: translateY(-1px); }
.lang-box-grid a:focus-visible { outline-color: var(--accent); }
.lang-box-grid svg { flex-shrink: 0; border-radius: 3px; box-shadow: 0 0 0 1px rgba(43, 33, 24, .15); }
@media (max-width: 420px) {
  .lang-box-grid { grid-template-columns: 1fr; }
}

.avail-busy .plate {
  background: var(--busy-bg);
  border: 2px solid rgba(122, 106, 92, .4);
  box-shadow:
    inset 0 0 0 4px var(--busy-bg),
    inset 0 0 0 5px rgba(122, 106, 92, .26),
    var(--shadow);
}
/* Standardzustand der Seite: --muted auf --busy-bg läge bei 4,46:1 und damit
   unter WCAG AA. Gedämpftes --ink hält die zurückhaltende Wirkung bei 6,4:1. */
.avail-busy p {
  margin: 0 auto;
  max-width: 44ch;
  color: var(--ink);
  opacity: .75;
  font-weight: 600;
}

/* --- Galerie -------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .7rem;
}
.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--busy-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .3s ease;
}
.gallery-item:hover img,
.gallery-item:focus-visible img { transform: scale(1.03); }

/* --- Ausstattung ---------------------------------------------------------- */
.am-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 0;
}
.am-card {
  padding: 1.4rem 1.25rem;
  border: 1px solid rgba(43, 33, 24, .05);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.am-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: .85rem;
  border-radius: 12px;
  background: rgba(196, 98, 45, .1);
  color: var(--accent);
}
.am-card h3 {
  margin-bottom: .25rem;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.01em;
}
.am-card p { color: var(--muted); }

/* --- Lage und Zwei-Klick-Karte -------------------------------------------- */
/* Standortvorteile (Meyer Werft, Einkaufen): nutzt die Ausstattungs-Kartenoptik */
.loc-perks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}
.loc-perks .am-card {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
}

.addr {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  margin-bottom: 1.5rem;
  font-size: 1.12rem;
  font-weight: 600;
}
.addr svg { flex: none; margin-top: .18rem; color: var(--accent); }

.map-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  min-height: 320px;
  padding: 2.5rem var(--pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
  /* angedeutetes Straßenraster statt eines Screenshots von Google */
  background-color: var(--busy-bg);
  background-image:
    linear-gradient(115deg, transparent 45%, rgba(196, 98, 45, .1) 45%, rgba(196, 98, 45, .1) 51%, transparent 51%),
    linear-gradient(rgba(122, 106, 92, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 106, 92, .13) 1px, transparent 1px);
  background-size: 100% 100%, 34px 34px, 34px 34px;
}
/* Das per JS eingesetzte Iframe ersetzt den Platzhalter und erbt dessen Form. */
#location iframe { display: block; width: 100%; border-radius: var(--radius); }
.map-pin { color: var(--accent); filter: drop-shadow(0 5px 12px rgba(43, 33, 24, .2)); }
/* Einwilligungstext bewusst in voller Textfarbe: --muted läge auf --busy-bg bei
   4,47:1 und damit knapp unter der WCAG-Schwelle von 4,5:1. */
.map-note { max-width: 46ch; color: var(--ink); font-size: 1rem; line-height: 1.5; }

/* --- Schaltflächen -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 52px;
  padding: .8rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .08s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { background: var(--surface); color: var(--accent-dark); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }

/* --- Formular ------------------------------------------------------------- */
.msg {
  margin-bottom: 1.5rem;
  padding: .95rem 1.1rem;
  border-left: 5px solid;
  border-radius: 10px;
  font-weight: 600;
}
.msg.ok { background: var(--free-bg); border-color: var(--free); color: #14582b; }
.msg.err { background: var(--err-bg); border-color: var(--err); color: #8d2416; }

.contact-form { margin-top: .5rem; }
.field { margin-bottom: 1.05rem; }
.field label {
  display: block;
  margin-bottom: .4rem;
  font-size: .98rem;
  font-weight: 600;
}
.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: .7rem .9rem;
  border: 1.5px solid rgba(122, 106, 92, .8);   /* ~3,6:1 — Feldgrenzen brauchen 3:1 */
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 150px; line-height: 1.55; resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 98, 45, .22);
}
.field-hint {
  margin: -.4rem 0 1.05rem;
  color: var(--muted);
  font-size: .96rem;
  line-height: 1.45;
}
.contact-form .btn { width: 100%; margin-top: .35rem; }

/* Honigtopf: nicht display:none — Bots erkennen das sofort. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Fuß ------------------------------------------------------------------ */
.site-footer {
  padding: 2.5rem 0;
  background: var(--ink);
  color: rgba(250, 246, 241, .72);
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .5rem;
}
.foot-name { color: var(--bg); font-weight: 800; letter-spacing: -.01em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 1.5rem; margin: 0; }
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.foot-links a:hover { color: var(--bg); }
.site-footer :focus-visible { outline-color: var(--bg); }

/* --- Leuchtkasten für die Galerie ---------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(43, 33, 24, .92);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.lb-close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 246, 241, .15);
  color: #fff;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
}
.lb-close:hover { background: rgba(250, 246, 241, .28); }
.lightbox :focus-visible { outline-color: var(--bg); }

/* --- Ab 720 px ------------------------------------------------------------ */
@media (min-width: 720px) {
  :root { --pad: 2rem; --header-h: 76px; }

  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav lang";
    gap: 0 1.5rem;
    padding-top: .5rem;
    padding-bottom: .5rem;
  }
  .brand img { height: 44px; }
  .section-nav { margin-left: 0; margin-right: 0; justify-self: center; }
  .section-nav ul { padding: 0; }

  .hero { min-height: min(80vh, 620px); padding: 6rem 0 6rem; }

  .avail { margin-top: -3.75rem; }
  .plate { padding: 1.75rem 1.75rem 1.5rem; }

  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }

  .contact-form .btn { width: auto; min-width: 260px; }

  .site-footer .wrap { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* --- Bewegung sparsam ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
