/*
 * Jonas Stolzenburg Baukonzept – Stylesheet
 *
 *  1. Schriften            8. Bilder & Kennzeichnung
 *  2. Tokens               9. Startseite
 *  3. Grundlagen          10. Kontaktdaten & Formular
 *  4. Hilfsklassen        11. Unterseiten
 *  5. Dunkle Flächen      12. Fußbereich & Kontaktleiste
 *  6. Buttons & Links     13. Bewegung
 *  7. Kopfbereich         14. Hoher Kontrast, 15. Druck
 *
 * - Schriftpfade sind logisch (/assets/fonts/…); der Build hängt den Hash an und
 *   lädt die erste Schrift vor.
 * - Menü-Breakpoint 64em = MENU_BREAKPOINT in generator/layout.py.
 * - Farben kommen aus Kontext-Variablen (--fg, --accent …); dunkle Flächen
 *   (Abschnitt 5) stellen nur diese Werte um.
 */

/* ======== 1. Schriften */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-400.c4d09609.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-500.27169104.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-600.7d2c457c.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* ======== 2. Tokens */

:root {
  /* Palette */
  --c-ink-900: #16181c;
  --c-ink-800: #1f2227;
  --c-ink-700: #2b2f36;
  --c-paper: #f6f4ef;
  --c-white: #fff;
  --c-text: #1c1e22;
  --c-muted: #5a5f68;
  --c-line: #e4dfd5;
  --c-line-strong: #cfc8ba;
  --c-field: #858a93; /* Feldrahmen, 3,4:1 auf Weiß */
  --c-gold: #c9a55c; /* Akzent auf dunklem Grund */
  --c-gold-light: #d9bd80;
  --c-gold-text: #80622a; /* Text/Links auf hellem Grund, ≥ 4,5:1 */
  --c-gold-tint: #f2ead9;
  --c-star: #b38a3a;
  --c-on-dark: #f4f2ed;
  --c-on-dark-muted: #b8bcc3;
  --c-error: #a3261b;
  --c-error-bg: #fbeeec;
  --c-success: #1d5e3b;
  --c-success-bg: #edf6f0;
  --c-notice-bg: #fff5dc;
  --c-notice-line: #e2bf62;
  --c-todo: #ffe066;

  /* Kontext: heller Grund (dunkle Flächen überschreiben, siehe 5.) */
  --fg: var(--c-text);
  --fg-muted: var(--c-muted);
  --accent: var(--c-gold-text);
  --line: var(--c-line);
  --focus: var(--c-gold-text);
  --btn-bg: var(--c-ink-900);
  --btn-fg: var(--c-white);
  --btn-hover: var(--c-ink-700);
  --btn-icon: var(--c-gold);

  /* Schrift: fließende Größen */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: clamp(1.0625rem, 1.02rem + 0.15vw, 1.125rem);
  --fs-lead: clamp(1.125rem, 1.04rem + 0.4vw, 1.3125rem);
  --fs-h3: clamp(1.1875rem, 1.1rem + 0.35vw, 1.375rem);
  --fs-h2: clamp(1.875rem, 1.4rem + 2vw, 3rem);
  --fs-h1: clamp(2.125rem, 1.5rem + 2.8vw, 3.625rem);
  --fs-display: clamp(2.5rem, 1.45rem + 4.6vw, 4.75rem);

  /* Raster & Abstände */
  --container: 1240px;
  --gutter: clamp(1rem, 3.5vw, 2.5rem);
  --section: clamp(4rem, 2.6rem + 5.5vw, 7.5rem);
  --gap: clamp(1.25rem, 0.9rem + 1.5vw, 2rem);
  --header-h: 4.25rem;
  --contact-bar-h: 4.125rem; /* feste Kontaktleiste unten (schmale Ansicht), ohne Safe Area */

  /* Formen */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgb(22 24 28 / 0.05), 0 4px 12px -4px rgb(22 24 28 / 0.08);
  --shadow: 0 2px 4px rgb(22 24 28 / 0.04), 0 18px 40px -16px rgb(22 24 28 / 0.2);
  --shadow-lg: 0 30px 70px -28px rgb(22 24 28 / 0.45);
  --glow: rgb(201 165 92 / 0.15);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: light;
}

/* ======== 3. Grundlagen */

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--fg);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
  /* Sicherheitsnetz: lange Wörter („Datenschutzerklärung“) nie breiter als der Bildschirm */
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--fs-h1);
}

/* Schmale Bildschirme: lange Wörter in Seitentiteln trennen (html lang="de");
   kurze Wörter bleiben ganz */
@media (max-width: 29.99em) {
  h1 {
    -webkit-hyphens: auto;
    hyphens: auto;
    hyphenate-limit-chars: 12 5 5;
  }
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
}

/* *Betonung* aus den Inhaltsdateien: Akzentfarbe statt Kursivschrift */
:is(h1, h2, h3) em {
  font-style: normal;
  color: var(--accent);
}

p,
ul,
ol,
dl,
figure,
blockquote,
address {
  margin: 0;
}

/* Listen mit Klasse sind Layout-Listen; Listen im Fließtext behalten Punkte.
   :where() hält die Spezifität bei 0, damit Innenabstände der Bausteine greifen. */
:where(ul[class], ol[class]) {
  padding: 0;
  list-style: none;
}

p {
  text-wrap: pretty;
}

address {
  font-style: normal;
}

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

img {
  height: auto;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

main:focus {
  outline: none;
}

/* ======== 4. Hilfsklassen */

.visually-hidden,
.hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  border-radius: var(--r-sm);
  background: var(--c-gold);
  color: var(--c-ink-900);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
  outline-color: var(--c-white);
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

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

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

/* Kleine Symbole in Buttons, Links und Leisten */
.button__icon,
.text-link__icon,
.service-card__more .icon,
.phone-link__icon,
.email-link__icon,
.trust__stars .icon,
.contact-bar__icon {
  width: 1.125rem;
  height: 1.125rem;
}

/* Wiederkehrende Anordnungen */
.site-header__inner,
.site-nav__list,
.site-nav__contact,
.hero__actions,
.hero__personal,
.repair__actions,
.testimonial__rating,
.breadcrumbs__list,
.breadcrumbs__item,
.page-hero__actions,
.project-facts,
.status-page__contact,
.status-page__actions,
.not-found__actions,
.site-footer__bottom-inner,
.site-footer__legal-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.button,
.text-link,
.phone-link,
.email-link,
.brand,
.menu-button,
.service-card__more,
.breadcrumbs__link,
.site-footer__link {
  display: inline-flex;
  align-items: center;
}

/* Überzeile mit kurzer Linie */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 1.75rem;
  height: 1px;
  background: currentColor;
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 2rem + 2vw, 3.75rem);
}

/* Einleitende Absätze */
.section-head__text,
.hero__text,
.repair__text,
.contact__text,
.page-intro__lead,
.page-hero__lead {
  margin-top: 1.25rem;
  color: var(--fg-muted);
  font-size: var(--fs-lead);
  line-height: 1.6;
}

/* Runde Symbol-Plaketten (Häkchen, Vorteile, Telefon …) */
.check-list__icon,
.trust__icon,
.benefit__icon,
.related__icon,
.phone-link--large .phone-link__icon {
  flex: none;
  border-radius: 50%;
  background: var(--c-gold-tint);
  color: var(--c-gold-text);
}

.check-list {
  display: grid;
  gap: 0.875rem;
}

.check-list__item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.check-list__icon {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0.3rem;
  stroke-width: 2.25;
}

/* Fehlende Pflichtangaben: auffällig markiert */
mark.todo {
  padding: 0.05em 0.35em;
  border-radius: 4px;
  background: var(--c-todo);
  color: var(--c-text);
  outline: 2px dashed #a07800;
  outline-offset: 1px;
  font-weight: 500;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

mark.todo::before {
  content: "⚠ ";
}

/* ======== 5. Dunkle Flächen */

.site-header,
.hero,
.page-intro:not(.page-intro--status, .page-intro--error),
.page-hero,
.repair__inner,
.testimonial,
.cta-band__inner,
.site-footer,
.contact-bar {
  --fg: var(--c-on-dark);
  --fg-muted: var(--c-on-dark-muted);
  --accent: var(--c-gold);
  --line: rgb(255 255 255 / 0.13);
  --focus: var(--c-gold);
  --btn-bg: var(--c-gold);
  --btn-fg: var(--c-ink-900);
  --btn-hover: var(--c-gold-light);
  --btn-icon: currentColor;
  color: var(--fg);
  background-color: var(--c-ink-900);
}

/* Dezenter Goldschimmer in einer Ecke */
.page-intro,
.page-hero,
.repair__inner,
.testimonial,
.cta-band__inner {
  background-image: radial-gradient(ellipse 60% 90% at 100% 0%, var(--glow), transparent 70%);
}

/* ======== 6. Buttons & Links */

.button {
  justify-content: center;
  gap: 0.625rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.button--primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}

.button--primary:hover {
  background: var(--btn-hover);
}

.button--secondary {
  border-color: color-mix(in srgb, var(--fg) 35%, transparent);
  background: transparent;
  color: var(--fg);
}

.button--secondary:hover {
  border-color: var(--fg);
  background: color-mix(in srgb, var(--fg) 7%, transparent);
}

.button__icon {
  color: var(--btn-icon);
}

.button--secondary .button__icon {
  color: var(--accent);
}

/* aria-disabled: bleibt fokussierbar (Formular „nicht verfügbar“, contact.js) */
.button:disabled,
.button[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.text-link {
  gap: 0.5rem;
  min-height: 2.75rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.text-link__label {
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.3em;
}

.text-link:hover .text-link__label {
  text-decoration-color: currentColor;
}


/* Pfeile rücken beim Überfahren ein Stück nach rechts */
.button__icon,
.text-link__icon,
.service-card__more .icon,
.related__icon {
  transition: transform 0.2s var(--ease);
}

:is(.button, .text-link, .service-card, .related__link):hover :is(.button__icon, .text-link__icon, .icon--arrow-right) {
  transform: translateX(3px);
}

.phone-link,
.email-link {
  gap: 0.5rem;
  color: var(--fg);
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.phone-link:hover .phone-link__number,
.email-link:hover .email-link__address {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.phone-link__icon,
.email-link__icon {
  color: var(--accent);
}

.phone-link__label {
  color: var(--fg-muted);
  font-weight: 400;
}

.phone-link__number {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.phone-link--large {
  gap: 0.75rem;
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.phone-link--large .phone-link__icon {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.7rem;
}

/* ======== 7. Kopfbereich & Navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background-color: rgb(22 24 28 / 0.9);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
}

.site-header__inner {
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  min-height: var(--header-h);
  padding-block: 0.5rem;
}

.brand {
  gap: 0.75rem;
  min-height: 2.75rem;
  color: var(--fg);
  text-decoration: none;
}

.brand__mark {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
}

.brand__logo {
  display: block;
  width: 100%;
  height: 100%;
}

.brand__shine {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 39%, rgba(255, 239, 188, 0.35) 45%, #fffdf4 50%, rgba(255, 239, 188, 0.35) 55%, transparent 61%);
  background-size: 280% 100%;
  background-repeat: no-repeat;
  background-position: 150% 0;
  -webkit-mask: url("/assets/brand/logo-192.9a486800.webp") center / contain no-repeat;
  mask: url("/assets/brand/logo-192.9a486800.webp") center / contain no-repeat;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}

.brand__name {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand__suffix {
  color: var(--fg-muted);
  font-size: var(--fs-xs);
}

.menu-button {
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
}

.menu-button__icon--close,
.site-header.is-menu-open .menu-button__icon--open {
  display: none;
}

.site-header.is-menu-open .menu-button__icon--close {
  display: block;
}

/* Ohne JavaScript: Navigation als umbrechende Zeile unter dem Logo */
.site-nav {
  flex-basis: 100%;
  padding-bottom: 0.5rem;
}

.site-nav__list,
.site-nav__contact {
  gap: 0.25rem 1.25rem;
}

.site-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--fg-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}

.site-nav__link:hover,
.site-nav__link[aria-current] {
  color: var(--fg);
}

/* Markierung der aktuellen Seite */
.site-nav__link[aria-current]::after {
  content: "";
  position: absolute;
  inset: auto 0 0.45rem;
  height: 2px;
  border-radius: 2px;
  background: var(--c-gold);
}

.site-header__phone,
.site-header__cta {
  min-height: 2.75rem;
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.site-header__cta {
  padding: 0.5rem 1.25rem;
}

/* Sehr schmale Geräte (< 360px): Menü-Button nur mit Symbol – die Beschriftung
   bleibt für Screenreader erhalten –, damit der Kopfbereich einzeilig bleibt
   und --header-h stimmt. */
@media not all and (min-width: 22.5em) {
  .brand {
    gap: 0.5rem;
  }

  .brand__name {
    font-size: 1rem;
  }

  .menu-button {
    padding-inline: 0.75rem;
  }

  .menu-button__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

/* Schmale Ansicht. Ohne JavaScript ist der Kopfbereich mit der ausgeklappten
   Navigation mehrere Zeilen hoch: dann nicht fixieren, sonst verdeckt er
   Sprungziele und fokussierte Elemente. scroll-padding-top bleibt trotzdem:
   main.js setzt die Klasse „js“ unter Umständen erst nach dem Sprung zum #Ziel.
   Mit JavaScript: Menü-Panel. */
@media not all and (min-width: 64em) {
  html:not(.js) .site-header {
    position: relative;
  }

  /* Logo und Menü-Button passen so auch bei 360px in eine Zeile (--header-h) */
  .site-header__inner {
    column-gap: 1rem;
  }

  .js .site-nav {
    display: none;
  }

  .js .site-header.is-menu-open .site-nav {
    position: absolute;
    inset: 100% 0 auto;
    display: block;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    padding: 0.5rem var(--gutter) 1.5rem;
    border-bottom: 1px solid var(--line);
    background: var(--c-ink-900);
    /* Seite darunter abdunkeln (Schatten nur nach unten) */
    box-shadow: 0 0 0 100vmax rgb(22 24 28 / 0.6);
    clip-path: inset(0 -100vmax -100vmax);
    overscroll-behavior: contain;
  }

  .js .site-nav__list {
    display: block;
  }

  .js .site-nav__item + .site-nav__item {
    border-top: 1px solid var(--line);
  }

  .js .site-nav__link {
    min-height: 3.25rem;
    color: var(--fg);
    font-size: 1.125rem;
  }

  .js .site-nav__link[aria-current]::after {
    inset: 50% auto auto -0.875rem;
    width: 3px;
    height: 1.25rem;
    transform: translateY(-50%);
  }

  .js .site-nav__contact {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
  }

  .js .site-header__phone {
    font-size: 1.125rem;
  }

  .js .site-header__cta {
    min-height: 3rem;
    font-size: 1rem;
  }
}

@media (min-width: 64em) {
  :root {
    --header-h: 4.75rem;
  }

  .site-header__inner,
  .site-nav__list,
  .site-nav__contact {
    flex-wrap: nowrap;
  }

  .menu-button {
    display: none;
  }

  .site-nav,
  .js .site-nav {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 1.25rem;
    padding: 0;
  }

  .site-nav__contact {
    padding-left: 1.25rem;
    border-left: 1px solid var(--line);
  }
}

/* Mittlere Desktop-Breite: kompakter; Telefonnummer nur als Symbol
   (die Nummer bleibt für Screenreader lesbar) */
@media (min-width: 64em) and (max-width: 79.99em) {
  .site-header .container {
    width: min(100% - 3rem, var(--container));
  }

  .site-header__inner,
  .js .site-nav,
  .site-nav__list,
  .site-nav__contact {
    gap: 1rem;
  }

  .site-nav__link {
    font-size: 0.875rem;
  }

  .site-nav__contact {
    padding-left: 1rem;
  }

  .site-header__cta {
    padding-inline: 1rem;
  }

  .site-header__phone {
    justify-content: center;
    width: 2.75rem;
    border: 1px solid var(--line);
    border-radius: 50%;
  }

  .site-header__phone .phone-link__number {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

/* ======== 8. Bilder & Kennzeichnung */

.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--c-ink-800);
}

.media picture,
.media__img {
  width: 100%;
  height: 100%;
}

.media__img {
  object-fit: cover;
}

.img--focus-top { object-position: 50% 15%; }
.img--focus-bottom { object-position: 50% 85%; }
.img--focus-left { object-position: 15% 50%; }
.img--focus-right { object-position: 85% 50%; }
.img--focus-center { object-position: 50% 50%; }

/* „KI-Symbolbild“ / „Visualisierung“ */
.media__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  padding: 0.25rem 0.625rem;
  border-radius: var(--r-pill);
  background: rgb(22 24 28 / 0.78);
  color: var(--c-white);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  pointer-events: none;
}

/* Der Verlauf blendet nur im oberen Innenabstand (--caption-fade) aus; hinter
   dem Text liegt immer mindestens 75 % Anthrazit – auch über hellen Bildstellen. */
.media__caption {
  --caption-fade: 3rem;
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  display: grid;
  gap: 0.125rem;
  padding: var(--caption-fade) 1.25rem 1.125rem;
  background: linear-gradient(to top, rgb(22 24 28 / 0.9), rgb(22 24 28 / 0.75) calc(100% - var(--caption-fade)), transparent);
  color: var(--c-white);
  font-size: var(--fs-sm);
  line-height: 1.4;
}

.media__caption-title {
  font-size: 1.0625rem;
  font-weight: 600;
}

.media__caption-text {
  color: #dfe1e5;
}

/* ======== 9. Startseite */

/* ---------- Hero
 * Schmal: Bild oben, Text darunter auf Anthrazit (immer gut lesbar).
 * Ab 64em: Vollbild mit Verlauf, Text links darüber. */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero__media {
  height: clamp(15rem, 68vw, 30rem);
  border-radius: 0;
}

/* Unten fast deckend: dort liegt die Überzeile (.hero__inner rückt 3rem ins Bild) */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--c-ink-900), rgb(22 24 28 / 0.9) 4rem, rgb(22 24 28 / 0.25) 45%, transparent 70%);
}

.hero__media .media__badge {
  right: var(--gutter);
  left: auto;
}

.hero__inner {
  position: relative;
  margin-top: -3rem;
  padding-bottom: 3rem;
}

.hero__content {
  max-width: 44rem;
}

.hero__title {
  font-size: var(--fs-display);
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.hero__text {
  max-width: 36rem;
  color: #d5d8dd;
}

.hero__actions {
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero__personal {
  gap: 0.25rem 1.25rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--fg-muted);
  font-size: var(--fs-sm);
}

.hero__owner {
  color: var(--fg);
  font-weight: 500;
}

.hero__phone {
  min-height: 2.75rem;
}

@media (max-width: 39.99em) {
  .hero__eyebrow::before {
    display: none;
  }

  .hero__actions .button {
    flex: 1 1 100%;
  }
}

@media (min-width: 64em) {
  .hero {
    justify-content: center;
    min-height: min(calc(100vh - var(--header-h)), 58rem);
    min-height: min(calc(100svh - var(--header-h)), 58rem);
  }

  .hero__media {
    position: absolute;
    inset: 0;
    z-index: -1;
    height: auto;
  }

  .hero__media::after {
    background:
      linear-gradient(90deg, rgb(22 24 28 / 0.94), rgb(22 24 28 / 0.82) 34%, rgb(22 24 28 / 0.28) 64%, rgb(22 24 28 / 0.08)),
      linear-gradient(to top, rgb(22 24 28 / 0.7), transparent 30%);
  }

  .hero__media .media__badge {
    top: auto;
    bottom: 1.25rem;
  }

  .hero__inner {
    margin-top: 0;
    padding-block: clamp(4rem, 10vh, 7rem);
  }
}

/* Bis 80em reicht der Text weiter ins Bild (helle Fassade): Verlauf kräftiger */
@media (min-width: 64em) and (max-width: 79.99em) {
  .hero__media::after {
    background:
      linear-gradient(90deg, rgb(22 24 28 / 0.94), rgb(22 24 28 / 0.85) 50%, rgb(22 24 28 / 0.4) 72%, rgb(22 24 28 / 0.08)),
      linear-gradient(to top, rgb(22 24 28 / 0.7), transparent 30%);
  }
}

/* ---------- Vertrauensleiste */

.trust {
  border-bottom: 1px solid var(--line);
  background: var(--c-white);
}

.trust__list {
  display: grid;
}

.trust__item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 0;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.4;
}

.trust__item + .trust__item {
  border-top: 1px solid var(--line);
}

.trust__icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.55rem;
}

.trust__stars,
.testimonial__stars {
  display: flex;
  flex: none;
  gap: 1px;
  color: var(--c-star);
}


.trust__link {
  color: var(--fg);
  font-weight: 600;
}

.trust__notice {
  display: block;
  color: var(--fg-muted);
  font-size: var(--fs-xs);
  font-weight: 400;
}

@media (min-width: 40em) {
  .trust__list {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust__item {
    min-height: 5.5rem;
    padding: 1.125rem 1.25rem;
    border-left: 1px solid var(--line);
  }

  .trust__item + .trust__item {
    border-top: 0;
  }

  .trust__item:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .trust__item:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (min-width: 72em) {
  .trust__list {
    grid-template-columns: 1.35fr repeat(3, 1fr);
  }

  .trust__item:nth-child(n) {
    padding-left: 1.25rem;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .trust__item:first-child {
    padding-left: 0;
    border-left: 0;
  }
}

/* ---------- Karten: Leistungen und Projekte */

.service-grid,
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr));
  gap: var(--gap);
}

.project-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}

/* Vier Leistungen: 1, 2×2 oder 4 nebeneinander – nie 3 + 1 */
@media (min-width: 40em) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 72em) {
  .service-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.service-card,
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--c-white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s ease;
}

.service-card:hover,
.project-card:hover {
  border-color: var(--c-line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.service-card__media,
.project-card__media {
  aspect-ratio: 4 / 3;
  border-radius: 0;
}

.service-card .media__img,
.project-card .media__img,
.project-gallery__link .media__img {
  transition: transform 0.6s var(--ease);
}

.service-card:hover .media__img,
.project-card:hover .media__img,
.project-gallery__link:hover .media__img {
  transform: scale(1.04);
}

.service-card__body,
.project-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem 1.5rem 1.625rem;
}

.service-card__title {
  font-size: 1.375rem;
}

.project-card__title {
  font-size: 1.25rem;
}

/* Der Titel-Link deckt die ganze Karte ab */
.service-card__link,
.project-card__link {
  color: var(--fg);
  text-decoration: none;
}

.service-card__link::after,
.project-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* Fokus-Rahmen um die ganze Karte (ältere Browser: Rahmen um den Titel-Link) */
@supports selector(:has(*)) {
  .service-card__link:focus-visible,
  .project-card__link:focus-visible {
    outline: none;
  }

  .service-card:has(:focus-visible),
  .project-card:has(:focus-visible) {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
  }
}

.service-card__subtitle,
.project-card__meta {
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.service-card__subtitle {
  margin-top: -0.25rem;
}

.project-card__meta {
  order: -1;
  letter-spacing: 0.04em;
}

.service-card__text,
.project-card__text {
  color: var(--fg-muted);
  font-size: var(--fs-sm);
  line-height: 1.6;
}

.service-card__more {
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  color: var(--accent);
  font-size: var(--fs-sm);
  font-weight: 600;
}

/* ---------- Reparatur-Hervorhebung */

.services + .repair {
  padding-top: 0;
}

.repair__inner {
  display: grid;
  gap: 2.5rem;
  padding: clamp(2rem, 1.2rem + 4vw, 4.5rem);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.repair__text {
  max-width: 38rem;
  margin-bottom: 2rem;
}

.repair .check-list__icon {
  background: rgb(201 165 92 / 0.16);
  color: var(--c-gold);
}

.repair__aside {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: rgb(255 255 255 / 0.04);
}

.repair__note {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.5;
}

.repair__actions {
  gap: 0.5rem 1.5rem;
}

.repair__call {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.repair__call .phone-link,
.cta-band__call .phone-link {
  flex-wrap: wrap;
  min-height: 2.75rem;
}

@media (min-width: 60em) {
  .repair__inner {
    grid-template-columns: 1.35fr 1fr;
    align-items: center;
    gap: clamp(2.5rem, 5vw, 5rem);
  }
}

/* ---------- Über uns: Bild-Mosaik + Text */

.about,
.quality,
.overview,
.related,
.legal,
.project-detail {
  background: var(--c-white);
}

.about__inner,
.contact__inner {
  display: grid;
  gap: clamp(2.5rem, 5vw, 5rem);
}

.about__gallery {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: repeat(2, minmax(11rem, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
}

.about__figure--1 {
  grid-row: span 2;
}

.about__figure .media__img {
  position: absolute;
  inset: 0;
}

.about__lead {
  margin: 1.5rem 0 1.25rem;
  font-size: var(--fs-lead);
  font-weight: 500;
  line-height: 1.55;
}

.about__text {
  color: var(--fg-muted);
}

.about__text + .about__text {
  margin-top: 1rem;
}

.about__owner {
  display: grid;
  margin: 2rem 0 1rem;
  padding: 1rem 0 1rem 1.25rem;
  border-left: 3px solid var(--c-gold);
}

.about__owner-name {
  font-size: 1.125rem;
  font-weight: 600;
}

.about__owner-role {
  color: var(--fg-muted);
  font-size: var(--fs-sm);
}

@media (min-width: 60em) {
  .about__inner {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
  }

  .about__gallery {
    grid-template-rows: repeat(2, minmax(14rem, 1fr));
    min-height: 34rem;
  }
}

/* ---------- Ablauf */

/* Drei Schritte (wie die drei „Weiteren Leistungen“, siehe dort): untereinander,
   ab 48em nebeneinander – nie 2 + 1 */
.process-list {
  display: grid;
  gap: var(--gap);
}

@media (min-width: 48em) {
  .process-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.process-step {
  padding: clamp(1.75rem, 1.3rem + 1.5vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--c-white);
}

.process-step__number {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: var(--accent);
  font-size: 2.25rem;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.process-step__number::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.process-step__title {
  margin-bottom: 0.75rem;
}

.process-step__text,
.benefit__text {
  color: var(--fg-muted);
  font-size: var(--fs-sm);
}

/* Auf Leistungsseiten steht der Ablauf auf Weiß */
.main--service .process {
  background: var(--c-white);
}

.main--service .process-step {
  border-color: transparent;
  background: var(--c-paper);
}

/* ---------- Qualität */

.quality__inner {
  display: grid;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 2.25rem var(--gap);
}

.benefit {
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.benefit__icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.25rem;
  padding: 0.7rem;
  border-radius: 12px;
}

.benefit__title {
  margin-bottom: 0.5rem;
  font-size: 1.1875rem;
}

@media (min-width: 64em) {
  .quality__inner {
    grid-template-columns: 5fr 7fr;
    gap: clamp(3rem, 6vw, 6rem);
    align-items: start;
  }

  .quality .section-head {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
    margin-bottom: 0;
  }

  .benefit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Projekte: Teaser und Leerzustand */

.projects__more {
  margin-top: 2rem;
  text-align: center;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 1rem 3rem;
  padding: clamp(1.5rem, 0.8rem + 3.5vw, 4rem);
  border: 1.5px dashed var(--c-line-strong);
  border-radius: var(--r-lg);
  background: var(--c-white);
}

.empty-state .eyebrow {
  margin: 0;
}

.empty-state__title {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}

.empty-state__text {
  max-width: 34rem;
  color: var(--fg-muted);
}

@media (min-width: 56em) {
  .empty-state {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .empty-state > :last-child {
    grid-area: 1 / 2 / 4;
  }
}

/* ---------- Kundenstimme */

.testimonial__inner {
  display: grid;
  justify-items: center;
  max-width: 54rem;
  text-align: center;
}

.testimonial .eyebrow {
  justify-content: center;
}

.testimonial__title {
  color: var(--fg-muted);
  font-size: var(--fs-h3);
  font-weight: 500;
}

.testimonial__quote {
  margin-top: 2.25rem;
}

.testimonial__text {
  font-size: clamp(1.5rem, 1.1rem + 1.9vw, 2.5rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.testimonial__source {
  margin-top: 1.75rem;
  color: var(--fg-muted);
}

.testimonial__author {
  color: var(--fg);
  font-weight: 600;
}

.testimonial__rating {
  justify-content: center;
  gap: 0.25rem 0.75rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
}

.testimonial__stars {
  color: var(--c-gold);
}

.testimonial__notice {
  color: var(--fg-muted);
}

.testimonial__link {
  margin-top: 0.5rem;
}

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

.contact__text {
  margin-bottom: 2.5rem;
}

.contact__form,
.contact--page .contact__info {
  padding: clamp(1.25rem, 0.6rem + 3vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--c-white);
}

.contact__form {
  box-shadow: var(--shadow);
}

.contact__form-title {
  font-size: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
}

.contact__form-intro {
  margin: 0.75rem 0 2rem;
  color: var(--fg-muted);
  font-size: var(--fs-sm);
}

@media (min-width: 64em) {
  .contact__inner {
    grid-template-columns: 5fr 7fr;
    align-items: start;
  }

  .contact--page .contact__inner {
    grid-template-columns: 7fr 5fr;
  }

  .contact--page .contact__info {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
  }
}

/* ======== 10. Kontaktdaten & Formular */

.contact-details__group {
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
}

.contact-details__group:first-child {
  padding-top: 0;
  border-top: 0;
}

.contact-details__title {
  margin-bottom: 0.875rem;
  font-size: 1.125rem;
}

.contact-details__label {
  color: var(--fg-muted);
  font-size: var(--fs-sm);
}

.contact-details__item {
  margin-top: 0.5rem;
}

.contact-details .email-link {
  font-size: 1rem;
}

.opening-hours {
  display: grid;
  max-width: 26rem;
}

/* Tage und Zeit bleiben je in einer Zeile; wird es zu eng, rutscht die Zeit darunter */
.opening-hours__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.125rem 1rem;
  padding-block: 0.5rem;
  border-bottom: 1px dashed var(--line);
  font-size: var(--fs-sm);
}

.opening-hours__days {
  color: var(--fg-muted);
}

.opening-hours__days,
.opening-hours__time {
  white-space: nowrap;
}

.opening-hours__time {
  margin: 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.opening-hours__note {
  margin-top: 0.875rem;
  color: var(--fg-muted);
  font-size: var(--fs-xs);
}

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

.contact-form,
.form-row {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 40em) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-field {
  display: grid;
  align-content: start;
  gap: 0.4rem;
}

.form-field__label {
  font-size: var(--fs-sm);
  font-weight: 600;
}

.form-field__required {
  color: var(--c-error);
}

.form-field__input {
  width: 100%;
  min-height: 3.125rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--c-field);
  border-radius: var(--r-sm);
  background-color: var(--c-white);
  color: var(--c-text);
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field__input::placeholder {
  color: #6b7079; /* 4,98:1 auf Weiß */
  opacity: 1;
}

.form-field__input:hover {
  border-color: var(--c-text);
}

.form-field__input:focus {
  border-color: var(--c-ink-900);
  outline: none;
  box-shadow: 0 0 0 3px var(--c-white), 0 0 0 5px var(--c-gold-text);
}

textarea.form-field__input {
  min-height: 9.5rem;
  resize: vertical;
}

/* Auswahlfeld mit eigenem Pfeil (zwei Verläufe, keine Bilddatei nötig) */
select.form-field__input {
  padding-right: 2.75rem;
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--c-muted) 50%), linear-gradient(135deg, var(--c-muted) 50%, transparent 50%);
  background-position: calc(100% - 1.4rem) 50%, calc(100% - 1.05rem) 50%;
  background-size: 0.35rem 0.35rem;
  background-repeat: no-repeat;
  cursor: pointer;
}

.form-field__hint,
.form-note {
  color: var(--c-muted);
  font-size: var(--fs-xs);
}

.form-note a {
  color: var(--c-gold-text);
}

/* Ungültige Eingaben (aria-invalid setzt contact.js) */
.form-field__error {
  display: flex;
  gap: 0.4rem;
  color: var(--c-error);
  font-size: var(--fs-sm);
  font-weight: 500;
}

.form-field__error::before {
  content: "!";
  display: grid;
  place-items: center;
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.15rem;
  border-radius: 50%;
  background: var(--c-error);
  color: var(--c-white);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
}

.form-field__input[aria-invalid="true"] {
  border: 2px solid var(--c-error);
  background-color: #fffafa;
}

.form-field__input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px var(--c-white), 0 0 0 5px var(--c-error);
}

.contact-form__submit {
  width: 100%;
  min-height: 3.25rem;
}

@media (min-width: 40em) {
  .contact-form__submit {
    width: auto;
    min-width: 14rem;
  }
}

/* Wird gesendet: Ladekreis statt Pfeil */
.contact-form[aria-busy="true"] .contact-form__submit {
  cursor: progress;
}

.contact-form[aria-busy="true"] .button__icon {
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
}

.contact-form[aria-busy="true"] .button__icon * {
  display: none;
}

/* Statusmeldungen und Hinweis „nicht eingerichtet“ */
.form-status,
.form-unavailable {
  padding: 1rem 1.25rem;
  border: 1px solid var(--c-notice-line);
  border-left-width: 4px;
  border-radius: var(--r-sm);
  background: var(--c-notice-bg);
  color: var(--c-text);
  font-size: var(--fs-sm);
}

.form-status {
  font-weight: 500;
}

/* Leere Live-Region: unsichtbar, bleibt aber für Screenreader bereit (contact.js) */
.form-status:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
}

.form-status[data-state="success"] {
  border-color: var(--c-success);
  background: var(--c-success-bg);
  color: var(--c-success);
}

.form-status[data-state="error"] {
  border-color: var(--c-error);
  background: var(--c-error-bg);
  color: var(--c-error);
}

.form-unavailable a {
  color: var(--c-text);
  font-weight: 600;
}

/* ======== 11. Unterseiten */

/* ---------- Seitenkopf: Brotkrumen, Überzeile, h1, Einleitung */

.page-intro__inner {
  padding-block: clamp(2.5rem, 1.8rem + 3vw, 4.5rem) clamp(3rem, 2rem + 4vw, 5.5rem);
}

.page-intro__title,
.page-hero__title {
  max-width: 22ch;
}

.page-intro__lead,
.page-hero__lead {
  max-width: 44rem;
}

.breadcrumbs {
  margin-bottom: clamp(1.75rem, 1.5rem + 1.5vw, 2.75rem);
  font-size: var(--fs-sm);
}

.breadcrumbs__list,
.breadcrumbs__item {
  gap: 0.25rem 0.6rem;
}

/* Trenner als kleiner Winkel (reine Deko, wird nicht vorgelesen) */
.breadcrumbs__item + .breadcrumbs__item::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-top: 1.5px solid;
  border-right: 1.5px solid;
  color: var(--fg-muted);
  transform: rotate(45deg);
}

.breadcrumbs__link {
  min-height: 2rem;
  color: var(--fg-muted);
  text-decoration: none;
}

.breadcrumbs__link:hover {
  color: var(--fg);
  text-decoration: underline;
}

.breadcrumbs__current {
  font-weight: 500;
}

/* ---------- Leistungsseiten */

.page-hero__inner {
  padding-block: clamp(2rem, 1.5rem + 2vw, 3rem) clamp(3rem, 2rem + 4vw, 5.5rem);
}

.page-hero__grid,
.overview__inner,
.feature__inner {
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.page-hero__actions {
  gap: 1rem 1.75rem;
  margin-top: 2.25rem;
}

.page-hero__phone {
  min-height: 2.75rem;
}

.page-hero__media,
.feature__media {
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-lg);
}

.page-hero__media .media__caption {
  --caption-fade: 4rem;
}

.overview__inner {
  align-items: start;
}

.overview__content {
  margin-bottom: 0;
}

.overview__benefits {
  gap: 0;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-radius: var(--r-lg);
  background: var(--c-paper);
}

.overview__benefits .check-list__item {
  padding-block: 1rem;
  font-weight: 500;
}

.overview__benefits .check-list__item + .check-list__item {
  border-top: 1px solid var(--line);
}

.feature + .feature {
  padding-top: 0;
}

.feature__media {
  box-shadow: var(--shadow);
}

.feature__title {
  font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.5rem);
}

.feature__text {
  margin: 1.25rem 0 1.5rem;
  color: var(--fg-muted);
  line-height: 1.7;
}

@media (min-width: 56em) {
  .feature__inner {
    grid-template-columns: 1.1fr 1fr;
  }

  .feature--reverse .feature__inner {
    grid-template-columns: 1fr 1.1fr;
  }

  .feature--reverse .feature__media {
    order: 2;
  }
}

@media (min-width: 60em) {
  .page-hero__grid {
    grid-template-columns: 1fr 1.05fr;
  }

  .page-hero__media {
    aspect-ratio: 5 / 4;
  }
}

@media (min-width: 64em) {
  .overview__inner {
    grid-template-columns: 1.1fr 1fr;
  }
}

/* ---------- Weitere Leistungen */

.process + .related {
  padding-top: 0;
}

.related__title {
  margin-bottom: 2rem;
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
}

/* Immer die drei übrigen Leistungen: untereinander, ab 48em in einer Reihe */
.related__list {
  display: grid;
  gap: 1rem;
}

@media (min-width: 48em) {
  .related__list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.related__link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.125rem 1rem;
  height: 100%;
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--c-paper);
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.related__link:hover {
  border-color: var(--c-gold-text);
  background: var(--c-white);
}

.related__eyebrow {
  color: var(--accent);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.related__name {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.related__icon {
  grid-area: 1 / 2 / 3;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.7rem;
  background: var(--c-white);
}

/* ---------- Aufruf-Band (dunkle Karte auf hellem Grund) */

.cta-band {
  padding-block: clamp(2.5rem, 2rem + 3vw, 5rem);
}

.cta-band__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: clamp(2rem, 1.2rem + 4vw, 4rem);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}

.cta-band__title {
  max-width: 20ch;
}

.cta-band__actions {
  display: grid;
  justify-items: start;
  gap: 1rem;
}

@media (min-width: 56em) {
  .cta-band__inner {
    grid-template-columns: 1fr auto;
  }
}

/* ---------- Projektseiten */

.projects--all {
  padding-top: clamp(3rem, 2rem + 4vw, 5rem);
}

.project-facts {
  gap: 0.75rem;
  margin-top: 2rem;
}

.project-facts__row {
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
}

.project-facts dt,
.project-facts dd {
  display: inline;
  margin: 0;
}

.project-facts dt {
  color: var(--fg-muted);
}

.project-facts dt::after {
  content: ": ";
}

.project-facts dd {
  font-weight: 500;
}

.project-detail__inner {
  display: grid;
  gap: clamp(2rem, 4vw, 3.5rem);
}

.project-detail__text p:first-child {
  font-size: var(--fs-lead);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
  gap: var(--gap);
}

.project-gallery__figure {
  aspect-ratio: 4 / 3;
}

.project-gallery__item:first-child {
  grid-column: 1 / -1;
}

.project-gallery__item:first-child .project-gallery__figure {
  aspect-ratio: 16 / 9;
}

.project-gallery__link {
  display: block;
  height: 100%;
}

.project-gallery__link:focus-visible {
  outline-offset: -4px;
}

/* ---------- Fließtext: Projekte und Rechtliches (lesbare Zeilenlänge) */

.prose {
  max-width: 68ch;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  font-size: clamp(1.375rem, 1.2rem + 0.7vw, 1.75rem);
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.prose h3 {
  margin-top: 2rem;
  font-size: 1.1875rem;
}

.prose :is(h2, h3) + * {
  margin-top: 0.875rem;
}

.prose ul,
.prose ol {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.25rem;
}

.prose li::marker {
  color: var(--c-gold-text);
}

.prose a {
  overflow-wrap: anywhere;
}

.legal__content address {
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--c-gold);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: var(--c-paper);
}

.page-intro--legal .page-intro__inner {
  padding-bottom: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

/* ---------- Ergebnisseiten (Formular ohne JS) und 404: bleiben hell (siehe 5.) */

.page-intro--status .page-intro__inner,
.page-intro--error .page-intro__inner {
  padding-block: clamp(3.5rem, 2.5rem + 6vw, 8rem);
}

/* /kontakt/fehler/: was der Server prüft */
.status-page__hints-title {
  margin-top: 2rem;
  font-weight: 500;
}

.status-page__hints {
  margin-top: 0.75rem;
}

.status-page__back-hint {
  margin-top: 1.25rem;
  color: var(--fg-muted);
  font-size: var(--fs-sm);
}

.status-page__alternatives {
  margin-top: 2.5rem;
  font-weight: 500;
}

.status-page__contact {
  gap: 1rem 2.5rem;
  margin-top: 1rem;
}

.status-page__actions,
.not-found__actions {
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.not-found__links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0 1.5rem;
  max-width: 48rem;
  margin-top: 2rem;
  padding-block: 1rem;
  border-block: 1px solid var(--line);
}

/* ======== 12. Fußbereich & Kontaktleiste */

.site-footer {
  font-size: var(--fs-sm);
}

/* Spalten: 1, ab 40em 2 × 2, erst ab 80em vier nebeneinander – darunter
   brächen E-Mail-Adresse und Öffnungszeiten mitten im Wort um */
.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem var(--gap);
  padding-block: clamp(3.5rem, 2.5rem + 4vw, 5.5rem);
}

.brand--footer .brand__mark {
  width: 3.25rem;
  height: 3.25rem;
}

.site-footer__claim {
  margin-top: 1.25rem;
  color: var(--fg-muted);
  font-size: 1.0625rem;
  line-height: 1.5;
}

.site-footer__title {
  margin-bottom: 1rem;
  color: var(--fg-muted);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer__link {
  min-height: 2.25rem;
  color: var(--fg);
  text-decoration: none;
}

.site-footer__link:hover,
.site-footer__link[aria-current="page"] {
  color: var(--c-gold);
}

.site-footer__link:hover {
  text-decoration: underline;
}

.site-footer__address {
  margin-bottom: 0.75rem;
}

.site-footer__line > * {
  min-height: 2.25rem;
  font-size: var(--fs-sm);
}

.site-footer__bottom {
  border-top: 1px solid var(--line);
}

.site-footer__bottom-inner {
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.25rem;
}

.site-footer__copyright,
.site-footer__legal .site-footer__link {
  font-size: var(--fs-xs);
}

.site-footer__copyright {
  color: var(--fg-muted);
}

.site-footer__legal-list {
  gap: 0 1.5rem;
}

@media (min-width: 40em) {
  .site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 80em) {
  .site-footer__inner {
    grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr;
  }
}

/* ---------- Mobile Kontaktleiste: fest unten; die Seite bekommt darunter Platz,
   damit die Leiste nie Inhalte oder Formular-Buttons verdeckt */

.contact-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.5rem max(0.5rem, env(safe-area-inset-right)) calc(0.5rem + env(safe-area-inset-bottom)) max(0.5rem, env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  background-color: rgb(22 24 28 / 0.96);
}

.contact-bar__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--fg);
  font-size: var(--fs-sm);
  font-weight: 600;
  /* zweizeilige Beschriftung (≤ 360px) bleibt innerhalb von --contact-bar-h */
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.contact-bar__link--call {
  border-color: var(--c-gold);
  background: var(--c-gold);
  color: var(--c-ink-900);
}


.contact-bar__link--request .contact-bar__icon {
  color: var(--c-gold);
}

/* Dankeseite: nur „Anrufen“ */
.contact-bar--single {
  grid-template-columns: 1fr;
}

body {
  padding-bottom: calc(var(--contact-bar-h) + env(safe-area-inset-bottom));
}

/* Beim Tabben scrollt der Browser fokussierte Elemente über die Leiste */
html {
  scroll-padding-bottom: calc(var(--contact-bar-h) + env(safe-area-inset-bottom) + 0.5rem);
}

@media (min-width: 64em) {
  .contact-bar {
    display: none;
  }

  body {
    padding-bottom: 0;
  }

  html {
    scroll-padding-bottom: 0;
  }
}

/* ---------- Kleine Bildschirme: Reparatur-Band randlos, Bildtexte kompakt */

@media (max-width: 39.99em) {
  .repair__inner {
    width: 100%;
    padding-inline: var(--gutter);
    border-radius: 0;
  }

  .cta-band__inner {
    padding-inline: 1.5rem;
  }

  .about__figure .media__caption {
    --caption-fade: 2.5rem;
    padding-inline: 0.875rem;
    padding-bottom: 0.75rem;
    font-size: var(--fs-xs);
  }

  .about__figure .media__caption-title {
    font-size: var(--fs-sm);
  }

  .site-footer__list {
    columns: 2;
  }
}

/* ======== 13. Bewegung */

/* Dezente Einblendung – nur mit JS und ohne Wunsch nach reduzierter Bewegung */
@media (prefers-reduced-motion: no-preference) {
  @supports (mask-image: url("/assets/brand/logo-192.9a486800.webp")) or (-webkit-mask-image: url("/assets/brand/logo-192.9a486800.webp")) {
    .brand__shine {
      display: block;
      animation: logo-shine 6s ease-in-out infinite;
    }
  }

  html {
    scroll-behavior: smooth;
  }

  .has-reveal [data-reveal]:not(.is-revealed) {
    opacity: 0;
    transform: translateY(1.25rem);
  }

  .has-reveal [data-reveal] {
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s ease;
  }

  /* Karten einer Reihe leicht versetzt einblenden */
  .has-reveal :is(.service-grid, .process-list, .benefit-grid, .project-grid) > :nth-child(2) {
    transition-delay: 0.08s;
  }

  .has-reveal :is(.service-grid, .process-list, .benefit-grid, .project-grid) > :nth-child(3) {
    transition-delay: 0.16s;
  }

  .has-reveal :is(.service-grid, .benefit-grid) > :nth-child(4) {
    transition-delay: 0.24s;
  }

  .has-reveal [data-reveal].is-revealed:hover {
    transition-delay: 0s;
  }

  .contact-form[aria-busy="true"] .button__icon {
    animation: spin 0.8s linear infinite;
  }
}

@keyframes logo-shine {
  0%, 8% {
    background-position: 150% 0;
  }
  32%, 100% {
    background-position: -50% 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

/* ======== 14. Hoher Kontrast (forced-colors) */

@media (forced-colors: active) {
  .button,
  .menu-button,
  .contact-bar__link,
  .media__badge,
  .related__link,
  .service-card,
  .project-card,
  .form-status,
  .form-unavailable {
    border: 1px solid CanvasText;
  }

  :focus-visible {
    outline-color: Highlight;
  }

  /* Schatten-Ring und Verlaufs-Pfeil werden nicht gezeichnet: Umriss und
     Standard-Auswahlfeld stattdessen */
  .form-field__input:focus {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }

  select.form-field__input {
    -webkit-appearance: auto;
    appearance: auto;
    padding-right: 1rem;
    background-image: none;
  }

  .site-nav__link[aria-current]::after {
    background: Highlight;
  }

  /* Verläufe verschwinden; Bildtexte bekommen eine feste Fläche */
  .media__caption,
  .media__badge {
    background: Canvas;
    color: CanvasText;
  }

  mark.todo {
    outline-color: Mark;
  }
}

/* ======== 15. Druck (v. a. Impressum/Datenschutz) */

@media print {
  body {
    padding: 0;
    background: #fff;
    font-size: 11pt;
  }

  .skip-link,
  .site-header,
  .contact-bar,
  .media,
  .breadcrumbs,
  .cta-band,
  .related,
  .contact__form,
  .site-footer__brand,
  .site-footer__nav,
  .site-footer__legal {
    display: none !important;
  }

  /* Alles schwarz auf weiß, ohne Flächen und Schatten */
  * {
    --line: #bbb !important;
    color: #000 !important;
    background: none !important;
    box-shadow: none !important;
  }

  .hero,
  .section,
  .page-intro__inner,
  .site-footer__inner {
    min-height: 0;
    padding-block: 0 1rem;
  }

  .container,
  .prose {
    width: auto;
    max-width: none;
  }

  .prose a[href^="http"]::after {
    content: " (" attr(href) ")";
  }

  .has-reveal [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  mark.todo {
    outline: 1px dashed #000;
  }
}
