/* Layout: an exposé built like the façade. An ochre "Putz" band carries the house name in green
   shop-front lettering; photos sit in round-arched frames like the three portals; the facts
   follow below on cool granite-grey stone. */
:root {
  color-scheme: light;
  --stone: #edefeb;
  --paper: #f8f9f6;
  --putz: #e9dba6;
  --ink: #1c2420;
  --muted: #55615a;
  --line: #c9d1cb;
  --green: #2b5943;
  --on-green: #f4f7f2;
  --tint: #d7e6dc;
  --map-bldg: #d6dbd5;
  --map-road: #ffffff;
  --map-water: #bdd3d6;
  --map-water-ink: #47707a;
  --map-green: #d5e2d1;
  --map-square: #f3f4f0;
  --map-route: #b9d5c3;
  --plan-wall: #3a4540;
  --plan-hall: #e2e7e1;
  --scrim: rgba(12, 16, 14, 0.94);
  --on-scrim: #eef1ed;
  --scrim-btn: rgba(238, 241, 237, 0.14);
  --scrim-btn-hover: rgba(238, 241, 237, 0.24);
  --display: "Marcellus", "Cormorant SC", Georgia, "Times New Roman", serif;
  --body: "Albert Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step-0: 0.8125rem;
  --step-1: 1.0625rem;
  --step-2: 1.375rem;
  --step-3: clamp(1.75rem, 3.4vw, 2.375rem);
  --step-4: clamp(2.75rem, 8vw, 5.25rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --stone: #121714; --paper: #19201c; --putz: #2c2919; --ink: #e5e9e4;
    --muted: #9ba79f; --line: #2f3933; --green: #8cc2a2; --on-green: #0d1912;
    --tint: #1f3629; --map-bldg: #252e29; --map-road: #34403a; --map-water: #1c3238;
    --map-water-ink: #86b3bd; --map-green: #1a2a20; --map-square: #1d2420; --map-route: #2e5a43;
    --plan-wall: #b3bfb8; --plan-hall: #252e29;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --stone: #121714; --paper: #19201c; --putz: #2c2919; --ink: #e5e9e4;
  --muted: #9ba79f; --line: #2f3933; --green: #8cc2a2; --on-green: #0d1912;
  --tint: #1f3629; --map-bldg: #252e29; --map-road: #34403a; --map-water: #1c3238;
  --map-water-ink: #86b3bd; --map-green: #1a2a20; --map-square: #1d2420; --map-route: #2e5a43;
  --plan-wall: #b3bfb8; --plan-hall: #252e29;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--stone);
  color: var(--ink);
  font: 400 var(--step-1)/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--green); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; text-wrap: balance; margin: 0; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.eyebrow {
  font-size: var(--step-0);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Fanlight mark: the radiating bars over each portal of No. 28 */
.fan { width: 2.25rem; height: auto; color: var(--green); flex: none; }
.fan path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

/* Top bar */
.bar { background: var(--putz); }
.bar .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-block: 14px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 1.125rem; color: var(--ink); text-decoration: none;
}
.bar-link { font-size: var(--step-0); font-weight: 600; letter-spacing: 0.04em; }

/* Hero: the façade band */
.hero { background: var(--putz); border-bottom: 1px solid var(--line); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: end;
  padding-block: clamp(32px, 6vw, 72px) 0;
}
.hero-text { display: grid; gap: 22px; padding-bottom: clamp(32px, 6vw, 72px); min-width: 0; }
.hero h1 {
  font-size: var(--step-4);
  line-height: 0.98;
  letter-spacing: 0.02em;
  color: var(--green);
}
.hero h1 small {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.32em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.lead { font-size: var(--step-2); line-height: 1.45; max-width: 34ch; }
.traits {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  list-style: none; margin: 0; padding: 0;
  font-size: var(--step-0); font-weight: 500; color: var(--muted);
}
.traits li { display: flex; align-items: center; gap: 8px; }
.traits li::before { content: ""; width: 6px; height: 6px; background: var(--green); border-radius: 50%; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.button {
  display: inline-block;
  padding: 13px 22px;
  background: var(--green);
  color: var(--on-green);
  font-weight: 600;
  text-decoration: none;
  border-radius: 2px;
}
.button:hover { filter: brightness(1.08); }
.button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Round-arched photo frames, after the ground-floor portals */
.arch { margin: 0; display: grid; gap: 10px; min-width: 0; }
.arch .frame {
  border-radius: 999px 999px 0 0;
  overflow: hidden;
  border: 6px solid var(--paper);
  border-bottom: 0;
  background: var(--paper);
  max-width: 100%;
}
.arch img { width: 100%; }
.arch.portrait .frame { aspect-ratio: 4 / 5; }
.arch.portrait img { height: 100%; object-fit: cover; }
figcaption { font-size: var(--step-0); color: var(--muted); }
.hero .arch { justify-self: end; width: min(100%, 420px); }
.hero .arch figcaption { padding-bottom: 12px; }

/* Sections */
main section { padding-block: clamp(48px, 8vw, 96px); border-bottom: 1px solid var(--line); }
main section:last-child { border-bottom: 0; }
.head { display: grid; gap: 10px; margin-bottom: clamp(24px, 4vw, 40px); }
.head h2 { font-size: var(--step-3); line-height: 1.1; }
.prose { display: grid; gap: 1em; max-width: 62ch; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}
.photo { margin: 0; display: grid; gap: 10px; min-width: 0; }
.photo img { border: 6px solid var(--paper); width: 100%; }

/* Objektdaten */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.facts-group { background: var(--paper); border: 1px solid var(--line); padding: 8px 24px 12px; min-width: 0; }
.facts-group h3 {
  font-family: var(--body); font-size: var(--step-0); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  padding-block: 14px 6px;
}
.facts dl { margin: 0; }
.facts dl div {
  display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 4px 16px;
  padding-block: 12px; border-top: 1px solid var(--line);
}
.facts dt { color: var(--muted); font-size: 0.9375rem; }
.facts dd { margin: 0; font-weight: 500; }
.facts dd.ask { font-weight: 400; font-style: italic; color: var(--muted); }
.facts-note { margin-top: 20px; font-size: 0.9375rem; color: var(--muted); max-width: 62ch; }

/* Lage */
.distances { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.distances li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: baseline;
  padding-block: 12px; border-bottom: 1px solid var(--line);
}
.distances strong { font-weight: 600; }
.distances span { grid-column: 1; font-size: 0.9375rem; color: var(--muted); }
.distances .m {
  grid-column: 2; grid-row: 1 / span 2; align-self: center;
  font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap;
}
.distance-note { margin-top: 12px; font-size: var(--step-0); color: var(--muted); }
.portals {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 32px); margin-top: clamp(36px, 6vw, 64px);
}
.portals .arch:nth-child(2) img { object-position: 38% 50%; }

/* Räume: façade elevation beside the rooms, grouped by floor */
.rooms-layout {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 64px); align-items: start;
}
.elev { margin: 0; display: grid; gap: 10px; color: var(--ink); position: sticky; top: calc(env(safe-area-inset-top, 0px) + 24px); }
.elev svg { display: block; width: 100%; max-width: 420px; height: auto; }
.e-house { fill: var(--paper); }
.e-ugbg { fill: var(--paper); }
.e-hatch { stroke: var(--muted); stroke-width: 1; opacity: 0.5; }
.fl-fill { fill: var(--tint); transition: opacity 0.2s; }
.e-label { transition: opacity 0.2s; }
.elev[data-active] .fl-fill, .elev[data-active] .e-label { opacity: 0.3; }
.elev[data-active="og1"] [data-floor="og1"],
.elev[data-active="eg"] [data-floor="eg"],
.elev[data-active="ug"] [data-floor="ug"] { opacity: 1; }
.e-lines, .e-faded { fill: none; stroke-linejoin: round; stroke-linecap: round; }
.e-lines { stroke: var(--green); stroke-width: 1.6; }
.e-faded { stroke: var(--muted); stroke-width: 1.2; opacity: 0.55; }
.e-ug { stroke-dasharray: 5 4; }
.e-ground { stroke: var(--ink); stroke-width: 2; }
.e-label path { fill: none; stroke: var(--muted); stroke-width: 1; }
.e-label text { font: 600 13px var(--body); fill: var(--ink); }
.e-label .sub { font-weight: 400; fill: var(--muted); }
.rooms { display: grid; gap: 28px; min-width: 0; }
.floor-group { display: grid; gap: 12px; }
.floor-group h3 {
  font-family: var(--body); font-size: var(--step-0); font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.room-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.room {
  background: var(--paper); border: 1px solid var(--line); padding: 18px 20px;
  display: grid; gap: 6px; align-content: start; transition: border-color 0.2s;
}
.floor-group:hover .room { border-color: var(--green); }
.room h4 { margin: 0; font-family: var(--display); font-weight: 400; font-size: var(--step-2); line-height: 1.2; }
.room p { color: var(--muted); font-size: 0.9375rem; }
.room .size { font-size: var(--step-0); font-style: italic; }
.rooms-note { font-size: 0.9375rem; color: var(--muted); }

/* Photos open full size in a lightbox; the hero image stays static */
.zoom { display: block; cursor: zoom-in; }
.arch .zoom { height: 100%; }
.zoom img { transition: filter 0.2s; }
.zoom:hover img { filter: brightness(1.06); }
.zoom:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: var(--scrim); color: var(--on-scrim);
}
.lightbox::backdrop { background: transparent; }
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.lb-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: max(12px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  font-size: var(--step-0); font-variant-numeric: tabular-nums;
}
.lightbox figure {
  margin: 0; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 0 clamp(16px, 7vw, 88px) max(20px, env(safe-area-inset-bottom, 0px));
}
.lightbox figure img { max-width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; }
.lightbox figcaption { color: var(--on-scrim); text-align: center; max-width: 62ch; }
.lb-btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: var(--scrim-btn); color: var(--on-scrim);
  font: 400 1.75rem/1 var(--body); cursor: pointer;
}
.lb-btn:hover { background: var(--scrim-btn-hover); }
.lb-btn:focus-visible { outline: 2px solid var(--on-scrim); outline-offset: 2px; }
.lb-prev, .lb-next { position: absolute; top: 50%; translate: 0 -50%; }
.lb-prev { left: max(12px, env(safe-area-inset-left, 0px)); }
.lb-next { right: max(12px, env(safe-area-inset-right, 0px)); }
@media (max-width: 600px) {
  .lb-prev, .lb-next { top: auto; bottom: max(16px, env(safe-area-inset-bottom, 0px)); translate: none; }
  .lightbox figure { padding-inline: 16px; padding-bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + 60px); }
  .lightbox figure img { max-height: calc(100dvh - 210px); }
}

/* Haus: two photos stacked beside the text */
.photo-stack { display: grid; gap: 28px; min-width: 0; }

/* Einblicke: one wide photo and one arch in the first row, three photos below */
.gallery {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 32px) 24px; align-items: start;
}
.gallery .wide { grid-column: span 2; }
.gallery .photo img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery .wide img { aspect-ratio: 3 / 2; }
.gallery .arch .frame { aspect-ratio: 3 / 4; }
.gallery .arch img { height: 100%; object-fit: cover; }

/* Grundriss: drawn from the construction plan; wide (street left) on desktop, tall (street below) on phones */
.intro { max-width: 62ch; margin-bottom: clamp(24px, 4vw, 40px); }
.plans { display: grid; gap: clamp(32px, 5vw, 48px); }
.plan { margin: 0; display: grid; gap: 14px; min-width: 0; }
.plan-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font-size: var(--step-0); color: var(--muted); }
.plan-head h3 { font-size: var(--step-2); color: var(--ink); }
.plan-frame { border: 6px solid var(--paper); background: var(--paper); padding: clamp(8px, 2vw, 20px); }
.plan svg { display: block; width: 100%; height: auto; }
.plan-tall { display: none !important; }
.p-wall { fill: var(--plan-wall); }
.p-room { fill: var(--paper); }
.p-hall { fill: var(--plan-hall); }
.p-guest { fill: var(--tint); }
.p-yard { fill: var(--stone); }
.p-hatch { stroke: var(--line); stroke-width: 3; }
.p-below { fill: none; stroke: var(--line); stroke-width: 4; stroke-dasharray: 16 12; }
.p-thin, .p-glass, .p-dash, .p-arrow { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.p-thin { stroke: var(--muted); stroke-width: 3; }
.p-glass { stroke: var(--muted); stroke-width: 4; }
.p-dash { stroke: var(--muted); stroke-width: 3; stroke-dasharray: 10 9; }
.p-arrow { stroke: var(--green); stroke-width: 6; }
.p-arrowhead { fill: var(--green); }
.plan text { fill: var(--ink); }
.p-name { font-family: var(--display); }
.p-small { font-family: var(--body); font-weight: 600; }
.plan .p-out, .plan .p-street { fill: var(--muted); }
.plan .p-door { fill: var(--green); }
.plan .p-sub { font-family: var(--body); font-weight: 500; fill: var(--muted); }
.p-street { font-family: var(--body); font-weight: 500; letter-spacing: 0.14em; }
.p-halo { paint-order: stroke; stroke: var(--plan-hall); stroke-width: 10px; stroke-linejoin: round; }
.legend {
  display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: 0; padding: 0;
  font-size: var(--step-0); color: var(--muted);
}
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 14px; border: 2px solid var(--plan-wall); flex: none; }
.legend .k-guest { background: var(--tint); }
.legend .k-room { background: var(--paper); }
.legend .k-hall { background: var(--plan-hall); }
.legend .k-yard { background: repeating-linear-gradient(45deg, var(--line) 0 1px, var(--stone) 1px 5px); }
.plan-note { margin-top: 12px; font-size: var(--step-0); color: var(--muted); max-width: 62ch; }

/* Karte: drawn from OpenStreetMap data, themed through the tokens */
.map-figure { margin: clamp(36px, 6vw, 64px) 0 0; display: grid; gap: 14px; }
.map-frame { border: 6px solid var(--paper); background: var(--paper); }
.map { display: block; width: 100%; height: auto; aspect-ratio: 1000 / 636; color: var(--ink); }
.m-ground { fill: var(--stone); }
.m-green { fill: var(--map-green); }
.m-water { fill: var(--map-water); }
.m-square { fill: var(--map-square); }
.m-bldg { fill: var(--map-bldg); }
.m-house { fill: var(--green); }
.m-foot, .m-service, .m-minor, .m-major, .m-route { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.m-foot { stroke: var(--map-road); stroke-width: 2.5; }
.m-service { stroke: var(--map-road); stroke-width: 5; }
.m-minor { stroke: var(--map-road); stroke-width: 9; }
.m-major { stroke: var(--map-road); stroke-width: 12; }
.m-route { stroke: var(--map-route); stroke-width: 14; }
.m-labels text, .m-pin-label, .m-scale text {
  paint-order: stroke; stroke: var(--stone); stroke-width: 4px; stroke-linejoin: round;
}
.m-place { font: 600 15px var(--body); fill: var(--ink); }
.m-street { font: 500 13px var(--body); fill: var(--muted); letter-spacing: 0.04em; }
.m-water-label { font: italic 400 15px var(--body); fill: var(--map-water-ink); letter-spacing: 0.3em; }
.m-country { font: 400 20px var(--display); fill: var(--muted); letter-spacing: 0.08em; }
.m-country-sub { font: 600 11px var(--body); fill: var(--muted); letter-spacing: 0.2em; }
.m-pin-halo { fill: var(--green); opacity: 0.22; }
.m-pin-dot { fill: var(--green); stroke: var(--paper); stroke-width: 3; }
.m-pin-label { font: 400 17px var(--display); fill: var(--green); }
.m-scale path { fill: none; stroke: var(--ink); stroke-width: 2; }
.m-scale text { font: 600 12px var(--body); fill: var(--ink); }
.map-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.map-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

/* Kontakt */
.contact {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px); align-items: start;
}
.card { background: var(--paper); border: 1px solid var(--line); padding: 8px 24px; min-width: 0; }
.card dl { margin: 0; }
.card dl div { display: grid; gap: 2px; padding-block: 14px; border-top: 1px solid var(--line); }
.card dl div:first-child { border-top: 0; }
.card dt { font-size: var(--step-0); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.checklist { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }

/* Footer */
footer { border-top: 1px solid var(--line); background: var(--paper); }
footer .wrap { padding-block: 32px 40px; display: grid; gap: 12px; font-size: var(--step-0); color: var(--muted); }
footer h2 { font-family: var(--body); font-size: var(--step-0); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
footer ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }

/* Impressum and Datenschutz */
.legal .wrap { max-width: 760px; padding-block: 48px 72px; display: grid; gap: 14px; }
.legal h1 { font-size: var(--step-3); line-height: 1.15; margin-bottom: 10px; }
.legal h2 { font-size: var(--step-2); margin-top: 22px; }
.legal p, .legal ul { margin: 0; max-width: 68ch; }
.legal ul { padding-left: 1.2em; display: grid; gap: 4px; }
.legal address { font-style: normal; }
.legal .stand { color: var(--muted); font-size: var(--step-0); margin-top: 18px; }

@media (max-width: 999px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .plan-wide { display: none !important; }
  .plan-tall { display: block !important; }
}
@media (max-width: 820px) {
  .hero .wrap, .split, .contact, .facts, .rooms-layout, .gallery { grid-template-columns: minmax(0, 1fr); }
  .hero .arch { justify-self: start; width: min(100%, 380px); }
  .hero-text { padding-bottom: 0; }
  .elev { position: static; }
  .gallery .wide { grid-column: auto; }
  .gallery .arch { width: min(100%, 420px); }
}
@media (max-width: 599px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan-frame { justify-self: start; width: min(100%, 440px); }
}
@media (max-width: 600px) {
  .map { aspect-ratio: 1 / 1; }
  .m-place { font-size: 24px; }
  .m-street { font-size: 20px; }
  .m-water-label { font-size: 22px; }
  .m-pin-label { font-size: 28px; }
  .m-scale text { font-size: 18px; }
  .m-country, .m-country-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fl-fill, .e-label, .room { transition: none; }
}
@media (max-width: 520px) {
  .facts dl div { grid-template-columns: minmax(0, 1fr); }
  .facts-group, .card { padding-inline: 16px; }
  .bar-link { display: none; }
}
