/* ==========================================================================
   Tectus Flachdachabdichtungen GmbH – Website
   Design: modernes Business-Layout. Farben aus dem Logo (Schwarz + Salbeigrün
   #9bb99e), Schrift "Manrope" (variabel, selbst gehostet, SIL OFL 1.1).
   Keine Inline-Styles im HTML: Die Content-Security-Policy erlaubt nur diese Datei.
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/Manrope.woff2") format("woff2");
}

:root {
  /* Farben */
  --ink: #0d120f;
  --ink-2: #161d18;
  --ink-3: #232c26;
  --text: #19201b;
  --muted: #59645d;
  --line: #e2e7e1;
  --surface: #f3f5f1;
  --paper: #fff;
  --brand: #9bb99e;          /* Logo-Grün */
  --brand-light: #b4ceb6;
  --brand-strong: #3d6b46;   /* Grün für Text auf hellem Grund (Kontrast ≥ 4,5:1) */
  --brand-soft: #e5eee5;
  --on-dark: #fff;
  --on-dark-muted: rgba(255, 255, 255, .68);
  --on-dark-line: rgba(255, 255, 255, .14);

  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Maße */
  --container: 1280px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(5rem, 10vw, 8.5rem);
  --header-h: 84px;
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;

  --shadow: 0 12px 32px -12px rgba(13, 18, 15, .2), 0 2px 6px rgba(13, 18, 15, .05);
  --shadow-lg: 0 32px 64px -24px rgba(13, 18, 15, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Grundlagen ---------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: rgba(155, 185, 158, .25);
}

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

a { color: inherit; text-decoration: none; }

p { margin: 0 0 1.25em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  margin: 0;
  color: inherit;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.025em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 1.35rem + 4.6vw, 5.25rem); font-weight: 800; line-height: 1.02; letter-spacing: -.04em; }
h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); line-height: 1.06; letter-spacing: -.035em; }
h3 { font-size: 1.3rem; line-height: 1.25; letter-spacing: -.02em; }

address { font-style: normal; }
strong { font-weight: 700; }

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

:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 300;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Strich-Icons (Inline-SVG) */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

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

.section { padding: var(--section-y) 0; }
.section-surface { background: var(--surface); }
.section-dark { background: var(--ink); color: var(--on-dark); }
/* Gestaltungsregel: Abschnitte laufen randlos von Kante zu Kante,
   abgerundet sind nur Elemente darin (Karten, Bilder, Buttons). */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 1.25rem;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand-strong);
}
/* Kleines Quadrat mit grünem Balken – angelehnt an das Logo */
.eyebrow::before {
  content: "";
  flex: none;
  width: .7rem;
  height: .7rem;
  border-radius: 2px;
  background: linear-gradient(var(--brand) 0 32%, currentColor 32%);
}
.section-dark .eyebrow,
.hero .eyebrow,
.page-hero .eyebrow { color: var(--brand); }
.section-dark .eyebrow::before,
.hero .eyebrow::before,
.page-hero .eyebrow::before { background: linear-gradient(var(--brand) 0 32%, #fff 32%); }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 1.5rem 4rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-intro { margin: 0; font-size: 1.125rem; color: var(--muted); }
.section-dark .section-intro { color: var(--on-dark-muted); }

.lead { font-size: clamp(1.15rem, 1.02rem + .55vw, 1.45rem); line-height: 1.5; font-weight: 500; letter-spacing: -.01em; }

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

.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  --btn-border: transparent;
  --btn-icon-bg: rgba(255, 255, 255, .14);
  --btn-icon-fg: currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  min-height: 3.375rem;
  padding: .4rem .45rem .4rem 1.5rem;
  border: 1px solid var(--btn-border);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, box-shadow .25s;
}
.btn-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--btn-icon-bg);
  color: var(--btn-icon-fg);
  transition: transform .35s var(--ease);
}
.btn-icon .icon { width: 1.1rem; height: 1.1rem; }
.btn:hover .btn-icon { transform: translateX(3px); }
.btn:hover .btn-icon.up-right { transform: translate(2px, -2px); }

.btn-primary { --btn-bg: var(--brand); --btn-fg: var(--ink); --btn-icon-bg: var(--ink); --btn-icon-fg: var(--brand); }
.btn-primary:hover { --btn-bg: var(--brand-light); }
.btn-dark { --btn-bg: var(--ink); --btn-fg: #fff; --btn-icon-bg: var(--brand); --btn-icon-fg: var(--ink); }
.btn-dark:hover { --btn-bg: var(--ink-3); }
.btn-ghost {
  --btn-bg: rgba(255, 255, 255, .08);
  --btn-fg: #fff;
  --btn-border: rgba(255, 255, 255, .3);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { --btn-bg: rgba(255, 255, 255, .18); }
.btn-sm { min-height: 2.75rem; padding: .3rem 1.25rem; font-size: .95rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: background .25s, border-color .25s, color .25s, opacity .25s;
}
.icon-btn:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--brand); }
.icon-btn:disabled { opacity: .35; cursor: default; }

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

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  color: var(--text);
  transition: color .3s;
}
/* Hintergrund als eigene Ebene: backdrop-filter direkt am Header würde das
   mobile Vollbild-Menü (position: fixed) auf die Header-Höhe begrenzen. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 1px 0 rgba(13, 18, 15, .08);
  transition: opacity .3s;
}
/* Seiten mit dunklem Titelbereich: Header oben transparent */
.has-hero .site-header:not(.is-scrolled) { color: #fff; }
.has-hero .site-header:not(.is-scrolled)::before { opacity: 0; }

.site-header .bar {
  max-width: var(--container);
  height: var(--header-h);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex: none;
  color: inherit;
}
.logo img { width: 44px; height: auto; }
.logo-text {
  display: flex;
  flex-direction: column;
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .04em;
}
.logo-text span + span { font-weight: 500; opacity: .75; }

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav a:not(.btn) {
  display: block;
  padding: .55rem 1rem;
  border-radius: 999px;
  font-size: .975rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: .82;
  transition: opacity .2s, background .2s;
}
.nav a:not(.btn):hover,
.nav a:not(.btn).active { opacity: 1; background: rgba(13, 18, 15, .06); }
.has-hero .site-header:not(.is-scrolled) .nav a:not(.btn):hover,
.has-hero .site-header:not(.is-scrolled) .nav a:not(.btn).active { background: rgba(255, 255, 255, .14); }
.nav .nav-cta { margin-left: .75rem; }

.nav-toggle {
  display: none;
  position: relative;
  width: 2.875rem;
  height: 2.875rem;
  padding: 0;
  border: 1px solid rgba(128, 128, 128, .4);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .3s var(--ease), background .3s;
}
.nav-toggle-lines { position: relative; }
.nav-toggle-lines::before,
.nav-toggle-lines::after { content: ""; position: absolute; left: 0; }
.nav-toggle-lines::before { top: -6px; }
.nav-toggle-lines::after { top: 6px; }
.nav-open .nav-toggle-lines { background: transparent; }
.nav-open .nav-toggle-lines::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-lines::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Titelbild (Startseite) ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% 50%;
  animation: heroZoom 2.2s var(--ease) both;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 13, 10, .62) 0%, rgba(9, 13, 10, .2) 26%, rgba(9, 13, 10, .38) 55%, rgba(9, 13, 10, .92) 100%),
    linear-gradient(90deg, rgba(9, 13, 10, .7) 0%, rgba(9, 13, 10, .25) 55%, rgba(9, 13, 10, 0) 80%);
}
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: none; } }

.hero-inner {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: calc(var(--header-h) + 3rem) var(--gutter) clamp(1.25rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(2.5rem, 7vh, 5rem);
}
/* Breit genug, dass die Headline auf Desktop und Tablet zweizeilig bleibt (Subtext hat eigene Breite) */
.hero-copy { max-width: 64rem; animation: riseIn 1s .15s var(--ease) both; }
.hero h1 { margin-bottom: 1.5rem; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lead { max-width: 40rem; margin-bottom: 2.25rem; color: rgba(255, 255, 255, .84); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  animation: riseIn 1s .35s var(--ease) both;
}
.hero-facts li { padding: 1.25rem 1.5rem; }
.hero-facts li + li { border-left: 1px solid rgba(255, 255, 255, .14); }
.fact-label {
  display: block;
  margin-bottom: .3rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
}
.fact-value { display: block; font-size: 1.075rem; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }

@keyframes riseIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* ---------- Titelbereich Unterseiten ---------- */

.page-hero {
  position: relative;
  isolation: isolate;
  padding: calc(var(--header-h) + clamp(3rem, 8vw, 6.5rem)) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}
.page-hero::before,
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.page-hero::before {
  background: radial-gradient(55% 90% at 88% 0%, rgba(155, 185, 158, .32), transparent 62%);
}
/* Feines Raster, zur Mitte hin ausgeblendet */
.page-hero::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 80% 0%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 90% at 80% 0%, #000 0%, transparent 75%);
}
.page-hero h1 { max-width: 48rem; }
.page-hero + .section { padding-top: clamp(3rem, 6vw, 5rem); }
.page-hero .lead { max-width: 40rem; margin: 1.5rem 0 0; color: var(--on-dark-muted); }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.25rem; }
.page-hero .code {
  display: block;
  margin-bottom: .5rem;
  font-size: clamp(5rem, 3rem + 10vw, 11rem);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.06em;
  color: var(--brand);
}

/* ---------- Unternehmen ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem 5rem;
  align-items: start;
}
.about-body { padding-top: .35rem; }
.about-body p:not(.lead) { color: var(--muted); }

.features {
  list-style: none;
  margin: clamp(3rem, 6vw, 5rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.feature {
  padding: 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--surface);
  transition: background .35s, border-color .35s, box-shadow .35s var(--ease), transform .35s var(--ease);
}
.feature:hover { background: #fff; border-color: var(--line); box-shadow: var(--shadow); transform: translateY(-4px); }
.feature-icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 2.5rem;
  border-radius: 14px;
  background: var(--ink);
  color: var(--brand);
}
.feature-icon .icon { width: 1.4rem; height: 1.4rem; }
.feature h3 { margin-bottom: .5rem; font-size: 1.125rem; }
.feature p { margin: 0; font-size: .975rem; color: var(--muted); }

/* ---------- Service & Produkte ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.service-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-media {
  position: relative;
  aspect-ratio: 16 / 10;
  margin: .5rem .5rem 0;
  border-radius: calc(var(--radius-lg) - .5rem);
  overflow: hidden;
  background: var(--surface);
}
.service-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease);
}
.service-card:hover .service-media img { transform: scale(1.05); }
.service-no {
  position: absolute;
  top: .85rem;
  left: .85rem;
  padding: .3rem .7rem;
  border-radius: 999px;
  background: rgba(13, 18, 15, .62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.service-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 1.75rem 1.75rem 2rem;
}
.service-body p { margin: 0; font-size: 1rem; color: var(--muted); }

.chips {
  list-style: none;
  margin: auto 0 0;
  padding: .5rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.chips li {
  padding: .35rem .8rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: .85rem;
  font-weight: 600;
}

/* ---------- Referenzen (Galerie mit Scroll-Snap) ---------- */

.refs-controls { display: flex; gap: .5rem; justify-self: end; }

.gallery {
  /* Linke Kante bündig mit dem Inhaltsbereich, rechts bis zum Rand */
  --bleed: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0 var(--bleed) .25rem;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--bleed);
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery:focus-visible { outline-offset: -3px; }
.gallery.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
@media (hover: hover) and (pointer: fine) {
  .gallery { cursor: grab; }
}

.ref-card { flex: 0 0 clamp(17.5rem, 38vw, 34rem); scroll-snap-align: start; }
.ref-media {
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.ref-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  transition: transform .9s var(--ease);
}
.ref-card:hover .ref-media img { transform: scale(1.04); }
.ref-caption { display: flex; gap: 1rem; align-items: baseline; padding-top: 1.25rem; }
.ref-no { flex: none; font-size: .8125rem; font-weight: 700; color: var(--brand-strong); font-variant-numeric: tabular-nums; }
.ref-card h3 { font-size: 1.2rem; }
.ref-tags { margin: .35rem 0 0; font-size: .95rem; color: var(--muted); }

.gallery-progress {
  height: 2px;
  margin-top: 2.5rem;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}
.gallery-progress span {
  display: block;
  width: 30%;
  height: 100%;
  border-radius: 2px;
  background: var(--brand-strong);
}

/* ---------- Jobs ---------- */

/* Kompaktes, ruhiges Band: eigene Zielgruppe, soll den Weg zum Kontakt nicht überlagern */
.cta-band { padding: clamp(4rem, 8vw, 6rem) 0; }
.cta-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 1.5rem 4rem;
  align-items: center;
}
.cta-band-body p { margin: 0 0 1.5rem; font-size: 1.125rem; color: var(--muted); }
/* Adresse des Karriereportals immer mittig unter dem Button (Breite = Button-Breite) */
.cta-band-action { display: inline-flex; flex-direction: column; align-items: center; gap: .75rem; }
.cta-band-action small { font-size: .875rem; font-weight: 600; color: var(--muted); }

/* ---------- Kontakt (dunkler Schlussblock, geht in den Footer über) ---------- */

.contact-section { position: relative; isolation: isolate; padding-bottom: clamp(4rem, 8vw, 6rem); }
/* Dezenter grüner Schimmer wie im Titelbereich der Unterseiten */
.contact-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(50% 70% at 90% 0%, rgba(155, 185, 158, .2), transparent 65%);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 3rem 5rem;
  align-items: start;
}
.contact-copy p:not(.eyebrow) { margin-top: 1.5rem; font-size: 1.125rem; color: var(--on-dark-muted); }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--on-dark-line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
  transition: border-color .3s, background .3s, transform .3s var(--ease);
}
a.contact-card:hover { border-color: var(--brand); background: rgba(255, 255, 255, .07); transform: translateY(-2px); }
.contact-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 14px;
  background: rgba(155, 185, 158, .14);
  color: var(--brand);
}
.contact-label {
  display: block;
  margin-bottom: .15rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.contact-value {
  display: block;
  font-size: clamp(1.1rem, 1rem + .5vw, 1.375rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}
.contact-arrow {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  margin-left: auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  transition: background .3s, color .3s, transform .35s var(--ease);
}
a.contact-card:hover .contact-arrow { background: var(--brand); color: var(--ink); transform: translateX(3px); }
a.contact-card:hover .contact-arrow.up-right { transform: translate(2px, -2px); }
.contact-note { margin: 1rem 0 0 .25rem; font-size: .95rem; color: var(--on-dark-muted); }

/* ---------- Rechtstexte ---------- */

.legal-layout {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 3rem 5rem;
  align-items: start;
}
.toc {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}
.toc-title {
  margin: 0 0 1rem;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a {
  display: block;
  padding: .45rem 0 .45rem 1rem;
  border-left: 2px solid var(--line);
  font-size: .925rem;
  line-height: 1.4;
  color: var(--muted);
  transition: color .2s, border-color .2s;
}
.toc a:hover,
.toc a.active { color: var(--text); border-left-color: var(--brand-strong); }

.prose { max-width: 46rem; }
.prose h2 {
  margin: 3.25rem 0 1rem;
  font-size: clamp(1.35rem, 1.2rem + .5vw, 1.65rem);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.prose h2:first-child { margin-top: 0; }
.prose p,
.prose li { color: #343e37; }
.prose ul { margin: 0 0 1.25em; padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; padding-left: .25rem; }
.prose li::marker { color: var(--brand-strong); }
.prose a {
  color: var(--brand-strong);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.prose a:hover { color: var(--ink); }
.prose code {
  padding: .1em .4em;
  border-radius: 6px;
  background: var(--surface);
  font-size: .9em;
}
.note { margin-top: 3rem; font-size: .9rem; color: var(--muted); }

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
}
.info-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
}
.info-card h2 {
  margin: 0 0 .75rem;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand-strong);
}
.info-card p { margin: 0; line-height: 1.7; }
.info-card a { color: var(--brand-strong); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

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

.site-footer {
  position: relative;
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 0;
  overflow: hidden;
  background: var(--ink);
  color: var(--on-dark-muted);
  font-size: .975rem;
}
/* Direkt nach einer dunklen Fläche (Kontakt, 404): nahtloser Übergang mit Trennlinie */
.site-footer-joined { padding-top: 0; }
.site-footer-joined .footer-top { padding-top: clamp(3rem, 6vw, 4.5rem); border-top: 1px solid var(--on-dark-line); }
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 3rem 2.5rem;
  padding-bottom: clamp(3rem, 6vw, 4.5rem);
  border-bottom: 1px solid var(--on-dark-line);
}
.footer-brand .logo { color: #fff; }
.footer-brand p { max-width: 22rem; margin: 1.5rem 0; }
/* Schwarzes JPG-Logo auf dunklem Grund: invertieren und Weiß ausblenden */
.footer-brand .dez {
  width: 170px;
  filter: invert(1) grayscale(1);
  mix-blend-mode: screen;
  opacity: .75;
}
.footer-title {
  margin: 0 0 1.25rem;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.footer-col a { transition: color .2s; }
.footer-col a:hover { color: var(--brand); }
.footer-col address { line-height: 1.75; }
.footer-col address a { color: #fff; }
.footer-col address a:hover { color: var(--brand); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding: 1.75rem 0;
  font-size: .875rem;
}
.footer-bottom p { margin: 0; }

.footer-wordmark {
  margin: 0 0 -.12em;
  padding: 0 var(--gutter);
  font-size: clamp(4.5rem, 1rem + 19vw, 19rem);
  font-weight: 800;
  line-height: .8;
  letter-spacing: -.06em;
  text-align: center;
  color: rgba(255, 255, 255, .05);
  user-select: none;
}

/* ---------- Nach oben ---------- */

.toplink {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 99;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--brand);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .16), 0 10px 30px -8px rgba(13, 18, 15, .45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(1rem);
  transition: opacity .3s, transform .3s var(--ease), visibility 0s .3s, background .2s;
}
.toplink.visible { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .3s var(--ease), background .2s; }
.toplink:hover { background: var(--ink-3); }

/* ---------- Einblenden beim Scrollen (main.js) ---------- */

.reveal-pending { opacity: 0; transform: translateY(28px); }
.reveal-in {
  transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 1024px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-card:last-child { grid-column: 1 / -1; flex-direction: row; }
  .service-card:last-child .service-media { flex: 0 0 46%; aspect-ratio: auto; margin: .5rem; }
  .service-card:last-child .service-body { padding: 2rem 2rem 2rem 1.25rem; }
}

@media (max-width: 960px) {
  :root { --header-h: 72px; }

  .nav-toggle { display: inline-flex; }
  .nav ul {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: calc(var(--header-h) + 1.5rem) var(--gutter) 2rem;
    overflow-y: auto;
    background: var(--ink);
    color: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity .3s, transform .35s var(--ease), visibility 0s .35s;
  }
  .nav-open .nav ul {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s, transform .35s var(--ease);
  }
  .nav a:not(.btn) {
    padding: 1.1rem 0;
    border-bottom: 1px solid var(--on-dark-line);
    border-radius: 0;
    font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
    font-weight: 700;
    letter-spacing: -.02em;
    opacity: 1;
  }
  .nav a:not(.btn):hover,
  .nav a:not(.btn).active,
  .has-hero .site-header:not(.is-scrolled) .nav a:not(.btn):hover,
  .has-hero .site-header:not(.is-scrolled) .nav a:not(.btn).active { background: none; color: var(--brand); }
  .nav .nav-cta { margin: 2rem 0 0; }
  .nav .nav-cta .btn { width: 100%; min-height: 3.5rem; font-size: 1.05rem; }

  .nav-open { overflow: hidden; }
  .nav-open .site-header { color: #fff; }
  .nav-open .site-header::before { opacity: 0; }

  .section-head,
  .about,
  .contact,
  .cta-band-inner { grid-template-columns: minmax(0, 1fr); }
  .refs-controls { justify-self: start; }

  .hero-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-facts li:nth-child(3) { border-left: 0; }
  .hero-facts li:nth-child(n + 3) { border-top: 1px solid rgba(255, 255, 255, .14); }

  .legal-layout { grid-template-columns: minmax(0, 1fr); }
  .toc {
    position: static;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--surface);
  }
  .toc ol { columns: 2; column-gap: 1.5rem; }
  .toc a { break-inside: avoid; }
}

@media (max-width: 640px) {
  :root { --radius-lg: 22px; }

  h1, h2, h3 { -webkit-hyphens: auto; hyphens: auto; }

  .logo img { width: 40px; }
  .logo-text { font-size: .75rem; }

  .hero-inner { padding-top: calc(var(--header-h) + 2rem); }
  .hero-actions .btn { flex: 1 1 100%; justify-content: space-between; }
  .hero-facts li { padding: 1rem 1.1rem; }
  .fact-label { font-size: .6875rem; }
  .fact-value { font-size: .975rem; }

  .features,
  .services,
  .info-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-icon { margin-bottom: 1.5rem; }
  .service-card:last-child { flex-direction: column; }
  .service-card:last-child .service-media { flex: none; aspect-ratio: 16 / 10; margin: .5rem .5rem 0; }
  .service-card:last-child .service-body { padding: 1.75rem 1.75rem 2rem; }

  .cta-band-action { display: flex; }
  .cta-band-action .btn { align-self: stretch; justify-content: space-between; }

  .contact-card { padding: 1rem 1.1rem; gap: 1rem; }
  .contact-icon { width: 2.75rem; height: 2.75rem; }
  .contact-arrow { display: none; }

  .toc ol { columns: 1; }

  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}

@media print {
  .site-header, .toplink, .consent-banner, .skip-link, .refs-controls, .gallery-progress, .footer-wordmark, .toc { display: none !important; }
  .hero, .page-hero, .section-dark, .site-footer { background: none; color: #000; }
  .hero-media { display: none; }
  .hero .lead, .page-hero .lead { color: #000; }
  .gallery { flex-wrap: wrap; overflow: visible; }
}

/* ---------- Cookie-/Einwilligungs-Banner (consent.js) ---------- */

.consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 200;
  max-width: 62rem;
  margin: 0 auto;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 70px -18px rgba(13, 18, 15, .4);
  animation: consentIn .5s var(--ease) both;
}
@keyframes consentIn { from { opacity: 0; transform: translateY(calc(100% + 1rem)); } to { opacity: 1; transform: none; } }
.consent-inner { display: flex; align-items: center; gap: 1.25rem 2rem; }
.consent-body { flex: 1 1 auto; }
.consent-title { margin: 0 0 .35rem; font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; }
.consent-text { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--muted); }
.consent-text a,
.consent-dialog a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

.consent-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; flex: 0 0 auto; }
.consent-btn {
  padding: .85rem 1.3rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.consent-btn:hover { background: var(--ink-3); border-color: var(--ink-3); }
.consent-link {
  padding: .85rem .75rem;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.consent-link:hover { color: var(--brand-strong); }

/* Einstellungs-Dialog */
.consent-dialog {
  width: min(640px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 2.25rem;
  overflow-y: auto;
  border: 0;
  border-radius: var(--radius-lg);
  background: #fff;
  color: var(--text);
  font: 1rem/1.6 var(--font);
  box-shadow: 0 40px 80px -20px rgba(13, 18, 15, .45);
}
.consent-dialog::backdrop {
  background: rgba(13, 18, 15, .5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.consent-dialog h2 { margin: 0 0 1rem; padding-right: 2.5rem; font-size: 1.6rem; }
.consent-dialog p { margin: 0 0 1rem; }
.consent-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s;
}
.consent-close:hover { background: var(--line); }
.consent-categories { list-style: none; margin: 0 0 1rem; padding: 0; }
.consent-categories li { padding: 1rem 0 0; border-top: 1px solid var(--line); }
.consent-categories li p { margin: .5rem 0 1rem 3.75rem; font-size: .9rem; line-height: 1.55; color: var(--muted); }
.consent-categories .consent-services { color: var(--muted); }
.consent-note { font-size: .9rem; color: var(--muted); }
.consent-dialog .consent-actions { margin-top: 1.5rem; }

/* Schalter */
.consent-switch { display: flex; align-items: center; gap: 1rem; font-weight: 700; cursor: pointer; }
.consent-switch input {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 1.5rem;
  margin: 0;
  border-radius: .75rem;
  background: #c3c9c4;
  cursor: pointer;
  transition: background .2s;
}
.consent-switch input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(1.5rem - 6px);
  height: calc(1.5rem - 6px);
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
}
.consent-switch input:checked { background: var(--brand-strong); }
.consent-switch input:checked::before { transform: translateX(1.25rem); }
.consent-switch input:disabled { cursor: not-allowed; opacity: .7; }

/* Platzhalter für blockierte Inhalte */
.consent-placeholder {
  padding: 2rem;
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.consent-placeholder p { margin: 0 0 1rem; }

@media (max-width: 960px) {
  .consent-inner { flex-direction: column; align-items: stretch; }
  .consent-actions .consent-btn { flex: 1 1 auto; }
}
@media (max-width: 640px) {
  .consent-banner { left: .5rem; right: .5rem; bottom: calc(.5rem + env(safe-area-inset-bottom, 0px)); padding: 1.1rem; }
  .consent-inner { gap: 1rem; }
  .consent-title { font-size: 1rem; }
  .consent-text { font-size: .85rem; }
  .consent-actions .consent-btn { flex: 1 1 0; padding: .8rem .5rem; }
  .consent-actions .consent-link { flex-basis: 100%; padding: .4rem 0 0; text-align: center; }
  .consent-dialog { padding: 1.5rem; }
  .consent-categories li p { margin-left: 0; }
}
