/* Halde Elf – Tokens, Layout, Komponenten */

@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif/instrument-serif-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif/instrument-serif-latin-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('../fonts/inter-tight/inter-tight-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('../fonts/inter-tight/inter-tight-latin-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #15130f;
  --stone-900: #23201b;
  --stone-700: #4a443b;
  --stone-400: #9b9284;
  --sand-100: #efe9df;
  --sand-50: #f7f3ec;
  --copper: #b8743f;
  --copper-soft: #d89a64;
  --night: #0c1119;

  --serif: 'Instrument Serif', 'Times New Roman', Times, serif;
  --sans: 'Inter Tight', 'Helvetica Neue', Arial, system-ui, sans-serif;
  --margin: clamp(20px, 5vw, 96px);
  --gutter: clamp(16px, 2vw, 32px);
  --header-h: 72px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --line: rgba(239, 233, 223, 0.16);
  --line-strong: rgba(239, 233, 223, 0.38);
  --muted: rgba(239, 233, 223, 0.72);
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  background: var(--ink);
  color: var(--sand-50);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--ink);
}

main { position: relative; z-index: 3; overflow-x: clip; }

img, svg, canvas { display: block; max-width: 100%; }

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; }

::selection { background: var(--copper); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--copper-soft);
  outline-offset: 3px;
}
main:focus, section:focus, [tabindex="-1"]:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: fixed;
  left: var(--margin);
  top: 12px;
  z-index: 120;
  padding: 12px 18px;
  background: var(--sand-50);
  color: var(--ink);
  font: 600 0.8125rem/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.5s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------------------------------------------------------------- Typo */

.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.88;
  font-kerning: normal;
}
.display em { font-style: italic; letter-spacing: -0.015em; }
.display--h2 {
  font-size: clamp(2.5rem, 5.2vw, 5.6rem);
  line-height: 0.92;
  text-wrap: balance;
}

.eyebrow {
  margin: 0 0 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font: 500 0.75rem/1.2 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.numeral {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--copper-soft);
  min-width: 1.6em;
}
.eyebrow__rule {
  display: block;
  width: 44px;
  height: 1px;
  background: var(--copper);
  transform-origin: 0 50%;
}

.body, .lead {
  margin: 1.6rem 0 0;
  max-width: 36ch;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgba(247, 243, 236, 0.9);
  text-wrap: pretty;
}
.lead { font-size: clamp(1.0625rem, 1.2vw, 1.2rem); max-width: 38ch; }

.line-mask { padding-bottom: 0.08em; margin-bottom: -0.08em; }

.is-motion [data-reveal], .is-motion [data-hero] { visibility: hidden; }

/* -------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 0;
  background: none;
  font: 500 0.75rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.55s var(--ease), color 0.55s var(--ease), border-color 0.55s var(--ease);
}
.btn--solid { background: var(--sand-50); color: var(--ink); }
.btn--solid:hover { background: var(--copper-soft); }
.btn--line { border-color: rgba(247, 243, 236, 0.5); color: var(--sand-50); }
.btn--line:hover { border-color: var(--sand-50); background: rgba(247, 243, 236, 0.06); }

.link-btn {
  padding: 10px 0;
  border: 0;
  background: none;
  font: 500 0.75rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.link-btn:hover { color: var(--sand-50); }

/* --------------------------------------------------------------- Stage */

.stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  background: var(--ink);
}
html.no-webgl .stage { display: none; }

.fallback {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #e8c9a6;
}
.fallback svg { width: 100%; height: 100%; max-width: none; }
/* Desktop: Zeichnung rechts neben der Textspalte, links zum Text hin abgedunkelt */
@media (min-width: 821px) {
  .fallback { background: linear-gradient(to bottom, #6f8fb0 0%, #e9c7a2 55%, #f2c9a0 75.9%, #8c8a7c 76%, #23201b 100%); }
  .fallback svg { position: absolute; top: 0; right: 0; width: 80%; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14%); mask-image: linear-gradient(to right, transparent 0, #000 14%); }
  .fallback::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(to right, rgba(21, 19, 15, 0.62) 0%, rgba(21, 19, 15, 0.4) 26%, rgba(21, 19, 15, 0) 46%);
  }
}
.fb-glass { fill: #20262a; transition: fill 0.5s var(--ease); }
.fb-house { transition: opacity 0.5s var(--ease); }
.fb-house.is-dim { opacity: 0.3; }
.fb-house.is-active .fb-glass { fill: var(--copper-soft); }
.fb-num { font: 600 17px var(--sans); letter-spacing: 0.08em; fill: var(--ink); text-anchor: middle; }

/* Projizierte Beschriftungen */
.labels {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.tag3d, .hover-tag {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  will-change: transform, opacity;
}
.tag3d__dot {
  position: absolute;
  left: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--sand-50);
  background: rgba(21, 19, 15, 0.5);
  box-shadow: 0 0 0 4px rgba(247, 243, 236, 0.08);
}
.tag3d__line {
  position: absolute;
  left: 0;
  top: -66px;
  width: 1px;
  height: 60px;
  background: linear-gradient(to top, rgba(247, 243, 236, 0.85), rgba(247, 243, 236, 0.35));
}
.tag3d__text {
  position: absolute;
  left: 10px;
  top: -80px;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 7px 11px;
  white-space: nowrap;
  background: rgba(21, 19, 15, 0.78);
  border-left: 1px solid var(--copper);
  font: 500 0.6875rem/1.2 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-50);
}
.tag3d__num { font-family: var(--serif); font-size: 0.95rem; letter-spacing: 0; color: var(--copper-soft); }
.tag3d--left .tag3d__text { left: auto; right: 10px; border-left: 0; border-right: 1px solid var(--copper); }
.tag3d--low .tag3d__line { top: 6px; background: linear-gradient(to bottom, rgba(247, 243, 236, 0.85), rgba(247, 243, 236, 0.35)); }
.tag3d--low .tag3d__text { top: 60px; }
.tag3d--house .tag3d__dot { width: 6px; height: 6px; left: -3px; top: -3px; box-shadow: none; }
.tag3d--house .tag3d__text {
  left: 0;
  top: -34px;
  transform: translateX(-50%);
  padding: 4px 8px;
  border: 0;
  background: rgba(21, 19, 15, 0.7);
  font: 400 0.95rem/1 var(--serif);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.hover-tag > span {
  display: block;
  transform: translate(-50%, -150%);
  padding: 7px 12px;
  background: var(--copper);
  color: var(--ink);
  font: 600 0.6875rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
html.is-picking main { cursor: pointer; }

/* ------------------------------------------------------------ Preloader */

.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--ink);
  clip-path: inset(0% 0% 0% 0%);
}
html:not(.js) .preloader { display: none; }
.preloader__inner { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.preloader__mark { font: 600 0.8125rem/1 var(--sans); letter-spacing: 0.42em; padding-left: 0.42em; color: var(--sand-100); }
.preloader__count {
  font: 200 clamp(3.2rem, 7vw, 5.6rem)/1 var(--sans);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--sand-50);
}
.preloader__bar { position: absolute; left: var(--margin); right: var(--margin); bottom: 9vh; height: 1px; background: rgba(247, 243, 236, 0.14); }
.preloader__bar span { display: block; height: 100%; background: var(--copper); transform: scaleX(0); transform-origin: 0 50%; }

/* --------------------------------------------------------------- Header */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--margin);
  background: linear-gradient(to bottom, rgba(21, 19, 15, 0.6), rgba(21, 19, 15, 0));
}
/* Inhalte unter der Kopfzeile weich ausblenden (--hc: Unterkante der Kopfzeile im Element, nav.js) */
.is-under-header {
  -webkit-mask-image: linear-gradient(to bottom, transparent var(--hc, 0px), #000 calc(var(--hc, 0px) + 22px));
  mask-image: linear-gradient(to bottom, transparent var(--hc, 0px), #000 calc(var(--hc, 0px) + 22px));
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
.wordmark {
  font: 600 0.8125rem/1 var(--sans);
  letter-spacing: 0.34em;
  text-decoration: none;
  color: var(--sand-50);
  padding: 14px 0;
}
.site-nav ul { display: flex; gap: clamp(18px, 2.4vw, 40px); margin: 0; padding: 0; list-style: none; }
.site-nav a {
  position: relative;
  display: inline-block;
  padding: 14px 0;
  font: 500 0.75rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(247, 243, 236, 0.8);
  transition: color 0.5s var(--ease);
}
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 1px;
  background: var(--copper-soft);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.6s var(--ease);
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--sand-50); }
.site-nav a:hover::after, .site-nav a[aria-current]::after { transform: scaleX(1); transform-origin: 0 50%; }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: none;
  font: 500 0.75rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-50);
}
.menu-toggle__lines { position: relative; width: 22px; height: 7px; }
.menu-toggle__lines::before, .menu-toggle__lines::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: currentColor;
  transition: transform 0.6s var(--ease);
}
.menu-toggle__lines::before { top: 0; }
.menu-toggle__lines::after { bottom: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines::before { transform: translateY(3px) rotate(20deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__lines::after { transform: translateY(-3px) rotate(-20deg); }

.menu { display: none; }

.chapter-progress {
  position: fixed;
  right: clamp(10px, 1.6vw, 28px);
  top: 50%;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateY(-50%);
  pointer-events: none;
}
.chapter-progress li {
  width: 26px;
  height: 1px;
  background: rgba(247, 243, 236, 0.45);
  transform: scaleX(0.46);
  transform-origin: 100% 50%;
  transition: transform 0.7s var(--ease), background-color 0.7s var(--ease);
}
.chapter-progress li.is-active { background: var(--copper-soft); transform: scaleX(1); }

/* ----------------------------------------------------------------- Hero */

.hero { position: relative; height: 135vh; }
.hero__inner {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-content: end;
  padding: calc(var(--header-h) + 4vh) var(--margin) 8vh;
}
.hero__inner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(21, 19, 15, 0.62) 0%, rgba(21, 19, 15, 0.3) 30%, rgba(21, 19, 15, 0) 58%),
    linear-gradient(to right, rgba(21, 19, 15, 0.36) 0%, rgba(21, 19, 15, 0) 50%);
}
.hero__inner { text-shadow: 0 1px 18px rgba(21, 19, 15, 0.4); }
.hero__links { text-shadow: none; }
.hero .eyebrow { grid-column: 1 / -1; }
.hero__title { grid-column: 1 / span 11; font-size: clamp(3.4rem, 9vw, 10.5rem); }
.hero__foot {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: end;
  margin-top: clamp(1.6rem, 4vh, 3.2rem);
}
.hero__lead { grid-column: 1 / span 5; margin: 0; }
.hero__links { grid-column: 8 / span 5; display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.scroll-hint {
  position: absolute;
  right: var(--margin);
  top: calc(var(--header-h) + 8vh);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font: 500 0.6875rem/1 var(--sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.scroll-hint__label { writing-mode: vertical-rl; }
.scroll-hint__line { position: relative; width: 1px; height: 72px; background: rgba(247, 243, 236, 0.22); overflow: hidden; }
.scroll-hint__line span {
  position: absolute;
  inset: 0;
  background: var(--sand-50);
  transform: scaleY(0);
  transform-origin: 50% 0;
  animation: hint-fill 2.8s var(--ease) infinite;
}
@keyframes hint-fill {
  0% { transform: scaleY(0); transform-origin: 50% 0; }
  55% { transform: scaleY(1); transform-origin: 50% 0; }
  56% { transform: scaleY(1); transform-origin: 50% 100%; }
  100% { transform: scaleY(0); transform-origin: 50% 100%; }
}

/* ------------------------------------------------------------- Chapters */

.chapter { position: relative; height: var(--len, 200vh); }
#ankunft { --len: 190vh; }
#material { --len: 210vh; }
#licht { --len: 400vh; }
#haeuser { --len: 250vh; }
#lage { --len: 190vh; }

.chapter__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-content: center;
  padding: calc(var(--header-h) + 5vh) var(--margin) 9vh;
}
.chapter__text { position: relative; grid-column: 2 / span 4; }
/* Lesbarkeit: weiche lineare Verlaeufe von der Bildkante statt runder Flecken */
.chapter__text, .figures, .daybox, .houses__intro { text-shadow: 0 1px 16px rgba(21, 19, 15, 0.38); }
.chapter__text::before, .figures::before, .daybox::before, .houses__intro::before {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  display: none;
}
.chapter__sticky::before {
  /* fest am Bildschirm, damit beim Wegscrollen keine Kante sichtbar wird;
     nur im aktiven Kapitel sichtbar (html[data-chapter], scroll.js) */
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
  background: linear-gradient(to right, rgba(21, 19, 15, 0.5) 0%, rgba(21, 19, 15, 0.3) 24%, rgba(21, 19, 15, 0) 45%);
}
html[data-chapter="ankunft"] #ankunft .chapter__sticky::before,
html[data-chapter="material"] #material .chapter__sticky::before,
html[data-chapter="licht"] #licht .chapter__sticky::before,
html[data-chapter="haeuser"] #haeuser .chapter__sticky::before,
html[data-chapter="lage"] #lage .chapter__sticky::before { opacity: 1; }
.chapter--ankunft .chapter__sticky::before {
  background:
    linear-gradient(to top, rgba(21, 19, 15, 0.55) 0%, rgba(21, 19, 15, 0.3) 24%, rgba(21, 19, 15, 0) 46%),
    linear-gradient(to right, rgba(21, 19, 15, 0.3) 0%, rgba(21, 19, 15, 0) 40%);
}
.chapter--licht .chapter__sticky::before {
  background:
    linear-gradient(to right, rgba(21, 19, 15, 0.48) 0%, rgba(21, 19, 15, 0.26) 24%, rgba(21, 19, 15, 0) 44%),
    linear-gradient(to left, rgba(21, 19, 15, 0.42) 0%, rgba(21, 19, 15, 0.2) 26%, rgba(21, 19, 15, 0) 45%);
}
.chapter--lage .chapter__sticky::before {
  background: linear-gradient(to left, rgba(21, 19, 15, 0.52) 0%, rgba(21, 19, 15, 0.3) 26%, rgba(21, 19, 15, 0) 48%);
}

.chapter--ankunft .chapter__sticky { align-content: end; }
.chapter--ankunft .chapter__text { grid-row: 1; }
.figures {
  grid-column: 7 / span 6;
  grid-row: 1;
  align-self: end;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gutter);
  margin: 0;
  position: relative;
}
.figure { display: flex; flex-direction: column-reverse; gap: 0.7rem; border-top: 1px solid var(--line-strong); padding-top: 1rem; }
.figure dt { font: 500 0.6875rem/1.3 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.figure dd { margin: 0; display: flex; align-items: baseline; gap: 0.3rem; font-family: var(--serif); line-height: 0.9; }
.figure__num { display: inline-block; font-size: clamp(2.6rem, 4.4vw, 4.8rem); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.figure__unit { font-size: clamp(1.1rem, 1.6vw, 1.6rem); font-style: italic; color: var(--copper-soft); }

.chapter--material .chapter__text { grid-column: 1 / span 4; }
.materials { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.1rem; max-width: 34ch; }
.material { border-top: 1px solid var(--line); padding-top: 1rem; }
.material h3 { margin: 0; display: flex; align-items: baseline; gap: 0.8rem; font: 500 0.95rem/1.3 var(--sans); letter-spacing: 0.01em; }
.material__num { font-family: var(--serif); font-size: 1.05rem; color: var(--copper-soft); }
.material p { margin: 0.4rem 0 0 2.05rem; font-size: 0.9375rem; line-height: 1.55; color: rgba(247, 243, 236, 0.82); }

.chapter--licht .chapter__sticky { align-content: space-between; }
.chapter--licht .chapter__text { grid-row: 1; align-self: start; }
.daybox { grid-column: 8 / span 5; grid-row: 2; align-self: end; position: relative; }
.clock { margin: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.clock__label { font: 500 0.75rem/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.clock__time {
  font: 200 clamp(4rem, 10vw, 9.5rem)/0.9 var(--sans);
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  color: var(--sand-50);
}
.moments { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 0.2rem; border-top: 1px solid var(--line-strong); }
.moment {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), color 0.7s var(--ease);
}
.moment__time { font-variant-numeric: tabular-nums; color: var(--copper-soft); }
.moment.is-past { opacity: 0.34; transform: none; }
.moment.is-active { opacity: 1; transform: none; }
.is-reduced .moment, html:not(.js) .moment { opacity: 0.6; transform: none; }
.is-reduced .moment.is-active { opacity: 1; }

.season { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 1.3rem; }
.season__btn {
  min-height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  border: 1px solid var(--line-strong);
  background: rgba(21, 19, 15, 0.55);
  font: 500 0.6875rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-shadow: none;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.season__btn:hover { border-color: var(--sand-100); color: var(--sand-50); }
.season__btn[aria-pressed="true"] { background: var(--sand-50); border-color: var(--sand-50); color: var(--ink); }
.season__date { font-weight: 400; letter-spacing: 0.04em; text-transform: none; opacity: 0.78; }
.season__note { margin: 0.6rem 0 0; max-width: 42ch; font-size: 0.75rem; line-height: 1.45; color: var(--muted); }
.time-control { margin-top: 1.6rem; display: grid; gap: 0.7rem; }
.time-control label { display: flex; justify-content: space-between; font: 500 0.75rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.time-control output { font-variant-numeric: tabular-nums; color: var(--sand-50); letter-spacing: 0.06em; }
.time-control input { width: 100%; min-height: 44px; accent-color: var(--copper); background: none; }
.time-control__scale { display: flex; justify-content: space-between; font-size: 0.75rem; font-variant-numeric: tabular-nums; color: var(--muted); }

/* Haeuser */
.houses { grid-template-rows: auto 1fr auto; align-content: stretch; row-gap: 1.2rem; padding-bottom: 6vh; }
.houses__intro { grid-column: 1 / span 4; grid-row: 1; position: relative; }
.houses__text { max-width: 32ch; }
.houses__panel { grid-column: 1 / span 4; grid-row: 3; align-self: end; }
.filter { display: flex; gap: 4px; margin-bottom: 10px; }
.filter__btn {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  background: rgba(21, 19, 15, 0.6);
  font: 500 0.6875rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.filter__btn[aria-pressed="true"] { background: var(--sand-50); border-color: var(--sand-50); color: var(--ink); }
.house-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.house-btn {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 2.1rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(21, 19, 15, 0.66);
  text-align: left;
  font-size: 0.8125rem;
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.house-btn:hover { border-color: var(--line-strong); background: rgba(35, 32, 27, 0.9); }
.house-btn[aria-pressed="true"] { border-color: var(--copper); background: color-mix(in srgb, var(--copper) 24%, transparent); }
.house-btn__num { font: 400 1.15rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.house-btn__type { color: rgba(247, 243, 236, 0.86); }
.house-btn__status { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.75rem; color: var(--muted); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot--available { background: #9fc08a; }
.dot--reserved { background: var(--copper-soft); }
.dot--sold { background: transparent; border: 1px solid var(--stone-400); }

.house-card {
  grid-column: 9 / span 4;
  grid-row: 1 / span 3;
  align-self: end;
  max-height: calc(100svh - var(--header-h) - 12vh);
  overflow: auto;
  padding: clamp(20px, 2vw, 32px);
  background: rgba(21, 19, 15, 0.9);
  border: 1px solid var(--line);
  overscroll-behavior: contain;
}
.house-card__hint { margin: 0; font-size: 0.9375rem; color: var(--muted); max-width: 32ch; }
.house-card__eyebrow { margin: 0 0 0.6rem; font: 500 0.6875rem/1.3 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.house-card__title { margin: 0; font: 400 clamp(2.4rem, 3.4vw, 3.4rem)/0.9 var(--serif); letter-spacing: -0.02em; }
.house-card__num { color: var(--copper-soft); font-variant-numeric: tabular-nums; }
.house-card__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 1.2rem; margin: 1.4rem 0 0; }
.house-card__facts > div { border-top: 1px solid var(--line); padding-top: 0.5rem; }
.house-card__facts dt { font: 500 0.625rem/1.3 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.house-card__facts dd { margin: 0.2rem 0 0; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-items: center; gap: 0.4rem; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--available { color: #b5d3a0; }
.status--reserved { color: var(--copper-soft); }
.status--sold { color: var(--stone-400); }
.house-card__plan { margin: 1.4rem 0 0; }
.plan { width: 100%; height: auto; max-height: 190px; }
.plan path { fill: none; stroke-dasharray: 1; stroke-dashoffset: 0; stroke-linejoin: miter; }
.plan__outline { stroke: var(--sand-50); stroke-width: 0.14; }
.plan__room { stroke: rgba(247, 243, 236, 0.62); stroke-width: 0.06; }
.plan__outdoor { stroke: color-mix(in srgb, var(--copper-soft) 60%, transparent); stroke-width: 0.05; fill: color-mix(in srgb, var(--copper-soft) 6%, transparent) !important; }
.plan__upper { stroke: var(--copper-soft); stroke-width: 0.05; }
.plan__door { stroke: rgba(247, 243, 236, 0.5); stroke-width: 0.04; }
.plan__label { font: 500 0.46px var(--sans); fill: rgba(247, 243, 236, 0.78); text-anchor: middle; letter-spacing: 0.02px; }
.plan__label--muted { fill: color-mix(in srgb, var(--copper-soft) 90%, transparent); }
.plan__caption { font: 500 0.5px var(--sans); fill: var(--muted); letter-spacing: 0.08px; text-transform: uppercase; }
.house-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1.4rem; }
.house-card__actions .btn { flex: 1 1 auto; }

/* Lage */
.chapter--lage .chapter__text { grid-column: 8 / span 4; }
.distances { list-style: none; margin: 2rem 0 0; padding: 0; max-width: 36ch; border-top: 1px solid var(--line-strong); }
.distances li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.distances li span:last-child { color: var(--copper-soft); font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- Kontakt */

.contact {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--header-h) + 12vh) var(--margin) 12vh;
  background: linear-gradient(180deg, rgba(12, 17, 25, 0) 0%, rgba(12, 17, 25, 0.5) 22%, rgba(12, 17, 25, 0.78) 55%, rgba(12, 17, 25, 0.92) 100%);
}
.contact__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 3rem; }
.contact__intro { grid-column: 2 / span 4; }
.contact__mail { margin: 2rem 0 0; font: 400 1.4rem/1.2 var(--serif); color: var(--copper-soft); word-break: break-word; }
.contact__line { margin: 0.6rem 0 0; font-size: 0.9375rem; color: var(--muted); }
.form { grid-column: 7 / span 5; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem var(--gutter); align-content: start; }
.field { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label { font: 500 0.6875rem/1.3 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.field__opt { letter-spacing: 0.08em; text-transform: none; color: var(--stone-400); }
.field input:not([type="checkbox"]), .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  font-size: 1rem;
  color: var(--sand-50);
  transition: border-color 0.5s var(--ease);
}
.field select {
  appearance: none;
  padding-right: 28px;
  background-color: transparent;
  background-image: linear-gradient(45deg, transparent 50%, var(--sand-100) 50%), linear-gradient(-45deg, transparent 50%, var(--sand-100) 50%);
  background-position: calc(100% - 10px) 52%, calc(100% - 5px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.field select option { background: var(--night); color: var(--sand-50); }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--copper-soft); outline: none; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--copper-soft); outline-offset: 4px; }
.field.is-invalid input, .field.is-invalid select { border-bottom-color: #e58f62; }
.field__error { margin: 0; min-height: 1.2em; font-size: 0.8125rem; line-height: 1.4; color: #f1a77d; }
.field--check { display: grid; grid-template-columns: 22px 1fr; gap: 0.4rem 0.9rem; align-items: start; }
.field--check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--copper); }
.field--check label { font: 400 0.9375rem/1.5 var(--sans); letter-spacing: 0; text-transform: none; color: rgba(247, 243, 236, 0.86); }
.field--check .field__error { grid-column: 2; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; }
.form__note { margin: 0; max-width: 34ch; font-size: 0.8125rem; color: var(--muted); }
.form__status { margin: 0; min-height: 1.5em; font-size: 0.9375rem; color: var(--sand-100); }

/* ---------------------------------------------------------------- Footer */

.site-footer { position: relative; z-index: 3; background: var(--ink); border-top: 1px solid var(--line); }
.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 1.2rem;
  align-items: center;
  padding: 7vh var(--margin) 6vh;
}
.site-footer__mark { grid-column: 1 / span 3; margin: 0; font: 600 0.8125rem/1 var(--sans); letter-spacing: 0.34em; }
.site-footer__note { grid-column: 4 / span 5; margin: 0; font-size: 0.875rem; color: var(--muted); }
.site-footer__links { grid-column: 9 / span 4; display: flex; justify-content: flex-end; gap: 1.6rem; flex-wrap: wrap; }

/* --------------------------------------------------------------- Dialog */

.dialog {
  width: min(38rem, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  background: var(--stone-900);
  color: var(--sand-100);
}
.dialog::backdrop { background: rgba(12, 17, 25, 0.74); }
.dialog__title { margin: 0 0 1.2rem; font: 400 clamp(2rem, 4vw, 2.8rem)/1 var(--serif); letter-spacing: -0.02em; }
.dialog p { margin: 0 0 1rem; font-size: 0.9375rem; line-height: 1.6; color: rgba(239, 233, 223, 0.88); }
.dialog__close { margin-top: 1rem; }
.dialog__sub { margin: 1.4rem 0 0.4rem; font: 600 0.8125rem/1.3 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: var(--copper-soft); }

.expose { display: none; }

/* ---------------------------------------------------------------- Mobil */

@media (max-width: 820px) {
  :root { --header-h: 60px; }
  .site-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .chapter-progress { display: none; }

  .menu {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--header-h) + 4vh) var(--margin) 6vh;
    background: var(--ink);
    visibility: hidden;
    clip-path: inset(0% 0% 100% 0%);
    transition: clip-path 0.7s var(--ease), visibility 0s linear 0.7s;
  }
  .menu[data-open="true"] { visibility: visible; clip-path: inset(0% 0% 0% 0%); transition: clip-path 0.7s var(--ease), visibility 0s; }
  .menu__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.2rem; }
  .menu__list a {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.35rem 0;
    font: 400 clamp(2.4rem, 11vw, 3.4rem)/1.05 var(--serif);
    letter-spacing: -0.02em;
    text-decoration: none;
  }
  .menu__num { min-width: 2.4rem; font-size: 1rem; color: var(--copper-soft); }
  .menu__foot { margin: 3rem 0 0; font: 500 0.6875rem/1.4 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
  .menu-open .site-header { background: none; }

  .hero__title { grid-column: 1 / -1; }
  .hero__foot { display: block; }
  .hero__links { justify-content: flex-start; margin-top: 1.6rem; }
  .hero__links .btn { flex: 1 1 auto; }
  .scroll-hint { display: none; }

  .chapter__sticky { align-content: end; padding: calc(var(--header-h) + 3vh) var(--margin) 5vh; row-gap: 1.4rem; }
  .chapter__text, .chapter--material .chapter__text, .chapter--lage .chapter__text { grid-column: 1 / -1; }
  .chapter__sticky::before { display: none; }
  .chapter__text::before, .houses__intro::before, .daybox::before, .figures::before {
    display: block;
    inset: -10vh calc(var(--margin) * -1) -6vh;
    background: linear-gradient(to top, rgba(21, 19, 15, 0.94) 35%, rgba(21, 19, 15, 0.7) 70%, rgba(21, 19, 15, 0));
  }
  .display--h2 { font-size: clamp(2.2rem, 10vw, 3.2rem); }
  .eyebrow { margin-bottom: 1rem; }
  .body { margin-top: 1rem; font-size: 1rem; }
  .figures { grid-column: 1 / -1; grid-row: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .figures::before { display: none; }
  .figure__num { font-size: 2.2rem; }
  .materials { margin-top: 1.2rem; gap: 0.6rem; }
  .material p { font-size: 0.875rem; }

  .chapter--licht .chapter__sticky { align-content: end; }
  .chapter--licht .chapter__text { grid-row: auto; }
  .chapter--licht .chapter__text .body { display: none; }
  .daybox { grid-column: 1 / -1; grid-row: auto; }
  /* Textplatte reicht im Kapitel Licht bis unter die Tagesbox */
  .chapter--licht .chapter__text::before { bottom: -1.4rem; }
  .chapter--licht .daybox::before { display: block; inset: 0 calc(var(--margin) * -1) -5vh; background: rgba(21, 19, 15, 0.94); }
  .clock__time { font-size: 3.6rem; }
  .season { margin-top: 0.8rem; }
  .season__btn { flex: 1 1 0; justify-content: center; }
  .season__note { margin-top: 0.4rem; font-size: 0.6875rem; }
  .moments { margin-top: 0.8rem; }
  .moment { padding: 0.45rem 0; font-size: 0.875rem; }
  html:not(.is-reduced) .moment:not(.is-active) { display: none; }

  .houses { grid-template-rows: auto 1fr auto auto; row-gap: 10px; padding-bottom: 3vh; }
  .houses__intro, .houses__panel, .house-card { grid-column: 1 / -1; }
  .houses__intro { grid-row: 1; }
  .houses__intro .display--h2 { font-size: 2.2rem; }
  .houses__text { display: none; }
  .houses__panel { grid-row: 3; position: relative; }
  .house-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    margin: 0 calc(var(--margin) * -1);
    padding: 0 var(--margin) 4px;
    scrollbar-width: none;
  }
  .house-list::-webkit-scrollbar { display: none; }
  .house-list li { flex: 0 0 auto; scroll-snap-align: start; }
  .house-btn { width: auto; min-width: 128px; }
  .house-card { grid-row: 4; max-height: 40svh; padding: 18px; }
  .house-card__title { font-size: 2.2rem; }
  .house-card__facts { margin-top: 0.9rem; gap: 0.6rem 1rem; }
  .plan { max-height: 120px; }
  .house-card__actions .btn { min-height: 44px; padding: 0 14px; }

  .contact { padding-top: calc(var(--header-h) + 8vh); }
  .contact__intro, .form { grid-column: 1 / -1; }
  .form { grid-template-columns: 1fr; }
  .site-footer__mark, .site-footer__note, .site-footer__links { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 820px) and (max-height: 700px) {
  .houses__intro .eyebrow { display: none; }
  .plan { display: none; }
}

/* -------------------------------------------------------------- Explorer */

.houses__explore { margin-top: 1.4rem; }

html[data-mode="explorer"], html[data-mode="explorer"] body { overflow: hidden; }
/* Seite tritt zurueck; !important schlaegt die Inline-Sichtbarkeit der Text-Reveals */
html[data-mode="explorer"] :is(main, .site-header, .site-footer, .menu, .chapter-progress, .skip-link),
html[data-mode="explorer"] :is(main, .site-header, .site-footer, .menu) * { visibility: hidden !important; pointer-events: none !important; }

.explorer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  color: var(--sand-50);
  animation: explorer-in 0.5s var(--ease) both;
}
@keyframes explorer-in { from { opacity: 0; } to { opacity: 1; } }
.explorer::before, .explorer::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
}
.explorer::before { top: 0; height: 160px; background: linear-gradient(to bottom, rgba(12, 11, 9, 0.62), rgba(12, 11, 9, 0)); }
.explorer::after { bottom: 0; height: 200px; background: linear-gradient(to top, rgba(12, 11, 9, 0.66), rgba(12, 11, 9, 0)); }
.explorer > * { pointer-events: auto; position: absolute; z-index: 1; }

.explorer__top {
  top: 0;
  left: var(--margin);
  right: var(--margin);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.explorer > .explorer__top { pointer-events: none; }
.explorer__top > * { pointer-events: auto; }
.explorer__brand { margin: 0; display: flex; align-items: baseline; gap: 1.1rem; flex-wrap: wrap; }
.explorer__mark { font: 500 0.875rem/1 var(--sans); letter-spacing: 0.32em; text-transform: uppercase; }
.explorer__concept { font: 500 0.6875rem/1.3 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper-soft); }
.explorer__close {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0 16px;
  border: 1px solid rgba(247, 243, 236, 0.5);
  background: rgba(21, 19, 15, 0.55);
  font: 500 0.75rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-50);
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.explorer__close:hover { border-color: var(--sand-50); background: rgba(35, 32, 27, 0.9); }
.explorer__key { padding: 3px 6px; border: 1px solid var(--line-strong); font-size: 0.625rem; letter-spacing: 0.08em; color: var(--muted); }

.explorer__side {
  left: var(--margin);
  top: calc(var(--header-h) + 24px);
  width: 210px;
  max-height: calc(100vh - var(--header-h) - 150px);
  overflow: auto;
  scrollbar-width: thin;
}
.explorer__label, .explorer-card__eyebrow, .explorer-card__sub {
  margin: 0 0 0.6rem;
  font: 500 0.6875rem/1.3 var(--sans);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.explorer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.xpick {
  width: 100%;
  min-height: 44px;
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(21, 19, 15, 0.66);
  text-align: left;
  font-size: 0.8125rem;
  color: var(--sand-50);
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.xpick:hover { border-color: var(--line-strong); background: rgba(35, 32, 27, 0.9); }
.xpick[aria-pressed="true"] { border-color: var(--copper); background: color-mix(in srgb, var(--copper) 30%, transparent); }
.xpick__num { font: 400 1.1rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.xpick__status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.6875rem; color: var(--muted); }

.explorer-card {
  right: var(--margin);
  top: calc(var(--header-h) + 24px);
  width: 330px;
  max-height: calc(100vh - var(--header-h) - 160px);
  overflow: auto;
  padding: 24px 26px 26px;
  background: rgba(21, 19, 15, 0.86);
  border: 1px solid var(--line);
  overscroll-behavior: contain;
}
.explorer-card__hint { margin: 0; font-size: 0.9375rem; color: var(--muted); }
.explorer-card__title { margin: 0; font: 400 2.8rem/0.9 var(--serif); letter-spacing: -0.02em; }
.explorer-card__num { color: var(--copper-soft); font-variant-numeric: tabular-nums; }
.explorer-card__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8rem 1.1rem; margin: 1.2rem 0 0; }
.explorer-card__facts > div { border-top: 1px solid var(--line); padding-top: 0.45rem; }
.explorer-card__facts dt { font: 500 0.625rem/1.3 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.explorer-card__facts dd { margin: 0.2rem 0 0; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.explorer-card__sub { margin-top: 1.3rem; }
.explorer-card__text { margin: 0; font-size: 0.875rem; line-height: 1.5; color: rgba(247, 243, 236, 0.86); }
.explorer-card__rooms { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.explorer-card__rooms li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.42rem 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; }
.explorer-card__rooms li span:last-child { color: var(--copper-soft); font-variant-numeric: tabular-nums; }

.explorer__bottom {
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100% - 2 * var(--margin));
}
.explorer__views, .explorer__floors { display: flex; gap: 4px; }
.xview {
  min-height: 46px;
  min-width: 96px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: rgba(21, 19, 15, 0.7);
  font: 500 0.6875rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand-50);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.xview:hover:not(:disabled) { border-color: var(--sand-100); }
.xview[aria-pressed="true"] { background: var(--sand-50); border-color: var(--sand-50); color: var(--ink); }
.xview:disabled { opacity: 0.42; cursor: not-allowed; }
.xview--floor { min-width: 64px; }
.explorer__hint { margin: 0; font-size: 0.75rem; letter-spacing: 0.04em; color: var(--muted); text-align: center; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); }
.explorer[data-busy="true"] .explorer__hint { opacity: 0.5; }
.explorer__tools { display: flex; gap: 12px; justify-content: center; }
.explorer__tools[hidden], .explorer__tools [hidden] { display: none; }
.xview--roof { min-width: 110px; }

/* Begehung: Raeume ersetzen die Hausliste, Standpunkt mit Konzeptflaeche */
.explorer[data-view="innen"] .explorer__side { display: none; }
.explorer__walk {
  left: var(--margin);
  top: calc(var(--header-h) + 24px);
  width: 230px;
  max-height: calc(100vh - var(--header-h) - 150px);
  overflow: auto;
  scrollbar-width: thin;
}
.explorer__walk[hidden] { display: none; }
.walk-room {
  margin: 0 0 1.3rem;
  padding: 12px 14px;
  border: 1px solid var(--copper);
  background: rgba(21, 19, 15, 0.82);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--sand-50);
  font-variant-numeric: tabular-nums;
}
.xroom { grid-template-columns: 1fr auto; }
.xroom__name { line-height: 1.2; }
/* Desktop: der Raum bleibt frei. Standpunkt klein oben links, Raeume als kompakte
   Leiste oben mittig zwischen Standpunkt und Hauskarte (dort liegen Decke und Wand,
   nicht das Motiv; unten schnitt sie bei acht Raeumen Bett und Tisch an). Die
   Flaeche steht im Standpunkt und bleibt fuer Screenreader im Knopf. */
@media (min-width: 821px) {
  .explorer__walk {
    left: calc(var(--margin) + 330px);
    right: calc(var(--margin) + 190px);
    top: calc(var(--header-h) + 18px);
    bottom: auto;
    width: auto;
    max-height: none;
    overflow: visible;
    pointer-events: none;
  }
  .explorer__walk .explorer__label { display: none; }
  .explorer__walk .walk-rooms { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; }
  .explorer__walk .walk-rooms li, .explorer__walk .walk-room { pointer-events: auto; }
  .explorer__walk .xroom {
    position: relative;
    width: auto;
    min-height: 36px;
    display: inline-flex;
    padding: 0 12px;
    background: rgba(21, 19, 15, 0.55);
    font-size: 0.6875rem;
    white-space: nowrap;
  }
  .explorer__walk .xroom__area {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .walk-room {
    position: fixed;
    top: calc(var(--header-h) + 18px);
    left: var(--margin);
    max-width: 320px;
    margin: 0;
    padding: 8px 12px;
    font-size: 0.8125rem;
    background: rgba(21, 19, 15, 0.62);
  }
  .explorer[data-view="innen"] .explorer-card { width: auto; max-width: 330px; padding: 14px 18px 16px; background: rgba(21, 19, 15, 0.62); }
  .explorer[data-view="innen"] .explorer-card__facts,
  .explorer[data-view="innen"] .explorer-card__eyebrow,
  .explorer[data-view="innen"] .explorer-card__sub,
  .explorer[data-view="innen"] .explorer-card__text,
  .explorer[data-view="innen"] .explorer-card__rooms { display: none; }
  .explorer[data-view="innen"] .explorer-card__title { font-size: 1.7rem; }
}
.xroom__area { font-size: 0.6875rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.walk-stick {
  right: 28px;
  bottom: 140px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(21, 19, 15, 0.5);
  touch-action: none;
  display: grid;
  place-items: center;
}
.walk-stick[hidden] { display: none; }
.walk-stick__knob {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(247, 243, 236, 0.85);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

@media (max-width: 820px) {
  .explorer::before { height: 110px; }
  .explorer::after { height: 46svh; background: linear-gradient(to top, rgba(12, 11, 9, 0.9) 55%, rgba(12, 11, 9, 0)); }
  .explorer__top { left: 16px; right: 12px; }
  .explorer__brand { flex-direction: column; gap: 0.35rem; }
  .explorer__mark { font-size: 0.8125rem; }
  .explorer__concept { font-size: 0.625rem; letter-spacing: 0.12em; }
  .explorer__key { display: none; }
  .explorer__bottom {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: auto;
    max-width: none;
    padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
    gap: 6px;
    background: rgba(21, 19, 15, 0.94);
    border-top: 1px solid var(--line);
  }
  .explorer__views { width: 100%; }
  .explorer__views .xview { flex: 1 1 0; min-width: 0; padding: 0 6px; min-height: 48px; letter-spacing: 0.1em; }
  .explorer__floors .xview { min-height: 44px; }
  .explorer__hint { display: none; }
  .explorer__side {
    left: 0;
    right: 0;
    top: auto;
    width: auto;
    bottom: calc(70px + env(safe-area-inset-bottom));
    max-height: none;
    overflow: visible;
  }
  .explorer__label { display: none; }
  .explorer__list { display: flex; gap: 6px; overflow-x: auto; padding: 0 12px 2px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .explorer__list::-webkit-scrollbar { display: none; }
  .explorer__list li { flex: 0 0 auto; scroll-snap-align: start; }
  .xpick { width: auto; min-width: 118px; }
  .explorer-card {
    left: 12px;
    right: 12px;
    top: auto;
    width: auto;
    bottom: calc(124px + env(safe-area-inset-bottom));
    max-height: 26svh;
    padding: 14px 16px;
  }
  .explorer[data-view="etage"] .explorer-card { bottom: calc(174px + env(safe-area-inset-bottom)); }
  .explorer-card__title { font-size: 2rem; }
  .explorer-card__facts { margin-top: 0.7rem; gap: 0.5rem 0.9rem; }
  /* nah am Haus zaehlt das Bild: Karte nur mit Titel und Ansichts-Hinweis */
  .explorer:not([data-view="aussen"]) .explorer-card { max-height: 22svh; }
  .explorer:not([data-view="aussen"]) .explorer-card__facts { display: none; }
  .explorer:not([data-view="aussen"]) .explorer-card__eyebrow { display: none; }
  .explorer:not([data-view="aussen"]) .explorer-card__title { font-size: 1.6rem; }
  .explorer-card__sub { margin-top: 0.8rem; }
  .explorer[data-view="puppenhaus"] .explorer-card { bottom: calc(174px + env(safe-area-inset-bottom)); }
  .explorer__tools { gap: 6px; }
  .explorer__tools .xview { min-height: 44px; }
  /* Begehung mobil: Standpunkt oben, Raeume als Leiste ueber den Ansichten, Karte aus */
  .explorer[data-view="innen"] .explorer-card { display: none; }
  .explorer__walk {
    left: 0;
    right: 0;
    top: auto;
    width: auto;
    bottom: calc(70px + env(safe-area-inset-bottom));
    max-height: none;
    overflow: visible;
  }
  .walk-room { position: fixed; top: 92px; left: 16px; right: 16px; margin: 0; padding: 8px 12px; font-size: 0.8125rem; }
  .xroom { min-width: 0; grid-template-columns: auto; gap: 0; padding: 4px 12px; }
  .walk-stick { right: 16px; bottom: calc(132px + env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------------- Reduced Motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.2s !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
  .scroll-hint__line span { transform: scaleY(1); }
  .is-motion [data-reveal], .is-motion [data-hero] { visibility: visible; }
}
