/* =========================================================
   AOD – Werbeagentur | main.css
   Flat, clean, Mobile First. Keine externen Abhängigkeiten.
   ========================================================= */

/* ---------- Fonts (lokal gehostet, DSGVO) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Markenfarbe AOD – exakten Hex-Wert hier eintragen, alles andere leitet sich ab */
  --accent: #004AAD;         /* AOD-Blau (aus dem Logo) */
  --accent-ink: #003A88;     /* dunkler: Hover, Texte in Blau */
  --accent-soft: #E6EDF7;    /* sehr hell: Flächen, Hover */
  --accent-light: #2F6BC0;   /* hellerer Blauton: jede 2. Referenzbox (Weiß darauf: Kontrast 5,2:1) */
  --gold: #C38A39;           /* AOD-Gold (aus dem Logo) – nur dekorativ, nicht für Fließtext */

  --ink: #0B1B2B;            /* Text: tiefes Marineblau statt Schwarz */
  --ink-2: #364759;
  --muted: #66778A;
  --line: #E2E8EF;
  --paper: #FFFFFF;          /* Seitenhintergrund: Weiß */
  --surface: #FFFFFF;
  --soft: #F4F6F9;           /* sehr helles Grau für Abschnitte */
  --ok: #1F7A4D;
  --err: #C0262D;

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(.83rem, .8rem + .15vw, .9rem);
  --step-0:  clamp(1rem, .97rem + .15vw, 1.0625rem);
  --step-1:  clamp(1.15rem, 1.08rem + .35vw, 1.35rem);
  --step-2:  clamp(1.4rem, 1.25rem + .75vw, 1.85rem);
  --step-3:  clamp(1.75rem, 1.45rem + 1.5vw, 2.6rem);
  --step-4:  clamp(2.2rem, 1.6rem + 3vw, 4rem);
  --step-5:  clamp(2.6rem, 1.7rem + 4.6vw, 5.4rem);

  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-5: 1.5rem; --space-6: 2rem; --space-7: 3rem; --space-8: 4rem;
  --section: clamp(3.5rem, 2.5rem + 5vw, 7rem);

  --radius: 14px;
  --radius-lg: 22px;
  --container: 1240px;
  --gutter: 16px;
  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* Schatten Referenzboxen: sehr dezent, mehrlagig (Apple-Stil) */
  --shadow-card: 0 0 0 1px rgba(11, 27, 43, .04), 0 1px 2px rgba(11, 27, 43, .04), 0 4px 16px rgba(11, 27, 43, .05);
  --shadow-card-hover: 0 0 0 1px rgba(11, 27, 43, .04), 0 2px 4px rgba(11, 27, 43, .05), 0 12px 32px rgba(11, 27, 43, .09);
}

@media (min-width: 768px) { :root { --gutter: 32px; --header-h: 88px; } }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body {
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
:where(ul[class], ol[class]) { list-style: none; padding: 0; }
h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -.02em; font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -100px; z-index: 100; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip:focus { top: 8px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--soft { background: var(--soft); }
.section--ink { background: var(--ink); color: #fff; }
.section__head { display: grid; gap: var(--space-4); margin-bottom: var(--space-7); max-width: 760px; }
.section__head--split { max-width: none; }
@media (min-width: 900px) {
  .section__head--split { grid-template-columns: 1fr auto; align-items: end; }
}
.section__title { font-size: var(--step-3); }
.lead { font-size: var(--step-1); color: var(--ink-2); line-height: 1.5; }
.section--ink .lead { color: rgba(255,255,255,.75); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--step--1); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink);
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: var(--gold); }
.eyebrow--light { color: #fff; opacity: .85; }
.prose { max-width: 72ch; }
.prose h2 { font-size: var(--step-2); margin: 2.2em 0 .6em; }
.prose h3 { font-size: var(--step-1); margin: 1.8em 0 .5em; }
.prose p, .prose ul, .prose ol { margin-bottom: 1em; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose a { color: var(--accent-ink); }
.placeholder { background: var(--accent-soft); padding: 0 .25em; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  --_bg: var(--ink); --_fg: #fff; --_bd: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .8rem 1.4rem; border-radius: 999px;
  background: var(--_bg); color: var(--_fg); border: 1.5px solid var(--_bd);
  font-weight: 600; font-size: var(--step-0); text-decoration: none; line-height: 1.1;
  transition: transform .2s var(--ease), background .2s, color .2s, border-color .2s;
}
.btn .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn--primary { --_bg: var(--accent); --_bd: var(--accent); }
.btn--primary:hover { --_bg: var(--accent-ink); --_bd: var(--accent-ink); }
.btn--outline { --_bg: transparent; --_fg: var(--ink); --_bd: var(--ink); }
.btn--outline:hover { --_bg: var(--ink); --_fg: #fff; }
.btn--light { --_bg: #fff; --_fg: var(--ink); --_bd: #fff; }
.btn--light:hover { --_bg: var(--accent-soft); --_bd: var(--accent-soft); }
.btn--ghost-light { --_bg: transparent; --_fg: #fff; --_bd: rgba(255,255,255,.4); }
.btn--ghost-light:hover { --_bd: #fff; }
.btn--sm { min-height: 40px; padding: .55rem 1.1rem; font-size: var(--step--1); }
.btn--block { width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.btn-icon {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  transition: background .2s, border-color .2s, color .2s, opacity .2s;
}
.btn-icon .icon { width: 20px; height: 20px; }
.btn-icon:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-icon:disabled { opacity: .35; pointer-events: none; }

.text-link { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.text-link .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.text-link:hover .icon { transform: translateX(4px); }
.text-link:hover { color: var(--accent-ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
/* Blur auf Pseudo-Element, damit position:fixed im Header (Mobile-Nav) am Viewport ausgerichtet bleibt */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; gap: var(--space-4); height: var(--header-h); }
.site-header__brand { position: relative; z-index: 60; margin-right: auto; text-decoration: none; color: var(--ink); }
.logo { height: 32px; width: auto; max-width: 220px; object-fit: contain; }
img.logo { height: 48px; }
@media (min-width: 768px) { img.logo { height: 60px; } }
.site-footer img.logo { height: 64px; }
.logo--invert { filter: brightness(0) invert(1); }
.site-header__cta { display: none; }

.nav-toggle { position: relative; width: 44px; height: 44px; display: grid; place-items: center; z-index: 60; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Mobile-Navigation (Fullscreen-Overlay) */
.nav {
  position: fixed; inset: 0; z-index: 55;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 24px) var(--gutter) 32px;
  background: var(--paper);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
}
.nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nav__list { display: grid; gap: .25rem; }
.nav__link {
  display: block; padding: .5rem 0; font-size: var(--step-3); font-weight: 700; letter-spacing: -.02em; text-decoration: none;
}
.nav__link.is-active { color: var(--accent); }
.nav__mobile-extra { display: grid; gap: .75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.nav__mobile-extra a { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink-2); }
.nav__mobile-extra .icon { width: 20px; height: 20px; }
body.nav-open { overflow: hidden; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-header__cta { display: inline-flex; }
  .nav {
    position: static; inset: auto; padding: 0; background: none; flex-direction: row;
    opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .nav__list { display: flex; gap: .25rem; }
  .nav__link { font-size: var(--step--1); font-weight: 500; padding: .5rem .9rem; border-radius: 999px; letter-spacing: 0; color: var(--ink-2); }
  .nav__link:hover { color: var(--ink); background: var(--soft); }
  .nav__link.is-active { color: var(--ink); background: var(--soft); }
  .nav__mobile-extra { display: none; }
}

/* ---------- Hero ---------- */
.hero { padding-block: clamp(3rem, 2rem + 6vw, 7rem) clamp(2.5rem, 2rem + 4vw, 5rem); }
.hero__grid { display: grid; gap: var(--space-7); align-items: end; }
.hero__title { font-size: var(--step-5); letter-spacing: -.035em; line-height: 1.02; margin: var(--space-4) 0 var(--space-5); }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__text { font-size: var(--step-1); color: var(--ink-2); max-width: 46ch; margin-bottom: var(--space-6); }
.hero__aside { display: grid; gap: var(--space-4); }
.hero__visual {
  position: relative; aspect-ratio: 4/3; border-radius: var(--radius-lg); overflow: hidden; background: var(--ink);
}
.hero__visual svg { width: 100%; height: 100%; }
.hero__visual img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.25fr 1fr; }
  .hero__visual { aspect-ratio: 1/1.05; }
}

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); padding-top: var(--space-6); margin-top: var(--space-7); border-top: 1px solid var(--line); }
.stat dt { font-size: var(--step--1); color: var(--muted); order: 2; }
.stat { display: flex; flex-direction: column; }
.stat dd { font-size: var(--step-3); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }

/* Logo-Leiste (Marquee) */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding-block: var(--space-5); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; gap: 3.5rem; width: max-content; animation: marquee 38s linear infinite; }
.marquee__item { font-weight: 700; font-size: var(--step-1); color: var(--muted); white-space: nowrap; letter-spacing: -.01em; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ---------- Service-Karten ---------- */
.services { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 640px) { .services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services { grid-template-columns: repeat(3, 1fr); } }
.service {
  position: relative; display: flex; flex-direction: column; gap: var(--space-4);
  padding: var(--space-6); background: var(--surface); text-decoration: none; min-height: 260px;
  transition: background .25s var(--ease);
}
.service:hover { background: var(--accent-soft); }
.service__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 12px; background: var(--soft); color: var(--ink); transition: background .25s, color .25s; }
.service:hover .service__icon { background: var(--accent); color: #fff; }
.service__icon .icon { width: 24px; height: 24px; }
.service__num { position: absolute; top: var(--space-6); right: var(--space-6); font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.service__title { font-size: var(--step-2); }
.service__text { color: var(--ink-2); flex: 1; }
.service__more { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: var(--step--1); }
.service__more .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.service:hover .service__more .icon { transform: translateX(4px); }

/* ---------- Card-Slider ---------- */
.slider { position: relative; }
.slider__controls { display: flex; gap: var(--space-2); justify-content: flex-end; margin-bottom: var(--space-4); }
.slider__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 86%;
  gap: var(--space-4); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter);
  padding-inline: var(--gutter); margin-inline: calc(var(--gutter) * -1);
  padding-top: 12px; margin-top: -12px;           /* Platz, damit der Schatten oben nicht abgeschnitten wird */
  padding-bottom: 28px; margin-bottom: -20px;     /* … und unten */
  scrollbar-width: none;
}
.slider__track::-webkit-scrollbar { display: none; }
.slider__track:focus-visible { outline-offset: -2px; }
.slider__item { scroll-snap-align: start; display: flex; }
@media (min-width: 640px) { .slider__track { grid-auto-columns: calc((100% - var(--gutter) * 2 - var(--space-4)) / 2); } }
@media (min-width: 1024px) { .slider__track { grid-auto-columns: calc((100% - var(--gutter) * 2 - var(--space-6) * 2) / 3); gap: var(--space-6); } }
@media (min-width: 1240px) { .slider__track { padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); margin-inline: calc(-1 * max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)))); scroll-padding-inline: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter))); grid-auto-columns: calc((var(--container) - var(--gutter) * 2 - var(--space-6) * 2) / 3); } }
.slider__progress { height: 2px; background: var(--line); margin-top: var(--space-5); border-radius: 2px; overflow: hidden; }
.slider__progress span { display: block; height: 100%; width: 0; background: var(--ink); transition: width .15s linear; }

/* Referenz-Karte (Variante A: offen, ohne Box) */
.ref-card { width: 100%; }
.ref-card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); }
.ref-card__media {
  --media-bg: var(--soft);
  --media-pad: 0px;                               /* Bild füllt die Fläche (bei Bedarf z. B. 20px für Innenabstand) */
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden;
  background: var(--media-bg); display: grid; place-items: center;
  box-shadow: var(--shadow-card);
  transition: background .3s var(--ease), box-shadow .4s var(--ease), transform .4s var(--ease);
}
.ref-card__link:hover .ref-card__media { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.ref-card__media img {
  position: absolute; inset: var(--media-pad);
  width: calc(100% - 2 * var(--media-pad)); height: calc(100% - 2 * var(--media-pad));
  object-fit: cover; object-position: center; display: block; transition: transform .6s var(--ease);
}
.ref-card__media .ref-mono { font-size: clamp(4rem, 9vw, 6rem); }
.ref-card__link:hover .ref-card__media img { transform: scale(1.03); }
.ref-card__link:hover .ref-mono { transform: scale(1.06); }
/* Jede 2. Box: hellblaue Bildfläche (Slider + Raster; im Raster setzt JS .is-alt passend zum Filter) */
.slider__item:nth-child(even) .ref-card__media,
.ref-grid > li:nth-child(even) .ref-card__media { --media-bg: var(--accent-soft); }
.js .ref-grid > li .ref-card__media { --media-bg: var(--soft); }
.js .ref-grid > li.is-alt .ref-card__media { --media-bg: var(--accent-soft); }
/* Auf grauen Abschnitten (.section--soft): Bildfläche und Pillen weiß statt grau */
.section--soft .ref-card__media { --media-bg: #FFFFFF; }
.section--soft .slider__item:nth-child(even) .ref-card__media,
.section--soft .ref-grid > li:nth-child(even) .ref-card__media { --media-bg: var(--accent-soft); }
.js .section--soft .ref-grid > li .ref-card__media { --media-bg: #FFFFFF; }
.js .section--soft .ref-grid > li.is-alt .ref-card__media { --media-bg: var(--accent-soft); }

.ref-card__meta { margin-top: 1.25rem; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ref-card__title { margin-top: .55rem; font-size: clamp(1.2rem, 1.1rem + .35vw, 1.375rem); font-weight: 600; line-height: 1.25; letter-spacing: -.015em; transition: color .2s; }
.ref-card__link:hover .ref-card__title { color: var(--accent); }
.ref-card__client { margin-top: .35rem; font-size: .95rem; color: var(--ink-2); }
.ref-card__teaser {
  margin-top: .8rem; font-size: .95rem; line-height: 1.6; color: #5B6B7D;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(2 * 1.6em);                    /* immer 2 Zeilen hoch → Boxen gleich hoch */
  margin-bottom: 1rem;
}
.ref-card__pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.ref-card__pills li { font-size: .8125rem; font-weight: 500; line-height: 1.2; padding: .4rem .75rem; border-radius: 999px; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.section--soft .ref-card__pills li { background: #FFFFFF; }
.ref-card__more {
  margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  font-size: .875rem; font-weight: 600; color: var(--accent);
}
.ref-card__more .icon { width: 20px; height: 20px; transition: transform .2s var(--ease); }
.ref-card__link:hover .ref-card__more .icon { transform: translateX(4px); }

.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { font-size: .78rem; font-weight: 500; padding: .25rem .65rem; border-radius: 999px; background: var(--soft); color: var(--ink-2); }
.tags--links a { text-decoration: none; }
.tags--links li:hover { background: var(--ink); color: #fff; }

/* Filter (Referenzseite) */
.filter { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; margin-bottom: var(--space-5); padding-bottom: 2px; }
.filter::-webkit-scrollbar { display: none; }
.filter button { flex: none; min-height: 40px; padding: .45rem 1rem; border: 1.5px solid var(--line); border-radius: 999px; font-size: var(--step--1); font-weight: 500; background: var(--surface); }
.filter button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Referenz-Grid */
.ref-grid { display: grid; gap: var(--space-4); }
@media (min-width: 640px) { .ref-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ref-grid { grid-template-columns: repeat(3, 1fr); gap: var(--space-7) var(--space-6); } }
.ref-grid > li { display: flex; }
.ref-grid > li[hidden], .js .ref-grid > li.is-paged { display: none; }
.load-more { display: flex; justify-content: center; margin-top: var(--space-6); }
.load-more[hidden] { display: none; }
.archive-count { color: var(--muted); font-size: var(--step--1); font-variant-numeric: tabular-nums; }
.filter button span { margin-left: .3rem; font-variant-numeric: tabular-nums; opacity: .6; }

/* ---------- Offcanvas ----------
   Keyframe-Animationen statt Transition: laufen ab dem ersten Frame,
   kein Zentrieren/Springen (Safari) und kein "Aufploppen" (Chrome). */
.offcanvas,
.offcanvas:modal {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  inset: 0; margin: 0; padding: 0; border: 0;
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none;
  background: transparent; overflow: hidden;
  transform: none; translate: none;
}
.offcanvas::backdrop { background: transparent; }
.offcanvas__overlay { position: absolute; inset: 0; background: rgba(11, 27, 43, .45); }
.offcanvas__panel {
  position: absolute; left: 0; right: 0; bottom: 0; top: auto; height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -10px 40px rgba(11, 27, 43, .14);
  will-change: transform;
}
@media (min-width: 768px) {
  .offcanvas__panel { top: 0; bottom: 0; left: auto; right: 0; height: 100%; width: min(640px, 92vw); border-radius: var(--radius-lg) 0 0 var(--radius-lg); box-shadow: -10px 0 40px rgba(11, 27, 43, .14); }
}

/* Öffnen */
.offcanvas[open] .offcanvas__overlay { animation: oc-fade-in .45s ease both; }
.offcanvas[open] .offcanvas__panel   { animation: oc-in-up .55s cubic-bezier(.22, .61, .36, 1) both; }
@media (min-width: 768px) { .offcanvas[open] .offcanvas__panel { animation-name: oc-in-right; } }
/* Schließen */
.offcanvas.is-closing .offcanvas__overlay { animation: oc-fade-out .5s ease both; }
.offcanvas.is-closing .offcanvas__panel   { animation: oc-out-down .5s cubic-bezier(.45, 0, .55, 1) both; }
@media (min-width: 768px) { .offcanvas.is-closing .offcanvas__panel { animation-name: oc-out-right; } }
/* Direktaufruf einer Referenz-URL: ohne Einflug */
.offcanvas.no-anim .offcanvas__overlay, .offcanvas.no-anim .offcanvas__panel { animation: none; }

@keyframes oc-fade-in   { from { opacity: 0; } to { opacity: 1; } }
@keyframes oc-fade-out  { from { opacity: 1; } to { opacity: 0; } }
@keyframes oc-in-right  { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes oc-out-right { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes oc-in-up     { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes oc-out-down  { from { transform: translateY(0); } to { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) {
  .offcanvas .offcanvas__overlay, .offcanvas .offcanvas__panel { animation: none !important; }
}

.offcanvas__head { --oc-px: var(--space-5); display: flex; align-items: center; justify-content: space-between; padding: .9rem var(--oc-px); border-bottom: 1px solid var(--line); }
.offcanvas__label { display: inline-flex; align-items: center; gap: .6rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.offcanvas__label::before { content: ""; width: 18px; height: 2px; background: var(--gold); }
.offcanvas__body { --oc-px: var(--space-5); overflow-y: auto; overscroll-behavior: contain; padding: var(--space-6) var(--oc-px) 0; flex: 1; }
@media (min-width: 768px) {
  .offcanvas__head { --oc-px: 2.5rem; }
  .offcanvas__body { --oc-px: 2.5rem; padding-top: 2rem; }
}
body.offcanvas-open { overflow: hidden; padding-right: var(--sbw, 0px); }
body.offcanvas-open .site-header { padding-right: var(--sbw, 0px); margin-right: calc(var(--sbw, 0px) * -1); }

/* ---------- Referenz-Detail (Offcanvas) ---------- */
.ref-detail { display: flex; flex-direction: column; }
.ref-detail h3 { margin: 2.5rem 0 .75rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -.015em; }
.ref-detail > p:not([class]) { color: var(--ink-2); line-height: 1.7; }
.ref-mono { color: var(--accent); font-weight: 800; letter-spacing: -.06em; line-height: 1; font-size: clamp(4rem, 10vw, 6.5rem); transition: transform .5s var(--ease); }

/* Bild-Slider */
.ref-shots {
  --shots-pad: 0px;                               /* Bild füllt die Fläche */
  position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--soft);
}
.ref-shots.is-mono { display: grid; place-items: center; background: var(--accent-soft); }
.ref-shots__track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.ref-shots__track::-webkit-scrollbar { display: none; }
.ref-shots__track:focus-visible { outline-offset: -3px; }
.ref-shots__slide { position: relative; flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
.ref-shots__slide img { position: absolute; inset: var(--shots-pad); width: calc(100% - 2 * var(--shots-pad)); height: calc(100% - 2 * var(--shots-pad)); object-fit: cover; object-position: center; }
.ref-shots__nav {
  position: absolute; top: 50%; margin-top: -22px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.92); border: 1px solid var(--line); color: var(--ink);
  box-shadow: 0 2px 10px rgba(11, 27, 43, .12);
  transition: background .2s, color .2s, opacity .2s;
}
.ref-shots__nav .icon { width: 18px; height: 18px; }
.ref-shots__nav--prev { left: 12px; }
.ref-shots__nav--next { right: 12px; }
.ref-shots__nav:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.ref-shots__nav:disabled { opacity: 0; pointer-events: none; }
.ref-shots__dots { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px 8px; border-radius: 999px; background: rgba(11, 27, 43, .35); }
.ref-shots__dot { width: 8px; height: 8px; padding: 0; border-radius: 999px; background: rgba(255,255,255,.6); transition: width .25s var(--ease), background .25s; }
.ref-shots__dot[aria-current] { width: 20px; background: #fff; }
.ref-shots__count { position: absolute; right: 12px; bottom: 10px; font-size: .75rem; font-weight: 600; padding: .3rem .6rem; border-radius: 999px; background: #fff; color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (max-width: 767px) { .ref-shots__nav { display: none; } }

/* Kopf */
.ref-detail__meta { margin-top: 2rem; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ref-detail__title { margin-top: .75rem; font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.125rem); font-weight: 700; line-height: 1.15; letter-spacing: -.025em; }
.ref-detail > .ref-detail__lead { margin-top: 1.1rem; font-size: 1.125rem; line-height: 1.55; color: var(--ink-2); }

/* Kennzahlen: Zeilen */
.ref-kpis { margin-top: 2rem; display: grid; gap: 2px; border-radius: var(--radius); overflow: hidden; }
.ref-kpi { display: grid; gap: .25rem; padding: 1rem 1.25rem; background: var(--soft); }
.ref-kpi dt { font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; color: var(--accent); }
.ref-kpi dd { font-size: .9375rem; color: var(--ink-2); }
@media (min-width: 560px) { .ref-kpi { grid-template-columns: 170px 1fr; align-items: baseline; gap: 1.25rem; } }

/* Steckbrief */
.ref-facts { margin-top: 2rem; display: grid; gap: .5rem 1.5rem; font-size: .9375rem; }
.ref-facts dt { color: var(--muted); }
.ref-facts dd { font-weight: 500; margin-bottom: .5rem; }
.ref-facts dd > a { display: inline-flex; align-items: center; gap: .35rem; color: var(--accent); text-decoration: none; }
.ref-facts dd > a .icon { width: 15px; height: 15px; }
.ref-facts dd > a:hover { text-decoration: underline; }
@media (min-width: 560px) { .ref-facts { grid-template-columns: 140px 1fr; row-gap: 1rem; } .ref-facts dd { margin-bottom: 0; } .ref-facts dt { padding-top: .1rem; } }
.ref-pills { display: flex; flex-wrap: wrap; gap: .5rem; }
.ref-pills li { font-size: .8125rem; font-weight: 500; line-height: 1.2; border-radius: 999px; background: var(--soft); color: var(--ink-2); }
.ref-pills li:not(:has(a)), .ref-pills a { display: block; padding: .4rem .75rem; }
.ref-facts .ref-pills a { color: var(--ink-2); }
.ref-pills--links li:hover { background: var(--ink); }
.ref-pills--links li:hover a { color: #fff; }
.ref-pills--tech li { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }

/* Umgesetzt: Kacheln */
.ref-scope { list-style: none; padding: 0; display: grid; gap: .75rem; }
@media (min-width: 560px) { .ref-scope { grid-template-columns: 1fr 1fr; } }
.ref-scope li { display: flex; gap: .6rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 12px; background: var(--soft); font-size: .9rem; line-height: 1.45; }
.ref-scope .icon { flex: none; width: 18px; height: 18px; color: var(--accent); margin-top: .1rem; }

/* Kundenstimme */
.ref-quote { margin: 2.5rem 0 0; padding: 1.5rem 1.75rem; border-radius: var(--radius); background: var(--accent-soft); }
.ref-quote p { font-size: 1.1875rem; line-height: 1.5; font-weight: 500; color: var(--ink); }
.ref-quote footer { margin-top: .6rem; font-size: .875rem; color: var(--muted); }

/* Fußleiste: bleibt beim Scrollen unten stehen */
.ref-detail__actions {
  position: sticky; bottom: 0; z-index: 2;
  margin: 2.5rem calc(-1 * var(--oc-px)) 0; padding: 1rem var(--oc-px) calc(1rem + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
  display: grid; gap: .75rem;
}
.ref-detail__actions .btn { width: 100%; }
@media (max-width: 559px) { .ref-detail__actions { gap: .5rem; padding-block: .75rem calc(.75rem + env(safe-area-inset-bottom)); } .ref-detail__actions .btn { min-height: 44px; padding-block: .6rem; font-size: .95rem; } }
@media (min-width: 560px) { .ref-detail__actions { grid-template-columns: 1fr 1.3fr; } .ref-detail__actions.is-single { grid-template-columns: 1fr; } }

/* ---------- Prozess ---------- */
.steps { display: grid; gap: var(--space-4); counter-reset: step; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { padding: var(--space-5); border-radius: var(--radius); border: 1px solid rgba(255,255,255,.14); counter-increment: step; }
.section:not(.section--ink) .step { border-color: var(--line); background: var(--surface); }
.step::before { content: counter(step, decimal-leading-zero); display: block; font-size: var(--step--1); font-weight: 600; color: var(--gold); margin-bottom: var(--space-5); }
.step h3 { font-size: var(--step-1); margin-bottom: var(--space-2); }
.step p { color: var(--muted); font-size: var(--step--1); }
.section--ink .step p { color: rgba(255,255,255,.65); }

/* ---------- Checkliste ---------- */
.checklist { display: grid; gap: var(--space-3); }
@media (min-width: 640px) { .checklist { grid-template-columns: repeat(2, 1fr); } }
.checklist li { display: flex; gap: .75rem; align-items: flex-start; padding: var(--space-4); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 500; }
.checklist .icon { flex: none; width: 22px; height: 22px; color: var(--accent); margin-top: .1rem; }

/* ---------- Split / Feature ---------- */
.split { display: grid; gap: var(--space-7); }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } .split--sticky > :first-child { position: sticky; top: calc(var(--header-h) + 32px); } }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: var(--space-5) 0; font-weight: 600; font-size: var(--step-1); cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { flex: none; width: 22px; height: 22px; transition: transform .25s var(--ease); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq__answer { padding: 0 0 var(--space-5); color: var(--ink-2); max-width: 70ch; }

/* ---------- Page-Hero (Unterseiten) ---------- */
.page-hero { padding-block: clamp(2rem, 1.5rem + 3vw, 4rem) clamp(2rem, 1.5rem + 3vw, 4rem); border-bottom: 1px solid var(--line); }
.page-hero__title { font-weight: 700; line-height: 1.08; font-size: var(--step-4); letter-spacing: -.03em; margin: var(--space-4) 0; max-width: 18ch; }
.page-hero .lead { max-width: 60ch; }
.page-hero__icon { width: 64px; height: 64px; border-radius: 16px; background: var(--accent); color: #fff; display: grid; place-items: center; margin-bottom: var(--space-5); }
.page-hero__icon .icon { width: 30px; height: 30px; }

.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; font-size: var(--step--1); color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); }

/* Service-Liste (Leistungsübersicht) */
.service-list { border-top: 1px solid var(--line); }
.service-row { display: grid; gap: var(--space-3); padding: var(--space-6) 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: padding .3s var(--ease); }
.service-row:hover { padding-left: var(--space-3); }
.service-row__num { font-size: var(--step--1); color: var(--muted); font-variant-numeric: tabular-nums; }
.service-row__title { font-size: var(--step-3); letter-spacing: -.03em; transition: color .2s; }
.service-row:hover .service-row__title { color: var(--accent); }
.service-row__text { color: var(--ink-2); max-width: 52ch; }
.service-row__arrow { display: none; }
@media (min-width: 900px) {
  .service-row { grid-template-columns: 60px 1.2fr 1fr 48px; align-items: center; gap: var(--space-6); }
  .service-row__arrow { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); transition: background .2s, color .2s, border-color .2s; }
  .service-row__arrow .icon { width: 20px; height: 20px; }
  .service-row:hover .service-row__arrow { background: var(--accent); color: #fff; border-color: var(--accent); }
}

/* Weitere Leistungen (Pills) */
.pill-links { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pill-links a { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem 1.1rem; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 500; background: var(--surface); }
.pill-links a:hover { border-color: var(--ink); }
.pill-links .icon { width: 18px; height: 18px; }

/* ---------- Kontakt ---------- */
.contact { display: grid; gap: var(--space-7); }
@media (min-width: 960px) { .contact { grid-template-columns: 1fr 1.4fr; } }
.contact-card { display: grid; gap: var(--space-4); align-content: start; }
.contact-item { display: flex; gap: var(--space-4); align-items: flex-start; padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
a.contact-item:hover { border-color: var(--ink); }
.contact-item .icon { flex: none; width: 24px; height: 24px; color: var(--accent); }
.contact-item strong { display: block; font-size: var(--step--1); color: var(--muted); font-weight: 500; }

.form { display: grid; gap: var(--space-4); padding: var(--space-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); }
@media (min-width: 768px) { .form { padding: var(--space-7); } .form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); } }
.form__row { display: grid; gap: var(--space-4); align-items: start; }
.field { display: grid; gap: .4rem; }
.field label, .field legend { font-size: var(--step--1); font-weight: 600; }
.field .req { color: var(--accent); }
.field input, .field textarea, .field select {
  width: 100%; min-height: 50px; padding: .8rem 1rem; border: 1.5px solid var(--line); border-radius: 12px; background: var(--paper);
  font-size: 16px; transition: border-color .2s, background .2s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); background: #fff; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--err); }
.field__error { font-size: .82rem; color: var(--err); min-height: 0; }
.field__hint { font-size: .82rem; color: var(--muted); }
fieldset.field { border: 0; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .25rem; }
.chips label { position: relative; font-weight: 500; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-flex; min-height: 40px; align-items: center; padding: .45rem 1rem; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; font-size: var(--step--1); transition: background .2s, color .2s, border-color .2s; }
.chips input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent { display: flex; gap: .75rem; align-items: flex-start; font-size: var(--step--1); color: var(--ink-2); }
.consent input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: var(--space-4) var(--space-5); border-radius: 12px; font-weight: 500; }
.alert--ok { background: #E3F4EA; color: var(--ok); }
.alert--err { background: #FBE4E5; color: var(--err); }
.form [type="submit"][aria-busy="true"] { opacity: .6; pointer-events: none; }

/* ---------- CTA-Band ---------- */
.cta-band { background: var(--accent); color: #fff; padding-block: clamp(3rem, 2rem + 4vw, 5.5rem); }
.cta-band__inner { display: grid; gap: var(--space-6); }
.cta-band__title { font-size: var(--step-4); letter-spacing: -.03em; margin: var(--space-3) 0; max-width: 16ch; }
.cta-band__text { opacity: .9; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
@media (min-width: 900px) { .cta-band__inner { grid-template-columns: 1fr auto; align-items: end; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,.7); padding-top: var(--space-8); font-size: var(--step--1); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer__grid { display: grid; gap: var(--space-6); padding-bottom: var(--space-7); }
@media (min-width: 640px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.site-footer__brand { color: #fff; display: inline-block; margin-bottom: var(--space-4); }
.site-footer__about p { max-width: 40ch; }
.site-footer__h { font-size: var(--step--1); color: #fff; font-weight: 600; margin-bottom: var(--space-4); letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.site-footer address { font-style: normal; line-height: 1.8; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-4); padding-block: var(--space-5); border-top: 1px solid rgba(255,255,255,.12); }
.site-footer__social { display: flex !important; gap: var(--space-4) !important; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; align-content: center; gap: var(--space-5); }
.notfound__code { font-size: clamp(6rem, 20vw, 14rem); font-weight: 800; letter-spacing: -.06em; line-height: .9; color: var(--accent); }

/* ---------- Reveal-Animation ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; } .marquee__track { animation: none; } }

/* ---------- Print ---------- */
@media print {
  .site-header, .cta-band, .site-footer, .nav-toggle, .slider__controls { display: none !important; }
  body { background: #fff; }
}