/* Meli Wohnkomfort - oeffentliche Website
   Design-Spec Sektion 0 (BINDEND): /opt/wohnkomfort/docs/superpowers/specs/2026-07-27-e2e-website-design.md
   Mobil-first. Klassennamen (zimmertafel/kachel/bereich/anfrage-formular/...) sind aus
   Task 1 uebernommen (siehe basis_oeffentlich.html) - hier nur Feinschliff/Layout. */

/* --- Design-Tokens ------------------------------------------------------------- */
:root {
  --papierweiss: #FAFAF7;
  --petrol: #0E4F4C;
  --petrol-hell: #14615d;   /* leicht aufgehellte Petrol-Variante fuer Verlaeufe/Hover auf dunklem Grund */
  --tuerkis: #14b8a6;
  --status-frei: #16a34a;
  --status-belegt: #b45309;
  --tinte: #1A2B2A;
  --linie: #E4E4DE;
  --weiss: #ffffff;

  --schrift-display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --schrift-text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --rand-radius: 12px;
  --schatten-kachel: 0 1px 2px rgba(14, 79, 76, 0.06);
  --schatten-kachel-hover: 0 8px 20px rgba(14, 79, 76, 0.14);
}

/* --- Fonts: selbst gehostet, KEIN CDN zur Laufzeit (Spec Sektion 0) ------------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/BricolageGrotesque-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/static/fonts/BricolageGrotesque-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Reset / Grundgeruest -------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--schrift-text);
  background: var(--papierweiss);
  color: var(--tinte);
  line-height: 1.55;
  padding-bottom: 4.75rem; /* Platz fuer die fixierte Mobil-CTA-Leiste */
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--schrift-display); font-weight: 700; line-height: 1.15; margin: 0 0 0.6rem; }
p { margin: 0 0 0.9rem; }
a { color: var(--tuerkis); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

/* Sichtbarer Fokus-Ring ueberall (Barrierefreiheit) - ersetzt niemals den Browser-Fokus
   still, sondern macht ihn deutlicher. */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--tuerkis);
  outline-offset: 2px;
  border-radius: 4px;
}

.eyebrow {
  font-size: 0.75rem; /* 12px */
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--petrol);
  font-weight: 700;
  margin: 0 0 0.4rem;
}
.eyebrow--hell { color: rgba(255, 255, 255, 0.85); }

/* --- Kopf / Navigation ----------------------------------------------------------- */
header.kopf {
  background: var(--petrol);
  color: #fff;
  padding: 1.1rem 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
}
header.kopf a.logo {
  color: #fff;
  text-decoration: none;
  font-family: var(--schrift-display);
  font-weight: 700;
  font-size: 1.15rem;
}
nav.hauptnav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-top: 0.6rem;
}
nav.hauptnav a { color: #fff; text-decoration: none; font-size: 0.92rem; }
nav.hauptnav a:hover { text-decoration: underline; }

main { max-width: 1140px; margin: 0 auto; padding: 0 1rem 3rem; }
section.bereich { margin: 2.75rem 0; }
section.bereich > p.eyebrow:first-child { margin-top: 0; }

/* --- Hero (Signature: Live-Zimmertafel) ------------------------------------------ */
.hero-flex {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
  margin: 1.75rem 0 3rem;
}
.hero-text h1 {
  color: var(--petrol);
  font-size: clamp(1.9rem, 6vw, 2.85rem);
  margin: 0.2rem 0 1rem;
}
.hero-text p { max-width: 46ch; }
.cta-knopf {
  display: inline-block;
  background: var(--tuerkis);
  color: var(--tinte);
  font-weight: 700;
  text-decoration: none;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  margin-top: 0.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cta-knopf:hover { box-shadow: var(--schatten-kachel-hover); transform: translateY(-1px); }
.cta-knopf:focus-visible { outline-offset: 3px; }

.zimmertafel-bereich h2 { margin-top: 0; }

/* --- Zimmertafel + Kacheln (Pensions-Schluesseltafel) ---------------------------- */
.zimmertafel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}
.kachel {
  border: 1px solid var(--linie);
  border-radius: var(--rand-radius);
  padding: 0.9rem;
  background: #fff;
  text-decoration: none;
  color: var(--tinte);
  display: block;
  box-shadow: var(--schatten-kachel);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.kachel:hover, .kachel:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--schatten-kachel-hover);
  border-color: var(--tuerkis);
}
.kachel-bild {
  aspect-ratio: 3 / 2;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, var(--petrol) 0%, var(--petrol-hell) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.kachel-bild img { width: 100%; height: 100%; object-fit: cover; }
.kachel-initialen {
  color: #fff;
  font-family: var(--schrift-display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
}
.kachel h3 {
  margin: 0.15rem 0 0.2rem;
  font-size: 1.05rem;
  color: var(--tinte);
}
.kachel-preis { margin: 0 0 0.35rem; font-weight: 600; font-size: 0.92rem; color: var(--petrol); }
.kachel-status { margin: 0; font-size: 0.88rem; display: flex; align-items: center; }
.kachel-status .status-punkt {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  margin-right: 0.45rem;
  flex-shrink: 0;
}
.status-punkt.frei { background: var(--status-frei); }
.status-punkt.belegt { background: var(--status-belegt); }

/* --- Bereich-Sektionen (Monteurzimmer / Wohnungen: 3 Karten + "alle ansehen") ---- */
.alle-ansehen { font-weight: 700; display: inline-block; margin-top: 0.4rem; }
.alle-ansehen::after { content: " \2192"; } /* dezenter Pfeil */

/* --- Lage-Sektion: Petrol-Flaeche, heller Text, 2-Spalten-Distanzliste ---------- */
.lage-bereich {
  background: var(--petrol);
  color: #fff;
  padding: 2.25rem 1.5rem;
  border-radius: 16px;
  margin-left: -1rem;
  margin-right: -1rem;
}
.lage-bereich h2 { color: #fff; }
table.distanzen { border-collapse: collapse; width: 100%; }
table.distanzen th {
  text-align: left;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  padding: 0.5rem 0.75rem 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
table.distanzen td {
  padding: 0.65rem 0.75rem 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
table.distanzen tr:last-child td { border-bottom: none; }

/* --- Anfrage-Formular: helle Karte, grosse Felder -------------------------------- */
.anfrage-bereich {
  background: #fff;
  border: 1px solid var(--linie);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
}
form.anfrage-formular .pflicht-hinweis { font-size: 0.82rem; color: #555; margin: 0 0 0.5rem; }
form.anfrage-formular .vorausgewaehlt-hinweis {
  background: var(--papierweiss);
  border: 1px solid var(--linie);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
form.anfrage-formular label { display: block; font-weight: 600; margin: 0.9rem 0 0.3rem; font-size: 0.95rem; }
form.anfrage-formular .hinweis { font-size: 0.82rem; color: #555; margin: 0.2rem 0 0; }
form.anfrage-formular input,
form.anfrage-formular textarea,
form.anfrage-formular select {
  width: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--linie);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--tinte);
}
form.anfrage-formular input:focus, form.anfrage-formular textarea:focus { border-color: var(--tuerkis); }
form.anfrage-formular button {
  margin-top: 1.4rem;
  padding: 1rem 1.75rem;
  border: none;
  border-radius: 999px;
  background: var(--tuerkis);
  color: var(--tinte);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
form.anfrage-formular button:hover { box-shadow: var(--schatten-kachel-hover); transform: translateY(-1px); }
form.anfrage-formular .fangfeld { position: absolute; left: -9999px; top: -9999px; }

.fehler {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
}

/* --- Fuss (Footer) ---------------------------------------------------------------- */
footer.fuss {
  background: var(--petrol);
  color: #fff;
  padding: 2.5rem 1rem 6.5rem; /* zusaetzlicher Platz unten wegen fixierter Mobil-CTA-Leiste */
  margin-top: 3.5rem;
}
footer.fuss .fuss-inhalt { max-width: 1140px; margin: 0 auto; }
footer.fuss a { color: #fff; text-decoration: underline; }
footer.fuss p { margin: 0 0 0.5rem; }
footer.fuss .fuss-verwaltung { margin-top: 1.5rem; }
footer.fuss .fuss-verwaltung a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  text-decoration: none;
}
footer.fuss .fuss-verwaltung a:hover { text-decoration: underline; }

/* --- Galerie (Detail-Seite): grosses Titelbild + Thumbs -------------------------- */
.galerie {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}
.galerie img, .galerie .kachel-bild { border-radius: 10px; aspect-ratio: 1 / 1; object-fit: cover; }
.galerie img:first-child, .galerie .kachel-bild:only-child {
  grid-column: 1 / -1;
  aspect-ratio: 3 / 2;
}

.verfuegbarkeit-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--papierweiss);
  border: 1px solid var(--linie);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 600;
}

/* --- Mobile fixierte CTA-Leiste (Start/Listen/Detail) ---------------------------- */
.mobil-cta-leiste {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 0.65rem 1rem;
  background: var(--papierweiss);
  border-top: 1px solid var(--linie);
  box-shadow: 0 -4px 12px rgba(14, 79, 76, 0.08);
}
.mobil-cta-leiste a {
  display: block;
  text-align: center;
  background: var(--tuerkis);
  color: var(--tinte);
  font-weight: 700;
  text-decoration: none;
  padding: 0.85rem 1rem;
  border-radius: 999px;
}

/* --- Responsive: ab Tablet-Breite ------------------------------------------------- */
@media (min-width: 640px) {
  .galerie { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 860px) {
  body { padding-bottom: 0; }
  footer.fuss { padding-bottom: 2.5rem; }
  .mobil-cta-leiste { display: none; }

  /* Hero bleibt gestapelt (Text oben, Tafel darunter) statt nebeneinander - eine
     Zwei-Spalten-Aufteilung wuerde die Tafel auf ~55% der Breite quetschen und die
     geforderten "Desktop 4 Spalten" (Spec Sektion 0) verhindern. */
  .hero-text { max-width: 62ch; }
  .zimmertafel { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem; }
  main { padding: 0 1.5rem 3rem; }
  .lage-bereich { padding: 2.75rem 2.5rem; }
}

/* --- Bewegungsreduktion respektieren --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  .kachel:hover, .cta-knopf:hover, form.anfrage-formular button:hover {
    transform: none;
  }
}

/* --- Druckansicht ------------------------------------------------------------------ */
@media print {
  header.kopf, .mobil-cta-leiste, form.anfrage-formular, footer .fuss-verwaltung { display: none; }
  body { background: #fff; color: #000; padding-bottom: 0; }
  .lage-bereich { background: #fff; color: #000; border: 1px solid #000; }
  .lage-bereich h2, table.distanzen th { color: #000; }
  a { color: #000; }
}
