/* ============================================================
   SCHÖN BAU GMBH – STYLE.CSS
   Amann Media | 2026
   ============================================================ */

/* ── CUSTOM PROPERTIES ─────────────────────────────────────── */
:root {
  --color-primary:      #8B2035;
  --color-dark:         #1a1a1a;
  --color-light:        #F5F4F0;
  --color-paper:        #EEECE6; /* matches the highlight of the photo grade */
  --color-gray:         #5F5F5C;
  --color-on-dark:      rgba(245,244,240,0.76);
  --color-on-dark-soft: rgba(245,244,240,0.62);
  --color-rule:         rgba(26,26,26,0.14);
  --color-rule-on-dark: rgba(245,244,240,0.14);

  --font-display: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --font-body:    'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --space-xs:   8px;
  --space-sm:   16px;
  --space-md:   24px;
  --space-lg:   36px;
  --space-xl:   56px;
  --space-2xl:  88px;
  --space-3xl:  128px;
  --max-width:  1440px;
  --gutter:     max(clamp(20px, 3.4vw, 56px), env(safe-area-inset-left), env(safe-area-inset-right));
  /* Left and right edge of the content, also for full-width elements. --vw comes from main.js */
  --edge:       max(var(--gutter), calc((var(--vw, 100vw) - var(--max-width)) / 2 + var(--gutter)));
  --grid-gap:   24px;

  --nav-height: 108px;
  --nav-height-scrolled: 72px;
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.76, 0, 0.24, 1);
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-padding-top: var(--nav-height-scrolled);
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #8a8a86 var(--color-light);
}
body {
  background: var(--color-light);
  color: var(--color-dark);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: rgba(139,32,53,0.14);
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
picture { display: contents; }
source { display: none; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
ul, ol { list-style: none; }
address { font-style: normal; }
h1, h2, h3 { text-wrap: balance; font-weight: 400; }
p { text-wrap: pretty; }
i { font-style: normal; }

::selection { background: var(--color-primary); color: var(--color-light); }
:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.leistungen-section :focus-visible,
.zertifikate-section :focus-visible,
.kontakt-hero :focus-visible,
.site-footer :focus-visible,
.site-header.scrolled :focus-visible,
.menu-overlay :focus-visible,
.mobile-cta :focus-visible,
.schritt--cta :focus-visible { outline-color: var(--color-light); }

.svg-defs { position: absolute; }
.icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 2000;
  padding: 10px 18px;
  background: var(--color-dark);
  color: var(--color-light);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
.h2 {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.5vw, 66px);
  line-height: 1.06;
  letter-spacing: -0.012em;
}
.section-lead {
  font-size: clamp(17px, 1.35vw, 19px);
  line-height: 1.5;
  max-width: 34em;
}
.text-body-lg { font-size: clamp(19px, 1.5vw, 21px); line-height: 1.45; }

/* ── LAYOUT ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
}
.section-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}
.leistungen-section .h2,
.zertifikate-section .h2 { color: var(--color-light); }
.leistungen-section .section-lead,
.zertifikate-section .section-lead { color: var(--color-on-dark); }
.ablauf-section .section-lead { color: var(--color-gray); }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 52px;
  padding: 13px 28px;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn .icon { transition: transform 0.35s var(--ease-out); }

.btn-outline { border: 1px solid var(--color-primary); color: var(--color-primary); align-self: flex-start; }
.btn-solid { background: var(--color-primary); color: var(--color-light); border: 1px solid var(--color-primary); }
.btn-solid[disabled] { opacity: 0.6; cursor: progress; }
.btn-light { background: var(--color-light); color: var(--color-dark); border: 1px solid var(--color-light); }

/* Hover nur mit Maus: auf dem Handy bliebe der Zustand nach dem Tippen sonst stehen */
@media (hover: hover) {
  .btn:hover .icon { transform: translateX(4px); }
  .btn-outline:hover { background: var(--color-primary); color: var(--color-light); }
  .btn-solid:hover { background: var(--color-dark); border-color: var(--color-dark); }
  .btn-light:hover { background: var(--color-dark); border-color: var(--color-dark); color: var(--color-light); }
  .site-header.scrolled .nav-cta:hover { background: var(--color-light); border-color: var(--color-light); color: var(--color-dark); }
  .hero-tiles a:hover { background: var(--color-primary); color: var(--color-light); }
  .leistung-feature:hover img { transform: scale(1.025); }
  .leistung-feature:hover .leistung-more .icon { transform: translateX(5px); }
  .gewerk:hover { background: var(--color-primary); }
  .gewerk:hover .gewerk-arrow { transform: translateX(5px); color: var(--color-light); }
  .gewerk:hover .gewerk-text,
  .gewerk:hover .gewerk-nr { color: rgba(245,244,240,0.92); }
}
.btn:active { opacity: 0.85; }
.gewerk:active, .hero-tiles a:active { opacity: 0.8; }

/* ── HEADER ─────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 28px);
  padding: 0 var(--edge);
  transition: height 0.35s var(--ease-out), background-color 0.3s ease;
}
.site-header.scrolled {
  height: var(--nav-height-scrolled);
  background: rgba(26,26,26,0.97);
}
.site-logo {
  position: relative;
  display: block;
  height: 86px;
  aspect-ratio: 758 / 387;
  flex-shrink: 0;
  transition: height 0.35s var(--ease-out);
}
.site-logo img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  transition: opacity 0.25s ease;
}
.logo-light { opacity: 0; }
.site-header.scrolled .site-logo { height: 56px; }
.site-header.scrolled .logo-dark { opacity: 0; }
.site-header.scrolled .logo-light { opacity: 1; }
.menu-open .site-header { background: transparent; }
.menu-open .logo-dark { opacity: 0; }
.menu-open .logo-light { opacity: 1; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.2vw, 34px);
  margin-left: auto;
}
.nav-link {
  font-size: 16px;
  color: var(--color-dark);
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 1px;
  width: 100%;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.site-header.scrolled .nav-link { color: var(--color-light); }

.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: clamp(16px, 2vw, 28px);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--color-dark);
  border-left: 1px solid var(--color-rule);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.nav-phone .icon { width: 16px; height: 16px; }
.nav-phone:hover { color: var(--color-primary); }
.site-header.scrolled .nav-phone { color: var(--color-light); border-color: var(--color-rule-on-dark); }
.nav-cta { min-height: 44px; padding: 9px 18px; font-size: 15px; }

.hamburger {
  display: none;
  width: 44px; height: 44px;
  position: relative;
  flex-shrink: 0;
}
.hamburger span {
  position: absolute;
  left: 10px; right: 10px;
  height: 1.5px;
  background: var(--color-dark);
  transition: transform 0.35s var(--ease-out), background-color 0.25s ease;
}
.hamburger span:nth-child(1) { top: 17px; }
.hamburger span:nth-child(2) { top: 26px; }
.site-header.scrolled .hamburger span,
.menu-open .hamburger span { background: var(--color-light); }
.menu-open .hamburger span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-open .hamburger span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }
.menu-open .nav-phone { color: var(--color-light); }

/* ── OVERLAY MENU ───────────────────────────────────────────── */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--color-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.menu-overlay[hidden] { display: none; }
.menu-overlay.open { opacity: 1; }
.menu-overlay-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.menu-overlay-link {
  font-family: var(--font-display);
  font-size: clamp(36px, 9vw, 56px);
  line-height: 1.25;
  color: var(--color-light);
}
.menu-overlay-phone {
  margin-top: var(--space-md);
  font-size: 18px;
  font-weight: 500;
  color: var(--color-on-dark);
}

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  position: relative;
  overflow: hidden;
}
.hero-content {
  padding: calc(var(--nav-height) + var(--space-sm)) var(--space-xl) var(--space-lg) var(--edge);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}
.hero-image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--color-paper);
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}
/* Keeps the navigation legible where it runs over the photo */
.hero-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 170px;
  background: linear-gradient(to bottom, var(--color-light) 22%, rgba(245,244,240,0.72) 58%, rgba(245,244,240,0));
  z-index: 3;
  pointer-events: none;
}

.hero-company {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}
.hero-company i {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.6;
  flex-shrink: 0;
}

.hero-h1 {
  font-family: var(--font-display);
  font-size: clamp(50px, 6.5vw, 100px);
  line-height: 1;
  letter-spacing: -0.018em;
}
.hero-h1 .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.04em;
}
.hero-h1 .line > span {
  display: inline-block;
  animation: line-up 0.9s var(--ease-out) both;
}
.hero-h1 .line:nth-child(2) > span { animation-delay: 0.08s; }
@keyframes line-up { from { transform: translateY(110%); } }
.hero-accent { color: var(--color-primary); }

.hero-subtext {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.4;
  margin-top: var(--space-sm);
}

.hero-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 620px;
  margin-top: var(--space-md);
  border-top: 1px solid var(--color-rule);
  border-left: 1px solid var(--color-rule);
}
.hero-tiles a {
  display: flex;
  align-items: center;
  height: 100%;
  min-height: 60px;
  padding: 9px 16px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  border-right: 1px solid var(--color-rule);
  border-bottom: 1px solid var(--color-rule);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-top: var(--space-md);
}
.hero-phone { font-size: 16px; color: var(--color-gray); }
.hero-phone strong { font-weight: 600; color: var(--color-dark); transition: color 0.25s ease; }
.hero-phone:hover strong { color: var(--color-primary); }

.hero-person {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: var(--space-md);
}
.hero-person img { width: 52px; height: 65px; object-fit: cover; flex-shrink: 0; }
.hero-person p { font-size: 16px; line-height: 1.35; }
.hero-person strong { font-weight: 600; }
.hero-person span { display: block; color: var(--color-gray); }

/* ── UNTERNEHMEN ────────────────────────────────────────────── */
.intro-section {
  padding: var(--space-3xl) 0;
  overflow: hidden;
}
.intro-image-wrap {
  grid-column: 1 / 7;
  position: relative;
  aspect-ratio: 9 / 10;
  overflow: hidden;
  background: var(--color-paper);
}
.intro-image {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.intro-text {
  grid-column: 8 / 13;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-md);
}
.intro-text > p { color: var(--color-gray); font-size: 18px; line-height: 1.55; }
.intro-facts { display: flex; flex-direction: column; margin-bottom: var(--space-xs); }
.intro-facts li {
  font-size: 17px;
  line-height: 1.45;
  padding: 15px 0;
  color: var(--color-gray);
  border-top: 1px solid var(--color-rule);
}
.intro-facts li:last-child { border-bottom: 1px solid var(--color-rule); }
.intro-facts strong { display: block; font-weight: 600; color: var(--color-dark); }

/* ── ZAHLEN ─────────────────────────────────────────────────── */
.zahlen-band {
  background: var(--color-dark);
  padding: var(--space-2xl) 0 0;
}
.zahlen {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
}
.zahl {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(245,244,240,0.32);
}
.zahl dd {
  order: -1;
  font-family: var(--font-display);
  font-size: clamp(60px, 6.6vw, 96px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--color-light);
  font-variant-numeric: lining-nums;
}
.zahl dt {
  font-size: 18px;
  line-height: 1.35;
  max-width: 21em;
  color: var(--color-on-dark);
}

/* ── LEISTUNGEN ─────────────────────────────────────────────── */
.leistungen-section {
  background: var(--color-dark);
  padding: var(--space-3xl) 0;
  color: var(--color-light);
}

.leistung-feature {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  border: 1px solid var(--color-rule-on-dark);
}
.leistung-feature-image {
  position: relative;
  overflow: hidden;
  min-height: 420px;
}
.leistung-feature-image img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease-out);
}
.leistung-feature-body {
  padding: clamp(28px, 3.6vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-sm);
}
.leistung-feature-title {
  font-family: var(--font-display);
  font-size: clamp(56px, 5.8vw, 88px);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--color-light);
}
.leistung-feature-text { font-size: 18px; line-height: 1.45; color: var(--color-on-dark); }
.leistung-feature-list { margin-top: var(--space-xs); }
.leistung-feature-list li {
  font-size: 17px;
  padding: 10px 0;
  border-top: 1px solid var(--color-rule-on-dark);
}
.leistung-feature-beispiel {
  font-size: 16px;
  line-height: 1.45;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-rule-on-dark);
  color: var(--color-on-dark);
}
.leistung-more {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: var(--space-xs);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-light);
}
.leistung-more .icon { transition: transform 0.35s var(--ease-out); }

.gewerk-nr {
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--color-on-dark-soft);
}
.gewerk-nr span { margin-left: 12px; color: var(--color-light); }

/* Leistungsverzeichnis: Positionen statt Kacheln */
.gewerke { border-bottom: 1px solid var(--color-rule-on-dark); }
.gewerk {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 5fr) minmax(0, 6fr) 32px;
  align-items: center;
  column-gap: var(--grid-gap);
  min-height: 84px;
  padding: 14px clamp(12px, 1.6vw, 24px);
  border-left: 1px solid var(--color-rule-on-dark);
  border-right: 1px solid var(--color-rule-on-dark);
  border-top: 1px solid var(--color-rule-on-dark);
  transition: background-color 0.25s ease;
}
.gewerke li:first-child .gewerk { border-top: none; }
.gewerk:focus-visible { background: var(--color-primary); outline-offset: -4px; }
.gewerk-name {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.5vw, 36px);
  line-height: 1.1;
  color: var(--color-light);
  hyphens: manual;
}
.gewerk-text {
  font-size: 17px;
  line-height: 1.4;
  color: var(--color-on-dark);
  transition: color 0.25s ease;
}
.gewerk-arrow {
  width: 22px; height: 22px;
  justify-self: end;
  color: var(--color-on-dark-soft);
  transition: transform 0.35s var(--ease-out), color 0.25s ease;
}
.gewerk:focus-visible .gewerk-arrow { color: var(--color-light); }
.gewerk:focus-visible .gewerk-text,
.gewerk:focus-visible .gewerk-nr { color: rgba(245,244,240,0.92); }

/* ── ABLAUF ─────────────────────────────────────────────────── */
.ablauf-section {
  background: var(--color-light);
  padding: var(--space-xl) 0 36px;
  overflow: hidden;
}
.ablauf-head { margin-bottom: 28px; }
.ablauf-head .section-header { margin-bottom: 0; gap: 8px; }
.ablauf-track-wrap {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ablauf-track-wrap::-webkit-scrollbar { display: none; }
.ablauf-track-wrap:focus-visible { outline-offset: -3px; }
.ablauf-track-wrap.is-pinned { overflow: hidden; }
.ablauf-track {
  display: flex;
  gap: var(--space-md);
  width: max-content;
  padding: 0 var(--edge);
}
.schritt {
  position: relative;
  flex-shrink: 0;
  /* Pinned on desktop, so header, heading and strip must fit one viewport */
  height: clamp(340px, calc(100vh - 340px), 640px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--color-paper);
  color: var(--color-light);
}
.schritt img { width: 100%; height: 100%; object-fit: cover; }
.schritt::after {
  content: '';
  position: absolute;
  inset: 28% 0 0 0;
  background: linear-gradient(to top, rgba(20,19,18,0.94) 0%, rgba(20,19,18,0.8) 48%, rgba(20,19,18,0));
  pointer-events: none;
}
.schritt-text {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: var(--space-md);
}
.schritt-text span { display: block; font-size: 15px; font-weight: 500; color: rgba(245,244,240,0.8); margin-bottom: 2px; }
.schritt-text h3 {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.4vw, 34px);
  line-height: 1.1;
  margin-bottom: 8px;
}
.schritt-text p { font-size: 16px; line-height: 1.4; color: rgba(245,244,240,0.88); }

.schritt--cta {
  background: var(--color-primary);
  aspect-ratio: auto;
  width: clamp(280px, 26vw, 400px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-md);
}
.schritt--cta::after { display: none; }
.schritt-cta-titel {
  font-family: var(--font-display);
  font-size: clamp(36px, 3.3vw, 50px);
  line-height: 1.06;
  margin-bottom: auto;
}
.schritt-cta-tel { font-size: 18px; font-weight: 500; }
.schritt-cta-tel:hover { text-decoration: underline; text-underline-offset: 4px; }

.ablauf-progress {
  height: 1px;
  background: var(--color-rule);
  margin-top: var(--space-md);
  overflow: hidden;
}
.ablauf-progress span {
  display: block;
  height: 100%;
  background: var(--color-primary);
  transform: scaleX(0.08);
  transform-origin: left;
}
.ablauf-hinweis {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--color-gray);
  text-align: right;
}

/* ── ÜBER UNS + TEAM ────────────────────────────────────────── */
.ueber-section {
  background: var(--color-light);
  padding: var(--space-2xl) 0 var(--space-3xl);
  overflow: hidden;
}
.ueber-quote-wrap {
  max-width: 1120px;
  margin: 0 auto var(--space-2xl);
  padding: 0 var(--gutter);
  text-align: center;
}
.ueber-quote {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 68px);
  line-height: 1.1;
  letter-spacing: -0.012em;
  text-wrap: balance;
  max-width: 15.5em;
  margin: 0 auto;
}
.ueber-quote-wrap figcaption {
  margin-top: var(--space-sm);
  font-size: 17px;
  color: var(--color-gray);
}

.team-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto auto;
  column-gap: var(--grid-gap);
  row-gap: var(--space-xl);
}
.team-lead { grid-column: 1 / 7; grid-row: 1 / 3; display: flex; flex-direction: column; }
.ueber-text {
  grid-column: 7 / 13;
  grid-row: 1;
  padding-left: var(--space-xs);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.ueber-text .h2 { font-size: clamp(36px, 3.9vw, 58px); }
.ueber-text p { color: var(--color-gray); line-height: 1.55; max-width: 36em; }
.ueber-text .text-body-lg { color: var(--color-dark); line-height: 1.4; }
.team-member { grid-row: 2; align-self: end; }
.team-member:nth-of-type(2) { grid-column: 7 / 10; }
.team-member:nth-of-type(3) { grid-column: 10 / 13; }

.team-lead picture, .team-member picture { display: block; overflow: hidden; background: var(--color-paper); aspect-ratio: 4 / 5; }
.team-lead img, .team-member img { width: 100%; height: 100%; object-fit: cover; }
.team-layout figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: var(--space-sm);
  min-height: 86px;
}
.team-name {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.15;
}
.team-role {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-primary);
}

/* ── ZERTIFIKATE ────────────────────────────────────────────── */
.zertifikate-section {
  background: var(--color-dark);
  padding: var(--space-3xl) 0 var(--space-2xl);
}
.zertifikate-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: start;
}
.zertifikate-layout .section-header { grid-column: 1 / 7; margin-bottom: 0; }
.zertifikate-list { grid-column: 7 / 13; padding-left: var(--space-xs); }
.zertifikate-list li {
  padding: 17px 0;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.3vw, 32px);
  line-height: 1.15;
  color: var(--color-light);
  border-top: 1px solid var(--color-rule-on-dark);
}
.zertifikate-list li:last-child { border-bottom: 1px solid var(--color-rule-on-dark); }

/* ── KONTAKT ────────────────────────────────────────────────── */
.kontakt-hero {
  position: relative;
  overflow: hidden;
  background: var(--color-dark);
  color: var(--color-light);
  padding: clamp(80px, 10vw, 144px) 0 clamp(56px, 7vw, 96px);
  text-align: center;
}
.kontakt-hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  opacity: 0.34;
}
.kontakt-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--color-dark) 0%, rgba(26,26,26,0) 42%);
  pointer-events: none;
}
.kontakt-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}
.kontakt-heading {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw, 90px);
  line-height: 1.04;
  letter-spacing: -0.015em;
}
.kontakt-hero-inner p { font-size: 19px; line-height: 1.45; color: rgba(245,244,240,0.88); }
.kontakt-hero-tel {
  margin-top: var(--space-xs);
  font-size: clamp(28px, 2.6vw, 36px);
  font-weight: 500;
  border-bottom: 1px solid rgba(245,244,240,0.5);
  transition: border-color 0.25s ease;
}
.kontakt-hero-tel:hover { border-color: var(--color-light); }
.kontakt-hero-inner .kontakt-orte { margin-top: var(--space-md); font-size: 17px; max-width: 38em; }

.kontakt-section { padding: var(--space-2xl) 0 var(--space-3xl); }
.kontakt-info { grid-column: 1 / 6; display: flex; flex-direction: column; gap: var(--space-lg); }
.kontakt-person {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  column-gap: var(--space-md);
}
.kontakt-person img { width: 96px; height: 120px; object-fit: cover; object-position: 50% 12%; }
.kontakt-person p { font-size: 18px; line-height: 1.4; }
.kontakt-details > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  column-gap: var(--space-sm);
  padding: 14px 0;
  border-top: 1px solid var(--color-rule);
}
.kontakt-details > div:last-child { border-bottom: 1px solid var(--color-rule); }
.kontakt-details dt { font-size: 16px; color: var(--color-gray); padding-top: 2px; }
.kontakt-details dd { font-size: 18px; font-weight: 500; line-height: 1.35; }
.kontakt-details dd a { transition: color 0.25s ease; }
.kontakt-details dd > a:hover { color: var(--color-primary); }
.kontakt-links { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 6px; font-size: 16px; font-weight: 500; }
.kontakt-links a, .kontakt-links button { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }
.kontakt-links a:hover, .kontakt-links button:hover { color: var(--color-dark); }

.map-panel { position: relative; height: 300px; background: var(--color-paper); }
.map-panel[hidden] { display: none; }
.map-panel iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.02); }
.map-note { margin-top: calc(var(--space-md) * -1); font-size: 15px; line-height: 1.4; color: var(--color-gray); }

.kontakt-form-wrap { grid-column: 7 / 13; padding-left: var(--space-xs); }
.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--space-md);
}
.form-group { margin-bottom: var(--space-md); }
.form-group label { display: block; font-size: 16px; font-weight: 500; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  min-height: 46px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(26,26,26,0.5);
  border-radius: 0;
  padding: 8px 0;
  font: inherit;
  font-size: 18px;
  color: var(--color-dark);
  caret-color: var(--color-primary);
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-group textarea { min-height: 112px; resize: vertical; display: block; }
.form-group textarea::placeholder { color: var(--color-gray); opacity: 1; }
.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover { border-bottom-color: var(--color-dark); }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-group [aria-invalid="true"] {
  border-bottom-color: var(--color-primary);
  box-shadow: 0 1px 0 0 var(--color-primary);
}
.select-wrap { position: relative; }
.select-wrap::after {
  content: '';
  position: absolute;
  right: 4px; top: 50%;
  width: 8px; height: 8px;
  margin-top: -6px;
  border-right: 1.5px solid var(--color-dark);
  border-bottom: 1.5px solid var(--color-dark);
  transform: rotate(45deg);
  pointer-events: none;
}
.form-error { margin-top: 6px; font-size: 15px; font-weight: 500; color: var(--color-primary); }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-privacy {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--color-gray);
}
.form-privacy input {
  width: 20px; height: 20px;
  margin-top: 1px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}
.form-privacy a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; }
.form-submit { width: 100%; margin-top: var(--space-md); }
.form-status { margin-top: var(--space-sm); font-size: 17px; line-height: 1.4; }
.form-status.is-success { color: var(--color-dark); font-weight: 500; }
.form-status.is-error { color: var(--color-primary); }
.form-status a { text-decoration: underline; text-underline-offset: 3px; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-dark);
  color: var(--color-light);
  padding-top: var(--space-xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
}
.footer-brand img { height: 84px; width: auto; }
.footer-brand p {
  margin-top: var(--space-sm);
  font-size: 16px;
  line-height: 1.4;
  max-width: 22em;
  color: var(--color-on-dark);
}
.footer-heading {
  font-size: 15px;
  color: var(--color-on-dark-soft);
  margin-bottom: var(--space-sm);
}
.footer-list { display: flex; flex-direction: column; gap: 8px; }
.footer-list li { font-size: 16px; line-height: 1.4; color: var(--color-on-dark); }
.footer-list a { transition: color 0.2s ease; }
.footer-list a:hover { color: var(--color-light); }
.footer-bar {
  border-top: 1px solid var(--color-rule-on-dark);
  padding: var(--space-md) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  font-size: 15px;
  color: var(--color-on-dark-soft);
}
.footer-bar-links { display: flex; gap: var(--space-md); }
.footer-bar-links a { transition: color 0.2s ease; }
.footer-bar-links a:hover { color: var(--color-light); }

/* Credit Amann Media: leise, erst beim Hover voll sichtbar */
.footer-bar > p { margin-right: auto; }
.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: var(--space-md);
  border-left: 1px solid var(--color-rule-on-dark);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-on-dark-soft);
  opacity: 0.62;
  transition: opacity 0.3s ease;
}
.footer-credit picture, .footer-credit img { display: block; height: 30px; width: auto; }
.footer-credit img { transition: transform 0.4s var(--ease-out); }
.footer-credit-arrow {
  width: 11px; height: 11px;
  fill: none; stroke: currentColor; stroke-width: 1.5;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease-out);
}
.footer-credit:hover, .footer-credit:focus-visible { opacity: 1; }
.footer-credit:hover img { transform: translateY(-1px); }
.footer-credit:hover .footer-credit-arrow,
.footer-credit:focus-visible .footer-credit-arrow { opacity: 1; transform: none; }
@media (max-width: 720px) {
  .footer-bar > p { width: 100%; margin-right: 0; }
  .footer-credit { padding-left: 0; border-left: 0; padding-top: 4px; }
}

/* ── SCHNELLKONTAKT (HANDY) ─────────────────────────────────── */
.mobile-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 900;
  display: none;
  grid-template-columns: 2fr 3fr;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--color-dark);
  transform: translateY(110%);
  transition: transform 0.3s var(--ease-out);
}
.mobile-cta.visible { transform: none; }
.mobile-cta a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-light);
}
.mobile-cta a:last-child { background: var(--color-primary); }

/* ── IMPRESSUM / DATENSCHUTZ ────────────────────────────────── */
.legal-page .site-header { background: rgba(26,26,26,0.97); height: var(--nav-height-scrolled); }
.legal-page .site-logo { height: 56px; }
.legal-back {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 16px;
  color: var(--color-light);
}
.legal-back .icon { transform: scaleX(-1); transition: transform 0.3s var(--ease-out); }
.legal-back:hover .icon { transform: scaleX(-1) translateX(4px); }
.legal-main {
  padding: calc(var(--nav-height-scrolled) + var(--space-2xl)) 0 var(--space-3xl);
  min-height: 80vh;
}
.legal-content { max-width: 760px; }
.legal-content h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 5.4vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-xl);
  hyphens: manual;
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.2;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}
.legal-content p,
.legal-content li {
  color: var(--color-gray);
  line-height: 1.65;
  margin-bottom: var(--space-sm);
}
.legal-content ul { padding-left: 20px; margin-bottom: var(--space-sm); }
.legal-content ul li { list-style: disc; margin-bottom: 4px; }
.legal-content strong { color: var(--color-dark); font-weight: 600; }
.legal-content a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-footer { background: var(--color-dark); color: var(--color-light); }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .nav-phone span { display: none; }
  .nav-phone { padding-left: 16px; }
}

/* Laptops with little height: keep the hero inside the first screen */
@media (min-width: 961px) and (max-height: 800px) {
  :root { --nav-height: 92px; }
  .site-logo { height: 72px; }
  .hero-h1 { font-size: clamp(50px, 5.6vw, 84px); }
  .hero-tiles a { min-height: 52px; padding-block: 6px; }
  .hero-tiles, .hero-actions, .hero-person { margin-top: 18px; }
}

/* ── Tablet und Handy: Foto oben, Text darunter ── */
@media (max-width: 960px) {
  :root { --nav-height: 84px; --nav-height-scrolled: 64px; --space-3xl: 88px; --space-2xl: 64px; }

  .site-nav, .nav-cta { display: none; }
  .hamburger { display: block; }
  .site-logo { height: 66px; margin-right: auto; }
  .site-header.scrolled .site-logo { height: 48px; }
  .site-header { gap: 4px; }
  .nav-phone { width: 44px; height: 44px; justify-content: center; padding: 0; border: none; }
  .nav-phone .icon { width: 20px; height: 20px; }
  .nav-phone span { display: none; }

  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-image-wrap { order: -1; margin-top: var(--nav-height); aspect-ratio: 16 / 9; }
  .hero-image { object-position: 50% 32%; }
  .hero-image-wrap::after { display: none; }
  .hero-content { padding: var(--space-md) var(--gutter) var(--space-xl); }
  .hero-company { order: 1; }
  .hero-h1 { order: 2; }
  .hero-subtext { order: 3; }
  .hero-actions { order: 4; }
  .hero-person { order: 5; }
  .hero-tiles { order: 6; max-width: none; margin-top: var(--space-lg); }

  .intro-image-wrap { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
  .intro-text { grid-column: 1 / -1; margin-top: var(--space-md); }

  .leistung-feature { grid-template-columns: minmax(0, 1fr); }
  .leistung-feature-image { min-height: 0; aspect-ratio: 16 / 10; }

  .ablauf-track-wrap {
    scroll-snap-type: x proximity;
    scroll-padding-left: var(--edge);
  }
  .schritt { scroll-snap-align: start; height: 440px; }
  .schritt--cta { width: 300px; }

  .team-layout { row-gap: var(--space-lg); }
  .ueber-text { grid-column: 1 / -1; grid-row: auto; order: -1; padding: 0; }
  .team-lead { grid-column: 1 / -1; grid-row: auto; }
  .team-member { grid-row: auto; align-self: start; }
  .team-member:nth-of-type(2) { grid-column: 1 / 7; }
  .team-member:nth-of-type(3) { grid-column: 7 / 13; }
  .team-layout figcaption { min-height: 0; }

  .zertifikate-layout .section-header,
  .zertifikate-list { grid-column: 1 / -1; }
  .zertifikate-list { margin-top: var(--space-md); padding-left: 0; }

  /* The form comes first: a tap on "Projekt anfragen" lands right on it */
  .kontakt-form-wrap { grid-column: 1 / -1; order: -1; padding-left: 0; }
  .kontakt-info { grid-column: 1 / -1; margin-top: var(--space-xl); }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .mobile-cta { display: grid; }
  .site-footer { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
}

@media (max-width: 720px) {
  .gewerk {
    grid-template-columns: 30px minmax(0, 1fr) 22px;
    grid-template-rows: auto auto;
    row-gap: 2px;
    column-gap: 10px;
    padding: 16px 12px;
  }
  .gewerk-nr { grid-column: 1; grid-row: 1; align-self: start; padding-top: 7px; }
  .gewerk-name { grid-column: 2; grid-row: 1; font-size: 27px; }
  .gewerk-text { grid-column: 2; grid-row: 2; font-size: 16px; }
  .gewerk-arrow { grid-column: 3; grid-row: 1; align-self: start; margin-top: 6px; }

  .zahlen { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
  .zahl { flex-direction: row; align-items: flex-start; gap: var(--space-sm); }
  .zahl dd { font-size: 54px; min-width: 2.1em; flex-shrink: 0; }
  .zahl dt { font-size: 16px; padding-top: 4px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .hero-tiles { grid-template-columns: minmax(0, 1fr); }
  .hero-tiles a { min-height: 50px; }
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .hero-phone { text-align: center; padding: 4px 0; }

  .team-name { font-size: 21px; }
  .team-lead .team-name { font-size: 28px; }
  .team-role { font-size: 15px; }

  .form-row { grid-template-columns: minmax(0, 1fr); }
  /* Finger-friendly tap targets for the small text links */
  .hero-phone { padding: 8px 0; }
  .form-privacy input { width: 24px; height: 24px; }
  .kontakt-details dd > a,
  .kontakt-links a,
  .kontakt-links button,
  .footer-list a,
  .footer-bar-links a { display: inline-block; padding: 10px 0; }
  .kontakt-links { gap: 0 22px; margin-top: 0; }
  .footer-list { gap: 0; }
  .footer-list li:not(:has(a)) { padding: 6px 0; }
  .kontakt-person { grid-template-columns: 80px minmax(0, 1fr); column-gap: var(--space-sm); }
  .kontakt-person img { width: 80px; height: 100px; }
  .kontakt-person p { font-size: 17px; }
  .kontakt-details > div { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-lg); }
  .btn { width: 100%; }
}

/* Handy quer: wenig Höhe, deshalb kompakter */
@media (max-width: 960px) and (max-height: 500px) {
  .hero-image-wrap { aspect-ratio: auto; height: 46vh; }
  .schritt { height: 320px; }
}

/* ── REDUCED MOTION ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
