/* =========================================================
   STEINLI – Real Estate Website
   Design System & Styles
   ========================================================= */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(0.95rem, 0.85rem + 0.3vw, 1.05rem);
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
picture,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

ul {
  list-style: none;
}

/* ---------- Design Tokens ---------- */
:root {
  /* Colors */
  --color-bg: #f4efe8;
  --color-bg-alt: #faf8f4;
  --color-surface: #ffffff;
  --color-ink: #1f1f1e;
  --color-ink-deep: #0f0f0e;
  --color-text: #2a2926;
  --color-muted: #6b6661;
  --color-line: #d9d2c7;
  --color-line-soft: #e9e2d6;
  --color-accent: #a0876b;
  --color-accent-soft: #c3ab8d;

  /* Typography */
  --font-display: "Cormorant Garamond", "Cormorant", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Spacing scale */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  /* Layout */
  --max-width: 1440px;
  --gutter: clamp(1.1rem, 3vw, 2.5rem);
  --section-y: clamp(3.25rem, 8vw, 8rem);

  /* Misc */
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 24px rgba(15, 15, 14, 0.06);
  --shadow-md: 0 12px 48px rgba(15, 15, 14, 0.1);
  --shadow-lg: 0 30px 80px rgba(15, 15, 14, 0.18);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 84px;
  --header-h-mobile: 64px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

h1 {
  font-size: clamp(2.75rem, 6vw, 5.75rem);
  font-weight: 300;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4.2vw, 3.75rem);
}

h3 {
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
}

h4 {
  font-size: clamp(1.15rem, 1.5vw, 1.4rem);
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.02em;
}

p {
  max-width: 62ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 1.5rem;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--color-accent);
}

.lead {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 300;
  line-height: 1.45;
  color: var(--color-ink);
  max-width: 36ch;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  position: relative;
}

.section--tight {
  padding-top: calc(var(--section-y) * 0.6);
  padding-bottom: calc(var(--section-y) * 0.6);
}

.section--dark {
  background: var(--color-ink);
  color: #e7e3dc;
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: #f5f1ea;
}

.section--alt {
  background: var(--color-bg-alt);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.divider {
  height: 1px;
  background: var(--color-line);
  border: none;
  margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: all 0.4s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-ink);
  color: #fff;
}

.btn--primary:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: transparent;
  color: var(--color-ink);
  border: 1px solid var(--color-ink);
}

.btn--ghost:hover {
  background: var(--color-ink);
  color: #fff;
}

.btn--light {
  background: transparent;
  color: #f5f1ea;
  border: 1px solid rgba(245, 241, 234, 0.4);
}

.btn--light:hover {
  background: #f5f1ea;
  color: var(--color-ink);
  border-color: #f5f1ea;
}

.btn .arrow {
  display: inline-block;
  width: 16px;
  height: 1px;
  background: currentColor;
  position: relative;
  transition: transform 0.3s var(--ease);
}

.btn .arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

/* =========================================================
   HEADER / NAV
   ========================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.5rem 0;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease),
    border-bottom-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(244, 239, 232, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.9rem 0;
  border-bottom-color: var(--color-line);
  box-shadow: 0 2px 18px rgba(15, 15, 14, 0.05);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
}

.brand {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.55rem;
  letter-spacing: 0.35em;
  color: #f5f1ea;
  transition: color 0.4s var(--ease);
}

.brand small {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-left: 0.6rem;
  opacity: 0.75;
}

.site-header.is-scrolled .brand {
  color: var(--color-ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav__list {
  display: flex;
  gap: 2.25rem;
}

.nav__list a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f5f1ea;
  position: relative;
  padding-bottom: 4px;
}

/* Enumeration numbers (01 / 02 …) live only inside the mobile drawer.
   The desktop nav reads as clean wordmarks: PROJEKT · WOHNUNGEN … */
.nav__num { display: none; }
.nav__label { display: inline; }

.site-header.is-scrolled .nav__list a {
  color: var(--color-ink);
}

.nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s var(--ease);
}

.nav__list a:hover::after,
.nav__list a.is-active::after {
  width: 100%;
}

.nav__cta {
  padding: 0.7rem 1.4rem;
  font-size: 0.72rem;
  border: 1px solid #f5f1ea;
  color: #f5f1ea;
  border-radius: 999px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 500;
}

.site-header.is-scrolled .nav__cta {
  border-color: var(--color-ink);
  color: var(--color-ink);
}

.nav__cta:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.nav-toggle {
  display: none;
  width: 32px;
  height: 22px;
  position: relative;
  z-index: 110;
}

.nav-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: #f5f1ea;
  transition: all 0.3s var(--ease);
}

.site-header.is-scrolled .nav-toggle span,
.nav-toggle.is-open span {
  background: var(--color-ink);
}

.nav-toggle span:nth-child(1) { top: 4px; }
.nav-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle span:nth-child(3) { bottom: 4px; }

.nav-toggle.is-open span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* =========================================================
   DEVELOPER CO-BRAND MARK (CM Invest, top-right of header)
   ========================================================= */
.dev-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding-left: 1.5rem;
  margin-left: 0.25rem;
  border-left: 1px solid rgba(245, 241, 234, 0.28);
  transition: opacity 0.3s var(--ease);
  flex-shrink: 0;
}

.dev-mark:hover { opacity: 0.7; }

.dev-mark__label {
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #f5f1ea;
  opacity: 0.7;
  white-space: nowrap;
  line-height: 1.2;
  text-align: right;
}

.dev-mark__logo {
  height: 32px;
  width: auto;
  display: block;
  transition: opacity 0.4s var(--ease);
}

.dev-mark__logo--dark   { display: none; }
.dev-mark__logo--light  { display: block; }

.site-header.is-scrolled .dev-mark {
  border-left-color: rgba(31, 31, 30, 0.18);
}
.site-header.is-scrolled .dev-mark__label {
  color: var(--color-ink);
  opacity: 0.65;
}
.site-header.is-scrolled .dev-mark__logo--dark  { display: block; }
.site-header.is-scrolled .dev-mark__logo--light { display: none; }

/* Mobile-only nav scaffolding hidden on desktop */
.nav__header,
.nav__meta { display: none; }

/* =========================================================
   MOBILE NAV (≤980px)
   Premium full-screen overlay with serif typography
   ========================================================= */
@media (max-width: 980px) {
  .site-header { padding: 1.1rem 0; }
  .site-header.is-scrolled { padding: 0.7rem 0; }

  .nav-toggle { display: block; }

  /* On mobile we hide the desktop dev-mark - it reappears beautifully inside the menu */
  .dev-mark { display: none; }

  /* The drawer */
  .nav {
    position: fixed;
    inset: 0;
    background:
      radial-gradient(120% 80% at 100% 0%, rgba(160, 135, 107, 0.18) 0%, rgba(160, 135, 107, 0) 55%),
      radial-gradient(80% 60% at 0% 100%, rgba(195, 171, 141, 0.14) 0%, rgba(195, 171, 141, 0) 50%),
      linear-gradient(180deg, #1a1917 0%, #0f0f0e 100%);
    color: #f5f1ea;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition:
      transform 0.55s var(--ease-out),
      opacity 0.4s var(--ease),
      visibility 0s linear 0.55s;
    z-index: 105;
    isolation: isolate;
  }

  /* Subtle film-grain to match hero */
  .nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    opacity: 0.06;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 0;
  }

  .nav > * { position: relative; z-index: 1; }

  .nav.is-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    transition:
      transform 0.55s var(--ease-out),
      opacity 0.4s var(--ease),
      visibility 0s linear 0s;
  }

  /* Header strip inside the drawer */
  .nav__header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: clamp(1.5rem, 5vw, 2.25rem) clamp(1.25rem, 5vw, 2.5rem) 0;
  }

  .nav__header-eyebrow {
    font-family: var(--font-body);
    font-size: 0.62rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--color-accent-soft);
    font-weight: 500;
  }

  .nav__header-brand {
    font-family: var(--font-display);
    font-size: 1.6rem;
    letter-spacing: 0.34em;
    color: #f5f1ea;
    font-weight: 400;
  }

  /* Nav list */
  .nav__list {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: clamp(1.75rem, 6vw, 3rem) clamp(1.25rem, 5vw, 2.5rem);
    margin: 0;
  }

  .nav__list li {
    border-bottom: 1px solid rgba(245, 241, 234, 0.08);
  }
  .nav__list li:last-child { border-bottom: none; }

  .nav__list a {
    display: flex !important;
    align-items: baseline;
    gap: 1rem;
    padding: 1.15rem 0;
    color: #f5f1ea !important;
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 7vw, 2.5rem);
    font-weight: 300;
    letter-spacing: -0.005em;
    text-transform: none;
    line-height: 1.1;
    transition: color 0.3s var(--ease), transform 0.45s var(--ease-out), padding-left 0.45s var(--ease-out);
  }

  .nav__list a::after { display: none; }

  .nav__list a:hover,
  .nav__list a.is-active {
    color: #e6cfac !important;
    padding-left: 0.6rem;
  }

  .nav__list a.is-active {
    font-style: italic;
  }

  .nav__num {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    color: var(--color-accent-soft);
    opacity: 0.85;
    min-width: 1.75rem;
    transform: translateY(-0.25rem);
  }

  .nav__label {
    flex: 1;
  }

  /* Stagger reveal of items when the menu opens */
  .nav.is-open .nav__list li {
    animation: nav-item-rise 0.6s var(--ease-out) both;
  }
  .nav.is-open .nav__list li:nth-child(1) { animation-delay: 0.10s; }
  .nav.is-open .nav__list li:nth-child(2) { animation-delay: 0.16s; }
  .nav.is-open .nav__list li:nth-child(3) { animation-delay: 0.22s; }
  .nav.is-open .nav__list li:nth-child(4) { animation-delay: 0.28s; }
  .nav.is-open .nav__list li:nth-child(5) { animation-delay: 0.34s; }

  @keyframes nav-item-rise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Kontakt CTA inside drawer */
  .nav__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 clamp(1.25rem, 5vw, 2.5rem);
    padding: 1.05rem 1.6rem;
    color: var(--color-ink) !important;
    background: #f5f1ea;
    border-color: #f5f1ea !important;
    font-size: 0.75rem;
    letter-spacing: 0.24em;
    width: auto;
    align-self: start;
  }

  .nav__cta:hover {
    background: var(--color-accent-soft);
    border-color: var(--color-accent-soft) !important;
    color: var(--color-ink) !important;
  }

  /* Meta footer: contact + developer */
  .nav__meta {
    display: grid;
    gap: 1.75rem;
    padding: clamp(1.75rem, 6vw, 2.5rem) clamp(1.25rem, 5vw, 2.5rem) clamp(1.5rem, 5vw, 2.25rem);
    border-top: 1px solid rgba(245, 241, 234, 0.08);
    margin-top: clamp(1.5rem, 5vw, 2.5rem);
  }

  .nav__contact {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .nav__contact-label {
    font-family: var(--font-body);
    font-size: 0.6rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--color-accent-soft);
    font-weight: 500;
  }

  .nav__contact-link {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: #f5f1ea;
    font-weight: 400;
    word-break: break-word;
    line-height: 1.3;
  }

  .nav__contact-link:hover { color: var(--color-accent-soft); }

  .nav__contact-person {
    font-family: var(--font-body);
    font-size: 0.82rem;
    color: rgba(245, 241, 234, 0.6);
    letter-spacing: 0.04em;
  }

  .nav__developer {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(245, 241, 234, 0.08);
    transition: opacity 0.3s var(--ease);
  }

  .nav__developer:hover { opacity: 0.8; }

  .nav__developer-label {
    font-family: var(--font-body);
    font-size: 0.58rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: rgba(245, 241, 234, 0.55);
    font-weight: 500;
    line-height: 1.2;
  }

  .nav__developer-logo {
    height: 44px;
    width: auto;
    display: block;
    filter: invert(1) brightness(1.05);
  }

  /* Burger over the dark drawer */
  body.is-nav-open .nav-toggle span,
  .nav-toggle.is-open span {
    background: #f5f1ea;
  }
}

@media (max-width: 480px) {
  .site-header { padding: 0.85rem 0; }
  .site-header.is-scrolled { padding: 0.6rem 0; }

  .brand__mark { font-size: 1.2rem; letter-spacing: 0.28em; }
  .brand__sub { display: none; }

  .nav-toggle { width: 28px; height: 20px; }
}

/* Hide co-brand on the very narrowest desktops so it never crowds the nav */
@media (max-width: 1180px) and (min-width: 981px) {
  .dev-mark__label { display: none; }
  .dev-mark { padding-left: 1rem; gap: 0; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  color: #f5f1ea;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.08);
  animation: hero-zoom 18s ease-out forwards;
  will-change: transform;
}

@keyframes hero-zoom {
  to { transform: scale(1); }
}

/* Layered overlay: radial spotlight bottom-left + bottom scrim + top scrim */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(120% 80% at 15% 90%,
      rgba(15, 15, 14, 0.78) 0%,
      rgba(15, 15, 14, 0.45) 35%,
      rgba(15, 15, 14, 0) 70%),
    linear-gradient(180deg,
      rgba(15, 15, 14, 0.55) 0%,
      rgba(15, 15, 14, 0.2) 18%,
      rgba(15, 15, 14, 0) 38%,
      rgba(15, 15, 14, 0) 55%,
      rgba(15, 15, 14, 0.85) 100%);
  pointer-events: none;
}

/* Subtle film-grain on top to unify photo + UI */
.hero__overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.06;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(3.5rem, 9vw, 7rem);
  padding-top: calc(var(--header-h) + 1.5rem);
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #f5f1ea;
  opacity: 0.95;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.hero__eyebrow::before {
  content: "";
  width: 48px;
  height: 1px;
  background: var(--color-accent-soft);
}

.hero h1 {
  color: #f5f1ea;
  font-weight: 300;
  max-width: 16ch;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.45);
}

.hero h1 em {
  font-style: italic;
  color: #e6cfac;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.55);
}

.hero__sub {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  font-weight: 300;
  letter-spacing: 0.04em;
  opacity: 0.92;
  margin-bottom: 2.5rem;
  max-width: 40ch;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}

.hero__sub--tight {
  margin-top: -0.5rem;
  margin-bottom: 2.25rem;
  max-width: 44ch;
  line-height: 1.55;
  font-weight: 300;
  opacity: 0.88;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.75;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero__scroll span {
  width: 1px;
  height: 50px;
  background: linear-gradient(180deg, transparent, #f5f1ea);
  animation: scroll-line 2.2s ease-in-out infinite;
}

@keyframes scroll-line {
  0%, 100% { transform: scaleY(0.3); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
}

/* Hide hard line-break in title on mobile, let it wrap naturally */
.hide-mobile { display: inline; }

/* Hero mobile rules */
@media (max-width: 720px) {
  .hero {
    min-height: 560px;
  }

  .hero__overlay {
    background:
      linear-gradient(180deg,
        rgba(15, 15, 14, 0.62) 0%,
        rgba(15, 15, 14, 0.3) 22%,
        rgba(15, 15, 14, 0.05) 42%,
        rgba(15, 15, 14, 0.55) 75%,
        rgba(15, 15, 14, 0.92) 100%);
  }

  .hero__content {
    padding-top: calc(var(--header-h-mobile, 64px) + 1rem);
    padding-bottom: 3.5rem;
  }

  .hero h1 {
    max-width: 20ch;
    margin-bottom: 1.25rem;
  }

  .hide-mobile { display: none; }

  .hero__sub {
    margin-bottom: 2rem;
  }

  .hero__scroll { display: none; }
}

@media (max-width: 560px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
    padding: 0.95rem 1.25rem;
    letter-spacing: 0.18em;
  }

  .hero__eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.26em;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .hero__eyebrow::before { width: 28px; }
}

/* =========================================================
   PROJEKT INTRO
   ========================================================= */
.intro {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.intro__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

@media (max-width: 900px) {
  .intro__grid { grid-template-columns: 1fr; }
}

.intro__title h2 {
  margin-top: 0.5rem;
}

.intro__title h2 em {
  font-style: italic;
  color: var(--color-accent);
}

.intro__copy p + p {
  margin-top: 1.25rem;
}

.intro__copy {
  color: var(--color-text);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.stat {
  padding: 2rem 1.25rem;
  text-align: center;
  border-right: 1px solid var(--color-line);
}

.stat:last-child { border-right: none; }

.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1;
  color: var(--color-ink);
  margin-bottom: 0.5rem;
}

.stat__num sup {
  font-size: 0.45em;
  color: var(--color-accent);
  margin-left: 0.2rem;
  top: -0.5em;
}

.stat__label {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* German long compound words: allow safe wrapping on small screens */
@media (max-width: 560px) {
  h2 {
    overflow-wrap: break-word;
    word-break: break-word;
  }
  .intro__copy p,
  .split__content p,
  .typdetail__sub,
  .typdetail__features li,
  .geschoss__desc,
  .timeline__desc,
  .eckdaten__val,
  .contact-info__block p {
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
  }
}

@media (max-width: 720px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 2.25rem;
  }
  .stat {
    padding: 1.4rem 0.5rem;
    border-right: 1px solid var(--color-line);
    border-bottom: 1px solid var(--color-line);
  }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-last-child(-n+2) { border-bottom: none; }
  .stat__num { font-size: clamp(1.85rem, 7vw, 2.4rem); margin-bottom: 0.4rem; }
  .stat__label {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    line-height: 1.35;
    word-break: keep-all;
    hyphens: auto;
  }
}

@media (max-width: 380px) {
  .stat { padding: 1.2rem 0.35rem; }
  .stat__label {
    font-size: 0.58rem;
    letter-spacing: 0.12em;
  }
}

/* =========================================================
   SPLIT IMAGE SECTIONS
   ========================================================= */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 6rem);
  align-items: center;
}

.split--reverse .split__media { order: 2; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

.split__media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 5;
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.6s var(--ease-out);
}

.split__media:hover img {
  transform: scale(1.05);
}

.split__caption {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #f5f1ea;
  background: rgba(15, 15, 14, 0.55);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.split__content h2 {
  margin-bottom: 1.5rem;
}

.split__content p + p { margin-top: 1.25rem; }

.feature-list {
  margin-top: 2rem;
  display: grid;
  gap: 0.6rem;
}

.feature-list li {
  padding-left: 1.75rem;
  position: relative;
  color: var(--color-text);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 12px;
  height: 1px;
  background: var(--color-accent);
}

/* =========================================================
   TECH / NACHHALTIGKEIT GRID
   ========================================================= */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-line);
  margin-top: 3rem;
  border: 1px solid var(--color-line);
}

@media (max-width: 900px) {
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
  .tech-grid { grid-template-columns: 1fr; }
}

.tech-card {
  background: var(--color-bg-alt);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background 0.4s var(--ease);
}

.tech-card:hover {
  background: var(--color-surface);
}

.tech-card__icon {
  width: 40px;
  height: 40px;
  color: var(--color-accent);
}

.tech-card__icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.tech-card h4 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-ink);
  letter-spacing: 0;
}

.tech-card p {
  font-size: 0.92rem;
  color: var(--color-muted);
  line-height: 1.6;
}

/* =========================================================
   WOHNUNGEN
   ========================================================= */
.haus-tabs {
  display: flex;
  gap: 0;
  margin: 3rem 0 2rem;
  border-bottom: 1px solid var(--color-line);
}

.haus-tab {
  padding: 1.1rem 2rem;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--color-muted);
  position: relative;
  transition: color 0.3s var(--ease);
}

.haus-tab::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 1px;
  background: var(--color-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

.haus-tab.is-active {
  color: var(--color-ink);
}

.haus-tab.is-active::after { transform: scaleX(1); }

.haus-tab:hover { color: var(--color-ink); }

@media (max-width: 720px) {
  .haus-tabs {
    margin: 2rem 0 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .haus-tabs::-webkit-scrollbar { display: none; }

  .haus-tab {
    flex: 0 0 auto;
    padding: 0.9rem 1.4rem;
    scroll-snap-align: start;
    font-size: 0.72rem;
  }
}

.wohnungen-panel.is-hidden,
.wohnungen-panel[hidden] {
  display: none;
}

.wohnungen-table-wrap {
  overflow-x: auto;
  margin-top: 1.5rem;
  border-top: 1px solid var(--color-line);
  animation: panel-fade 0.5s var(--ease-out);
}

@keyframes panel-fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wohnungen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.wohnungen-table thead th {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 1.2rem 1rem;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--color-line);
}

.wohnungen-table tbody td {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid var(--color-line-soft);
  vertical-align: middle;
  color: var(--color-ink);
}

.wohnungen-table tbody tr {
  transition: background 0.3s var(--ease);
}

.wohnungen-table tbody tr:hover {
  background: var(--color-bg-alt);
}

.wohnungen-table .nr {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-accent);
}

.wohnungen-table .preis {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 400;
  white-space: nowrap;
}

/* Stacked card layout on mobile */
@media (max-width: 720px) {
  .wohnungen-table-wrap {
    overflow-x: visible;
    border-top: none;
    margin-top: 0.5rem;
  }
  .wohnungen-table,
  .wohnungen-table thead,
  .wohnungen-table tbody,
  .wohnungen-table tr,
  .wohnungen-table td,
  .wohnungen-table th {
    display: block;
    width: 100%;
  }
  .wohnungen-table thead {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }
  .wohnungen-table tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1rem;
    row-gap: 0.4rem;
    padding: 1.25rem 1.1rem;
    margin-bottom: 1rem;
    background: var(--color-bg-alt);
    border: 1px solid var(--color-line-soft);
    border-radius: var(--radius-md);
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
  }
  .wohnungen-table tbody tr:hover {
    background: var(--color-surface);
    border-color: var(--color-line);
  }
  .wohnungen-table tbody td {
    padding: 0;
    border-bottom: none;
    display: contents;
  }
  .wohnungen-table tbody td::before {
    content: attr(data-label);
    grid-column: 1;
    font-family: var(--font-body);
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-muted);
    font-weight: 500;
    align-self: center;
  }
  .wohnungen-table tbody td > * {
    grid-column: 2;
    justify-self: start;
    text-align: left !important;
  }
  /* Nr cell spans the top of the card as a header */
  .wohnungen-table tbody td:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    grid-column: 1 / -1;
    padding-bottom: 0.75rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-line-soft);
  }
  .wohnungen-table tbody td:first-child::before { display: none; }
  .wohnungen-table tbody td:first-child .nr {
    font-size: 1.6rem;
  }
  /* Preis: emphasise as the closing line of the card */
  .wohnungen-table tbody td.preis {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-line-soft);
  }
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
}

.status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status--verfuegbar {
  background: rgba(116, 156, 117, 0.14);
  color: #4a6f4b;
}
.status--verfuegbar::before { background: #6a9c6b; }

.status--reserviert {
  background: rgba(196, 142, 73, 0.14);
  color: #855a1f;
}
.status--reserviert::before { background: #c48e49; }

.status--verkauft {
  background: rgba(120, 120, 120, 0.14);
  color: var(--color-muted);
  text-decoration: line-through;
}
.status--verkauft::before { background: var(--color-muted); }

/* Wohnungstypen Karten */
.types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

@media (max-width: 900px) {
  .types-grid { grid-template-columns: 1fr; }
}

.type-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 3 / 4;
  cursor: pointer;
  background: #0f0f0e;
}

.type-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 1.4s var(--ease-out), opacity 0.6s var(--ease);
}

.type-card:hover img {
  transform: scale(1.06);
  opacity: 1;
}

.type-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 15, 14, 0) 50%, rgba(15, 15, 14, 0.9) 100%);
}

.type-card__content {
  position: absolute;
  left: 1.75rem;
  right: 1.75rem;
  bottom: 1.75rem;
  color: #f5f1ea;
}

.type-card__label {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.5rem;
}

.type-card h3 {
  color: #f5f1ea;
  font-size: 2rem;
  font-weight: 300;
  margin-bottom: 0.5rem;
}

.type-card__meta {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* =========================================================
   AUSSTATTUNG
   ========================================================= */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

@media (max-width: 1100px) {
  .materials-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
}

@media (max-width: 560px) {
  .materials-grid { grid-template-columns: 1fr; gap: 1.75rem; margin-top: 2rem; }
  .material__img { aspect-ratio: 16 / 10 !important; }
  .material h4 { font-size: 1.2rem; }
}

.material {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.material__img {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.material__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out);
}

.material:hover .material__img img {
  transform: scale(1.05);
}

.material h4 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--color-ink);
}

.material p {
  font-size: 0.92rem;
  color: var(--color-muted);
  line-height: 1.55;
}

/* =========================================================
   TIMELINE
   ========================================================= */
.timeline {
  position: relative;
  margin-top: 4rem;
  padding-left: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: rgba(245, 241, 234, 0.25);
}

.timeline__item {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 3rem;
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--color-ink);
  border: 1px solid var(--color-accent-soft);
  box-shadow: 0 0 0 5px rgba(195, 171, 141, 0.15);
}

.timeline__date {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
  margin-bottom: 0.4rem;
}

.timeline__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
  color: #f5f1ea;
}

.timeline__desc {
  font-size: 0.95rem;
  color: rgba(231, 227, 220, 0.75);
  max-width: 50ch;
}

/* =========================================================
   GALLERY
   ========================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 110px;
  gap: 1rem;
  margin-top: 4rem;
}

@media (max-width: 900px) {
  .gallery-grid { grid-auto-rows: 80px; gap: 0.6rem; }
}

.g-item {
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: zoom-in;
  position: relative;
  background: #0f0f0e;
}

.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out), opacity 0.4s var(--ease);
}

.g-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 14, 0);
  transition: background 0.3s var(--ease);
}

.g-item:hover img { transform: scale(1.06); }
.g-item:hover::after { background: rgba(15, 15, 14, 0.18); }

/* Custom grid spans */
.g-1  { grid-column: span 7; grid-row: span 4; }
.g-2  { grid-column: span 5; grid-row: span 4; }
.g-3  { grid-column: span 4; grid-row: span 3; }
.g-4  { grid-column: span 4; grid-row: span 3; }
.g-5  { grid-column: span 4; grid-row: span 3; }
.g-6  { grid-column: span 6; grid-row: span 4; }
.g-7  { grid-column: span 6; grid-row: span 4; }

@media (max-width: 900px) {
  .g-1, .g-2, .g-3, .g-4, .g-5, .g-6, .g-7 {
    grid-column: span 6;
    grid-row: span 3;
  }
}

@media (max-width: 560px) {
  .g-1, .g-2, .g-3, .g-4, .g-5, .g-6, .g-7 {
    grid-column: span 12;
    grid-row: span 3;
  }
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 15, 14, 0.96);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.lightbox.is-open {
  display: flex;
  opacity: 1;
}

.lightbox__img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(245, 241, 234, 0.12);
  color: #f5f1ea;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease);
  font-size: 1.5rem;
}

.lightbox__close {
  top: 1.5rem;
  right: 1.5rem;
  transform: none;
}

.lightbox__nav--prev { left: 1.5rem; }
.lightbox__nav--next { right: 1.5rem; }

.lightbox__close:hover,
.lightbox__nav:hover {
  background: rgba(245, 241, 234, 0.25);
}

.lightbox__caption {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  color: #f5f1ea;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 6vw, 6rem);
  margin-top: 4rem;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-info h3 {
  margin-bottom: 1rem;
}

.contact-info__block {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-line);
}

.contact-info__block h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.contact-info__block p {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-text);
}

.contact-info__block a {
  color: var(--color-ink);
  border-bottom: 1px solid var(--color-line);
  transition: border-color 0.3s var(--ease);
}

.contact-info__block a:hover {
  border-color: var(--color-accent);
}

/* Form */
.form {
  display: grid;
  gap: 1.25rem;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 560px) {
  .form__row { grid-template-columns: 1fr; }
}

.field {
  position: relative;
}

.field label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: transparent;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  color: var(--color-ink);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-ink);
  background: var(--color-surface);
}

.field--check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--color-muted);
  line-height: 1.5;
}

.field--check input {
  width: auto;
  margin-top: 4px;
  accent-color: var(--color-accent);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form__submit {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

@media (max-width: 560px) {
  .form__submit {
    justify-content: stretch;
  }
  .form__submit .btn {
    width: 100%;
    justify-content: center;
  }
}

.form__msg {
  font-size: 0.88rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  display: none;
}

.form__msg.is-visible { display: block; }

.form__msg--success {
  background: rgba(116, 156, 117, 0.14);
  color: #4a6f4b;
}

.form__msg--error {
  background: rgba(180, 80, 80, 0.12);
  color: #883333;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--color-ink-deep);
  color: rgba(231, 227, 220, 0.7);
  padding: clamp(4rem, 7vw, 6rem) 0 2rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.35em;
  color: #f5f1ea;
  margin-bottom: 1rem;
}

.footer-tagline {
  color: rgba(231, 227, 220, 0.65);
  max-width: 32ch;
  line-height: 1.7;
}

.footer-col h5 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.footer-col p,
.footer-col a {
  color: rgba(231, 227, 220, 0.7);
  line-height: 1.8;
  display: block;
}

.footer-col a:hover {
  color: #f5f1ea;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(231, 227, 220, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: rgba(231, 227, 220, 0.5);
  letter-spacing: 0.04em;
}

.footer-bottom a {
  padding: 0.25rem 0;
  display: inline-block;
}

.footer-bottom a:hover {
  color: #f5f1ea;
}

@media (max-width: 560px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
}

/* =========================================================
   UTILITIES
   ========================================================= */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   BRAND LOCKUP (header + footer)
   ========================================================= */
.brand--lockup {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 4px;
  letter-spacing: 0;
}

.brand__mark {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: 0.35em;
}

.brand__sub {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.7;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-brand__sub {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
  font-weight: 500;
}

/* =========================================================
   ECKDATEN AUF EINEN BLICK
   ========================================================= */
.eckdaten {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 3rem;
  border-top: 1px solid var(--color-line);
}

@media (max-width: 720px) {
  .eckdaten { grid-template-columns: 1fr; }
}

.eckdaten__row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--color-line);
}

.eckdaten__row:nth-child(odd) {
  border-right: 1px solid var(--color-line);
  padding-right: 2rem;
}

.eckdaten__row:nth-child(even) {
  padding-left: 2rem;
}

@media (max-width: 720px) {
  .eckdaten__row,
  .eckdaten__row:nth-child(odd),
  .eckdaten__row:nth-child(even) {
    padding-left: 0;
    padding-right: 0;
    border-right: none;
    grid-template-columns: 1fr;
    gap: 0.25rem;
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
  }
  .eckdaten__val {
    font-size: 1.02rem;
    line-height: 1.45;
  }
  .eckdaten__key {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
  }
}

.eckdaten__key {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 500;
}

.eckdaten__val {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--color-ink);
  letter-spacing: 0.01em;
}

/* =========================================================
   DIE GESCHOSSE
   ========================================================= */
.geschosse {
  margin-top: 4rem;
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(245, 241, 234, 0.15);
}

.geschoss {
  display: grid;
  grid-template-columns: 100px 1fr 1.2fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(245, 241, 234, 0.15);
  transition: background 0.4s var(--ease);
}

.geschoss:hover {
  background: rgba(245, 241, 234, 0.03);
}

@media (max-width: 720px) {
  .geschoss {
    grid-template-columns: 56px 1fr;
    grid-template-areas:
      "code title"
      "code desc";
    gap: 0.4rem 1.1rem;
    padding: 1.75rem 0;
  }
  .geschoss__code  { grid-area: code; }
  .geschoss__title { grid-area: title; font-size: 1.3rem; }
  .geschoss__title small { font-size: 0.62rem; margin-bottom: 0.4rem; letter-spacing: 0.24em; }
  .geschoss__desc  { grid-area: desc; font-size: 0.88rem; line-height: 1.6; }
}

@media (max-width: 400px) {
  .geschoss { grid-template-columns: 46px 1fr; gap: 0.3rem 0.85rem; }
  .geschoss__title { font-size: 1.18rem; }
}

.geschoss__code {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 300;
  color: var(--color-accent-soft);
  line-height: 1;
}

.geschoss__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 1.8rem);
  font-weight: 400;
  color: #f5f1ea;
  margin: 0;
}

.geschoss__title small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
  margin-bottom: 0.6rem;
}

.geschoss__desc {
  color: rgba(231, 227, 220, 0.75);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* =========================================================
   HOUSE VIEWER (Isometric + Elevation)
   ========================================================= */
.hv-section {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.hv-stage {
  margin-top: 2.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
  min-height: clamp(420px, 48vw, 580px);
}

@media (max-width: 720px) {
  .hv-stage {
    min-height: 0;
    margin-top: 1.75rem;
    border-radius: var(--radius-md);
  }
  .hv-view {
    padding: 1.25rem 0.85rem 1.75rem;
  }
  .hv-view__header {
    margin-bottom: 1rem;
    gap: 0.6rem;
  }
  .hv-view__header h3 {
    font-size: 1.15rem;
  }
  .hv-view__header h3 small {
    font-size: 0.6rem;
    letter-spacing: 0.24em;
    margin-bottom: 0.25rem;
  }
  .rc-controls {
    gap: 0.4rem;
    margin-bottom: 1rem;
  }
  .rc-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    flex: 0 1 auto;
  }
  .rc-hint {
    margin-top: 1.1rem;
    font-size: 0.78rem;
    padding: 0 0.5rem;
    line-height: 1.5;
  }
}

@media (max-width: 400px) {
  .rc-controls {
    gap: 0.35rem;
    margin-bottom: 0.85rem;
  }
  .rc-btn {
    padding: 0.45rem 0.7rem;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
  }
}

.hv-view {
  display: none;
  padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1.25rem, 3vw, 2.5rem);
  position: relative;
}

.hv-view.is-active {
  display: block;
}

.hv-view.is-entering {
  animation: hv-enter 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hv-view.is-leaving {
  display: block;
  animation: hv-leave 0.52s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 2;
}

/* Subtler, faster transitions — both views animate simultaneously so the
   stage is never empty during the swap. */
@keyframes hv-enter {
  0%   { opacity: 0; transform: scale(1.015) translateY(10px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes hv-leave {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to   { opacity: 0; transform: scale(0.985) translateY(-8px); }
}

/* Stagger units appearance in elevation view */
.hv-elev .unit {
  opacity: 0;
  animation: unit-rise 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes unit-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* (Click-feedback animations now live alongside the top-view site plan rules below) */

.hv-view__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.hv-view__header h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 400;
  margin: 0;
  color: var(--color-ink);
}

.hv-view__header h3 small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.hv-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-muted);
  cursor: pointer;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  transition: all 0.3s var(--ease);
  background: transparent;
  flex-shrink: 0;
}

.hv-back:hover {
  border-color: var(--color-ink);
  color: var(--color-ink);
}

.hv-back::before { content: "←"; font-size: 1rem; }

@media (max-width: 720px) {
  .hv-back {
    padding: 0.5rem 0.95rem;
    font-size: 0.65rem;
    letter-spacing: 0.16em;
    gap: 0.4rem;
  }
}

/* =========================================================
   TOP-VIEW SITE PLAN (clean, reference-inspired)
   ========================================================= */
.hv-site {
  display: block;
  width: 100%;
  height: auto;
  /* 2:1 aspect matches viewBox; capping max-width caps the rendered height
     so the whole house-viewer section fits a typical laptop screen
     (1366×768, 1440×900) without scrolling. */
  max-width: 980px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  background: #FAFAF7;
  box-shadow: inset 0 0 0 1px rgba(31, 31, 30, 0.06);
}

/* Filter pills above the map */
.rc-controls {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.rc-btn {
  padding: 0.6rem 1.2rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-muted);
  background: transparent;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.rc-btn:hover {
  color: var(--color-ink);
  border-color: var(--color-ink);
  background: var(--color-bg-alt);
}

.rc-btn.is-active {
  background: var(--color-ink);
  color: #fff;
  border-color: var(--color-ink);
}

/* Hint paragraph below the map */
.rc-hint {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-muted);
  font-style: italic;
}

/* Building interactivity */
.hv-site .haus {
  cursor: pointer;
  outline: none;
  transition: opacity 0.3s var(--ease);
}

.hv-site .haus .rc-roof {
  transition: filter 0.3s var(--ease), stroke-width 0.3s var(--ease), stroke 0.3s var(--ease);
}

.hv-site .haus:hover .rc-roof,
.hv-site .haus:focus-visible .rc-roof {
  filter: brightness(1.08);
}

.hv-site .haus.is-dimmed {
  opacity: 0.32;
}

.hv-site .haus.is-filter-active .rc-roof {
  stroke-width: 4;
  stroke: #2E4F1F;
}

/* Hotspot badge group */
.hv-site .rc-label-group {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.3s var(--ease);
}

.hv-site .haus:hover .rc-label-group,
.hv-site .haus:focus-visible .rc-label-group {
  transform: scale(1.06);
}

.hv-site .haus.is-filter-active .rc-label-group {
  transform: scale(1.1);
}

/* Click-feedback pulse on selection (brief — kept tight so the cross-fade
   to the elevation feels instantaneous). */
.hv-site .haus.is-selected .rc-roof {
  animation: roof-pop 0.28s ease-out;
}

.hv-site .haus.is-selected .rc-label-group {
  animation: badge-pop 0.28s ease-out;
}

@keyframes roof-pop {
  0%   { filter: brightness(1); }
  50%  { filter: brightness(1.25) drop-shadow(0 0 22px rgba(127, 167, 87, 0.85)); }
  100% { filter: brightness(1); }
}

@keyframes badge-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* Elevation (Schnitt) */
.hv-elev-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
  margin-top: 1rem;
}

@media (max-width: 1100px) {
  .hv-elev-wrap { grid-template-columns: minmax(0, 1fr) 240px; }
}

@media (max-width: 900px) {
  .hv-elev-wrap {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.hv-elev {
  width: 100%;
  height: auto;
  display: block;
  /* Cap the elevation SVG width so the Schnitt-Elevation comfortably fits
     on typical laptop screens (1366×768, 1440×900) without scrolling. */
  max-width: 800px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #FAFAF7 0%, #F0ECDC 100%);
}

/* Container for the elevation SVG */
.hv-elev-col {
  min-width: 0;
}

#hvElevSvg {
  width: 100%;
  min-width: 0;
  display: block;
}

/* The HTML floor cards used on phones — hidden by default (desktop shows SVG). */
.hv-mobile { display: none; }

@media (max-width: 900px) {
  /* On phones the technical schnitt-SVG is replaced by a stacked
     floor-by-floor card layout that feels native and is fully tappable. */
  #hvElevSvg { display: none !important; }
  .hv-mobile { display: block; }

  .hv-elev-wrap { margin-top: 0.25rem; }
}

/* ========== Mobile floor cards ========== */
.hv-mobile__floor {
  margin-bottom: 1.4rem;
}
.hv-mobile__floor:last-child { margin-bottom: 0; }

.hv-mobile__floor-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-line);
}

.hv-mobile__floor-code {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--color-ink);
  line-height: 1;
  letter-spacing: 0.02em;
  min-width: 2rem;
}

.hv-mobile__floor-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.hv-mobile__floor-name {
  font-family: var(--font-body);
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 500;
}

.hv-mobile__floor-desc {
  font-size: 0.78rem;
  color: var(--color-muted);
  line-height: 1.4;
}

.hv-mobile__units {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

@media (max-width: 360px) {
  .hv-mobile__units { gap: 0.45rem; }
}

.hv-mobile__unit {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.85rem 0.85rem 0.95rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #b89472, #7a6549);
  color: #fff;
  text-align: left;
  cursor: pointer;
  border: none;
  font-family: inherit;
  box-shadow: 0 6px 18px rgba(15, 15, 14, 0.12);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s var(--ease);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hv-mobile__unit::before {
  /* Soft top sheen for a tactile, premium feel */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent);
  pointer-events: none;
  z-index: -1;
}

.hv-mobile__unit:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 4px 10px rgba(15, 15, 14, 0.1);
}

.hv-mobile__unit:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Persistent selection — visible warm-accent ring around the currently
   chosen apartment, regardless of its base colour. Stays until another
   apartment is tapped. Mirrored on the matching table row. */
.hv-mobile__unit.is-selected {
  box-shadow:
    0 0 0 3px var(--color-accent),
    0 14px 30px rgba(160, 135, 107, 0.35),
    inset 0 0 0 2px rgba(255, 255, 255, 0.55);
  transform: translateY(-2px);
}

.hv-mobile__unit.is-selected::after {
  /* Small "selected" tick badge in the corner */
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  color: var(--color-accent);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  pointer-events: none;
  z-index: 2;
  animation: hv-mobile-tick 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes hv-mobile-tick {
  0%   { opacity: 0; transform: scale(0.4); }
  100% { opacity: 1; transform: scale(1); }
}

/* The corner status dot would visually clash with the tick — hide it
   while the card is selected. */
.hv-mobile__unit.is-selected .hv-mobile__unit-status {
  opacity: 0;
}

/* Unit colours — match the desktop SVG gradients */
.hv-mobile__unit--45 { background: linear-gradient(180deg, #b89472, #7a6549); }
.hv-mobile__unit--35 { background: linear-gradient(180deg, #d6bc94, #9c7e58); }
.hv-mobile__unit--25 { background: linear-gradient(180deg, #94BD6F, #5E8240); }

.hv-mobile__unit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.hv-mobile__unit-id {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.92;
}

.hv-mobile__unit-status {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

.hv-mobile__unit-status--verfuegbar { background: #7ab37a; }
.hv-mobile__unit-status--reserviert { background: #c48e49; }
.hv-mobile__unit-status--verkauft   { background: #8a8479; }

.hv-mobile__unit-title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 400;
  line-height: 1.1;
  margin-top: 0.15rem;
}

.hv-mobile__unit-meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.hv-mobile__unit-price {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 500;
  margin-top: auto;
  padding-top: 0.45rem;
  letter-spacing: 0.02em;
}

@media (max-width: 360px) {
  .hv-mobile__unit { padding: 0.7rem 0.7rem 0.8rem; gap: 0.3rem; }
  .hv-mobile__unit-title { font-size: 1.1rem; }
  .hv-mobile__unit-meta { font-size: 0.66rem; }
  .hv-mobile__unit-price { font-size: 0.98rem; }
}

/* UG card — informational, neutral palette */
.hv-mobile__ug {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, #d6cfbf, #b4ad9b);
  color: #2a2926;
}

.hv-mobile__ug-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  color: #4a4338;
}

.hv-mobile__ug-body { min-width: 0; }

.hv-mobile__ug-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
  letter-spacing: 0.01em;
}

.hv-mobile__ug-desc {
  font-size: 0.78rem;
  color: #4a4338;
  line-height: 1.45;
}

/* Floor labels (left side of building) */
.hv-elev .floor-code {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  fill: var(--color-ink);
  letter-spacing: 0.04em;
}

.hv-elev .floor-name {
  font-family: 'Inter', sans-serif;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  fill: #5E8240;
}

.hv-elev .floor-meta {
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  fill: var(--color-muted);
}

.hv-elev .roof-label {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  fill: #2E4F1F;
}

/* Unit group */
.hv-elev .unit {
  cursor: pointer;
  outline: none;
}

.hv-elev .unit > rect:first-of-type {
  transition: filter 0.3s var(--ease), transform 0.3s var(--ease);
  transform-box: fill-box;
  transform-origin: center;
}

.hv-elev .unit:hover > rect:first-of-type,
.hv-elev .unit:focus > rect:first-of-type,
.hv-elev .unit.is-active > rect:first-of-type {
  filter: brightness(1.12) drop-shadow(0 6px 20px rgba(15, 15, 14, 0.28));
  transform: translateY(-1px);
}

.hv-elev .unit:focus { outline: none; }
.hv-elev .unit:focus > rect:first-of-type {
  outline: 2px solid #fff;
}

/* Unit text */
.hv-elev .unit-id {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  fill: rgba(255, 255, 255, 0.9);
  pointer-events: none;
}

.hv-elev .unit-zimmer {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  fill: #fff;
  text-anchor: middle;
  pointer-events: none;
  letter-spacing: 0.01em;
}

.hv-elev .unit-zimmer--center {
  font-size: 26px;
  font-style: italic;
  font-weight: 500;
}

.hv-elev .unit-line {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  fill: rgba(255, 255, 255, 0.88);
  text-anchor: middle;
  pointer-events: none;
  letter-spacing: 0.04em;
}

.hv-elev .unit-preis {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  fill: #fff;
  text-anchor: middle;
  pointer-events: none;
  letter-spacing: 0.02em;
}

/* UG text */
.hv-elev .ug-label {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  fill: #4a4338;
  pointer-events: none;
}

.hv-elev .ug-sub {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 400;
  fill: #4a4338;
  letter-spacing: 0.06em;
  pointer-events: none;
}

/* Side panel: legend + selected detail */
.hv-side {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  padding: 1.5rem;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-line-soft);
}

.hv-legend h4 {
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--color-muted);
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.hv-legend__list {
  display: grid;
  gap: 0.55rem;
}

.hv-legend__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.86rem;
  color: var(--color-ink);
  line-height: 1.4;
}

.hv-legend__sw {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  /* On phones the mobile floor cards are self-explanatory (each unit
     shows its type colour, status dot, area and price), so the desktop
     side panel is removed for a cleaner experience. */
  .hv-side { display: none; }
}

.hv-house-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .hv-house-tabs {
    margin-bottom: 0.85rem;
    gap: 0.4rem;
  }
}

.hv-house-tab {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--color-line);
  background: transparent;
  color: var(--color-muted);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}

.hv-house-tab:hover {
  color: var(--color-ink);
  border-color: var(--color-ink);
}

.hv-house-tab.is-active {
  background: var(--color-ink);
  color: #fff;
  border-color: var(--color-ink);
}

/* Floating tooltip */
.hv-tooltip {
  position: fixed;
  z-index: 90;
  pointer-events: none;
  background: var(--color-ink);
  color: #f5f1ea;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0;
  transform: translate(-50%, -100%) translateY(-12px);
  transition: opacity 0.2s var(--ease);
  min-width: 230px;
  max-width: 280px;
}

@media (max-width: 720px) {
  .hv-tooltip {
    min-width: 180px;
    max-width: calc(100vw - 32px);
    padding: 0.75rem 0.9rem;
    font-size: 0.78rem;
  }
  .hv-tooltip__title { font-size: 1rem; gap: 0.5rem; }
  .hv-tooltip__title small { font-size: 0.58rem; letter-spacing: 0.18em; }
  .hv-tooltip__row { font-size: 0.72rem; }
  .hv-tooltip__preis { font-size: 1rem; }
}

.hv-tooltip.is-visible { opacity: 1; }

.hv-tooltip__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: #f5f1ea;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.hv-tooltip__title small {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent-soft);
}

.hv-tooltip__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  opacity: 0.85;
  margin-bottom: 0.25rem;
}

.hv-tooltip__row span:first-child {
  color: var(--color-accent-soft);
  letter-spacing: 0.05em;
}

.hv-tooltip__preis {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(245, 241, 234, 0.15);
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #f5f1ea;
}

.hv-tooltip__status {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.hv-tooltip__status--verfuegbar { background: rgba(116, 156, 117, 0.25); color: #b6d5b6; }
.hv-tooltip__status--reserviert { background: rgba(196, 142, 73, 0.25); color: #e7c391; }
.hv-tooltip__status--verkauft   { background: rgba(180, 180, 180, 0.18); color: #c8c4bb; }

/* Highlighted table row from viewer click — quick flash for attention */
.wohnungen-table tr.is-highlighted {
  background: rgba(160, 135, 107, 0.22) !important;
  animation: row-flash 1.5s ease-out;
}

@keyframes row-flash {
  0%   { background: rgba(160, 135, 107, 0.6); }
  100% { background: rgba(160, 135, 107, 0.22); }
}

/* Persistent "selected" state — sticks until another unit is picked.
   Works for both the desktop table rows and the stacked mobile cards. */
.wohnungen-table tbody tr.is-selected {
  background: rgba(160, 135, 107, 0.14) !important;
  box-shadow: inset 3px 0 0 var(--color-accent);
}

@media (max-width: 720px) {
  .wohnungen-table tbody tr.is-selected {
    background: rgba(160, 135, 107, 0.12) !important;
    border-color: var(--color-accent-soft) !important;
    box-shadow: 0 0 0 1px var(--color-accent-soft), 0 6px 18px rgba(160, 135, 107, 0.18);
  }
}

/* =========================================================
   KUULA 360° RUNDGANG
   ========================================================= */
.kuula-wrap {
  position: relative;
  margin-top: 3.5rem;
  aspect-ratio: 16 / 9;
  background: var(--color-ink);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.kuula-wrap iframe,
.kuula-wrap .ku-embed {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.kuula-hint {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.kuula-hint::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--color-accent);
}

/* =========================================================
   WOHNUNGSTYP DETAIL CARDS (enhanced)
   ========================================================= */
.typdetails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

@media (max-width: 1000px) {
  .typdetails { grid-template-columns: 1fr; gap: 1.5rem; }
}

@media (max-width: 560px) {
  .typdetail__body { padding: 1.5rem 1.25rem; }
  .typdetail__title { font-size: 1.75rem; }
  .typdetail__sub { font-size: 0.86rem; margin-bottom: 1.25rem; }
  .typdetail__stat-val { font-size: 1.1rem; }
  .typdetail__stat-key { font-size: 0.55rem; letter-spacing: 0.18em; }
  .typdetail__features li { font-size: 0.86rem; padding-left: 1.25rem; }
  .typdetail__features li::before { width: 8px; }
  .typdetail__cta { font-size: 0.68rem; padding: 0.8rem 1.3rem; letter-spacing: 0.18em; }
}

.typdetail {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.typdetail:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.typdetail__img {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  cursor: pointer;
}

.typdetail__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out);
}

.typdetail__img:hover img { transform: scale(1.05); }

.typdetail__zoom {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  background: rgba(15, 15, 14, 0.6);
  color: #f5f1ea;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.typdetail__body {
  padding: 2rem 1.75rem 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.typdetail__label {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.typdetail__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
  color: var(--color-ink);
}

.typdetail__sub {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.typdetail__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  margin-bottom: 1.5rem;
}

.typdetail__stat {
  padding: 1rem 0.5rem;
  text-align: center;
  border-right: 1px solid var(--color-line);
}

.typdetail__stat:last-child { border-right: none; }

.typdetail__stat-val {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--color-ink);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.typdetail__stat-key {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.typdetail__features {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  flex: 1;
}

.typdetail__features li {
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.5;
}

.typdetail__features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 10px;
  height: 1px;
  background: var(--color-accent);
}

.typdetail__features li b {
  font-weight: 500;
  color: var(--color-ink);
}

.typdetail__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.5rem;
  background: var(--color-ink);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: all 0.3s var(--ease);
  width: fit-content;
}

.typdetail__cta:hover {
  background: var(--color-accent);
  transform: translateY(-2px);
}

/* =========================================================
   TIMELINE (5 numbered phases)
   ========================================================= */
.timeline__num {
  position: absolute;
  left: -4px;
  top: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 0 0 4px var(--color-ink), 0 0 0 5px rgba(195, 171, 141, 0.4);
}

.timeline__item--numbered {
  padding-left: 3.25rem;
}

.timeline__item--numbered .timeline__dot {
  display: none;
}

@media (max-width: 720px) {
  .timeline { margin-top: 2.5rem; }
  .timeline__item--numbered {
    padding-left: 2.5rem;
    padding-bottom: 2.25rem;
  }
  .timeline__num {
    width: 24px;
    height: 24px;
    font-size: 0.85rem;
    box-shadow: 0 0 0 3px var(--color-ink), 0 0 0 4px rgba(195, 171, 141, 0.4);
  }
  .timeline__date {
    font-size: 0.62rem;
    letter-spacing: 0.22em;
  }
  .timeline__title { font-size: 1.3rem; }
  .timeline__desc { font-size: 0.88rem; line-height: 1.6; }
}

/* =========================================================
   TERMINPLAN — Phases (Verkaufsdossier-Stil)
   5 grouped sections: Vorbereitung · Etappe 1 · 2 · 3 · Fertigstellung
   ========================================================= */
.phases {
  margin-top: 4rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.phase {
  position: relative;
  padding: 1.75rem 2rem 1.85rem;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(231, 227, 220, 0.12);
  border-left: 3px solid var(--phase-accent, rgba(195, 171, 141, 0.55));
  border-radius: 6px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.phase:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(231, 227, 220, 0.18);
  border-left-color: var(--phase-accent, rgba(195, 171, 141, 0.85));
}

/* Per-phase accent colour */
.phase--prep   { --phase-accent: rgba(195, 171, 141, 0.55); }
.phase--haus-c { --phase-accent: #d8954f; }
.phase--haus-b { --phase-accent: #9aa0d6; }
.phase--haus-a { --phase-accent: #8ec56a; }
.phase--final  { --phase-accent: rgba(231, 227, 220, 0.45); }

/* Phase header — kicker label + total period on the right */
.phase__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(231, 227, 220, 0.08);
  flex-wrap: wrap;
}

.phase__kicker {
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(231, 227, 220, 0.92);
  position: relative;
  padding-left: 28px;
}

.phase__kicker::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 18px;
  height: 1px;
  background: var(--phase-accent);
  transform: translateY(-50%);
}

.phase__kicker em {
  font-style: normal;
  color: var(--phase-accent);
  margin-right: 0.4em;
}

.phase__period {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-style: italic;
  color: rgba(231, 227, 220, 0.62);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Steps list (1–3 rows per phase) */
.phase__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.phase__step {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: auto auto;
  gap: 0.25rem 2rem;
  padding: 1.1rem 0;
  border-bottom: 1px dashed rgba(231, 227, 220, 0.07);
}

.phase__step:last-child { border-bottom: none; }

.phase__step-meta {
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
  padding-top: 0.35rem;
}

.phase__step-time {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(231, 227, 220, 0.78);
}

.phase__step-badge {
  display: inline-block;
  padding: 0.22em 0.75em;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--phase-accent);
  color: var(--color-ink);
}

.phase__step-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: #f5f1ea;
  margin: 0 0 0.4rem;
  line-height: 1.3;
  grid-column: 2;
}

.phase__step-desc {
  font-size: 0.92rem;
  color: rgba(231, 227, 220, 0.7);
  margin: 0;
  line-height: 1.65;
  max-width: 60ch;
  grid-column: 2;
}

/* Milestone (Übergabe / Bezug) — slightly emphasised */
.phase__step--milestone .phase__step-title {
  font-style: italic;
  color: #fffaf0;
}

.phase__step--milestone {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.025),
    transparent 70%
  );
  margin-left: -2rem;
  margin-right: -2rem;
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (max-width: 860px) {
  .phase { padding: 1.5rem 1.4rem; }
  .phase__step {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1rem 0;
  }
  .phase__step-title,
  .phase__step-desc { grid-column: 1; }
  .phase__step--milestone {
    margin-left: -1.4rem;
    margin-right: -1.4rem;
    padding-left: 1.4rem;
    padding-right: 1.4rem;
  }
  .phase__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
  .phase__period { font-size: 0.88rem; }
}

/* =========================================================
   LAGEPLAN section helpers
   ========================================================= */
.lageplan-svg {
  width: 100%;
  height: auto;
  display: block;
}

