/* Layout: dunkles Logo-Band oben (Original-Schieferblau) mit gezeichnetem Straßenzug, darunter ruhige helle Inhaltsseite */
:root {
  /* Markenfarben aus dem Original-Template und dem Logo */
  --brand-slate: #517082;   /* Seitenhintergrund des alten Templates */
  --brand-dark: #38424e;    /* alter Footer */
  --brand-blue: #406f99;    /* Menü-Links */
  --brand-sky: #5093bd;     /* Banner-Rahmen */
  --brand-cyan: #00ccff;    /* "CR" im Logo */
  --brand-sage: #8db6b6;    /* "HAUSVERWALTUNG" im Logo */
  --brand-ice: #cfe3ec;     /* Tabellenköpfe */

  --bg: #f2f6f8;
  --surface: #ffffff;
  --fg: #1d2a33;
  --muted: #546570;
  --line: #d3e0e7;
  --blue: var(--brand-blue);
  --blue-soft: #e4eff5;
  --hot: #2b6f96;
  --hot-soft: #e1f2fa;
  --todo-bg: #fff4c2;
  --todo-fg: #5a4400;

  --font-mark: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(2rem, 1.4rem + 2.6vw, 3rem);

  --measure: 66ch;
  --wrap: 68rem;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #18232b; --surface: #1f2d37; --fg: #e4edf1; --muted: #9fb4bf; --line: #2e404c;
    --blue: #7cc4e6; --blue-soft: #243846; --hot: #5fd3f5; --hot-soft: #1d3644;
    --todo-bg: #4a3c08; --todo-fg: #ffe9a3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #18232b; --surface: #1f2d37; --fg: #e4edf1; --muted: #9fb4bf; --line: #2e404c;
  --blue: #7cc4e6; --blue-soft: #243846; --hot: #5fd3f5; --hot-soft: #1d3644;
  --todo-bg: #4a3c08; --todo-fg: #ffe9a3;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 2px; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Kopf: immer im dunklen Markenband, damit das Logo wie im Original wirkt */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--brand-dark); }
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--brand-dark) 94%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--brand-sage) 25%, transparent);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; flex-wrap: wrap; padding-block: .75rem; }
.brand { display: block; line-height: 0; }
.brand img { width: 180px; height: auto; }
.nav { display: flex; gap: .25rem 1.25rem; flex-wrap: wrap; font-size: var(--step--1); font-weight: 600; }
.nav a { color: var(--brand-ice); text-decoration: none; padding: .3rem 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--brand-cyan); }
.site-head :focus-visible, .hero :focus-visible { outline-color: var(--brand-cyan); }

/* Hero: Schieferblau mit Straßenzug */
.hero { background: linear-gradient(180deg, var(--brand-dark) 0%, var(--brand-slate) 70%); color: #fff; overflow: hidden; }
.hero .wrap { padding-block: clamp(2.5rem, 6vw, 4.5rem) 0; }
.eyebrow { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem; }
.hero .eyebrow { color: var(--brand-sage); }
h1, h2, h3 { text-wrap: balance; line-height: 1.2; margin: 0; }
h1 { font-size: var(--step-3); font-weight: 700; letter-spacing: -.015em; }
.hero h1 { max-width: 18ch; }
h1 em { font-family: var(--font-mark); font-weight: 600; font-size: 1.15em; color: var(--brand-cyan); }
.lead { font-size: var(--step-1); max-width: 40ch; margin: 1.1rem 0 1.6rem; }
.hero .lead { color: var(--brand-ice); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .7rem 1.15rem; border-radius: var(--radius); font-weight: 600; font-size: var(--step--1); text-decoration: none; border: 1px solid transparent; }
.btn.primary { background: var(--brand-cyan); color: var(--brand-dark); }
.btn.primary:hover { background: #4fdcff; }
.btn.ghost { color: #fff; border-color: color-mix(in srgb, #fff 55%, transparent); }
.btn.ghost:hover { border-color: #fff; }
.skyline { display: block; width: 100%; height: clamp(150px, 22vw, 330px); object-fit: cover; object-position: center bottom; margin-top: clamp(1.5rem, 4vw, 2.5rem); }

/* Abschnitte */
section.block + section.block { border-top: 1px solid var(--line); }
section.block { padding-block: clamp(2.5rem, 5vw, 4rem); scroll-margin-top: 4.5rem; }
.block-head { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); gap: 1rem 3rem; }
.block-head h2 { font-size: var(--step-2); font-weight: 700; }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1rem; }

.welcome { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: start; }
.person { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 1rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; max-width: 22rem; }
.person img { width: 96px; height: 122px; object-fit: cover; border-radius: 4px; }
.person strong { display: block; font-size: var(--step-0); }
.person span { font-size: var(--step--1); color: var(--muted); }
.sign { font-family: var(--font-mark); font-style: italic; font-size: 1.6rem; color: var(--blue); margin-top: .25rem; }

/* Leistungen */
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.list-title { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 .75rem; }
.objects { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.objects li { padding: .65rem .9rem; background: var(--blue-soft); border-radius: var(--radius); font-weight: 600; }
.services { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.services li { display: grid; gap: .15rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.services li:last-child { border-bottom: 0; padding-bottom: 0; }
.services b { font-size: var(--step-0); }
.services span { color: var(--muted); font-size: var(--step--1); }

/* Mieter */
.hotline { background: var(--hot-soft); border: 1px solid color-mix(in srgb, var(--hot) 35%, transparent); border-radius: var(--radius); padding: 1.4rem; display: grid; gap: .3rem; max-width: 32rem; }
.hotline .label { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--hot); }
.hotline .num { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; color: var(--fg); }
.hotline small { color: var(--muted); font-size: .82rem; }
.note { font-size: var(--step--1); color: var(--muted); }
.emergency { margin-top: 1.25rem; font-size: var(--step--1); }

/* Kontakt */
.contact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2.5rem; }
.hours table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hours th { text-align: left; font-weight: 600; padding: .1rem 1.25rem .1rem 0; white-space: nowrap; }
.hours td { padding: .1rem 0; }
.hours .note { margin: .4rem 0 0; }
.contact dl { margin: 0; display: grid; gap: .1rem; }
.contact dt { font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.contact dd { margin: 0 0 .75rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.copy { font: inherit; font-size: .78rem; font-weight: 600; color: var(--blue); background: none; border: 1px solid var(--line); border-radius: 4px; padding: .1rem .45rem; margin-left: .4rem; cursor: pointer; }

/* Rechtstexte */
.legal { padding-block: clamp(2rem, 5vw, 3.5rem); }
.legal h1 { font-size: var(--step-3); margin-bottom: 1.5rem; }
.legal h2 { font-size: var(--step-1); margin: 2rem 0 .6rem; }
.legal h3 { font-size: var(--step-0); margin: 1.25rem 0 .4rem; }
.legal p, .legal li { max-width: var(--measure); }
.legal address { font-style: normal; }

.todo { background: var(--todo-bg); color: var(--todo-fg); padding: 0 .3rem; border-radius: 3px; outline: 1px dashed currentColor; font-size: .92em; }

/* Fuß */
.site-foot { background: var(--brand-dark); padding-block: 1.6rem; font-size: var(--step--1); color: var(--brand-sage); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: .75rem 2rem; flex-wrap: wrap; }
.site-foot nav { display: flex; gap: 1.2rem; }
.site-foot a { color: var(--brand-ice); }

@media (max-width: 760px) {
  .block-head, .welcome, .cols, .contact { grid-template-columns: minmax(0, 1fr); }
  .person { max-width: none; }
}
