/* Immo Leipzig — one landing page, one stylesheet, no framework. */

:root {
  --bg: #f7f6f3;
  --panel: #ffffff;
  --panel-alt: #f1efea;
  --ink: #17191c;
  --muted: #616872;
  --line: #e3e0d9;
  --accent: #14424f;      /* deep teal — reads as "solid", not "startup" */
  --accent-soft: #e6eef0;
  --accent-ink: #ffffff;
  --gold: #9a6b1f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.06);
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141a;
    --panel: #1a1d24;
    --panel-alt: #1f232b;
    --ink: #ecebe7;
    --muted: #9aa1ab;
    --line: #2b3038;
    --accent: #63b6c8;
    --accent-soft: #16262c;
    --accent-ink: #0d1a1f;
    --gold: #d9ab63;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.35);
  }
}

* { 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(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5vw, 48px); }
h2 { font-size: clamp(24px, 3.4vw, 34px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
a { color: inherit; }

/* ---- top bar ------------------------------------------------------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 16px clamp(16px, 5vw, 48px);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand strong { display: block; font-size: 18px; }
.mark {
  width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 17px;
}
.tagline { color: var(--muted); font-size: 13px; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 640px) { .nav { display: none; } }

/* ---- layout -------------------------------------------------------- */
main { display: block; }
.hero, .band {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) clamp(16px, 5vw, 48px);
}
.band { border-top: 1px solid var(--line); }
.section-lede { color: var(--muted); max-width: 62ch; font-size: 17px; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: 12px;
  font-weight: 600; color: var(--accent); margin-bottom: .8em;
}
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--gold); } }

/* ---- hero ---------------------------------------------------------- */
.hero { padding-top: clamp(48px, 8vw, 96px); }
.hero .lede { font-size: clamp(17px, 2.1vw, 20px); color: var(--muted); max-width: 60ch; }

.cta-block { margin: 32px 0 8px; }
.cta {
  font: inherit; font-weight: 600; font-size: 18px;
  padding: 16px 32px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: var(--shadow);
  transition: transform .12s ease, filter .12s ease;
}
.cta:hover { filter: brightness(1.08); }
.cta:active { transform: translateY(1px); }
.cta:focus-visible, .ghost:focus-visible, .nav a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
.cta-note { color: var(--muted); font-size: 14px; margin-top: 14px; max-width: 48ch; }

.ghost {
  font: inherit; padding: 14px 20px; border-radius: 12px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--line);
}
.ghost:hover { background: var(--panel-alt); }

.hero-points {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  color: var(--muted); font-size: 15px;
}
.hero-points li {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
}
.hero-points strong { color: var(--ink); display: block; }

/* ---- cards --------------------------------------------------------- */
.cards { display: grid; gap: 20px; margin-top: 28px; }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.card.plain { box-shadow: none; }
.card h3 { margin-bottom: .6em; }
.card p:last-child { margin-bottom: 0; }

.accent-band { background: var(--accent-soft); border-top-color: transparent; }
.accent-band .card { background: var(--panel); }

.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { padding-left: 26px; position: relative; font-size: 16px; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 700;
}
@media (prefers-color-scheme: dark) { .ticks li::before { color: var(--gold); } }

.fineprint {
  margin-top: 26px; color: var(--muted); font-size: 14.5px; max-width: 72ch;
  border-left: 3px solid var(--line); padding-left: 16px;
}

/* ---- steps --------------------------------------------------------- */
.steps {
  counter-reset: step; list-style: none; padding: 0; margin: 28px 0 0;
  display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.steps li {
  counter-increment: step; position: relative;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 22px 22px 64px;
}
.steps li::before {
  content: counter(step);
  position: absolute; left: 22px; top: 22px;
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 700;
}
.steps p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---- faq ----------------------------------------------------------- */
.faq { margin-top: 24px; border-top: 1px solid var(--line); max-width: 76ch; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); margin: 0 0 18px; }

/* ---- closing + footer ---------------------------------------------- */
.closing { text-align: center; }
.closing .section-lede { margin-inline: auto; }

.foot {
  border-top: 1px solid var(--line); background: var(--panel);
  padding: 32px clamp(16px, 5vw, 48px);
  color: var(--muted); font-size: 14px;
}
.foot > * { max-width: var(--maxw); margin-inline: auto; }
.foot-links { display: flex; gap: 20px; margin-bottom: 12px; }
.foot-links a { color: var(--ink); }

/* ---- legal pages (Impressum, Datenschutz) --------------------------- */
.legal { max-width: 76ch; }
.legal h2 { font-size: 20px; margin-top: 1.8em; }
.legal ul { padding-left: 20px; color: var(--muted); }
.legal li { margin-bottom: 10px; }
.legal p { color: var(--muted); }
.legal .todo {
  background: var(--accent-soft); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; font-size: 15px;
}
.back { margin-top: 2.4em; }

/* ---- dialog -------------------------------------------------------- */
dialog {
  border: 1px solid var(--line); border-radius: 18px; padding: 0;
  width: min(560px, calc(100vw - 32px));
  /* The form is taller than a laptop viewport. Without this the consent
     checkbox and the submit button end up below the fold with nothing to
     scroll — i.e. unreachable. */
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--panel); color: var(--ink);
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
}
dialog::backdrop { background: rgba(10,12,16,.55); backdrop-filter: blur(2px); }
dialog form, dialog .done { padding: 28px; }
.dialog-lede { color: var(--muted); font-size: 15px; }

fieldset.choice { border: 0; padding: 0; margin: 0 0 20px; }
fieldset.choice legend { font-weight: 600; padding: 0 0 8px; }
fieldset.choice label { display: flex; gap: 10px; align-items: center; padding: 7px 0; font-size: 15.5px; }

.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field em { font-style: normal; color: var(--gold); }
.field em.opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 11px 13px;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent);
}
.row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) { .row { grid-template-columns: 1fr; } }

.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; font-size: 14px; color: var(--muted); }
.check input { margin-top: 4px; flex: none; }
.check a { color: var(--ink); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-error {
  background: #fdecea; color: #8c2f24; border: 1px solid #f0c4bd;
  border-radius: 10px; padding: 10px 12px; font-size: 14.5px;
}
@media (prefers-color-scheme: dark) {
  .form-error { background: #2a1715; color: #e5a099; border-color: #4a2b26; }
}

.dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }
.dialog-actions .cta { font-size: 16px; padding: 14px 26px; }
.done h2 { margin-bottom: .4em; }
.done p { color: var(--muted); }
