@import url('fonts/fonts.css');

:root {
  color-scheme: light;
  --paper: #f3ede1;
  --paper-raised: #fffdf8;
  --ink: #2a1c14;
  --ink-soft: #6b5c4c;
  --ink-faint: #9c8e7a;
  --line: #ddd0b8;
  --brass: #a3792f;
  --brass-ink: #7a5620;
  --brass-soft: #ece0c2;
  --forest: #35503f;
  --forest-soft: #e1e8dc;
  --hero-ink: #f3ede1;
  --hero-ink-soft: #d9cdb2;
  --hero-ground: #1c130d;
  --shadow: 0 2px 3px rgba(42, 28, 20, 0.06), 0 14px 34px -14px rgba(42, 28, 20, 0.28);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; text-wrap: balance; margin: 0; }
em { font-style: italic; color: var(--brass-ink); }

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}


/* ---------- chevron divider, echoes the facade's baseboard frieze ---------- */
.chevron {
  height: 10px;
  background-image:
    linear-gradient(135deg, var(--brass) 25%, transparent 25%),
    linear-gradient(225deg, var(--brass) 25%, transparent 25%);
  background-position: 0 0;
  background-size: 16px 10px;
  opacity: 0.55;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: flex-end;
  background: var(--hero-ground);
  overflow: hidden;
  padding-top: env(safe-area-inset-top, 0px);
}
.hero-img { position: absolute; inset: 0; }
.hero-img img { opacity: 0.86; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,10,7,0.15) 0%, rgba(15,10,7,0.3) 35%, rgba(15,10,7,0.7) 60%, rgba(15,10,7,0.94) 100%);
}
.hero-inner {
  position: relative;
  width: 100%;
  max-width: 74rem;
  margin: 0 auto;
  padding: 6rem 1.5rem 6.25rem;
  color: var(--hero-ink);
}
.hero-eyebrow { color: #e8bf7a; text-shadow: 0 1px 10px rgba(15,10,7,0.9); margin-bottom: 1.1rem; display: flex; align-items: center; gap: 0.6rem; }
.hero-eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brass); }
h1.hero-title {
  font-weight: 500;
  font-size: clamp(2.3rem, 1.5rem + 4.2vw, 4.6rem);
  letter-spacing: -0.01em;
  line-height: 1.03;
  max-width: 20ch;
}
/* hero sits on a dark photo in both themes, so its accent stays light */
h1.hero-title em { color: #e8bf7a; }
.hero-sub {
  margin: 1.4rem 0 0;
  max-width: 46ch;
  font-size: clamp(1rem, 0.93rem + 0.35vw, 1.18rem);
  color: var(--hero-ink-soft);
}

/* ---------- facts strip, floats over hero/body seam ---------- */
.facts-wrap { max-width: 74rem; margin: 0 auto 3.5rem; padding: 0 1.5rem; }
.facts {
  position: relative;
  margin-top: -3.75rem;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  z-index: 5;
}
.fact {
  padding: 1.5rem 1.4rem;
  border-right: 1px solid var(--line);
}
.fact:last-child { border-right: none; }
.fact-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}
.fact-value {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.fact-note { font-size: 0.78rem; color: var(--ink-faint); margin-top: 0.15rem; }

@media (max-width: 760px) {
  .facts { grid-template-columns: repeat(2, 1fr); margin-top: -2.75rem; }
  .hero-inner { padding-bottom: 5rem; }
  .facts-wrap { margin-bottom: 2.5rem; }
  .fact:nth-child(2) { border-right: none; }
  .fact { border-bottom: 1px solid var(--line); }
  .fact:last-child { grid-column: 1 / -1; border-bottom: none; }
  .fact { padding: 1.2rem 1rem; }
}

/* ---------- generic section shell ---------- */
section { padding: 5rem 1.5rem; }
.shell { max-width: 74rem; margin: 0 auto; }
.shell-narrow { max-width: 46rem; margin: 0 auto; }

.section-eyebrow { color: var(--brass-ink); margin-bottom: 0.9rem; }
h2.section-title { font-weight: 500; font-size: clamp(1.7rem, 1.45rem + 1.4vw, 2.4rem); letter-spacing: -0.01em; }

/* ---------- intro / timeline ---------- */
.intro p { font-size: 1.1rem; color: var(--ink-soft); margin: 0 0 1.1rem; }
.intro .timeline p { font-size: 0.95rem; margin: 0.15rem 0 0; }

/* ---------- galleries ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(11rem, 22vw, 19rem);
  grid-auto-flow: dense;
  gap: 0.6rem;
}
.gallery figure { margin: 0; overflow: hidden; border-radius: 8px; position: relative; background: var(--paper-raised); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 0.6rem 0.8rem 0.5rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  color: #f3ede1;
  background: linear-gradient(0deg, rgba(15,10,7,0.72), rgba(15,10,7,0));
}
.span-row { grid-row: span 2; }
/* staged / AI-edited photos must always carry a visible label */
.gallery figure.ki::before {
  content: "KI-Visualisierung";
  position: absolute; top: 0.6rem; left: 0.6rem; z-index: 1;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 10, 7, 0.72);
  color: #f3ede1;
}
.span-col { grid-column: span 2; }
.span-big { grid-column: span 2; grid-row: span 2; }
.gallery-lead { color: var(--ink-soft); max-width: 52ch; margin: 0 0 1.4rem; }

@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 44vw; }
  .gallery .span-row { grid-row: span 2; }
  .gallery .span-col { grid-column: span 2; }
  .gallery .span-big { grid-column: span 2; grid-row: span 2; }
}

/* ---------- haus timeline ---------- */
.timeline { list-style: none; margin: 2.2rem 0 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.4rem 1.5rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 0.45rem;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--brass);
}
.timeline .year { font-family: "IBM Plex Mono", monospace; font-size: 0.78rem; letter-spacing: 0.04em; color: var(--brass-ink); }
.timeline p { margin: 0.15rem 0 0; color: var(--ink-soft); }

/* ---------- eckdaten table ---------- */
.facts-table { display: flex; flex-direction: column; }
.facts-row {
  display: grid;
  grid-template-columns: 13rem 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.facts-row:last-child { border-bottom: none; }
.facts-row dt {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.facts-row dd { margin: 0; color: var(--ink); }
@media (max-width: 600px) { .facts-row { grid-template-columns: 1fr; gap: 0.2rem; } }

/* ---------- nutzung callout ---------- */
.callout {
  background: var(--forest-soft);
  border: 1px solid color-mix(in srgb, var(--forest) 35%, var(--line));
  border-radius: 14px;
  padding: 2rem 2.2rem;
}
.callout .eyebrow { color: var(--forest); }
.callout h3 { font-size: 1.3rem; font-weight: 500; margin: 0.6rem 0 0.9rem; }
.callout p { color: var(--ink-soft); margin: 0 0 0.8rem; }
.callout p:last-child { margin-bottom: 0; }
@media (max-width: 600px) { .callout { padding: 1.6rem 1.4rem; } }

/* ---------- lage ---------- */
.lage-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: start; }
.lage-list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.lage-list li { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.lage-list li:last-child { border-bottom: none; padding-bottom: 0; }
.lage-list .place { color: var(--ink); }
.lage-note { margin-top: 0.9rem; font-size: 0.78rem; color: var(--ink-faint); }
.lage-list .dist { font-family: "IBM Plex Mono", monospace; color: var(--ink-faint); font-size: 0.82rem; white-space: nowrap; }
@media (max-width: 760px) { .lage-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- kontakt / cta band ---------- */
.cta {
  background: var(--hero-ground);
  color: var(--hero-ink);
  text-align: center;
}
.cta .eyebrow { color: var(--brass); justify-content: center; display: flex; }
.cta h2 { color: var(--hero-ink); margin-top: 0.9rem; }
.cta p { color: var(--hero-ink-soft); max-width: 40ch; margin: 1.1rem auto 0; }
.cta-actions { margin-top: 2rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary { background: var(--brass); color: #1c130d; }
.btn-primary:hover { background: #b98d43; }
.btn-ghost { border: 1px solid rgba(243,237,225,0.35); color: var(--hero-ink); }
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }
.btn:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

footer.hint {
  padding: 2rem 1.5rem 3rem;
  max-width: 74rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
footer.hint p { margin: 0; max-width: 60ch; }
.tbd { color: var(--brass-ink); border-bottom: 1px dashed var(--brass); font-style: italic; }

/* ---------- variant switch (Gesamt / 95 / 135) ---------- */
.variants {
  position: absolute;
  top: calc(1rem + env(safe-area-inset-top, 0px));
  left: 1rem;
  z-index: 40;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(243, 237, 225, 0.35);
  background: rgba(28, 19, 13, 0.45);
  backdrop-filter: blur(6px);
}
.variants a {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  color: var(--hero-ink);
  text-decoration: none;
}
.variants a:hover { color: var(--brass); }
.variants a[aria-current="page"] { background: var(--brass); color: #1c130d; }
.variants a:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.facts-row dd a { color: var(--brass-ink); }

/* ---------- floor plan ---------- */
.plan { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: clamp(0.8rem, 3vw, 2rem); }
.plan img { height: auto; object-fit: contain; max-height: 46rem; margin: 0 auto; }
.plan figcaption { margin-top: 0.9rem; font-family: "IBM Plex Mono", monospace; font-size: 0.7rem; color: var(--ink-faint); }
.plan-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.9rem; }
.plan-tabs button {
  font: 500 0.78rem "IBM Plex Mono", monospace; letter-spacing: 0.03em;
  padding: 0.4rem 0.9rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--ink-soft);
}
.plan-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.plan-tabs button:focus-visible, .plan-track:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.plan-track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; align-items: flex-start; }
.plan-track::-webkit-scrollbar { display: none; }
.plan-slide { flex: 0 0 100%; scroll-snap-align: start; }

/* ---------- lightbox ---------- */
.gallery figure img { cursor: zoom-in; }
.gallery figure img:focus-visible { outline: 3px solid var(--brass); outline-offset: -3px; }
.lb-open { overflow: hidden; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.5rem;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 10, 7, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.lb-img { width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 6rem); object-fit: contain; border-radius: 6px; }
.lb-figure figcaption {
  display: flex; justify-content: space-between; gap: 1rem; width: 100%; margin-top: 0.7rem;
  font-family: "IBM Plex Mono", monospace; font-size: 0.75rem; color: #d9cdb2;
}
.lb-count { color: #9c8e7a; white-space: nowrap; }
.lb-ki {
  position: absolute; top: 0.7rem; left: 0.7rem;
  font-family: "IBM Plex Mono", monospace; font-size: 0.68rem;
  padding: 0.25rem 0.6rem; border-radius: 999px; background: rgba(15, 10, 7, 0.72); color: #f3ede1;
}
.lightbox button {
  font: 400 2rem/1 "IBM Plex Sans", sans-serif; color: #f3ede1;
  width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer;
  background: rgba(243, 237, 225, 0.08); border: 1px solid rgba(243, 237, 225, 0.25);
}
.lightbox button:hover { background: rgba(243, 237, 225, 0.18); }
.lightbox button:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.lb-close { position: absolute; top: calc(1rem + env(safe-area-inset-top, 0px)); right: 1rem; z-index: 1; font-size: 1.6rem !important; }
@media (max-width: 760px) {
  .lightbox { grid-template-columns: minmax(0, 1fr); padding-inline: 0.5rem; }
  .lb-prev, .lb-next { position: absolute; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); z-index: 1; }
  .lb-prev { left: 1rem; } .lb-next { right: 1rem; }
  .lb-img { max-height: calc(100vh - 9rem); }
  .lb-figure figcaption { padding-inline: 0.5rem; }
}

footer.hint a { color: inherit; }
.gallery-lead a { color: var(--brass-ink); }
