@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --putz: #f1f2ef;
  --anthrazit: #1f2326;
  --schnur: #2747d8;
  --schnur-hell: #9fb0ff;
  --moertel: #575d63;
  --fuge: #d6d9d5;
  --rand: clamp(1.25rem, 4vw, 3rem);
  /* Seitenrand, der den Inhalt auf max. 76rem begrenzt */
  --seite: max(var(--rand), calc((100% - 76rem) / 2));
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: none; text-size-adjust: none; }
html:focus-within { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:focus-within { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--anthrazit);
  background: var(--putz);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 0.08em; }
:focus-visible { outline: 3px solid var(--schnur); outline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

.springen {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--putz); color: var(--anthrazit); padding: 0.6rem 1rem; font-weight: 600;
}
.springen:focus { top: 1rem; }

/* ---------- Kopf + Navigation (Popover, schmal / inline, breit) ---------- */
.kopf { position: relative; z-index: 5; color: var(--anthrazit); border-bottom: 1px solid var(--fuge); background: var(--putz); }
.kopf-innen {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1rem var(--seite);
}
.kopf-innen > * { flex-shrink: 0; white-space: nowrap; }
.marke {
  font-weight: 800; font-stretch: 125%; font-size: 1.125rem; text-decoration: none; letter-spacing: -0.01em;
}
.menue-knopf {
  anchor-name: --menue-knopf;
  font: inherit; font-weight: 600; color: inherit; background: none;
  border: 2px solid currentColor; padding: 0.45rem 1rem; cursor: pointer; min-height: 44px;
}
.menue {
  position: fixed;
  inset: auto;
  inset-block-start: 4.5rem;
  inset-block-start: anchor(--menue-knopf bottom);
  inset-inline-end: var(--rand);
  inline-size: min(80dvw, 22rem);
  max-block-size: calc(100dvh - 6rem);
  margin: 0.5rem 0 0; padding: 0.75rem;
  overflow: auto; list-style: none;
  background: var(--anthrazit); color: #fff; border: 0;
}
.menue a {
  display: block; padding: 0.75rem 0.5rem; text-decoration: none; font-weight: 600;
}
.menue a:hover { text-decoration: underline; }
.menue :focus-visible { outline-color: #fff; }
.menue .tel { color: var(--schnur-hell); }
[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 3px; text-decoration-color: var(--schnur); }

.kopf.is-wide .menue-knopf { display: none; }
.kopf.is-wide .menue {
  position: static; display: flex; align-items: center; gap: 0.25rem;
  inline-size: auto; max-block-size: none; overflow: visible;
  margin: 0; padding: 0; background: transparent; color: inherit;
}
.kopf.is-wide .menue a { padding: 0.5rem 0.75rem; }
.kopf.is-wide .menue :focus-visible { outline-color: var(--schnur); }
.kopf.is-wide .menue .tel {
  color: inherit; border: 2px solid currentColor; margin-inline-start: 0.5rem;
}
.kopf.is-measuring * { transition: none !important; }

/* ---------- Hero: Name + Schnur links, Foto rechts ---------- */
.hero {
  display: grid; gap: 2rem 4rem; align-items: center;
  padding: clamp(2.5rem, 7vh, 5rem) var(--seite) clamp(3rem, 8vh, 5.5rem);
}
.hero h1 {
  font-size: clamp(2.75rem, 6.5vw, 5rem);
  font-weight: 800; font-stretch: 125%;
  line-height: 0.92; letter-spacing: -0.03em;
}
.schnur {
  display: block; width: 100%; height: 14px; margin-block: 1.25rem 1.5rem;
  color: var(--schnur);
}
@media (prefers-reduced-motion: no-preference) {
  .hero .schnur { animation: schnappen 0.9s 0.35s both; }
}
@keyframes schnappen {
  0%   { clip-path: inset(0 100% 0 0); translate: 0 0; animation-timing-function: cubic-bezier(.6,0,.4,1); }
  40%  { clip-path: inset(0 0 0 0); translate: 0 -7px; animation-timing-function: ease-out; }
  55%  { translate: 0 5px; }
  70%  { translate: 0 -2px; }
  85%  { translate: 0 1px; }
  100% { clip-path: inset(0 0 0 0); translate: 0 0; }
}
.hero-text p {
  font-size: clamp(1.125rem, 1.8vw, 1.375rem); font-weight: 500; line-height: 1.35; color: var(--moertel);
  margin-bottom: 1.75rem;
}
.hero-bild { margin: 0; }
.hero-bild img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: 60% 40%; }
@media (min-width: 60rem) {
  .hero { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
  .hero-bild img { aspect-ratio: 4 / 3; max-height: 60svh; }
}

.knoepfe { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.knopf {
  display: inline-flex; align-items: center; min-height: 48px;
  padding: 0.7rem 1.25rem; font-weight: 700; font-size: 1rem; text-decoration: none;
  background: var(--schnur); color: #fff; border: 2px solid var(--schnur);
  transition: background-color 0.2s, color 0.2s;
}
.knopf:hover { background: #1c37b3; border-color: #1c37b3; }
.knopf.rahmen { background: transparent; color: var(--anthrazit); border-color: currentColor; }
.knopf.rahmen:hover { background: var(--anthrazit); color: #fff; border-color: var(--anthrazit); }

figcaption {
  font-size: 0.8125rem; color: var(--moertel); padding-top: 0.5rem;
}

/* ---------- Leistungen: Bühne + Liste ---------- */
.leistungen { padding: clamp(3.5rem, 9vh, 6rem) var(--seite); border-top: 1px solid var(--fuge); }
.leistungen-kopf {
  padding-bottom: clamp(1.5rem, 4vh, 2.5rem);
  display: grid; gap: 1rem;
}
.leistungen-kopf h2, .anfahrt h2, .kontakt h2 {
  font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 800; font-stretch: 125%; letter-spacing: -0.03em;
}
.leistungen-kopf p { max-width: 34ch; color: var(--moertel); }

.gewerke { display: grid; }
.buehne { display: none; }
.liste { list-style: none; margin: 0; padding: 0; }
.gewerk { border-top: 1px solid var(--fuge); padding-block: 1.5rem 2rem; }
.gewerk figure { margin: 0 0 1.25rem; }
.gewerk figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gewerk h3 {
  font-size: clamp(1.5rem, 5vw, 2.25rem); font-weight: 750; font-stretch: 112%; letter-spacing: -0.02em; line-height: 1.05;
  hyphens: auto;
}
.gewerk a.anfrage {
  display: inline-block; margin-top: 0.75rem; font-weight: 600; color: var(--schnur);
  padding-block: 0.5rem;
}

@media (min-width: 48rem) and (max-width: 59.99rem) {
  .hero-bild img { aspect-ratio: 16 / 9; }
  .gewerk { display: grid; grid-template-columns: 16rem 1fr; gap: 2rem; align-items: center; }
  .gewerk figure { margin: 0; }
}

@media (min-width: 60rem) {
  .gewerke { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
  .buehne {
    display: block; position: sticky; top: max(2rem, calc(50svh - 17rem)); height: min(34rem, 75svh);
    overflow: hidden; background: var(--anthrazit);
  }
  .buehne figure { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 0.5s; }
  .buehne figure:first-child, .buehne figure[data-aktiv] { opacity: 1; }
  .buehne img { width: 100%; height: 100%; object-fit: cover; }
  .buehne figcaption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 0.3rem 0.6rem;
    background: rgb(20 22 24 / 0.8); color: #fff;
  }
  .gewerk { min-height: min(24rem, 45svh); display: flex; align-items: center; padding-block: 2.5rem; }
  .gewerk figure { display: none; }
  .gewerk h3 { font-size: clamp(1.75rem, 2.8vw, 2.5rem); }

  @supports ((animation-timeline: view()) and (animation-range: 0% 100%)) {
    html { timeline-scope: --g2, --g3, --g4, --g5; }
    .liste > li:nth-child(2) { view-timeline: --g2 block; }
    .liste > li:nth-child(3) { view-timeline: --g3 block; }
    .liste > li:nth-child(4) { view-timeline: --g4 block; }
    .liste > li:nth-child(5) { view-timeline: --g5 block; }
    .buehne figure:not(:first-child) {
      transition: none;
      animation: aufblenden linear both;
      animation-range: cover 30% cover 45%;
    }
    .buehne figure:nth-child(2) { animation-timeline: --g2; }
    .buehne figure:nth-child(3) { animation-timeline: --g3; }
    .buehne figure:nth-child(4) { animation-timeline: --g4; }
    .buehne figure:nth-child(5) { animation-timeline: --g5; }
  }
}
@keyframes aufblenden { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Kontakt (blaue Tafel innerhalb der Seitenbreite) ---------- */
.kontakt { padding: 0 var(--seite) clamp(3.5rem, 9vh, 6rem); }
.kontakt-raster {
  display: grid; gap: 2rem 4rem;
  background: var(--schnur); color: #fff;
  padding: clamp(1.75rem, 5vw, 3.5rem);
}
.kontakt .einladung { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.5; max-width: 40ch; margin-top: 1.25rem; }
.wege { list-style: none; margin: 0; padding: 0; display: grid; align-content: start; }
.wege li { border-top: 1px solid rgb(255 255 255 / 0.5); padding-block: 0.75rem 0.9rem; }
.wege li:last-child { border-bottom: 1px solid rgb(255 255 255 / 0.5); }
.wege span { display: block; font-size: 0.9375rem; color: #e6eaff; }
.wege a {
  display: inline-block; font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 700; font-stretch: 112%;
  letter-spacing: -0.01em; text-decoration: none; overflow-wrap: anywhere; line-height: 1.2; padding-block: 0.15rem;
}
.wege a:hover { text-decoration: underline; }
.kontakt :focus-visible { outline-color: #fff; }
@media (min-width: 60rem) { .kontakt-raster { grid-template-columns: 1fr 1fr; } }

/* ---------- Anfahrt ---------- */
.anfahrt {
  display: grid; gap: 2rem 4rem; align-items: center;
  padding: clamp(3.5rem, 9vh, 6rem) var(--seite); border-top: 1px solid var(--fuge);
}
.anfahrt figure { margin: 0; }
.anfahrt figure img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.anfahrt address { font-style: normal; font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.35; margin: 1.25rem 0 1.5rem; }
@media (min-width: 60rem) { .anfahrt { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }

/* ---------- Fuß ---------- */
.fuss {
  background: var(--anthrazit); color: #fff;
  padding: 2.5rem var(--seite);
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center;
}
.fuss nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.5rem 1.5rem; flex-wrap: wrap; }
.fuss a { display: inline-block; padding-block: 0.5rem; }
.fuss small { font-size: 0.9375rem; color: #c9cdd0; }
.fuss :focus-visible { outline-color: var(--schnur-hell); }

/* ---------- Rechtstexte ---------- */
.recht { padding: clamp(3rem, 8vh, 5rem) var(--seite) 5rem; }
.recht > * { max-width: 46rem; }
.recht h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); font-weight: 800; font-stretch: 125%; letter-spacing: -0.03em; margin-bottom: 2rem; }
.recht h2 { font-size: 1.5rem; font-weight: 700; margin: 2.5rem 0 0.75rem; }
.recht p, .recht ul { margin: 0 0 1rem; }
.recht ul { padding-left: 1.25rem; }
.recht a { color: var(--schnur); overflow-wrap: anywhere; }
.recht .schnur { color: var(--schnur); margin: 0 0 2rem; }

@media (forced-colors: active) {
  .knopf, .menue-knopf { border: 2px solid ButtonText; }
  [aria-current="page"] { text-decoration-color: LinkText; }
}
