/* =========================================================
   Immobilien Pasek – Stylesheet
   Erdige Farbpalette, Hell-/Dunkelmodus, mobil zuerst
   ========================================================= */

/* ---------- Schriften ----------
   Aktuell werden Systemschriften verwendet (keine externen Server).
   Für eigene Webfonts (z. B. Fraunces und Inter) die .woff2-Dateien
   in /fonts ablegen und diese Blöcke einkommentieren:

@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Inter";    src: url("../fonts/inter.woff2")    format("woff2"); font-weight: 400 700; font-display: swap; }
*/

/* ---------- Farb-Tokens: hell ---------- */
:root {
  --bg: #f5efe6;          /* Leinen */
  --surface: #fbf8f3;     /* helles Papier */
  --surface-2: #ece3d4;   /* Sand */
  --text: #33291f;        /* Erdbraun */
  --muted: #66574a;
  --border: #d8cbb6;
  --primary: #56633a;     /* Oliv */
  --primary-hover: #46522e;
  --on-primary: #fbf8f3;
  --accent: #9e4824;      /* Terrakotta (textfähig) */
  --accent-soft: #e9cdb8;
  --focus: #9e4824;
  --shadow: 0 1px 2px rgb(60 45 30 / .06), 0 8px 24px rgb(60 45 30 / .08);
  --header-bg: rgb(245 239 230 / .88);

  --map-bg: #ebe2d1;
  --map-ring: #b9a88d;
  --map-river: #8fa3a6;

  --font-head: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --gutter: clamp(16px, 4vw, 32px);
  --section-y: clamp(64px, 9vw, 112px);
  --header-h: 68px;

  color-scheme: light;
}

/* ---------- Farb-Tokens: dunkel ---------- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1814;
    --surface: #26201a;
    --surface-2: #2f281f;
    --text: #ede4d6;
    --muted: #bcae98;
    --border: #463c30;
    --primary: #a9b67f;
    --primary-hover: #bcc893;
    --on-primary: #1c1814;
    --accent: #e09468;
    --accent-soft: #4a3123;
    --focus: #e09468;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
    --header-bg: rgb(28 24 20 / .88);
    --map-bg: #2a231c;
    --map-ring: #5f5141;
    --map-river: #5d7477;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1c1814;
  --surface: #26201a;
  --surface-2: #2f281f;
  --text: #ede4d6;
  --muted: #bcae98;
  --border: #463c30;
  --primary: #a9b67f;
  --primary-hover: #bcc893;
  --on-primary: #1c1814;
  --accent: #e09468;
  --accent-soft: #4a3123;
  --focus: #e09468;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25);
  --header-bg: rgb(28 24 20 / .88);
  --map-bg: #2a231c;
  --map-ring: #5f5141;
  --map-river: #5d7477;
  color-scheme: dark;
}

/* ---------- Grundlagen ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.0625rem);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.5rem + 3vw, 3.6rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.7rem, 1.3rem + 1.8vw, 2.6rem); letter-spacing: -.01em; }
h3 { font-size: clamp(1.2rem, 1.1rem + .5vw, 1.45rem); }
h4 { font-size: 1.08rem; font-family: var(--font-body); font-weight: 650; }

p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.small { font-size: .875rem; }
.muted { color: var(--muted); }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--primary); color: var(--on-primary);
  padding: .6em 1em; border-radius: var(--radius-sm); text-decoration: none;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-size: .8rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .75em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .75em 1.4em;
  border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.text-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: .4em; }
.text-link:hover { text-decoration: underline; }

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s, background-color .25s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 2px 12px rgb(0 0 0 / .05); }

.header-inner { display: flex; align-items: center; gap: 16px; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; margin-right: auto; min-width: 0; }
.brand-mark { width: auto; height: 44px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.brand-sub { font-size: .75rem; color: var(--muted); white-space: nowrap; }

.header-actions { display: flex; align-items: center; gap: 6px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent; border: 1px solid var(--border); color: var(--text);
  cursor: pointer; transition: background-color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Sonne im dunklen Modus zeigen, Mond im hellen */
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.burger { display: grid; gap: 4px; width: 18px; }
.burger span { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Navigation mobil: ausklappbares Panel */
.main-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: none;
}
.main-nav.is-open { display: block; }
.main-nav ul { list-style: none; margin: 0; padding: 8px var(--gutter) 20px; }
.main-nav a {
  display: block; padding: 14px 4px; color: var(--text); text-decoration: none;
  font-weight: 550; border-bottom: 1px solid var(--border);
}
.main-nav li:last-child a { border-bottom: 0; }
.main-nav a.is-active { color: var(--accent); }
.main-nav .nav-cta {
  margin-top: 12px; text-align: center; border: 0;
  background: var(--primary); color: var(--on-primary); border-radius: 999px;
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .main-nav { position: static; display: block; background: none; border: 0; box-shadow: none; }
  .main-nav ul { display: flex; align-items: center; gap: 4px; padding: 0; }
  .main-nav a { border: 0; padding: 8px 14px; border-radius: 999px; }
  .main-nav a:hover { background: var(--surface-2); }
  .main-nav .nav-cta { margin: 0 0 0 8px; padding: 8px 18px; }
  .main-nav .nav-cta:hover { background: var(--primary-hover); }
  .main-nav a.nav-cta.is-active { color: var(--on-primary); }
}

/* ---------- Start ---------- */
.hero { padding-block: clamp(40px, 7vw, 96px) var(--section-y); }
.hero-inner { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
.h1-kicker { display: block; font-family: var(--font-body); line-height: 1.4; letter-spacing: .14em; margin-bottom: .9rem; }
.lead { font-size: clamp(1.08rem, 1rem + .4vw, 1.25rem); color: var(--muted); max-width: 38em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 32px; }
.hero-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.hero-facts li { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.hero-facts svg {
  width: 26px; height: 26px; padding: 4px; flex-shrink: 0; border-radius: 50%;
  background: var(--accent-soft); stroke: var(--accent); fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.hero-media img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius); box-shadow: var(--shadow);
}

@media (max-width: 479px) {
  .hero-actions .btn { width: 100%; }
}
@media (min-width: 900px) {
  .hero-inner { grid-template-columns: 1.1fr .9fr; }
  .hero-media img { aspect-ratio: 8 / 9; border-radius: 160px 160px var(--radius) var(--radius); }
}

/* ---------- Abschnitte ---------- */
.section { padding-block: var(--section-y); }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 46rem; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p:last-child { color: var(--muted); margin-bottom: 0; }

/* ---------- Leistungen ---------- */
.service-groups { display: grid; gap: 24px; }
@media (min-width: 900px) { .service-groups { grid-template-columns: 1fr 1fr; } }

.service-group {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(22px, 4vw, 40px);
  display: flex; flex-direction: column;
}
.service-group-head { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.service-group-head h3 { margin: 0; }
.service-tag { margin: 2px 0 0; color: var(--accent); font-size: .9rem; font-weight: 600; }
.service-icon {
  flex-shrink: 0; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 16px; background: var(--primary); color: var(--on-primary);
}
.service-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.service-list { list-style: none; margin: 0 0 24px; padding: 0; display: grid; }
.service-list li { padding: 16px 0; border-top: 1px solid var(--border); }
.service-list h4 { margin-bottom: .3em; }
.service-list p { margin: 0; color: var(--muted); }
.service-group .text-link { margin-top: auto; }

/* ---------- Angebote (Verweis auf Kleinanzeigen) ---------- */
.offer-teaser {
  display: grid; gap: 20px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(22px, 4vw, 40px);
}
.offer-teaser-icon {
  display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px;
  background: var(--primary); color: var(--on-primary);
}
.offer-teaser-icon svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.offer-teaser-text h3 { margin-bottom: .3em; }
.offer-teaser-text p { margin: 0; color: var(--muted); }
.offer-teaser-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.offer-teaser-note { margin: 12px 0 0; }
@media (max-width: 479px) {
  .offer-teaser-actions .btn { width: 100%; }
}
@media (min-width: 900px) {
  .offer-teaser { grid-template-columns: auto 1fr auto; gap: 28px; }
  .offer-teaser-actions { flex-direction: column; align-items: stretch; }
}

/* ---------- Über uns ---------- */
.team-grid { display: grid; gap: 24px; }
@media (min-width: 720px) { .team-grid { grid-template-columns: 1fr 1fr; } }

.team-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: grid;
}
.team-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; }
.team-body { padding: 22px 24px 26px; }
.team-body h3 { margin-bottom: .2em; }
.team-role { color: var(--accent); font-weight: 600; font-size: .92rem; }
.team-body p:last-child { margin: 0; color: var(--muted); }
.team-bio { color: var(--muted); }
.team-bio p { margin: 0 0 .8em; }
.team-bio strong { color: var(--text); font-weight: 650; }
.team-bio ul { margin: 0 0 .8em; padding-left: 1.1em; display: grid; gap: .5em; }
.team-bio li::marker { color: var(--accent); }
.team-card { align-content: start; }
@media (min-width: 1024px) {
  .team-card img { aspect-ratio: 5 / 4; object-position: center 25%; }
  .team-body { padding: 26px 30px 30px; }
}

.values { list-style: none; padding: 0; margin: clamp(40px, 6vw, 64px) 0 0; display: grid; gap: 24px; }
@media (min-width: 720px) { .values { grid-template-columns: repeat(3, 1fr); } }
.values li { border-top: 3px solid var(--primary); padding-top: 16px; }
.values h3 { font-size: 1.2rem; }
.values p { margin: 0; color: var(--muted); }

/* ---------- Region / Karte ---------- */
.region-inner { display: grid; gap: clamp(32px, 5vw, 56px); align-items: center; }
@media (min-width: 960px) { .region-inner { grid-template-columns: .85fr 1.15fr; } }
.region-text .btn { margin: 8px 0 12px; }

.region-map { margin: 0; }
.region-map svg { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow); }
.region-map figcaption { margin-top: 10px; text-align: right; }

.map-bg { fill: var(--map-bg); }
.map-ring { fill: none; stroke: var(--map-ring); stroke-width: 1.5; stroke-dasharray: 6 6; }
.map-ring-outer { opacity: .6; }
.map-ring-label { fill: var(--muted); font: 600 12px var(--font-body); }
.map-river { fill: none; stroke: var(--map-river); stroke-width: 5; stroke-linecap: round; opacity: .7; }
.map-river-label { fill: var(--map-river); font: italic 600 13px var(--font-body); }
.map-city circle { fill: var(--surface); stroke: var(--muted); stroke-width: 2; }
.map-city text { fill: var(--text); font: 500 14px var(--font-body); }
.map-home-halo { fill: var(--accent); opacity: .22; }
.map-home-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }
.map-home text { fill: var(--accent); font: 700 20px var(--font-head); }

/* Kleine Bildschirme: größere Beschriftung, Nebenorte ausblenden */
@media (max-width: 600px) {
  .map-minor, .map-river-label { display: none; }
  .map-city text { font-size: 22px; }
  .map-city circle { stroke-width: 3; }
  .map-ring-label { font-size: 18px; }
  .map-home text { font-size: 30px; }
}

/* ---------- Kontakt ---------- */
.contact-inner { display: grid; gap: clamp(32px, 5vw, 64px); }
@media (min-width: 960px) { .contact-inner { grid-template-columns: .9fr 1.1fr; align-items: start; } }

.contact-list { margin: 28px 0 0; display: grid; gap: 20px; }
.contact-list dt { display: flex; align-items: center; gap: 10px; font-weight: 650; margin-bottom: 4px; }
.contact-list dt svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-list dd { margin: 0 0 0 32px; color: var(--muted); overflow-wrap: anywhere; }

.contact-form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(20px, 4vw, 36px); box-shadow: var(--shadow);
}
.form-row { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.req { color: var(--accent); }

.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; min-height: 48px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
}
.field .is-invalid, .field-check.is-invalid input { border-color: #c0392b; }
.field-error { display: block; color: #b33a2a; font-size: .85rem; margin-top: 4px; }
:root[data-theme="dark"] .field-error { color: #f08a7a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field-error { color: #f08a7a; } }

.field-check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; }
.field-check input { width: 22px; height: 22px; min-height: 0; margin: 2px 0 0; accent-color: var(--primary); }
.field-check label { font-weight: 400; font-size: .92rem; margin: 0; }
.field-check .field-error { grid-column: 2; }

.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin: 14px 0 0; font-weight: 600; min-height: 1.5em; }
.form-status.is-success { color: var(--primary); }
.form-status.is-error { color: var(--accent); }

/* ---------- Rechtliches ---------- */
.legal { padding-block: clamp(48px, 6vw, 72px); }
.legal-inner { display: grid; gap: 16px; max-width: 900px; }
.legal-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.legal-block summary {
  list-style: none; cursor: pointer; padding: 20px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.legal-block summary::-webkit-details-marker { display: none; }
.legal-block summary h2 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); margin: 0; }
.legal-block summary::after {
  content: ""; flex-shrink: 0; width: 12px; height: 12px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-3px, -3px); transition: transform .25s;
}
.legal-block[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.legal-content { padding: 0 24px 28px; font-size: .95rem; overflow-wrap: anywhere; }
.legal-content h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin: 1.6em 0 .4em; }
.legal-content h3:first-child { margin-top: 0; }
#datenschutz .legal-content h3 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; margin-top: 2em; }
#datenschutz .legal-content h3:first-child { margin-top: 0; }
.legal-content h4 { font-size: .97rem; font-weight: 650; margin: 1.3em 0 .35em; }
.legal-content ul { padding-left: 1.2em; }

/* ---------- Fußzeile ---------- */
.site-footer { background: var(--text); color: var(--bg); padding-block: 40px; }
.site-footer a { color: var(--bg); }
.footer-inner { display: grid; gap: 20px; }
.footer-brand { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.footer-inner p { margin: 0; opacity: .85; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { display: inline-block; padding: 6px 0; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
@media (min-width: 800px) {
  .footer-inner { grid-template-columns: 1fr auto auto; align-items: center; gap: 40px; }
}
