/* ==========================================================================
   Zur Wagnerei Eschenz – Designsystem
   ========================================================================== */

:root {
  color-scheme: light;

  /* Farbe */
  --bg: #fbfaf7;
  --surface: #f3efe8;
  --surface-2: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #55555a;
  --ink-3: #86868b;
  --line: rgba(29, 29, 31, 0.1);
  --accent: #862236;
  --accent-strong: #6d1a2b;
  --accent-soft: rgba(134, 34, 54, 0.08);
  --cream: #fafbd4;
  --glass: rgba(251, 250, 247, 0.72);
  --glass-dark: rgba(22, 22, 24, 0.42);

  /* Typografie */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Raster */
  --max: 1200px;
  --gutter: max(20px, 4vw);
  --nav-h: 60px;
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --section: clamp(72px, 10vw, 140px);

  /* Bewegung – kritisch gedämpft, kein Überschwingen */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08), 0 32px 80px rgba(0, 0, 0, 0.14);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: -0.003em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-strong); }

:focus-visible { outline: 3px solid rgba(134, 34, 54, 0.45); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); color: var(--ink); }
p { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Typografie-Skala (Tracking pro Grösse) ---------- */

.display {
  font-size: clamp(2.75rem, 7.2vw, 5.75rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.title {
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  line-height: 1.07;
  letter-spacing: -0.028em;
  font-weight: 700;
}
.title-sm {
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.022em;
  font-weight: 700;
}
.headline {
  font-size: 1.375rem;
  line-height: 1.25;
  letter-spacing: -0.016em;
  font-weight: 600;
}
.eyebrow {
  display: block;
  margin: 0 0 14px;
  font-size: 0.8125rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.lead {
  font-size: clamp(1.1875rem, 1.9vw, 1.5rem);
  line-height: 1.42;
  letter-spacing: -0.012em;
  color: var(--ink-2);
  font-weight: 400;
}
.muted { color: var(--ink-2); }
.small { font-size: 0.875rem; line-height: 1.45; letter-spacing: 0; }

.prose { max-width: 68ch; }
.prose p { color: var(--ink-2); }
.prose p strong { color: var(--ink); }
.prose h2 { font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.022em; margin: 2.2em 0 0.6em; }
.prose h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.014em; margin: 2em 0 0.5em; }
.prose > :first-child { margin-top: 0; }

/* ---------- Layout ---------- */

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: calc(820px + var(--gutter) * 2); }

.section { padding: var(--section) 0; }
.section-tight { padding: calc(var(--section) * 0.55) 0; }
.section + .section { padding-top: 0; }
.section.alt { background: var(--surface); }
.section.alt + .section, .section + .section.alt { padding-top: var(--section); }

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head .lead { margin-top: 18px; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

main { padding-top: var(--nav-h); min-height: 60vh; }

/* ---------- Navigation: Glasmaterial ---------- */

.nav-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--nav-h);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transition: box-shadow 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
/* Kante erscheint erst, wenn Inhalt darunter liegt */
.nav-bar[data-scrolled] { box-shadow: 0 1px 0 var(--line); }

.nav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand span { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.015em; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  position: relative;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s var(--ease-out), background-color 0.2s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); background: rgba(29, 29, 31, 0.05); }
.nav-links a:active { background: rgba(29, 29, 31, 0.09); transition-duration: 0s; }
.nav-links a[aria-current] { color: var(--ink); background: rgba(29, 29, 31, 0.07); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px; margin-right: -10px;
  border: 0; background: none; cursor: pointer; border-radius: 999px;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 13px; width: 18px; height: 1.5px; border-radius: 2px; background: var(--ink);
  transition: transform 0.35s var(--ease-out);
}
.nav-toggle span:first-child { top: 18px; }
.nav-toggle span:last-child { top: 25px; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; left: 0; right: 0; top: var(--nav-h);
    height: calc(100dvh - var(--nav-h));
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--gutter) 40px;
    /* verschachteltes backdrop-filter greift nicht – daher deckend */
    background: var(--bg);
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s var(--ease-out), transform 0.4s var(--ease-out), visibility 0s linear 0.4s;
  }
  .nav-links.open {
    opacity: 1; visibility: visible; transform: none;
    transition: opacity 0.3s var(--ease-out), transform 0.4s var(--ease-out), visibility 0s;
  }
  .nav-links a {
    padding: 14px 0;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 1.75rem; font-weight: 600; letter-spacing: -0.022em;
    color: var(--ink);
    background: none !important;
    opacity: 0; transform: translateY(-6px);
    transition: opacity 0.35s var(--ease-out), transform 0.45s var(--ease-out);
  }
  .nav-links.open a { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 35ms + 60ms); }
  .nav-links a[aria-current] { color: var(--accent); }
  .nav-bar:has(.nav-links.open) { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  html.nav-open { overflow: hidden; }
}

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px;
  border-radius: 999px; border: 0;
  font: inherit; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.008em;
  text-decoration: none; cursor: pointer;
  background: var(--accent); color: #fff;
  transition: transform 0.25s var(--ease-out), background-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--accent-strong); color: #fff; }
/* Rückmeldung beim Drücken – sofort, nicht erst beim Loslassen */
.btn:active { transform: scale(0.97); transition-duration: 0.08s; }
.btn-ghost { background: rgba(29, 29, 31, 0.06); color: var(--ink); }
.btn-ghost:hover { background: rgba(29, 29, 31, 0.1); color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--cream); color: var(--ink); }
.btn-glass {
  background: rgba(255, 255, 255, 0.2); color: #fff;
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.3); color: #fff; }
.btn svg { width: 16px; height: 16px; flex: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; text-decoration: none; color: var(--accent);
}
.link-arrow::after { content: "›"; font-size: 1.25em; line-height: 1; transition: transform 0.25s var(--ease-out); }
.link-arrow:hover::after { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Pills ---------- */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0;
  background: rgba(29, 29, 31, 0.06); color: var(--ink-2);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.pill-sold { background: rgba(29, 29, 31, 0.06); color: var(--ink-2); }
.pill-reserved { background: var(--accent-soft); color: var(--accent); }
.pill-done { background: rgba(255, 255, 255, 0.2); color: #fff; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25); }
.pill-done::before { background: #7fd69b; opacity: 1; box-shadow: 0 0 0 3px rgba(127, 214, 155, 0.25); }

/* ---------- Hero (Startseite) ---------- */

.hero {
  position: relative;
  margin: 0 clamp(8px, 1vw, 14px);
  height: clamp(560px, calc(100svh - var(--nav-h) - 14px), 980px);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #2a2522;
  color: #fff;
  isolation: isolate;
  touch-action: pan-y;
}
.hero .slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s var(--ease-in-out); }
.hero .slide.active { opacity: 1; }
.hero .slide img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  transition: transform 7s cubic-bezier(0.2, 0, 0.2, 1);
  will-change: transform;
}
.hero .slide.active img { transform: scale(1); }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0) 22%),
    linear-gradient(0deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.18) 42%, rgba(0,0,0,0) 62%);
}
.hero-content {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  padding: 0 clamp(22px, 5vw, 72px) clamp(28px, 5vw, 64px);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 32px;
}
.hero-copy { max-width: 760px; }
.hero .eyebrow { color: rgba(255, 255, 255, 0.85); }
.hero h1 { color: #fff; text-wrap: balance; }
.hero .lead { color: rgba(255, 255, 255, 0.88); margin: 18px 0 0; max-width: 34ch; }
.hero .btn-row { margin-top: 26px; }

.hero-controls {
  display: flex; align-items: center; gap: 10px; flex: none;
  padding: 8px 10px 8px 16px; border-radius: 999px;
  background: var(--glass-dark);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.dots { display: flex; gap: 6px; }
.dot {
  position: relative; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, 0.45); cursor: pointer; overflow: hidden;
  transition: width 0.45s var(--ease-out), background-color 0.3s;
}
.dot::before { content: ""; position: absolute; inset: -10px -3px; } /* grössere Trefferfläche */
.dot.active { width: 36px; background: rgba(255, 255, 255, 0.35); }
.dot i { position: absolute; inset: 0; border-radius: inherit; background: #fff; transform: scaleX(0); transform-origin: left; }
.dot.active i { animation: dot-fill var(--slide-ms, 6000ms) linear forwards; }
.hero.paused .dot.active i { animation-play-state: paused; }
@keyframes dot-fill { to { transform: scaleX(1); } }
.hero-play {
  width: 30px; height: 30px; border: 0; border-radius: 50%; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, 0.16); color: #fff;
  transition: background-color 0.2s, transform 0.2s var(--ease-out);
}
.hero-play:hover { background: rgba(255, 255, 255, 0.28); }
.hero-play:active { transform: scale(0.92); transition-duration: 0.08s; }
.hero-play svg { width: 12px; height: 12px; }
.hero-play .i-play { display: none; }
.hero.paused .hero-play .i-play { display: block; }
.hero.paused .hero-play .i-pause { display: none; }

@media (max-width: 760px) {
  .hero { height: clamp(520px, calc(100svh - var(--nav-h) - 10px), 820px); border-radius: 22px; }
  .hero-content { flex-direction: column; align-items: flex-start; gap: 22px; }
}

/* ---------- Seiten-Hero (Unterseiten) ---------- */

.page-hero {
  position: relative;
  margin: 0 clamp(8px, 1vw, 14px);
  height: clamp(380px, 62svh, 640px);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #2a2522;
  isolation: isolate;
}
.page-hero > img { width: 100%; height: 100%; object-fit: cover; animation: settle 1.6s var(--ease-out) both; }
@keyframes settle { from { transform: scale(1.05); opacity: 0.6; } to { transform: none; opacity: 1; } }
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(0deg, rgba(0,0,0,0.58) 0%, rgba(0,0,0,0.12) 45%, rgba(0,0,0,0) 65%);
}
.page-hero .hero-copy {
  position: absolute; z-index: 2; left: 0; bottom: 0;
  padding: 0 clamp(22px, 5vw, 72px) clamp(28px, 4.5vw, 56px);
  color: #fff;
}
.page-hero .eyebrow { color: rgba(255, 255, 255, 0.85); }
.page-hero h1 { color: #fff; text-wrap: balance; }
.page-hero .hero-logo {
  position: absolute; z-index: 2; top: clamp(16px, 3vw, 32px); left: 50%; transform: translateX(-50%);
  width: clamp(110px, 16vw, 170px); height: auto; border-radius: 14px; box-shadow: var(--shadow-lg);
}
@media (max-width: 760px) { .page-hero { border-radius: 22px; } }

/* ---------- Kennzahlen ---------- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat { padding: 8px 28px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3.6vw, 3.25rem); line-height: 1; letter-spacing: -0.035em; font-weight: 700; white-space: nowrap;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat b small { font-size: 0.45em; letter-spacing: -0.01em; font-weight: 600; margin-left: 2px; }
.stat span { display: block; margin-top: 10px; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.4; }
@media (max-width: 860px) {
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 420px) {
  .stat { padding: 4px 16px; }
}

/* ---------- Fortschritt / Timeline ---------- */

.status-card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(250, 251, 212, 0.12) 0%, rgba(250, 251, 212, 0) 50%),
    linear-gradient(160deg, #8f2639 0%, #6d1a2b 100%);
  color: var(--cream);
  padding: clamp(32px, 6vw, 80px);
  box-shadow: var(--shadow);
}
.status-card .eyebrow { color: rgba(250, 251, 212, 0.75); }
.status-card h2 { color: #fff; }
.status-card .lead { color: rgba(255, 255, 255, 0.82); }
.status-top { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.status-top p { color: rgba(255, 255, 255, 0.78); margin: 0 0 1em; }
.status-top p:last-child { margin: 0; }
@media (max-width: 860px) { .status-top { grid-template-columns: 1fr; } }

.timeline {
  --dot: 28px;
  list-style: none; margin: clamp(40px, 6vw, 72px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(9, 1fr);
  position: relative;
  counter-reset: step;
}
/* Schiene + Füllung */
.timeline::before, .timeline::after {
  content: ""; position: absolute; top: calc(var(--dot) / 2 - 1px); height: 2px;
  left: calc(100% / 18); right: calc(100% / 18);
  border-radius: 2px;
}
.timeline::before { background: rgba(250, 251, 212, 0.22); }
.timeline::after {
  background: var(--cream);
  transform-origin: left; transform: scaleX(var(--fill, 1));
}
.timeline li {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  font-size: 0.875rem; line-height: 1.3; font-weight: 500; letter-spacing: -0.005em;
  color: rgba(255, 255, 255, 0.92);
  padding: 0 4px;
}
.timeline li::before {
  content: "";
  width: var(--dot); height: var(--dot); border-radius: 50%; margin-bottom: 14px; flex: none;
  background: #7a1f31;
  box-shadow: inset 0 0 0 2px rgba(250, 251, 212, 0.5);
}
.timeline li.done::before {
  background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M8.5 14.5l3.6 3.4 7.4-7.6' fill='none' stroke='%23862236' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
  box-shadow: 0 0 0 5px rgba(250, 251, 212, 0.12);
}
.timeline li:last-child { font-weight: 700; color: #fff; }

/* Animation beim Erscheinen */
.js .timeline:not(.in)::after { transform: scaleX(0); }
.js .timeline::after { transition: transform 1.6s var(--ease-in-out) 0.15s; }
.js .timeline li::before { transition: transform 0.5s var(--ease-out), opacity 0.4s var(--ease-out); transition-delay: calc(var(--i) * 160ms + 150ms); }
.js .timeline:not(.in) li::before { transform: scale(0.4); opacity: 0; }

@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; gap: 0; }
  .timeline::before, .timeline::after {
    left: calc(var(--dot) / 2 - 1px); right: auto; width: 2px; height: auto;
    top: calc(var(--dot) / 2); bottom: calc(var(--dot) / 2);
    transform-origin: top; transform: scaleY(var(--fill, 1));
  }
  .js .timeline:not(.in)::after { transform: scaleY(0); }
  .timeline li { flex-direction: row; text-align: left; gap: 16px; padding: 0 0 18px; font-size: 1.0625rem; }
  .timeline li:last-child { padding-bottom: 0; }
  .timeline li::before { margin: 0; }
}

/* ---------- Bento / Bildraster ---------- */

.bento { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; height: clamp(420px, 52vw, 680px); }
.bento > :first-child { grid-row: 1 / 3; }
@media (max-width: 760px) {
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; height: auto; }
  .bento > :first-child { grid-row: auto; grid-column: 1 / -1; aspect-ratio: 4 / 3; }
  .bento > * { aspect-ratio: 1; }
}

.media {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r);
  background: var(--surface);
  -webkit-tap-highlight-color: transparent;
}
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-out), opacity 0.3s; }
a.media { cursor: zoom-in; }
a.media:hover img { transform: scale(1.035); }
a.media:active img { transform: scale(1.01); transition-duration: 0.15s; }
a.media::after {
  content: ""; position: absolute; right: 14px; bottom: 14px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(22, 22, 24, 0.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M12 3h5v5M8 17H3v-5M17 3l-6 6M3 17l6-6' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/16px no-repeat;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transform: scale(0.9);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}
a.media:hover::after, a.media:focus-visible::after { opacity: 1; transform: none; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.grid .media { aspect-ratio: 4 / 3; }
.grid .media.wide { grid-column: span 2; aspect-ratio: auto; }
@media (max-width: 760px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid .media.wide { grid-column: auto; aspect-ratio: 4 / 3; }
}

figure { margin: 0; }
.figure figcaption { margin-top: 12px; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); }
.figure figcaption b { display: block; color: var(--ink-3); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 2px; }

/* ---------- Karten ---------- */

.cards { display: grid; gap: 14px; }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .cards-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .cards-2, .cards-3 { grid-template-columns: 1fr; } }

.card {
  border-radius: var(--r);
  background: var(--surface-2);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow-sm);
}
.section.alt .card { box-shadow: none; }
.card-sand { background: var(--surface); box-shadow: none; }
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }

.feature {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  min-height: 220px;
}
.feature .num { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em; color: var(--accent); }
.feature h3 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); line-height: 1.18; letter-spacing: -0.022em; font-weight: 700; }

/* ---------- Split (Titel links, Text rechts) ---------- */

.split { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.split > .sticky { position: sticky; top: calc(var(--nav-h) + 32px); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split > .sticky { position: static; }
}

/* ---------- Tabellen ---------- */

.table-card { border-radius: var(--r); background: var(--surface-2); box-shadow: var(--shadow-sm); overflow: hidden; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 16px 18px; text-align: left; white-space: nowrap; }
table.data thead th {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
table.data tbody tr + tr td { border-top: 1px solid var(--line); }
table.data tbody tr { transition: background-color 0.2s; }
table.data tbody tr:hover { background: rgba(29, 29, 31, 0.025); }
table.data td.num, table.data th.num { text-align: right; }
table.data td:first-child, table.data th:first-child { padding-left: clamp(18px, 2.4vw, 28px); }
table.data td:last-child, table.data th:last-child { padding-right: clamp(18px, 2.4vw, 28px); }
table.data .unit { font-weight: 600; color: var(--ink); }
table.data .unit small { display: block; font-weight: 400; color: var(--ink-3); font-size: 0.8125rem; }
.doc-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 0.8125rem; font-weight: 600; text-decoration: none;
  background: var(--accent-soft); color: var(--accent);
  transition: background-color 0.2s, transform 0.2s var(--ease-out);
}
.doc-link:hover { background: rgba(134, 34, 54, 0.14); color: var(--accent-strong); }
.doc-link:active { transform: scale(0.96); transition-duration: 0.08s; }
.doc-link svg { width: 14px; height: 14px; }

/* Auf schmalen Bildschirmen wird die Angebotstabelle zur Kartenliste */
@media (max-width: 980px) {
  table.offer thead { display: none; }
  table.offer, table.offer tbody, table.offer tr, table.offer td { display: block; }
  table.offer tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 18px 20px; }
  table.offer tbody tr + tr { border-top: 1px solid var(--line); }
  table.offer tbody tr + tr td { border-top: 0; }
  table.offer td { padding: 0 !important; white-space: normal; }
  table.offer td.c-unit { grid-column: 1; grid-row: 1; }
  table.offer td.c-status { grid-column: 2; grid-row: 1; justify-self: end; }
  table.offer td.c-meta { grid-column: 1 / -1; color: var(--ink-2); font-size: 0.875rem; }
  table.offer td.c-meta:empty { display: none; }
  table.offer td.c-doc { grid-column: 1 / -1; margin-top: 10px; }
  table.offer td.c-hide { display: none; }
}
@media (min-width: 981px) { table.offer td.c-meta { display: none; } }

table.budget td:not(:first-child), table.budget th:not(:first-child) { text-align: right; }
table.budget td:first-child { font-weight: 600; }

/* ---------- Distanzen ---------- */

.distances { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.distance { border-radius: var(--r); background: var(--surface-2); padding: 24px 24px 22px; box-shadow: var(--shadow-sm); }
.distance h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 18px; }
.distance .vals { display: flex; align-items: baseline; gap: 18px; }
.distance b { font-family: var(--font-display); font-size: 2rem; line-height: 1; letter-spacing: -0.03em; font-weight: 700; font-variant-numeric: tabular-nums; }
.distance b small { font-size: 0.5em; font-weight: 600; letter-spacing: 0; color: var(--ink-2); margin-left: 3px; }
.distance .time { color: var(--ink-2); font-size: 0.9375rem; display: inline-flex; align-items: center; gap: 6px; }
.distance .time svg { width: 15px; height: 15px; }
@media (max-width: 860px) { .distances { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .distances { grid-template-columns: 1fr; } }

/* ---------- Inhaltsverzeichnis (Baubeschreibung) ---------- */

.toc { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 7px 0 7px 18px; margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--ink-2); text-decoration: none; font-size: 0.9375rem;
  transition: color 0.2s, border-color 0.2s;
}
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
@media (max-width: 860px) { .toc-wrap { display: none; } }

.note-card { border-radius: var(--r); background: var(--surface); padding: clamp(22px, 3vw, 32px); margin-top: 2.4em; }
.note-card h3 { margin-top: 0 !important; }
.note-card p { font-size: 0.9375rem; }

/* ---------- Formular ---------- */

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; margin: 0 0 6px 2px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 13px 16px;
  font: inherit; font-size: 1.0625rem; color: var(--ink);
  background: var(--surface-2);
  border: 1px solid rgba(29, 29, 31, 0.14); border-radius: var(--r-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: rgba(29, 29, 31, 0.28); }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(134, 34, 54, 0.14); }
.field input:user-invalid { border-color: #c0392b; }
.form .note { margin: 14px 0 0; font-size: 0.8125rem; color: var(--ink-3); }
.form .thanks { margin: 14px 0 0; color: #1f7a3f; font-weight: 600; }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ---------- Team ---------- */

.person { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; }
.person img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--surface); }
.person h3 { font-size: 1.0625rem; letter-spacing: -0.01em; margin-bottom: 2px; }
.person p { margin: 0; font-size: 0.9375rem; color: var(--ink-2); line-height: 1.45; }
.person a { text-decoration: none; }
.person + .person { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---------- Kontaktbereich ---------- */

.contact-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; }
.contact-grid address { font-style: normal; color: var(--ink-2); }
.contact-grid address strong { color: var(--ink); }
.contact-actions { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; }
.contact-action {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; margin: 0 -14px; border-radius: var(--r-sm);
  color: var(--ink); text-decoration: none;
  transition: background-color 0.2s;
}
.contact-action:hover { background: rgba(29, 29, 31, 0.04); color: var(--ink); }
.contact-action:active { background: rgba(29, 29, 31, 0.08); transition-duration: 0s; }
.contact-action .ic {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.contact-action .ic svg { width: 17px; height: 17px; }
.contact-action small { display: block; font-size: 0.75rem; color: var(--ink-3); line-height: 1.2; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

.map-card { margin-top: 14px; border-radius: var(--r); overflow: hidden; background: var(--surface); height: clamp(300px, 36vw, 440px); box-shadow: var(--shadow-sm); }
.map-card iframe { width: 100%; height: 100%; border: 0; display: block; filter: saturate(0.85); }

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

.site-footer { background: var(--bg); border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.875rem; padding: clamp(48px, 6vw, 72px) 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid var(--line); }
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { width: 52px; height: 52px; border-radius: 10px; }
.footer-brand strong { display: block; color: var(--ink); font-size: 1rem; letter-spacing: -0.01em; }
.site-footer h4 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; font-size: 0.8125rem; color: var(--ink-3); }
.footer-legal img { height: 20px; width: auto; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Scroll-Einblendung ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Lightbox ---------- */

.lb { position: fixed; inset: 0; z-index: 100; display: none; touch-action: none; }
.lb.open { display: block; }
.lb-backdrop { position: absolute; inset: 0; background: #0b0b0c; opacity: 0; }
.lb-track { position: absolute; inset: 0; will-change: transform; }
.lb-slide { position: absolute; top: 0; height: 100%; }
.lb-slide img {
  position: absolute; max-width: none;
  border-radius: 4px; user-select: none; -webkit-user-drag: none;
  will-change: transform;
  background: #1a1a1c;
}
.lb-ui { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.lb-ui > * { pointer-events: auto; }
.lb-btn {
  position: absolute; width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: background-color 0.2s, transform 0.2s var(--ease-out), opacity 0.2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.22); }
.lb-btn:active { transform: scale(0.92); transition-duration: 0.08s; }
.lb-btn[disabled] { opacity: 0.3; cursor: default; }
.lb-btn svg { width: 18px; height: 18px; }
.lb-close { top: max(16px, env(safe-area-inset-top)); right: 16px; }
.lb-prev { left: 16px; top: 50%; margin-top: -22px; }
.lb-next { right: 16px; top: 50%; margin-top: -22px; }
.lb-caption {
  position: absolute; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: min(680px, calc(100% - 32px));
  padding: 10px 18px; border-radius: 999px;
  color: #fff; font-size: 0.875rem; line-height: 1.35; text-align: center; letter-spacing: 0.005em;
  background: rgba(40, 40, 42, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
}
.lb-caption span { color: rgba(255, 255, 255, 0.6); margin-left: 8px; font-variant-numeric: tabular-nums; }
@media (hover: none), (max-width: 760px) { .lb-prev, .lb-next { display: none; } }
html.lb-lock { overflow: hidden; }

/* ---------- Diverses ---------- */

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 0 0 16px 46px; color: var(--ink-2); }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 0.8125rem; font-weight: 700;
}
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Barrierefreiheit: Bewegung, Transparenz, Kontrast ---------- */

@media (prefers-reduced-motion: reduce) {
  .js .reveal { transform: none; transition: opacity 0.4s linear; transition-delay: 0s; }
  .hero .slide img, .page-hero > img { transform: none !important; transition: none; animation: none; }
  .hero .slide { transition-duration: 0.4s; }
  .js .timeline::after, .js .timeline li::before { transition: opacity 0.4s linear; transition-delay: 0s; }
  .js .timeline:not(.in)::after { transform: none; opacity: 0; }
  .js .timeline:not(.in) li::before { transform: none; }
  .nav-links, .nav-links a { transform: none !important; }
  a.media img { transition: none; }
  a.media:hover img { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .nav-bar, .nav-links { background: var(--bg) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .hero-controls, .lb-btn, .lb-caption, .btn-glass, .pill-done { background: rgba(22, 22, 24, 0.85); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --ink-2: #333336; --ink-3: #4a4a4f; --line: rgba(29, 29, 31, 0.3); }
  .nav-bar { background: var(--bg); box-shadow: 0 1px 0 var(--ink); }
}

/* ---------- Ergänzungen ---------- */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.section.alt + .section.alt { padding-top: 0; }
.split.split-7-5 { grid-template-columns: 7fr 5fr; }
.split.split-even { grid-template-columns: 1fr 1fr; align-items: center; }
.cta-card { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.media.wide-photo { aspect-ratio: 21 / 9; }
@media (max-width: 860px) {
  .split.split-7-5, .split.split-even { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cta-card { grid-template-columns: 1fr; }
  .media.wide-photo { aspect-ratio: 4 / 3; }
}

/* ---------- Onepager / Referenz ---------- */

.facts { margin: 32px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 0.9375rem; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; color: var(--ink); font-weight: 500; }

.mix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.mix > div { border-radius: var(--r); background: var(--surface-2); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.mix b { display: block; font-family: var(--font-display); font-size: clamp(2rem, 3.4vw, 2.75rem); line-height: 1; letter-spacing: -0.035em; color: var(--accent); }
.mix span { display: block; margin-top: 8px; color: var(--ink-2); font-size: 0.9375rem; }
@media (max-width: 640px) { .mix { grid-template-columns: 1fr 1fr; } }

.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .grid-4 { grid-template-columns: 1fr; } }

.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.spec { padding: 28px 28px 28px 0; border-bottom: 1px solid var(--line); }
.spec + .spec:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.spec h3 { font-size: 1.1875rem; letter-spacing: -0.014em; margin-bottom: 8px; }
.spec p { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }
@media (max-width: 860px) {
  .spec-grid { grid-template-columns: 1fr 1fr; }
  .spec + .spec:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .spec:nth-child(even) { padding-left: 24px !important; border-left: 1px solid var(--line) !important; }
}
@media (max-width: 560px) {
  .spec-grid { grid-template-columns: 1fr; }
  .spec:nth-child(even) { padding-left: 0 !important; border-left: 0 !important; }
  .spec { padding: 22px 0; }
}

.distances.distances-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 480px) { .distances.distances-2 { grid-template-columns: 1fr; } }

.status-card.cta-card { grid-template-columns: 1fr auto; }
@media (max-width: 640px) { .status-card.cta-card { grid-template-columns: 1fr; } }
.cards-3 .feature { justify-content: flex-start; gap: 28px; min-height: 0; }

/* ---------- Weiches Scrollen (Lenis) ---------- */

html.lenis, html.lenis body { height: auto; }
html.lenis-smooth { scroll-behavior: auto !important; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
section[tabindex="-1"]:focus { outline: none; }

/* ---------- Chronik (horizontale Bildleiste) ---------- */

.rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: clamp(56px, 7vw, 96px) 0 28px; }
.rail-nav { display: flex; gap: 10px; }
.rail-btn {
  width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(29, 29, 31, 0.07); color: var(--ink);
  transition: background-color 0.2s, transform 0.2s var(--ease-out), opacity 0.2s;
}
.rail-btn:hover { background: rgba(29, 29, 31, 0.12); }
.rail-btn:active { transform: scale(0.92); transition-duration: 0.08s; }
.rail-btn[disabled] { opacity: 0.35; cursor: default; }
.rail-btn svg { width: 18px; height: 18px; }

.rail {
  list-style: none; margin: 0; padding: 4px 0 24px;
  display: flex; gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  padding-inline: max(var(--gutter), calc((100vw - var(--max)) / 2));
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail-item { flex: 0 0 clamp(260px, 30vw, 380px); scroll-snap-align: start; }
.rail-item .media { aspect-ratio: 4 / 3; margin-bottom: 16px; }
.rail-date { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-variant-numeric: tabular-nums; }
.rail-item h4 { font-size: 1.125rem; letter-spacing: -0.014em; margin: 6px 0 4px; }
.rail-item p { margin: 0; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }
@media (max-width: 560px) { .rail-nav { display: none; } .rail-item { flex-basis: 78vw; } }
