:root {
  --paper: #F6F4EF;
  --stone: #E7E2D8;
  --sage: #8A9A84;
  --sage-deep: #5F6E5A;
  --lake: #5E7383;
  --ink: #1F2320;
  --ink-soft: #4A4F4A;
  --ink-mute: #6D716B;
  --line: rgba(31, 35, 32, 0.14);
  --reserved: #B99A72;
  --reserved-ink: #85663F;
  --taken: #A4524A;
  --taken-tint: rgba(196, 98, 86, 0.1);
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --section: clamp(96px, 12vw, 176px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --slow: 800ms;
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
}

body.is-locked { overflow: hidden; }

img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

:focus-visible { outline: 1px solid var(--lake); outline-offset: 4px; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip-link:focus { top: 16px; }

.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { padding-top: var(--section); padding-bottom: var(--section); }

/* Placeholder marker for [values] */
.ph {
  color: var(--lake);
  background: rgba(94, 115, 131, 0.08);
  padding: 0 0.2em;
  border-radius: 2px;
}

/* ---------- Typography ---------- */
.label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 28px;
}
.label--light { color: rgba(246, 244, 239, 0.82); }

.title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.1rem, 4.4vw, 3.9rem);
  line-height: 1.06;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0 0 36px;
  max-width: 17ch;
  text-wrap: balance;
}
.title--small { font-size: clamp(1.7rem, 3vw, 2.6rem); max-width: 22ch; }

.lead {
  font-size: clamp(1rem, 1.1vw, 1.075rem);
  color: var(--ink-soft);
  max-width: 58ch;
}
.lead + .lead { margin-top: 20px; }
.lead--quiet {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 1.8vw, 1.6rem);
  line-height: 1.4;
  color: var(--ink);
}

.caption, .note {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}
.caption { margin-top: 12px; }
.note { margin-top: 24px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: var(--paper);
  transition: background-color 500ms var(--ease), color 500ms var(--ease), box-shadow 500ms var(--ease);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.site-header.is-scrolled {
  color: var(--ink);
  background: rgba(246, 244, 239, 0.84);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-menu-open { color: var(--ink); background: transparent; box-shadow: none; }

.logo {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: 0.34em;
  text-decoration: none;
  position: relative;
  z-index: 2;
}
.logo--dark { color: var(--ink); }

.site-nav__list { display: none; gap: 40px; }
.site-nav a {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.86;
  padding: 8px 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 500ms var(--ease), opacity 300ms;
}
.site-nav a:hover { opacity: 1; background-size: 100% 1px; }

.menu-toggle {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  background: none;
  border: 0;
  padding: 12px 0;
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.menu-toggle__lines {
  position: relative;
  width: 26px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transition: transform 400ms var(--ease), height 400ms var(--ease);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__lines { height: 0; border-bottom: 0; transform: rotate(0); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  background: var(--paper);
  padding: var(--header-h) var(--gutter) var(--gutter);
  opacity: 0;
  transition: opacity 500ms var(--ease);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { opacity: 1; }
.mobile-menu__list { display: grid; gap: 10px; }
.mobile-menu__list a {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  text-decoration: none;
  line-height: 1.2;
}

@media (min-width: 1000px) {
  .site-nav__list { display: flex; }
  .menu-toggle { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  color: var(--paper);
  background: #3b3a35 url('media/hero-aerial-poster.webp') center / cover no-repeat;
}
.hero__media, .hero__shade { position: absolute; inset: 0; }
.hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1200ms var(--ease);
}
.hero__video.is-active { opacity: 1; }
.hero__shade {
  background:
    radial-gradient(ellipse 62% 44% at 50% 54%, rgba(20, 22, 20, 0.42) 0%, rgba(20, 22, 20, 0) 100%),
    linear-gradient(180deg, rgba(20, 22, 20, 0.34) 0%, rgba(20, 22, 20, 0) 22%),
    linear-gradient(0deg, rgba(20, 22, 20, 0.42) 0%, rgba(20, 22, 20, 0) 32%);
}
.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--header-h);
}
.hero__title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 7vw, 6.6rem);
  line-height: 1;
  letter-spacing: 0.08em;
  margin: 0 0 clamp(16px, 2vw, 24px);
  text-shadow: 0 1px 24px rgba(20, 22, 20, 0.25);
}
.hero__subtitle {
  max-width: 40ch;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  line-height: 1.4;
  color: rgba(246, 244, 239, 0.92);
  text-shadow: 0 1px 16px rgba(20, 22, 20, 0.3);
}
.hero__cta {
  position: absolute;
  left: 50%;
  bottom: clamp(32px, 6vh, 64px);
  transform: translateX(-50%);
  display: inline-flex;
  white-space: nowrap;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(246, 244, 239, 0.5);
  transition: border-color 400ms var(--ease);
}
.hero__cta:hover { border-color: var(--paper); }
.hero__cta span[aria-hidden] { display: inline-block; transition: transform 600ms var(--ease); }
.hero__cta:hover span[aria-hidden] { transform: translateY(3px); }

/* ---------- Frames & motion ---------- */
.frame { position: relative; overflow: hidden; background: var(--stone); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame--house { aspect-ratio: 3 / 2; }

[data-parallax] { will-change: transform; transform: translate3d(0, var(--py, 0), 0) scale(1.12); }

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Wohnungen ---------- */
.section-intro { margin-bottom: clamp(56px, 7vw, 96px); }

/* The intro fills the screen on its own; the types only appear once you scroll. */
.apartments { padding-top: 0; }
.apartments .section-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  margin-bottom: 0;
  padding: 48px 0;
}

/* --fade (0–1) follows the scroll position, set in app.js. */
[data-scroll-fade] {
  opacity: var(--fade, 1);
  transform: translate3d(0, calc((1 - var(--fade, 1)) * 56px), 0);
}

/* One film per apartment type; max 1600px wide. */
.showcases { display: grid; gap: clamp(96px, 11vw, 168px); }
.showcase__head { display: grid; gap: 20px; margin-bottom: clamp(28px, 3.5vw, 48px); }
.showcase__head .label { margin-bottom: 14px; }
.showcase__head .lead { margin: 0; max-width: none; }
.showcase__name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.02;
  margin: 0;
}
.showcase__stage {
  width: min(100% - 2 * var(--gutter), 1600px);
  aspect-ratio: 4 / 5;
  max-height: calc(100svh - var(--header-h) - 40px);
  margin: 0 auto;
  overflow: hidden;
  background: var(--stone);
}
.showcase__stage video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.showcase__head,
.showcase__body {
  width: min(100% - 2 * var(--gutter), 1600px);
  max-width: none;
  padding: 0;
}

.showcase__body { margin-top: clamp(16px, 2vw, 28px); }
.showcase__units { margin-top: clamp(24px, 3vw, 40px); }
.showcase__none { margin: 0; font-size: 14px; color: var(--ink-mute); }

@media (min-width: 700px) {
  .showcase__stage { aspect-ratio: 3 / 2; }
}
@media (min-width: 1000px) {
  .showcase__stage { aspect-ratio: 16 / 9; }
}

.showcases > *,
.showcase__head > *,
.building__intro > *,
.contact__grid > * { min-width: 0; }

@media (min-width: 1000px) {
  .units { min-width: 0; }
}

/* ---------- Das Gebäude ---------- */
.building { padding-bottom: 0; }
.building__intro { display: grid; gap: 8px; }
.building__intro .lead { margin: 0; }
/* Rundgang: alle Ansichten übereinander, die horizontale Mausposition wählt die Ansicht. */
.turntable__stage {
  --tt-pad: clamp(18px, 2.6vw, 36px);
  --tt-fade: 1400ms;
  --tt-ease: cubic-bezier(0.45, 0, 0.25, 1);
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--stone);
  color: #fff;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 700px) {
  .turntable__stage { aspect-ratio: 16 / 10; }
}
.turntable__stage { cursor: pointer; }
.turntable__stage.is-auto { --tt-fade: 1800ms; }

/* Own stacking context: the ever-growing z-index of the images never reaches the overlays. */
.turntable__frames { position: absolute; inset: 0; isolation: isolate; }
.turntable__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity var(--tt-fade) var(--tt-ease), transform var(--tt-fade) var(--tt-ease);
  pointer-events: none;
}
.turntable__img.is-in { opacity: 1; transform: none; }

.turntable__shade {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(31, 35, 32, 0.5), rgba(31, 35, 32, 0));
  pointer-events: none;
}

.turntable__meta {
  position: absolute;
  left: var(--tt-pad);
  right: var(--tt-pad);
  bottom: calc(var(--tt-pad) + 12px);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 32px;
  pointer-events: none;
}
.turntable__caption {
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}
.turntable__count { color: rgba(255, 255, 255, 0.7); font-variant-numeric: tabular-nums; }
.turntable__caption.is-changing { animation: turntable-caption var(--tt-fade) var(--tt-ease); }
@keyframes turntable-caption { from { opacity: 0; transform: translate3d(0, 8px, 0); } }
@keyframes turntable-fade { from { opacity: 0; } }

.turntable__progress {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  height: 28px;
}
.turntable__seg {
  position: relative;
  flex: 1;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.turntable__seg::before {
  content: '';
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  transition: background-color var(--tt-fade) var(--tt-ease);
}
.turntable__seg:first-child::before { left: 0; }
.turntable__seg:last-child::before { right: 0; }
.turntable__seg:hover::before { background: rgba(255, 255, 255, 0.6); }
.turntable__seg[aria-current='true']::before { background: #fff; }
.turntable__seg:focus-visible { outline: 1px solid #fff; outline-offset: -6px; }

@media (max-width: 699px) {
  .turntable__shade { height: 60%; }
  .turntable__meta { flex-direction: column-reverse; align-items: flex-start; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 1000px) {
  .building__intro { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); align-items: end; gap: clamp(32px, 5vw, 96px); }
  .building__intro .title { margin-bottom: 0; }
}

.table-wrap { overflow-x: auto; }
.units { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
.units th {
  text-align: left;
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 0 12px 14px 0;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}
.units td {
  padding: 16px 12px 16px 0;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.units__id {
  font-family: var(--serif);
  font-size: 1.15rem;
}
.units a { font-size: 12px; letter-spacing: 0.06em; text-decoration: none; border-bottom: 1px solid var(--line); }
.units a:hover { border-color: var(--ink); }
.units .ph { font-size: 12px; }
.units__empty { padding: 32px 0; color: var(--ink-mute); }
.units tr.is-taken td:not(:last-child) { color: var(--ink-mute); }
.units tbody tr.is-taken { background: var(--taken-tint); }
.units__flag {
  margin-left: 12px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--taken);
}
.units__flag--reserved { color: var(--reserved-ink); }
/* Phones: Whg. Nr., Nettomiete and Details only; Etage, Wohnfläche and Balkon are in the PDF. */
@media (max-width: 699px) {
  .units { min-width: 0; }
  .units :is(th, td):nth-child(2),
  .units :is(th, td):nth-child(3),
  .units :is(th, td):nth-child(4) { display: none; }
  .units :is(th, td):last-child { text-align: right; padding-right: 0; }
  .units__flag { display: block; margin: 4px 0 0; }
}

.status { display: inline-flex; align-items: center; gap: 8px; }
.status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage);
}
.status--reserved::before { background: var(--reserved); }
.status--taken::before { background: transparent; border: 1px solid var(--ink-mute); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 32px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 400ms var(--ease), color 400ms var(--ease);
}
.button:hover { background: transparent; color: var(--ink); }
.button[disabled] { opacity: 0.6; cursor: progress; }
.text-link {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
}
.text-link:hover { border-color: var(--ink); }

/* ---------- Natur-Slider ---------- */
.nature { overflow: hidden; }
.nature .title { max-width: 20ch; }
.slider {
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(120px, 1fr);
  gap: 22px 16px;
  align-items: start;
  width: calc(100% + var(--gutter) + (100vw - min(100vw, 1360px)) / 2);
}
.slider__stage {
  position: relative;
  grid-column: 1;
  height: clamp(340px, 52vh, 640px);
  overflow: hidden;
  background: var(--stone);
  touch-action: pan-y;
  user-select: none;
}
.slider__images, .slider__texts { display: grid; }
.slider__texts { grid-column: 1; width: auto; }
.slider__image, .slider__text { grid-area: 1 / 1; }
.slider__images { position: absolute; inset: 0; }
.slider__image {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 900ms var(--ease);
}
.slider__image::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  background: linear-gradient(to top, rgba(20, 24, 22, 0.62) 0%, rgba(20, 24, 22, 0.18) 42%, transparent 100%);
  pointer-events: none;
}
.slider__caption {
  position: absolute;
  z-index: 1;
  left: 10%;
  right: 10%;
  bottom: 7%;
  margin: 0;
  padding-left: 0.34em;
  text-align: center;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(0.95rem, 1.8vw, 1.4rem);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--paper);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}
.slider__image.is-active { opacity: 1; }
.slider__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 6s var(--ease);
}
.slider__image.is-active img { transform: scale(1); }
.slider__image--placeholder {
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 12px;
  background:
    linear-gradient(160deg, rgba(138, 154, 132, 0.34), rgba(94, 115, 131, 0.28)),
    var(--stone);
}
.slider__image--placeholder .ph { background: rgba(246, 244, 239, 0.6); }

.slider__peek {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  height: clamp(340px, 52vh, 640px);
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--stone);
  cursor: pointer;
}
.slider__peek img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.35);
}
.slider__peek::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(246, 244, 239, 0.62);
  transition: background 400ms var(--ease);
}
.slider__peek:hover::after { background: rgba(246, 244, 239, 0.38); }

.slider__count {
  position: absolute;
  left: clamp(16px, 2vw, 28px);
  top: 18px;
  z-index: 2;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--paper);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.slider__text {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease), visibility 0s 700ms;
}
.slider__text.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 700ms var(--ease) 150ms, transform 700ms var(--ease) 150ms, visibility 0s;
}
.slider__text { width: 100%; }
.slider__body {
  margin: 0;
  max-width: none;
  font-size: clamp(17px, 1.3vw, 19px);
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-soft);
}
.slider__reach {
  margin: 10px 0 0;
  max-width: none;
  font-size: 13px;
  color: var(--ink-mute);
}
@media (max-width: 599px) {
  .slider { grid-template-columns: minmax(0, 3fr) minmax(72px, 1.1fr); gap: 18px 10px; }
  .slider__stage, .slider__peek { height: clamp(240px, 42vh, 420px); }
  .slider__caption { letter-spacing: 0.2em; font-size: 0.85rem; left: 8%; right: 8%; }
}

/* ---------- Galerie ---------- */
.gallery { padding-top: 0; }
.gallery__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px 32px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.gallery__head .title { margin-bottom: 0; }
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 10px;
  margin-bottom: 28px;
}
.tile { aspect-ratio: 4 / 5; }
.tile--l, .tile--f { grid-column: span 2; aspect-ratio: 16 / 10; }
.tile__button {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--stone);
  cursor: zoom-in;
}
.tile__button img, .tile__button video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tile__button:focus-visible { outline-offset: 3px; }

@media (min-width: 900px) {
  .gallery__grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: clamp(64px, 6.4vw, 92px);
    grid-auto-flow: row;
    gap: clamp(12px, 1.4vw, 20px);
  }
  .tile { aspect-ratio: auto; }
  .tile--l { grid-column: span 8; grid-row: span 4; }
  .tile--m { grid-column: span 4; grid-row: span 4; }
  .tile--s { grid-column: span 4; grid-row: span 3; }
  .tile--w { grid-column: span 6; grid-row: span 3; }
  .tile--f { grid-column: 1 / -1; grid-row: span 5; }
}

/* ---------- Galerieansicht ---------- */
.viewer {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: #161917;
  color: var(--paper);
  overflow: hidden;
}
.viewer::backdrop { background: #161917; }
.viewer[open] { animation: viewer-in 500ms var(--ease); }
@keyframes viewer-in { from { opacity: 0; } }
.viewer__bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--gutter);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.viewer__counter { font-variant-numeric: tabular-nums; color: rgba(246, 244, 239, 0.7); }
.viewer__close {
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(246, 244, 239, 0.4);
  padding: 4px 0;
  color: inherit;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}
.viewer__stage {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 72px clamp(16px, 7vw, 120px);
  touch-action: pan-y;
}
.viewer__stage img, .viewer__stage video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  animation: viewer-in 600ms var(--ease);
}
.viewer__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  margin-top: -26px;
  border: 1px solid rgba(246, 244, 239, 0.3);
  border-radius: 50%;
  background: rgba(22, 25, 23, 0.4);
  color: var(--paper);
  font-size: 18px;
  cursor: pointer;
  transition: background 300ms var(--ease), border-color 300ms var(--ease);
}
.viewer__nav:hover { background: rgba(246, 244, 239, 0.12); border-color: rgba(246, 244, 239, 0.7); }
.viewer__nav--prev { left: clamp(12px, 2vw, 32px); }
.viewer__nav--next { right: clamp(12px, 2vw, 32px); }
@media (max-width: 640px) {
  .viewer__nav { top: auto; bottom: 20px; margin-top: 0; }
}

/* ---------- Kontakt ---------- */
.contact { padding-bottom: 0; }
.contact__grid { display: grid; gap: 72px; padding-bottom: var(--section); }
@media (min-width: 1000px) {
  .contact__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(64px, 8vw, 140px); align-items: start; }
  .person { margin-top: 180px; }
}

.form { margin-top: 56px; display: grid; gap: 28px; }
.form__row { display: grid; gap: 28px; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; border: 0; margin: 0; padding: 0; min-width: 0; }
.field label, .field legend {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 6px;
  padding: 0;
}
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(31, 35, 32, 0.3);
  border-radius: 0;
  background: transparent;
  padding: 10px 0;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  transition: border-color 300ms;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #9A5B4B; }
.field__error { min-height: 0; font-size: 12px; color: #8E4F40; margin-top: 6px; }
.field__error:empty { display: none; }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
@media (min-width: 520px) { .choices { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.field .choice { margin: 0; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  color: var(--ink);
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
  transition: border-color 300ms, background-color 300ms, color 300ms;
}
.choice__title { font-size: 14px; font-weight: 400; letter-spacing: 0.01em; }
.choice__meta { font-size: 12px; color: var(--ink-mute); transition: color 300ms; }
.choice input:checked + span .choice__meta { color: rgba(246, 244, 239, 0.72); }
.choice span:hover { border-color: var(--ink); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.choice input:focus-visible + span { outline: 1px solid var(--lake); outline-offset: 3px; }
.choice--taken input:not(:checked) + span { background: var(--taken-tint); }
.choice--taken .choice__status { color: var(--taken); }
.choice--taken input:checked + span .choice__status { color: #F0B2AA; }
.choice input:disabled + span { color: var(--ink-mute); cursor: not-allowed; }

.check { display: flex; gap: 14px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ink); flex-shrink: 0; }
.field--check .field__error { margin-left: 32px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .button { justify-self: start; margin-top: 8px; }
.form__status { font-size: 13px; color: #8E4F40; }
.form__status:empty { display: none; }

.form-success { margin-top: 56px; padding: 48px 0; border-top: 1px solid var(--line); }
.form-success:focus { outline: none; }
.form-success__title { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 12px; }

.person__photo {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  max-width: 320px;
  margin-bottom: 32px;
  font-size: 12px;
  background: var(--stone);
}
.person__name { font-family: var(--serif); font-size: 1.8rem; font-weight: 300; margin: -12px 0 16px; }
.person__lines { display: grid; gap: 6px; font-size: 15px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { padding: 72px 0 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft); }
.site-footer__inner { display: grid; gap: 20px; align-items: center; }
.site-footer__links { display: flex; gap: 28px; }
.site-footer__links a { text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer__disclaimer { margin-top: 40px; font-size: 11px; color: var(--ink-mute); }
.site-footer__disclaimer--follow { margin-top: 6px; }
@media (min-width: 900px) {
  .site-footer__inner { grid-template-columns: auto 1fr auto auto; gap: 48px; }
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  padding: 16px var(--gutter) 24px;
  background: rgba(246, 244, 239, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.cookie-banner[hidden] { display: none !important; }

.cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
}

.cookie-banner__title {
  margin: 0 0 4px;
  font: 500 15px/1.3 var(--sans);
  color: var(--ink);
}

.cookie-banner__text {
  margin: 0;
  max-width: 52ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.cookie-banner__text a { color: var(--sage-deep); }

.cookie-banner__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-banner .btn {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font: 500 13px/1 var(--sans);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.cookie-banner .btn--primary {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
  color: #fff;
}

.cookie-banner .btn--ghost:hover { border-color: var(--ink-mute); }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  [data-parallax] { transform: none; }
  .turntable__img { transform: none !important; transition: opacity 150ms linear !important; }
  .turntable__caption.is-changing { animation: turntable-fade 150ms linear !important; }
}
