/* ============================================================
   KV Wohnbau — Sanierung & Modernisierung im Bestand
   Design system nach Corporate Design Guide
   Farben: KV White / KV Anthrazit / KV Sand / KV Green
   Schrift: Raleway (Headlines, CTA) / Merriweather Sans (Fließtext)
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Raleway';
  src: url('../assets/fonts/raleway.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Merriweather Sans';
  src: url('../assets/fonts/merriweather-sans.woff2') format('woff2');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #F4F1ED;          /* KV White */
  --paper-2: #EAE5DD;
  --ink: #2D2D2D;            /* KV Anthrazit */
  --ink-2: #383838;
  --sand: #9C8F75;           /* KV Sand — Hauptfarbe */
  --accent: #3A5532;         /* KV Green — Akzent, interaktiv */
  --muted: #5E5950;
  --line: rgba(45, 45, 45, 0.16);
  --line-soft: rgba(45, 45, 45, 0.09);
  --hair-light: rgba(244, 241, 237, 0.16);

  --display: 'Raleway', 'Helvetica Neue', Arial, sans-serif;
  --text: 'Merriweather Sans', 'Helvetica Neue', Arial, sans-serif;

  --fs-hero: clamp(2.7rem, 7.4vw, 7.6rem);
  --fs-h2: clamp(2.2rem, 5vw, 4.6rem);
  --fs-manifesto: clamp(1.35rem, 2.5vw, 2.4rem);
  --fs-quote: clamp(1.4rem, 2.7vw, 2.5rem);
  --fs-label: 0.6875rem;

  --container: min(92vw, 1500px);
  --section-pad: clamp(5.5rem, 13vh, 10rem);
  --nav-h: 76px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body[data-state="loading"] { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
em { font-style: italic; }
address { font-style: normal; }

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

/* Scrollbar */
@media (pointer: fine) {
  ::-webkit-scrollbar { width: 10px; }
  ::-webkit-scrollbar-track { background: var(--paper); }
  ::-webkit-scrollbar-thumb { background: rgba(45, 45, 45, 0.28); border-radius: 999px; border: 2px solid var(--paper); }
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 999;
  padding: 0.7em 1.2em;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8rem;
  border-radius: 999px;
  transform: translateY(-300%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus-visible { transform: none; }

/* ---------- Utilities ---------- */
.container { width: var(--container); margin-inline: auto; }

.section { padding-block: var(--section-pad); position: relative; }

.label {
  font-family: var(--display);
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  margin-bottom: clamp(2.2rem, 5vh, 3.6rem);
}
/* Kapitel-Labels (z. B. „Wer wir sind") präsenter als Standard-Labels */
.section-head .label,
.ref-cards-head .label {
  font-size: 0.875rem;
  letter-spacing: 0.22em;
}

.section-title {
  font-family: var(--display);
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin-bottom: clamp(2.5rem, 7vh, 5rem);
}
.section-title .line { display: block; }
.line-italic { font-style: normal; font-weight: 300; letter-spacing: 0; }

.accent { color: var(--accent); }

/* ---------- Buttons & links ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 1em 1.8em;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.btn::after {
  content: "→";
  font-family: var(--text);
  font-size: 1.05em;
  line-height: 1;
  transition: transform 0.35s var(--ease-out);
}
.btn:hover::after { transform: translateX(0.3em); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }

.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

.btn-small { padding: 0.75em 1.4em; font-size: 0.75rem; }
.btn-big { padding: 1.25em 2.4em; font-size: 0.875rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.link-arrow::after {
  content: "";
  width: 0.8em;
  height: 0.8em;
  flex-shrink: 0;
  background-color: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M4 12h16M13 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round' d='M4 12h16M13 5l7 7-7 7'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.35s var(--ease-out);
}
.link-arrow:hover::after { transform: translateX(0.25em); }

.link-underline { position: relative; display: inline-block; }
.link-underline::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed;
  inset: -100px;
  z-index: 90;
  pointer-events: none;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 1.4s steps(7) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-32px, 16px); }
  40% { transform: translate(24px, -24px); }
  60% { transform: translate(-16px, -32px); }
  80% { transform: translate(32px, 24px); }
  100% { transform: translate(0, 0); }
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--paper);
  display: grid;
  place-items: center;
}
.preloader-mark { text-align: center; }
.preloader-word {
  display: block;
  font-family: var(--display);
  font-size: clamp(2.4rem, 6.5vw, 4.6rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1;
  overflow: hidden;
}
.preloader-word i { font-style: normal; font-weight: 800; color: var(--ink); font-family: var(--text); }
.preloader-tag {
  display: block;
  margin-top: 1rem;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.preloader-count {
  position: absolute;
  right: clamp(1.5rem, 4vw, 4rem);
  bottom: clamp(1.2rem, 3.5vw, 3rem);
  font-family: var(--display);
  font-size: clamp(3.5rem, 9vw, 8rem);
  font-weight: 200;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.preloader-bar {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 2px;
  background: var(--line-soft);
}
.preloader-bar-fill {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------- Custom cursor ---------- */
.cursor { display: none; }
@media (pointer: fine) {
  body.has-cursor .cursor { display: block; }
  body.has-cursor .cursor-dot,
  body.has-cursor .cursor-ring {
    position: fixed;
    top: 0; left: 0;
    z-index: 600;
    pointer-events: none;
    border-radius: 50%;
    will-change: transform;
  }
  .cursor-dot {
    width: 8px; height: 8px;
    background: var(--accent);
    transform: translate(-50%, -50%);
  }
  .cursor-ring {
    width: 38px; height: 38px;
    border: 1px solid rgba(58, 85, 50, 0.55);
    display: grid;
    place-items: center;
    transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
                background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
  }
  .cursor-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--paper);
    opacity: 0;
    transition: opacity 0.25s;
  }
  body.cursor-hover .cursor-ring {
    width: 56px; height: 56px;
    background: rgba(58, 85, 50, 0.12);
    border-color: var(--accent);
  }
  body.cursor-drag .cursor-ring {
    width: 72px; height: 72px;
    background: var(--accent);
    border-color: var(--accent);
  }
  body.cursor-drag .cursor-label { opacity: 1; }
  body.cursor-drag .cursor-dot { opacity: 0; }
}

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  transition: transform 0.5s var(--ease-out), background-color 0.4s, backdrop-filter 0.4s;
}
.site-nav.nav-hidden { transform: translateY(-101%); }
.site-nav.nav-scrolled {
  background: rgba(244, 241, 237, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line-soft);
}
.nav-inner {
  width: var(--container);
  margin-inline: auto;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 300;
  letter-spacing: 0.015em;
  line-height: 1;
}
.nav-logo-img { height: 44px; width: auto; flex-shrink: 0; }
.nav-logo i { font-style: normal; font-weight: 800; font-family: var(--text); }
.nav-links { display: flex; gap: clamp(1.4rem, 2.6vw, 2.6rem); }
.nav-links a {
  position: relative;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding-block: 0.4em;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-right { display: flex; align-items: center; gap: 1.2rem; }

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px; height: 44px;
  align-items: center;
}
.nav-burger span {
  display: block;
  width: 26px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.4s var(--ease-out), background-color 0.3s;
}
body.menu-open .nav-burger span:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
body.menu-open .nav-burger span:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }
body.menu-open .nav-burger span { background: var(--paper); }
body.menu-open .nav-logo { color: var(--paper); }
body.menu-open .nav-logo i { color: var(--sand); }
body.menu-open .site-nav { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
body.menu-open .nav-cta { display: none; }

/* ---------- Menu overlay ---------- */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--ink);
  color: var(--paper);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  display: flex;
}
.menu-inner {
  width: var(--container);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3rem;
  padding-block: 14vh 6vh;
}
.menu-links { display: flex; flex-direction: column; }
.menu-links a {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  font-family: var(--display);
  font-size: clamp(2.3rem, 8vw, 4.2rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--hair-light);
  padding-block: 0.35em 0.28em;
  transition: color 0.3s, padding-left 0.4s var(--ease-out);
}
.menu-links a:hover { color: var(--sand); padding-left: 0.4em; }
.menu-foot {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  font-size: 0.85rem;
  color: rgba(244, 241, 237, 0.65);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: clip;
  background: var(--paper);
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 68% 38%, black 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 70% at 68% 38%, black 25%, transparent 78%);
}
.hero-content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: calc(var(--nav-h) + 4vh);
  padding-bottom: clamp(1.6rem, 4vh, 3rem);
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: clamp(1.4rem, 3.5vh, 3rem);
}
.hero-meta-sep { width: 38px; height: 1px; background: var(--line); }

.hero-title {
  font-family: var(--display);
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.018em;
  margin-bottom: clamp(2rem, 5.5vh, 4rem);
}
.hero-title .line { display: block; }

.hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.hero-sub {
  max-width: 36ch;
  font-size: clamp(0.95rem, 1.15vw, 1.1rem);
  line-height: 1.65;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  flex-wrap: wrap;
}
.hero-foot {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 1.2rem 1.6rem;
  border-top: 1px solid var(--line-soft);
}
.hero-scroll {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-scroll-line {
  width: 44px;
  height: 1px;
  background: var(--sand);
  transform-origin: left;
  animation: scrollPulse 2.2s var(--ease-out) infinite;
}
@keyframes scrollPulse {
  0% { transform: scaleX(0); transform-origin: left; }
  45% { transform: scaleX(1); transform-origin: left; }
  55% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

/* ---------- Before / After ---------- */
.ba { max-width: 1180px; margin-inline: auto; }
.ba-frame {
  --ba: 50%;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.ba-layer {
  position: absolute;
  inset: 0;
  margin: 0;
}
.ba-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba-before {
  clip-path: inset(0 calc(100% - var(--ba)) 0 0);
}
.ba-before img {
  filter: sepia(0.32) saturate(0.62) contrast(0.94) brightness(0.96);
}
.ba-before::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 120% 90% at 50% 45%, transparent 55%, rgba(40, 38, 34, 0.32));
  pointer-events: none;
}
.ba-chip {
  position: absolute;
  top: 1.1rem;
  padding: 0.5em 0.95em;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
}
.ba-chip-before { left: 1.1rem; background: rgba(45, 45, 45, 0.85); }
.ba-chip-after { right: 1.1rem; background: var(--accent); }
.ba-handle {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--ba);
  width: 1px;
  background: var(--paper);
  box-shadow: 0 0 0 0.5px rgba(45, 45, 45, 0.4);
  cursor: ew-resize;
}
.ba-knob {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: background-color 0.3s, color 0.3s, transform 0.3s var(--ease-out);
}
.ba-knob svg { width: 20px; height: 20px; }
.ba-handle:hover .ba-knob,
.ba-handle:focus-visible .ba-knob {
  background: var(--accent);
  color: var(--paper);
  transform: translate(-50%, -50%) scale(1.08);
}
.ba-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2rem;
  margin-top: 1.2rem;
}
.ba-address { font-size: 0.9rem; color: var(--muted); }

/* ---------- Projects ---------- */
.projects {
  position: relative;
  background: var(--paper-2);
}
.projects-pin {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-block: calc(var(--nav-h) + 2vh) 4.5vh;
  overflow: hidden;
}
.projects-head { position: relative; }
.projects-head .section-title { margin-bottom: 0; font-size: clamp(2.2rem, 4.6vw, 4.4rem); }

.projects-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 0;
  margin-top: 2.5vh;
}
.projects-track {
  display: flex;
  align-items: stretch;
  gap: clamp(1.4rem, 3vw, 3rem);
  padding-inline: calc((100vw - var(--container)) / 2);
  will-change: transform;
}
.project-card {
  position: relative;
  flex-shrink: 0;
  width: clamp(290px, 34vw, 500px);
  display: flex;
  flex-direction: column;
}
.project-media {
  position: relative;
  height: clamp(280px, 45svh, 500px);
  overflow: hidden;
  border-radius: 2px;
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 0.9s var(--ease-out);
  will-change: transform;
}
.project-card:hover .project-media img { transform: scale(1.12); }

.project-card-end {
  justify-content: flex-start;
}
.project-end-inner {
  height: clamp(280px, 45svh, 500px);
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  text-align: center;
  padding: 2rem;
}
.project-end-title {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.2vw, 3rem);
  line-height: 1.08;
  font-weight: 800;
}
.project-end-title em { color: var(--sand); font-style: normal; font-weight: 300; }
.project-end-inner .btn-primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.project-end-inner .btn-primary:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }

.projects-progress {
  position: relative;
  height: 2px;
  background: var(--line-soft);
  margin-top: 3.5vh;
}
.projects-progress-fill {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------- Process ---------- */
.process { background: var(--paper); }
.process-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(1.2rem, 3vh, 2rem);
}
.process-card {
  position: sticky;
  top: calc(var(--nav-h) + 4vh + (var(--i, 0) * 1.6rem));
}
.process-card[data-card="1"] { --i: 0; }
.process-card[data-card="2"] { --i: 1; }
.process-card[data-card="3"] { --i: 2; }
.process-card[data-card="4"] { --i: 3; }
.process-card-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: clamp(1.5rem, 4vw, 4rem);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: clamp(1.8rem, 4.5vw, 3.6rem);
  min-height: clamp(280px, 42svh, 420px);
  box-shadow: 0 -18px 40px -28px rgba(45, 45, 45, 0.35);
}
.process-num {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  font-weight: 200;
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.process-body h3 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.008em;
  margin-bottom: 1rem;
}
.process-body p {
  max-width: 52ch;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.1vw, 1.08rem);
}
.process-icon {
  width: clamp(56px, 7vw, 96px);
  height: auto;
  opacity: 0.8;
}
.process-card-sand .process-card-inner {
  background: var(--sand);
  border-color: var(--sand);
  color: var(--paper);
}
.process-card-sand .process-body p { color: rgba(244, 241, 237, 0.85); }
.process-card-sand .process-num { color: var(--paper); }
.process-card-dark .process-card-inner {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.process-card-dark .process-body p { color: rgba(244, 241, 237, 0.68); }
.process-card-dark .process-num { color: var(--sand); }
.process-card-accent .process-card-inner {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper);
}
.process-card-accent .process-body p { color: rgba(244, 241, 237, 0.85); }
.process-card-accent .process-num { color: var(--paper); }

/* ---------- CTA ---------- */
.cta {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding-block: clamp(7rem, 17vh, 13rem);
  position: relative;
  overflow: clip;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(244, 241, 237, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(244, 241, 237, 0.045) 1px, transparent 1px);
  background-size: 88px 88px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 45%, black 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 80% at 50% 45%, black 20%, transparent 75%);
}
.cta .container { position: relative; }
.cta .label { color: rgba(244, 241, 237, 0.55); }
.cta-title {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6.6vw, 6.2rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin-block: 1.8rem 3rem;
}
.cta-title .line { display: block; }
/* Langes Einzelwort „Sanierungsvorhaben?" muss auf schmalen Screens passen */
@media (max-width: 560px) {
  .cta-title { font-size: clamp(1.65rem, 8.4vw, 2.4rem); }
}
.cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
}
.cta-contacts {
  display: flex;
  gap: 2.2rem;
  font-size: 0.9rem;
  color: rgba(244, 241, 237, 0.65);
}

/* ---------- Stärken ---------- */
.strengths { background: var(--paper); }
.strengths-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.15;
  text-align: center;
  max-width: 24ch;
  margin: 0 auto clamp(1.5rem, 3vh, 2.2rem);
}
.strengths-intro {
  max-width: 62ch;
  margin: 0 auto clamp(2.5rem, 6vh, 4rem);
  text-align: center;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.2vw, 1.12rem);
  line-height: 1.75;
}
.strengths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.9rem, 1.8vw, 1.6rem);
}
.strength-card {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: var(--paper-2);
  border-radius: 10px;
  padding: clamp(1.2rem, 2.2vw, 1.7rem) clamp(1.2rem, 2.2vw, 1.8rem);
}
.strength-card svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  color: var(--sand);
  margin-top: 0.2em;
}
.strength-card p { font-size: clamp(0.95rem, 1.1vw, 1.05rem); line-height: 1.55; }
.strength-card strong { font-weight: 700; }
@media (max-width: 980px) { .strengths-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .strengths-grid { grid-template-columns: 1fr; } }

/* ---------- Kundenstimmen ---------- */
.quotes { background: var(--paper); }
.quotes-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.15;
  margin-bottom: clamp(1.5rem, 3vh, 2rem);
}
.quotes-intro {
  max-width: 60ch;
  font-weight: 600;
  font-size: clamp(1.02rem, 1.35vw, 1.25rem);
  line-height: 1.7;
  margin-bottom: clamp(3rem, 7vh, 4.5rem);
}
.quotes-sub {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: clamp(1.6rem, 4vh, 2.4rem);
}
.quotes-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 2 * clamp(1rem, 2vw, 1.8rem)) / 3);
  gap: clamp(1rem, 2vw, 1.8rem);
  align-items: stretch;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0.4rem 0.2rem 1.4rem;
}
.quotes-track::-webkit-scrollbar { display: none; }
.quotes-track .quote-card { scroll-snap-align: start; }
.quotes-nav { display: flex; justify-content: flex-end; gap: 0.7rem; margin-top: 0.4rem; }
.quotes-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--ink);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, opacity 0.25s;
}
.quotes-btn:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.quotes-btn:disabled { opacity: 0.3; cursor: default; }

/* Firmen-Testimonials: Logo statt Avatar */
.quote-logo { display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem; margin-bottom: 1.1rem; }
.quote-logo-img { height: 56px; width: auto; display: block; }
.quote-card {
  background: #FFFFFF;
  border-radius: 10px;
  padding: clamp(1.4rem, 2.4vw, 2rem);
  box-shadow: 0 6px 28px -12px rgba(45, 45, 45, 0.18);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.quote-card blockquote {
  font-style: italic;
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  line-height: 1.7;
  flex: 1;
}
.quote-card figcaption { display: flex; align-items: center; gap: 0.85rem; }
.quote-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--sand);
  font-family: var(--display);
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.quote-meta { display: flex; flex-direction: column; line-height: 1.35; }
.quote-meta strong { font-size: 0.95rem; }
.quote-meta span { font-size: 0.82rem; color: var(--muted); }
@media (max-width: 1100px) { .quotes-track { grid-auto-columns: calc((100% - clamp(1rem, 2vw, 1.8rem)) / 2); } }
@media (max-width: 760px) { .quotes-track { grid-auto-columns: 88%; } }

/* ---------- Prozess-CTA ---------- */
.process-cta { text-align: center; margin-top: clamp(2.5rem, 6vh, 4rem); }
.btn-form.btn-form-inline {
  display: inline-block;
  width: auto;
  margin-top: 0;
  background: var(--sand);
  border-color: var(--sand);
  padding: 1.15em 2.4em;
  text-align: center;
}
.btn-form.btn-form-inline:hover { background: var(--ink); border-color: var(--ink); }

/* ---------- Vertrauen: Vergleich ---------- */
.trust { background: var(--paper); }
.trust.section { padding-top: 0; }
.trust .container { border-top: 1px solid var(--line); padding-top: var(--section-pad); }
.trust-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.18;
  text-align: center;
  margin-bottom: clamp(2.6rem, 7vh, 4.5rem);
}
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  max-width: 1280px;
  margin-inline: auto;
}
.trust-card {
  background: #FFFFFF;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  box-shadow: 0 14px 38px rgba(45, 45, 45, 0.06);
  padding: clamp(1.8rem, 3.4vw, 3rem);
}
.trust-card h3 {
  font-family: var(--text);
  font-weight: 700;
  font-size: clamp(1.15rem, 1.7vw, 1.5rem);
  margin-bottom: clamp(1.4rem, 2.6vh, 2rem);
}
.trust-card-pro h3 { color: var(--sand); }
.trust-card ul { list-style: none; display: grid; gap: 1.15rem; }
.trust-card li {
  position: relative;
  padding-left: 2.1rem;
  font-size: clamp(0.98rem, 1.2vw, 1.12rem);
  line-height: 1.55;
  color: var(--ink-2);
}
.trust-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 1.1em;
  height: 1.1em;
  background-color: var(--sand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.6l5.2 5.2L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.6l5.2 5.2L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.trust-card-contra li::before {
  background-color: #C4BCAE;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 880px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* ---------- Häufige Fragen ---------- */
.faq { background: var(--paper); }
.faq-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 4.6vw, 3.6rem);
  line-height: 1.15;
  text-align: center;
  margin-bottom: clamp(2.4rem, 6vh, 4rem);
}
.faq-list { max-width: 880px; margin-inline: auto; }
.faq-item { padding: clamp(1.6rem, 3.4vh, 2.3rem) 0.2rem; border-bottom: 1px solid var(--line-soft); }
.faq-item:first-child { padding-top: 0; }
.faq-item h3 {
  font-family: var(--text);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.45vw, 1.3rem);
  line-height: 1.4;
}
.faq-item p {
  margin-top: 0.95rem;
  max-width: 75ch;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.18vw, 1.1rem);
  line-height: 1.75;
}

/* ---------- Schwebender Nach-oben-Button ---------- */
.to-top {
  position: fixed;
  right: clamp(0.9rem, 2.2vw, 1.8rem);
  bottom: clamp(0.9rem, 2.2vw, 1.8rem);
  z-index: 120;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid rgba(244, 241, 237, 0.18);
  box-shadow: 0 10px 28px rgba(45, 45, 45, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.92);
  transition: opacity 0.35s, visibility 0.35s, transform 0.45s var(--ease-out), background-color 0.3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--accent); }
.to-top:active { transform: scale(0.94); }
@media (max-width: 680px) {
  .to-top { width: 44px; height: 44px; }
  .to-top svg { width: 16px; height: 16px; }
}

/* ---------- Leistungen-Untermenü: Desktop-Dropdown ---------- */
.nav-sub { position: relative; }
.nav-sub-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding-block: 0.4em;
  color: inherit;
}
.nav-sub-chev { transition: transform 0.3s var(--ease-out); }
.nav-sub.open .nav-sub-chev { transform: rotate(180deg); }
.nav-sub-panel {
  position: absolute;
  top: calc(100% + 0.85rem);
  left: 50%;
  transform: translate(-50%, 8px);
  min-width: 300px;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(45, 45, 45, 0.14);
  padding: 0.55rem 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s, transform 0.3s var(--ease-out);
}
.nav-sub.open .nav-sub-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.nav-sub-panel a {
  display: block;
  padding: 0.62em 1.4em;
  font-family: var(--text);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.nav-sub-panel a::after { display: none; }
.nav-sub-panel a:hover { background: var(--paper-2); color: var(--ink); }
.nav-sub-panel .nav-sub-all {
  font-weight: 700;
  color: var(--accent);
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 0.45rem;
  padding-bottom: 0.85em;
}

/* ---------- Leistungen-Untermenü: Overlay-Akkordeon ---------- */
.menu-sub { border-bottom: 1px solid var(--hair-light); }
.menu-sub-toggle {
  display: flex;
  align-items: center;
  gap: 0.45em;
  width: 100%;
  text-align: left;
  font-family: var(--display);
  font-size: clamp(2.3rem, 8vw, 4.2rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
  padding-block: 0.35em 0.28em;
  color: inherit;
  transition: color 0.3s;
}
.menu-sub-toggle:hover { color: var(--sand); }
.menu-sub-chev { width: 0.42em; height: auto; flex-shrink: 0; margin-top: 0.1em; transition: transform 0.3s var(--ease-out); }
.menu-sub.open .menu-sub-chev { transform: rotate(180deg); }
.menu-sub-list { overflow: hidden; max-height: 0; transition: max-height 0.45s var(--ease-out); }
.menu-sub.open .menu-sub-list { max-height: 34rem; }
.menu-sub-list a {
  display: block;
  font-family: var(--text);
  font-size: clamp(1.02rem, 2.6vw, 1.25rem);
  color: rgba(244, 241, 237, 0.82);
  padding: 0.48em 0 0.48em 1.3em;
  transition: color 0.25s, padding-left 0.3s var(--ease-out);
}
.menu-sub-list a:hover { color: var(--sand); padding-left: 1.6em; }
.menu-sub-list a:first-child { padding-top: 0.1em; }
.menu-sub-list a:last-child { padding-bottom: 1em; }
.menu-sub-list .nav-sub-all { color: var(--sand); font-weight: 700; }

/* Referenz-Karten: Headline-Abstand */
.ref-cards-title { margin: clamp(0.6rem, 1.6vh, 1.1rem) 0 clamp(1.8rem, 4.5vh, 3rem); }

/* ---------- Breadcrumb-Navigation ---------- */
.breadcrumb { margin-bottom: clamp(1.4rem, 3.5vh, 2.2rem); }
.breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45em;
  font-family: var(--text);
  font-size: 0.8rem;
  color: var(--muted);
}
.breadcrumb li { display: flex; align-items: center; gap: 0.45em; }
.breadcrumb li + li::before { content: "/"; opacity: 0.4; }
.breadcrumb a { color: var(--muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current] { color: var(--ink-2); font-weight: 600; }
.cta .breadcrumb { text-align: left; }
.cta .breadcrumb ol { justify-content: center; }
.cta .breadcrumb ol, .cta .breadcrumb a { color: rgba(244, 241, 237, 0.62); }
.cta .breadcrumb a:hover { color: var(--paper); }
.cta .breadcrumb [aria-current] { color: var(--paper); }

/* ---------- Leistungsseiten ---------- */
.svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.1rem, 2.2vw, 1.8rem);
  margin-top: clamp(2.2rem, 5vh, 3.4rem);
}
.svc-tile {
  display: block;
  background: var(--paper-2);
  border-radius: 10px;
  padding: clamp(1.5rem, 2.8vw, 2.4rem);
}
.svc-tile h2, .svc-tile h3 {
  font-family: var(--text);
  font-weight: 700;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  margin-bottom: 0.8rem;
}
.svc-tile p { color: var(--muted); font-size: clamp(0.95rem, 1.15vw, 1.05rem); line-height: 1.7; }
a.svc-tile { transition: transform 0.35s var(--ease-out), box-shadow 0.35s; }
a.svc-tile:hover { transform: translateY(-5px); box-shadow: 0 16px 38px rgba(45, 45, 45, 0.1); }
.svc-tile .link-arrow { margin-top: 1.15rem; display: inline-block; font-weight: 700; }
.svc-h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  line-height: 1.15;
  margin: clamp(3.2rem, 8vh, 5.2rem) 0 clamp(1rem, 2.6vh, 1.6rem);
}
.svc-text { color: var(--muted); max-width: 78ch; font-size: clamp(0.98rem, 1.2vw, 1.1rem); line-height: 1.78; }
.svc-text + .svc-text { margin-top: 0.9rem; }
.ref-mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.1rem, 2.2vw, 1.8rem);
  margin-top: clamp(1.8rem, 4vh, 2.6rem);
}
a.ref-mini {
  display: block;
  background: #FFFFFF;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: clamp(1.5rem, 2.6vw, 2.2rem);
  box-shadow: 0 12px 32px rgba(45, 45, 45, 0.05);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s;
}
a.ref-mini:hover { transform: translateY(-5px); box-shadow: 0 18px 44px rgba(45, 45, 45, 0.1); }
.svc-rule { border: 0; border-top: 1px solid var(--line); margin-top: clamp(3rem, 7.5vh, 4.8rem); }
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.1rem, 2.2vw, 1.8rem);
  margin-top: clamp(1.8rem, 4vh, 2.6rem);
}
.benefit-card {
  background: #FFFFFF;
  border: 1px solid rgba(156, 143, 117, 0.35);
  border-radius: 12px;
  padding: clamp(1.4rem, 2.4vw, 2rem);
}
.benefit-card h3 {
  font-family: var(--text);
  font-weight: 700;
  font-size: clamp(1.02rem, 1.35vw, 1.2rem);
  color: var(--sand);
  margin-bottom: 0.6rem;
}
.benefit-card p { color: var(--ink-2); line-height: 1.65; font-size: clamp(0.93rem, 1.1vw, 1.02rem); }
@media (max-width: 880px) { .benefit-grid { grid-template-columns: 1fr; } }
.ref-mini .label { display: block; color: var(--sand); margin-bottom: 0.7rem; }
.ref-mini h3 { font-family: var(--text); font-weight: 700; font-size: clamp(1.08rem, 1.45vw, 1.3rem); margin-bottom: 0.55rem; }
.ref-mini p { color: var(--muted); line-height: 1.65; font-size: clamp(0.93rem, 1.1vw, 1.02rem); }
.sub-cta p { color: rgba(244, 241, 237, 0.78); max-width: 62ch; margin: -0.9rem auto 2rem; line-height: 1.7; }
@media (max-width: 880px) {
  .svc-grid, .ref-mini-grid { grid-template-columns: 1fr; }
}

/* ---------- Rechtsseiten (Impressum / Datenschutz) ---------- */
.legal { padding-top: calc(var(--nav-h) + clamp(2.5rem, 7vh, 4.5rem)); }
.legal .container { max-width: 880px; }
.legal h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.12;
  margin-bottom: clamp(2rem, 5vh, 3.2rem);
}
.legal h2 {
  font-family: var(--text);
  font-weight: 700;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  margin: clamp(2rem, 4.5vh, 2.8rem) 0 0.85rem;
}
.legal h3 {
  font-family: var(--text);
  font-weight: 700;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  margin: 1.6rem 0 0.6rem;
}
.legal p, .legal li {
  color: var(--muted);
  font-size: clamp(0.95rem, 1.15vw, 1.06rem);
  line-height: 1.75;
}
.legal p + p { margin-top: 0.8rem; }
.legal ul { list-style: none; margin: 0.6rem 0 0; display: grid; gap: 0.45rem; }
.legal ul li { padding-left: 1.3rem; position: relative; }
.legal ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 0.45em; height: 0.45em;
  border-radius: 50%;
  background: var(--sand);
}
.legal .legal-block { margin-top: 0.4rem; }
.legal .legal-block p { color: var(--ink-2); }
.legal .legal-stand { margin-top: clamp(2.4rem, 5vh, 3.4rem); font-size: 0.88rem; color: var(--muted); }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Kontakt-Subzeile ---------- */
.cta-sub {
  max-width: 58ch;
  margin: 0 auto clamp(0.5rem, 2vh, 1rem);
  color: rgba(244, 241, 237, 0.7);
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  line-height: 1.75;
}

/* ---------- Kontaktformular ---------- */
.contact-form {
  max-width: 780px;
  margin: clamp(2.5rem, 6vh, 4rem) auto 0;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  padding: clamp(1.6rem, 4vw, 3rem);
  border-radius: 2px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 1.8rem;
}
.form-field { display: flex; flex-direction: column; gap: 0.7rem; }
.contact-form > .form-field,
.contact-form > .form-pills { margin-top: 1.8rem; }
.form-field .label { color: var(--muted); }
.req { color: var(--accent); }
.form-asterisk-note { margin-top: 1.6rem; font-size: 0.8rem; color: var(--muted); }

.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="email"],
.contact-form textarea {
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.85em 1em;
  transition: border-color 0.25s, box-shadow 0.25s;
  width: 100%;
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: rgba(94, 89, 80, 0.55); }
.contact-form input.invalid { border-color: #A8442C; box-shadow: 0 0 0 1px #A8442C; }

/* Slider */
.form-size-value {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1;
  color: var(--accent);
}
.form-size-unit { font-size: 0.45em; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.contact-form input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--p, 8%), var(--paper-2) var(--p, 8%), var(--paper-2) 100%);
  cursor: pointer;
}
.contact-form input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 2px 8px rgba(45, 45, 45, 0.25);
  cursor: grab;
}
.contact-form input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 2px 8px rgba(45, 45, 45, 0.25);
  cursor: grab;
}
.contact-form input[type="range"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.form-slider-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

/* Pills */
.form-pills { border: 0; padding: 0; margin: 0; }
.form-pills legend { padding: 0; margin-bottom: 0.9rem; }
.pill-group { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.8em 1.15em;
  border-radius: 3px;
  border: 1px solid transparent;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.pill:hover span { background: var(--paper-2); color: var(--ink); }
.pill input:checked + span { background: var(--accent); color: var(--paper); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }

.btn-form {
  width: 100%;
  margin-top: 2rem;
  padding: 1.25em 2em;
  font-family: var(--display);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 4px;
  transition: background-color 0.3s, border-color 0.3s, transform 0.2s var(--ease-out);
}
.btn-form:hover { background: var(--ink); border-color: var(--ink); }
.btn-form:active { transform: scale(0.99); }
.form-note { margin-top: 1.1rem; font-size: 0.85rem; color: var(--muted); }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- Subseiten (Referenzen) ---------- */
.sub-hero {
  padding-top: calc(var(--nav-h) + clamp(3rem, 9vh, 5.5rem));
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
}
.sub-hero .section-title { margin-bottom: clamp(1.5rem, 4vh, 2.2rem); }
.sub-intro { max-width: 64ch; color: var(--muted); font-size: clamp(1rem, 1.25vw, 1.15rem); line-height: 1.7; }
.ref-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(1rem, 2vw, 2rem);
  margin-block: clamp(2rem, 5vh, 3.5rem);
}
.ref-gallery figure { overflow: hidden; border-radius: 2px; }
.ref-gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; transition: transform 0.8s var(--ease-out); }
.ref-gallery figure:hover img { transform: scale(1.05); }
.ref-focus {
  background: var(--accent);
  color: var(--paper);
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  border-radius: 2px;
  margin-block: clamp(1.5rem, 4vh, 2.5rem);
}
.ref-focus .label { color: rgba(244, 241, 237, 0.8); display: block; margin-bottom: 0.9rem; }
.ref-focus p {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.05rem, 1.7vw, 1.4rem);
  line-height: 1.55;
  max-width: 60ch;
}
.ref-case { margin-top: clamp(3rem, 8vh, 5rem); }
.ref-case .label { display: block; margin-bottom: 1rem; }
.ref-case h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.8rem);
  line-height: 1.12;
  margin-bottom: 1.4rem;
  max-width: 24ch;
}
.ref-case p { max-width: 70ch; line-height: 1.75; margin-bottom: 1.1rem; }
.ref-case-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.ref-case-grid figure { overflow: hidden; border-radius: 2px; position: sticky; top: calc(var(--nav-h) + 2rem); }
.ref-case-grid img { width: 100%; height: auto; }
.ref-nav {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem 2rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: clamp(3rem, 8vh, 5rem);
  padding-top: 1.6rem;
}
.sub-cta {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: clamp(3.5rem, 9vh, 6rem) 0;
  margin-top: clamp(3.5rem, 9vh, 6rem);
}
.sub-cta h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4.5vw, 3.4rem);
  margin-bottom: 2rem;
}
.footer-compact { border-top: 0; padding-top: 0; }
.ref-cards { margin-top: clamp(3rem, 8vh, 5rem); }
.ref-cards-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  margin-bottom: clamp(1.6rem, 4vh, 2.4rem);
}
.ref-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2.4rem);
}
.ref-card { display: block; }
.ref-card-media {
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 16 / 11;
}
.ref-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 0.8s var(--ease-out);
}
.ref-card:hover .ref-card-media img { transform: scale(1.1); }
.ref-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-top: 1rem;
}
.ref-card-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.1rem, 1.5vw, 1.45rem);
  line-height: 1.15;
  letter-spacing: -0.005em;
}
.ref-card-arrow {
  color: var(--accent);
  transition: transform 0.35s var(--ease-out);
  margin-top: 0.15em;
  flex-shrink: 0;
}
.ref-card-arrow svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}
.ref-card:hover .ref-card-arrow,
.project-card:hover .ref-card-arrow { transform: translate(0.3em, 0); }
.ref-card-sub {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
}
@media (max-width: 760px) {
  .ref-cards-grid { grid-template-columns: 1fr; }
  .ref-card-media { aspect-ratio: 16 / 9; }
}
@media (max-width: 800px) {
  .ref-case-grid { grid-template-columns: 1fr; }
  .ref-case-grid figure { position: static; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid var(--hair-light);
  padding-top: clamp(3.5rem, 8vh, 6rem);
  overflow: clip;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.05fr;
  gap: clamp(2.2rem, 5vw, 5rem);
  padding-bottom: clamp(3rem, 7vh, 5rem);
}
.footer-col { display: flex; flex-direction: column; gap: 1.05rem; align-items: flex-start; }
.footer-brand {
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.2vw, 1.95rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.footer-desc {
  font-size: 0.98rem;
  line-height: 1.7;
  color: rgba(244, 241, 237, 0.72);
  max-width: 34ch;
  font-style: normal;
}
.footer-head {
  font-family: var(--text);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--paper);
  margin-bottom: 0.35rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.8rem; }
.footer-links a, .footer-links span {
  font-size: 0.98rem;
  color: rgba(244, 241, 237, 0.72);
  transition: color 0.3s;
  line-height: 1.5;
}
.footer-links a:hover { color: var(--paper); }
.footer-contact { display: flex; flex-direction: column; gap: 0.85rem; }
.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: 0.98rem;
  color: rgba(244, 241, 237, 0.78);
  transition: color 0.3s;
}
.footer-contact a:hover { color: var(--paper); }
.footer-contact svg { color: var(--sand); flex-shrink: 0; }
.footer-sep {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--hair-light);
  margin: 0.6rem 0 0.4rem;
}
.footer-follow { font-size: 0.98rem; color: var(--paper); font-weight: 600; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--hair-light);
  padding-block: 1.5rem 1.7rem;
  font-size: 0.85rem;
  color: rgba(244, 241, 237, 0.55);
}
.footer-bottom-nav { display: flex; align-items: center; gap: 0.9em; }
.footer-bottom-nav a { color: rgba(244, 241, 237, 0.65); transition: color 0.3s; }
.footer-bottom-nav a:hover { color: var(--paper); }
.footer-bottom-nav span { opacity: 0.5; }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2.6rem; }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}

@media (max-width: 900px) {
  :root { --nav-h: 64px; }

  /* Projects: native horizontal snap scrolling instead of pin */
  .projects-pin {
    min-height: 0;
    padding-bottom: 3rem;
  }
  .projects-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin-top: 0.5rem;
    scrollbar-width: none;
  }
  .projects-viewport::-webkit-scrollbar { display: none; }
  .projects-track { padding-block: 0.5rem; }
  .project-card { scroll-snap-align: center; width: min(78vw, 420px); }
  /* Kartentitel: Platz für zwei Zeilen reservieren, damit alle Karten gleich hoch sind */
  
@media (max-width: 768px) {

  .hero-row { flex-direction: column; align-items: flex-start; }

  .ba-frame { aspect-ratio: 4 / 3; }
  .ba-knob { width: 44px; height: 44px; }
}

@media (max-width: 560px) {
  .nav-cta { display: none; }
  .hero-meta { flex-wrap: wrap; gap: 0.6rem 1rem; }
  .hero-meta-sep { display: none; }
  .hero-title { max-width: none; }
  .ba-caption { flex-direction: column; gap: 0.4rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .menu-foot { flex-direction: column; gap: 0.4rem; }
  .process-card-inner { grid-template-columns: 1fr; gap: 1.2rem; min-height: 0; }
  .process-icon { grid-column: 1; }
  .cta-contacts { flex-direction: column; gap: 0.8rem; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
body.reduced-motion .projects-pin { min-height: 0; padding-bottom: 3rem; }
body.reduced-motion .projects-viewport { overflow-x: auto; -webkit-overflow-scrolling: touch; }
body.reduced-motion .projects-progress { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .grain { animation: none; }
  .hero-scroll-line { animation: none; transform: scaleX(1); }
}}