/* ==========================================================
   Bornhagen Hausverwaltung — Swiss / International Style
   ========================================================== */

:root {
  --paper: #FAFAF8;
  --ink: #14161A;
  --accent: #2447F5;
  --grey-1: #EBEBE7;
  --grey-2: #D8D8D2;
  --grey-3: #9A9A94;
  --grey-4: #5C5C58;
  --hairline: rgba(20, 22, 26, 0.12);
  --font-head: "Space Grotesk", sans-serif;
  --font-text: "IBM Plex Sans", sans-serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --pad: clamp(1.25rem, 4vw, 4rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

::selection { background: var(--accent); color: var(--paper); }

/* ---------- visible grid: hairline columns ---------- */
.grid-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--hairline) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
  background-position: 0 0;
  opacity: 0.35;
}
@media (max-width: 768px) {
  .grid-lines { background-size: calc(100% / 3) 100%; }
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--pad);
  height: 4rem;
  border-bottom: 1px solid var(--hairline);
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.brand-sub {
  font-weight: 400;
  color: var(--grey-4);
  margin-left: 0.45rem;
  letter-spacing: 0.01em;
}
.brand-mark {
  width: 0.85rem;
  height: 0.85rem;
  background: var(--accent);
  display: inline-block;
  flex: none;
}

.site-nav { display: flex; gap: clamp(1rem, 2.5vw, 2.25rem); }
.site-nav a {
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.02em;
  color: var(--grey-4);
  transition: color 0.3s var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.nav-num {
  font-family: var(--font-head);
  font-size: 0.65rem;
  color: var(--accent);
  margin-right: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.nav-cta { color: var(--ink) !important; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

@media (max-width: 768px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

/* ---------- section scaffolding ---------- */
section { padding: clamp(7.5rem, 14vh, 12.5rem) var(--pad); }

.section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: baseline;
  border-top: 1px solid var(--ink);
  padding-top: 1.25rem;
  margin-bottom: clamp(3.5rem, 8vh, 6rem);
}
.tab-num {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.section-head h2 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.section-note {
  grid-column: 2;
  max-width: 44ch;
  color: var(--grey-4);
  font-size: 0.95rem;
  margin-top: 0.85rem;
}

/* ---------- hero ---------- */
.hero {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 8rem;
  padding-bottom: 3rem;
  position: relative;
}

.hero-meta {
  display: flex;
  gap: clamp(1.5rem, 5vw, 4rem);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-4);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1rem;
  margin-bottom: clamp(2rem, 6vh, 4rem);
}

.hero-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(2.75rem, 9.5vw, 8.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}
.hero-title span { display: block; }
.hero-title .accent { color: var(--accent); }

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 40ch) 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
}
.hero-lede { color: var(--grey-4); font-size: 1.05rem; }

.hero-index {
  justify-self: end;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--grey-4);
  min-width: 15rem;
}
.hero-index div {
  display: flex;
  gap: 1rem;
  border-top: 1px solid var(--hairline);
  padding: 0.45rem 0;
}
.hero-index div:last-child { border-bottom: 1px solid var(--hairline); }
.hero-index i {
  font-style: normal;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.hero-scroll {
  position: absolute;
  right: var(--pad);
  top: 40%;
  writing-mode: vertical-rl;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--grey-3);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.scroll-line { width: 1px; height: 4rem; background: var(--grey-3); display: block; }

@media (max-width: 768px) {
  .hero-foot { grid-template-columns: 1fr; }
  .hero-index { justify-self: start; width: 100%; }
  .hero-scroll { display: none; }
}

/* ---------- leistungen layout ---------- */
.leistungen-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.haus-col { order: 2; align-self: stretch; }
.leistung-col { order: 1; }

.haus-sticky {
  position: sticky;
  top: 4rem;
  height: calc(100dvh - 4rem);
  display: flex;
  flex-direction: column;
}
#haus-canvas {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: block;
}
.haus-caption {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--ink);
  padding: 0.75rem 0 1.5rem;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
#haus-caption-num { color: var(--accent); font-variant-numeric: tabular-nums; }
#haus-caption-text { color: var(--grey-4); }

.leistung {
  min-height: 82vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 1px solid var(--hairline);
  padding: 3rem 0;
  transition: opacity 0.6s var(--ease);
}
.leistung:first-child { border-top: none; }

.leistung-head {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.l-num {
  font-family: var(--font-head);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--grey-2);
  font-variant-numeric: tabular-nums;
  transition: color 0.6s var(--ease);
}
.leistung.active .l-num { color: var(--accent); }
.leistung h3 {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.leistung p { color: var(--grey-4); max-width: 52ch; margin-bottom: 2rem; }

.l-facts { list-style: none; max-width: 30rem; }
.l-facts li {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--hairline);
  padding: 0.6rem 0;
  font-size: 0.9rem;
}
.l-facts li:last-child { border-bottom: 1px solid var(--hairline); }
.l-facts li span:first-child { color: var(--grey-3); }
.l-facts li span:last-child {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@media (max-width: 768px) {
  .leistungen-layout { grid-template-columns: 1fr; }
  .haus-col { order: 1; }
  .leistung-col { order: 2; }
  .haus-sticky {
    top: 4rem;
    height: 42dvh;
    z-index: 5;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
  }
  .haus-caption { padding-bottom: 0.6rem; }
  .leistung { min-height: 0; padding: 4rem 0; }
}

/* ---------- zahlen ---------- */
.zahlen-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.zahl {
  border-left: 1px solid var(--hairline);
  padding: 0.5rem clamp(1rem, 2.5vw, 2.5rem) 2.5rem;
}
.zahl:first-child { border-left: none; padding-left: 0; }
.zahl strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 0.85rem;
}
.zahl .lt, .zahl .unit { color: var(--accent); }
.zahl > span {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grey-4);
}
@media (max-width: 768px) {
  .zahlen-grid { grid-template-columns: 1fr 1fr; row-gap: 3rem; }
  .zahl:nth-child(3) { border-left: none; padding-left: 0; }
}

/* ---------- büro ---------- */
.buero-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.buero-layout figure img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.buero-layout figcaption {
  font-size: 0.8rem;
  color: var(--grey-3);
  padding-top: 0.6rem;
  border-top: 1px solid var(--hairline);
  margin-top: 0.6rem;
}
.buero-text p { color: var(--grey-4); margin-bottom: 1.4rem; max-width: 52ch; }

.buero-facts div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  border-top: 1px solid var(--hairline);
  padding: 0.65rem 0;
  font-size: 0.9rem;
}
.buero-facts div:last-child { border-bottom: 1px solid var(--hairline); }
.buero-facts dt { color: var(--grey-3); }
.buero-facts dd { font-weight: 600; text-align: right; }

@media (max-width: 768px) {
  .buero-layout { grid-template-columns: 1fr; }
}

/* ---------- objekt ---------- */
.objekt-layout {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.objekt-layout figure img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }
.objekt-data h3 {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.objekt-data > p { color: var(--grey-4); max-width: 54ch; margin-bottom: 2.5rem; }

.objekt-table { list-style: none; max-width: 34rem; }
.objekt-table li {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  border-top: 1px solid var(--hairline);
  padding: 0.7rem 0;
  font-size: 0.95rem;
}
.objekt-table li:last-child { border-bottom: 1px solid var(--hairline); }
.objekt-table li span:first-child { color: var(--grey-3); }
.objekt-table li span:last-child {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@media (max-width: 768px) {
  .objekt-layout { grid-template-columns: 1fr; }
}

/* ---------- kontakt ---------- */
.kontakt-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.field { margin-bottom: 1.75rem; }
.field label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-4);
  margin-bottom: 0.5rem;
}
.field input,
.field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--grey-2);
  background: transparent;
  font-family: var(--font-text);
  font-size: 1.05rem;
  color: var(--ink);
  padding: 0.5rem 0;
  border-radius: 0;
  transition: border-color 0.3s var(--ease);
}
.field textarea { resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.field ::placeholder { color: var(--grey-3); }

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 1rem 2rem;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
}
.submit-btn:hover { background: var(--accent); border-color: var(--accent); }
.submit-btn span { transition: transform 0.35s var(--ease); }
.submit-btn:hover span { transform: translateX(0.35rem); }

.kontakt-info dl div {
  border-top: 1px solid var(--hairline);
  padding: 0.9rem 0;
}
.kontakt-info dl div:last-child { border-bottom: 1px solid var(--hairline); }
.kontakt-info dt {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-3);
  margin-bottom: 0.25rem;
}
.kontakt-info dd { font-size: 0.98rem; font-variant-numeric: tabular-nums; }
.kontakt-info em { font-style: normal; color: var(--grey-3); font-size: 0.85rem; }

@media (max-width: 768px) {
  .kontakt-layout { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--ink);
  padding: 4rem var(--pad) 2rem;
  background: var(--paper);
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: clamp(2rem, 5vw, 4rem);
  margin-bottom: 3.5rem;
}
.footer-brand strong { font-family: var(--font-head); font-size: 1.05rem; display: block; margin: 0.75rem 0 0.4rem; }
.footer-brand p { color: var(--grey-4); font-size: 0.9rem; max-width: 28ch; }
.footer-brand .brand-mark { display: block; }

.footer-nav { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--grey-4);
  transition: color 0.3s var(--ease);
}
.footer-nav a:hover { color: var(--accent); }

.footer-impressum h4 {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-3);
  margin-bottom: 0.6rem;
}
.footer-impressum p { font-size: 0.85rem; color: var(--grey-4); line-height: 1.7; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
  padding-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--grey-3);
}
.footer-bottom a { color: var(--ink); text-decoration-color: var(--accent); }

@media (max-width: 768px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* ---------- scroll reveals ---------- */
.reveal {
  opacity: 0;
  transform: translateY(2.25rem);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 0.12s; }
.reveal.d2 { transition-delay: 0.24s; }
.reveal.d3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .submit-btn span { transition: none; }
}
