/* ═══════════════════════════════════════════════════════════════
   NORDLICHT IMMOBILIEN — Demo von UNICORNS.media
   „Editorial Estate": warmes Papier, Tannengrün, Serifen-Display.
   Themes via --akzent/--akzent-tief (URL-Param ?farbe=…).
   ═══════════════════════════════════════════════════════════════ */
:root {
  --papier: #F7F4EE;
  --papier-tief: #EFEAE0;
  --karte: #FFFFFF;
  --tinte: #191C19;
  --tinte-2: #4A4F49;
  --tinte-3: #767B74;
  --linie: #DDD6C8;
  --akzent: #1E4D3B;      /* Tanne (Default-Theme) */
  --akzent-tief: #143528;
  --akzent-hell: #E4EDE6;
  --gold: #B08A45;
  --dunkel: #14181A;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --radius-lg: 22px;
  --schatten: 0 1px 2px rgba(20, 24, 20, 0.06), 0 14px 40px rgba(20, 24, 20, 0.10);
  --schatten-hoch: 0 2px 4px rgba(20, 24, 20, 0.08), 0 26px 64px rgba(20, 24, 20, 0.18);
  --dur: 240ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --wrap: 74rem;
}
[data-theme="marine"]   { --akzent: #1C3A5E; --akzent-tief: #12263F; --akzent-hell: #E2E9F2; }
[data-theme="bordeaux"] { --akzent: #6E1F2E; --akzent-tief: #4B1520; --akzent-hell: #F2E3E6; }
[data-theme="messing"]  { --akzent: #8A6524; --akzent-tief: #5F4517; --akzent-hell: #F2EAD9; }
[data-theme="graphit"]  { --akzent: #3A3F44; --akzent-tief: #24282C; --akzent-hell: #E8EAEC; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 1.4rem + 3.6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem); }
h3 { font-size: 1.375rem; }
h1 em, h2 em { font-style: italic; color: var(--akzent); }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--akzent);
  margin-bottom: 1rem;
}
.sec-head { max-width: 44rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

/* Reveals */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.55s var(--ease), transform 0.55s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Buttons & Chips */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 1rem var(--sans);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--akzent); color: #fff; box-shadow: var(--schatten); }
.btn-solid:hover { background: var(--akzent-tief); }
.btn-line { border-color: var(--tinte); color: var(--tinte); background: transparent; }
.btn-line:hover { background: var(--tinte); color: var(--papier); }
.btn-gold { background: var(--gold); color: #17130A; box-shadow: var(--schatten); }
.btn-gold:hover { filter: brightness(1.06); }
.btn-line-light { border-color: rgba(255, 255, 255, 0.4); color: #fff; background: transparent; }
.btn-line-light:hover { background: rgba(255, 255, 255, 0.1); }
.chip {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--linie);
  background: var(--karte);
  color: var(--tinte-2);
  font: 600 0.9375rem var(--sans);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.chip:hover { border-color: var(--akzent); color: var(--akzent); }
.chip.is-active { background: var(--akzent); border-color: var(--akzent); color: #fff; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; border-radius: 4px; }

/* Topbar & Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 8px clamp(1rem, 3vw, 2rem);
  background: var(--dunkel);
  color: #EDE9DF;
  font-size: 0.85rem;
}
.topbar p { margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.topbar-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.topbar-sub { opacity: 0.75; }
.topbar a { color: var(--gold); font-weight: 600; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
@media (max-width: 560px) { .topbar-sub { display: none; } }

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--papier) 86%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.site-head.is-scrolled { border-bottom-color: var(--linie); }
.head-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 76px; }
.brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--tinte); text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--akzent); font-style: italic; font-weight: 600; }
.head-nav { display: none; gap: clamp(1.25rem, 2.5vw, 2rem); }
.head-nav a { color: var(--tinte-2); text-decoration: none; font-weight: 500; font-size: 0.9688rem; }
.head-nav a:hover { color: var(--akzent); }
.head-cta { min-height: 44px; padding: 10px 20px; font-size: 0.9375rem; }
@media (min-width: 920px) { .head-nav { display: flex; } }
@media (max-width: 480px) { .head-cta { font-size: 0.8438rem; padding: 9px 14px; } }

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 11fr 10fr; } }
.hero-sub { font-size: 1.1875rem; color: var(--tinte-2); max-width: 34rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.875rem; margin-top: 1.75rem; }
.hero-kpi {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: clamp(1.25rem, 4vw, 3rem);
  margin: 2.5rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid var(--linie);
  width: fit-content;
}
.hero-kpi dt { font-family: var(--serif); font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 700; color: var(--akzent); font-variant-numeric: tabular-nums; }
.hero-kpi dd { margin: 0.25rem 0 0; font-size: 0.875rem; color: var(--tinte-3); }
@media (max-width: 480px) { .hero-kpi { grid-template-columns: 1fr; gap: 1rem; } }
.hero-media img, .ueber-media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--schatten-hoch);
  width: 100%;
  height: auto;
  object-fit: cover;
}
.hero-media img { aspect-ratio: 16 / 10; }

/* Bild-Fallback: Seite darf NIE kaputt aussehen */
.img-fallback img { display: none; }
.img-fallback { border-radius: var(--radius-lg); aspect-ratio: 16 / 10; background: linear-gradient(145deg, var(--akzent-tief), var(--akzent) 60%, var(--gold)); }

/* Objekte */
.objekte { background: var(--papier-tief); }
.filter { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-bottom: 2rem; }
.obj-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px)  { .obj-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .obj-grid { grid-template-columns: repeat(3, 1fr); } }
.obj-card {
  background: var(--karte);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--schatten);
  cursor: pointer;
  border: none;
  text-align: left;
  padding: 0;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.obj-card:hover { transform: translateY(-4px); box-shadow: var(--schatten-hoch); }
.obj-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(145deg, var(--akzent-tief), var(--akzent)); }
.obj-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.obj-card:hover .obj-media img { transform: scale(1.04); }
.obj-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: color-mix(in srgb, var(--dunkel) 82%, transparent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.obj-body { padding: 1.25rem 1.375rem 1.5rem; display: flex; flex-direction: column; gap: 0.375rem; flex-grow: 1; }
.obj-ort { font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--akzent); }
.obj-titel { font-family: var(--serif); font-size: 1.25rem; font-weight: 650; line-height: 1.25; }
.obj-daten { color: var(--tinte-3); font-size: 0.9063rem; }
.obj-preis { margin-top: 0.625rem; font-family: var(--serif); font-size: 1.375rem; font-weight: 700; color: var(--tinte); font-variant-numeric: tabular-nums; }
.obj-preis small { font-family: var(--sans); font-size: 0.8125rem; font-weight: 500; color: var(--tinte-3); }
.obj-note { margin-top: 2rem; font-size: 0.875rem; color: var(--tinte-3); }
.obj-card.is-hidden { display: none; }

/* Leistungen */
.leist-grid { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .leist-grid { grid-template-columns: repeat(3, 1fr); } }
.leist-card { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.75rem; display: flex; flex-direction: column; }
.leist-card p { color: var(--tinte-2); font-size: 0.9688rem; flex-grow: 1; }
.leist-link { border: none; background: none; padding: 0; color: var(--akzent); font: 600 0.9688rem var(--sans); cursor: pointer; text-align: left; }
.leist-link:hover { color: var(--akzent-tief); text-decoration: underline; }

/* Über uns */
.ueber { background: var(--papier-tief); }
.ueber-grid { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 960px) { .ueber-grid { grid-template-columns: 5fr 6fr; } }
.ueber-media img { aspect-ratio: 4 / 3; }
.ueber-liste { list-style: none; padding: 0; margin: 1.25rem 0; display: flex; flex-direction: column; gap: 0.625rem; }
.ueber-liste li { padding-left: 1.75rem; position: relative; color: var(--tinte-2); }
.ueber-liste li::before { content: '✓'; position: absolute; left: 0; color: var(--akzent); font-weight: 700; }
.bewertung { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9375rem; color: var(--tinte-2); }
.sterne { color: var(--gold); letter-spacing: 0.1em; }

/* Demo-Reveal */
.demo-reveal { background: var(--dunkel); color: #EFEBE1; text-align: center; }
.demo-reveal .eyebrow { color: var(--gold); }
.demo-reveal h2 { color: #fff; max-width: 30ch; margin-inline: auto; }
.demo-reveal h2 em { color: var(--gold); }
.demo-text { max-width: 54ch; margin: 0 auto 2rem; color: rgba(239, 235, 225, 0.85); }
.demo-ctas { display: flex; flex-wrap: wrap; gap: 0.875rem; justify-content: center; }
.demo-micro { margin-top: 1.25rem; font-size: 0.8438rem; color: rgba(239, 235, 225, 0.55); }

/* Footer */
.site-foot { background: var(--papier); border-top: 1px solid var(--linie); padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem; }
.foot-grid { display: grid; gap: 2rem; }
@media (min-width: 820px) { .foot-grid { grid-template-columns: repeat(3, 1fr); } }
.brand-foot { font-size: 1.25rem; margin: 0 0 0.375rem; }
.foot-claim { color: var(--tinte-3); font-size: 0.9375rem; }
.site-foot address { font-style: normal; color: var(--tinte-2); font-size: 0.9375rem; }
.site-foot address p { margin: 0 0 0.375rem; }
.site-foot address a { color: inherit; text-decoration: none; }
.foot-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.foot-links button, .foot-links a { border: none; background: none; padding: 0; color: var(--tinte-2); font: 500 0.9375rem var(--sans); cursor: pointer; text-decoration: none; }
.foot-links button:hover, .foot-links a:hover { color: var(--akzent); text-decoration: underline; }
.foot-disclaimer { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--linie); font-size: 0.8125rem; color: var(--tinte-3); }

/* Overlays (Exposé, Lead, Legal) */
.overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: clamp(0.75rem, 3vw, 2rem); }
.overlay[hidden] { display: none; }
.overlay-scrim { position: absolute; inset: 0; background: rgba(15, 18, 15, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.overlay-panel {
  position: relative;
  background: var(--karte);
  border-radius: var(--radius-lg);
  box-shadow: var(--schatten-hoch);
  width: min(60rem, 100%);
  max-height: min(92dvh, 60rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.lead-panel, .legal-panel { width: min(34rem, 100%); }
.legal-panel { width: min(44rem, 100%); }
.ov-close {
  position: sticky;
  top: 0.875rem;
  margin-left: auto;
  margin-right: 0.875rem;
  translate: 0 0.875rem;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--dunkel);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  float: right;
}
.ov-close:hover { background: var(--akzent); }
body.ov-open { overflow: hidden; }

/* Exposé-Inhalt */
.xp-galerie { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(145deg, var(--akzent-tief), var(--akzent)); border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }
.xp-galerie img { width: 100%; height: 100%; object-fit: cover; }
.xp-nav { position: absolute; inset-inline: 12px; top: 50%; translate: 0 -50%; display: flex; justify-content: space-between; pointer-events: none; }
.xp-nav button { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255, 255, 255, 0.92); color: var(--tinte); font-size: 1.2rem; cursor: pointer; box-shadow: var(--schatten); }
.xp-nav button:hover { background: #fff; }
.xp-zaehler { position: absolute; right: 14px; bottom: 12px; background: rgba(15, 18, 15, 0.65); color: #fff; font-size: 0.8125rem; padding: 3px 10px; border-radius: 999px; }
.xp-body { padding: clamp(1.5rem, 4vw, 2.5rem); }
.xp-kopf { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }
.xp-titel h3 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin-bottom: 0.25rem; }
.xp-ort { color: var(--tinte-3); font-size: 0.9375rem; }
.xp-preisblock { text-align: right; }
.xp-preis { font-family: var(--serif); font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 700; color: var(--akzent); font-variant-numeric: tabular-nums; }
.xp-preis-sub { font-size: 0.8438rem; color: var(--tinte-3); }
.xp-daten { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.875rem 1.25rem; margin-bottom: 1.5rem; padding: 1.25rem; background: var(--papier); border-radius: var(--radius); }
.xp-daten dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--tinte-3); }
.xp-daten dd { margin: 0.125rem 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.xp-text { color: var(--tinte-2); }
.xp-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.25rem 0 1.5rem; }
.xp-chip { background: var(--akzent-hell); color: var(--akzent-tief); font-size: 0.8438rem; font-weight: 600; padding: 5px 13px; border-radius: 999px; }
.xp-energie { font-size: 0.8125rem; color: var(--tinte-3); margin-bottom: 1.5rem; }
.xp-cta { display: flex; flex-wrap: wrap; gap: 0.875rem; }

/* Lead-Dialog */
.lead-body { padding: clamp(1.5rem, 4vw, 2.25rem); }
.lead-schritt { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tinte-3); margin-bottom: 0.5rem; }
.lead-frage { font-family: var(--serif); font-size: 1.375rem; font-weight: 650; margin-bottom: 1.25rem; }
.lead-opts { display: grid; gap: 0.625rem; }
.lead-opt { border: 1.5px solid var(--linie); background: var(--karte); border-radius: var(--radius); padding: 0.875rem 1.125rem; font: 600 1rem var(--sans); color: var(--tinte); text-align: left; cursor: pointer; transition: all var(--dur) var(--ease); }
.lead-opt:hover { border-color: var(--akzent); }
.lead-opt.is-active { border-color: var(--akzent); background: var(--akzent-hell); }
.lead-feld { display: flex; flex-direction: column; gap: 0.375rem; margin-bottom: 1rem; }
.lead-feld label { font-size: 0.875rem; font-weight: 600; }
.lead-feld input {
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--linie);
  border-radius: 10px;
  font: 500 1rem var(--sans);
  background: #fff;
  color: var(--tinte);
}
.lead-feld input:focus { outline: none; border-color: var(--akzent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 18%, transparent); }
.lead-nav { display: flex; justify-content: space-between; gap: 0.75rem; margin-top: 1.5rem; }
.lead-hinweis { font-size: 0.8125rem; color: var(--tinte-3); margin-top: 1rem; }
.lead-erfolg { text-align: center; padding: 1rem 0; }
.lead-erfolg .check { width: 64px; height: 64px; margin: 0 auto 1.25rem; border-radius: 50%; background: var(--akzent-hell); color: var(--akzent); display: grid; place-items: center; font-size: 1.75rem; }
.hp-feld { position: absolute; left: -9999px; opacity: 0; }

/* Legal */
.legal-body { padding: clamp(1.5rem, 4vw, 2.25rem); }
.legal-body h3 { margin-top: 0; }
.legal-body h4 { margin: 1.25rem 0 0.375rem; font-family: var(--sans); font-size: 1rem; }
.legal-body p { font-size: 0.9375rem; color: var(--tinte-2); }

/* Konfigurator-Mini-Panel (?konfig) */
.konfig {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: var(--schatten-hoch);
  padding: 1.125rem;
  width: min(20rem, calc(100vw - 2rem));
  font-size: 0.9063rem;
}
.konfig h3 { font-family: var(--sans); font-size: 0.9375rem; margin-bottom: 0.75rem; }
.konfig .lead-feld input { min-height: 40px; }
.konfig-farben { display: flex; gap: 0.5rem; margin: 0.5rem 0 0.875rem; }
.konfig-farben button { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--linie); cursor: pointer; }
.konfig-farben button.is-active { box-shadow: 0 0 0 2.5px var(--akzent); }
.konfig-zeile { display: flex; gap: 0.5rem; }
.konfig-zeile .btn { flex: 1; min-height: 40px; padding: 8px 12px; font-size: 0.8438rem; }
