/* ==========================================================================
   PöhlsDigital – Basis-Stylesheet
   Design-Entscheidungen:
   - Ein Akzentton (Indigo) auf neutraler Grau/Weiß-Palette für einen
     seriösen B2B-Look.
   - System-Font-Stack statt Web-Font-Import: keine zusätzliche
     Netzwerk-Anfrage, dadurch bessere Performance/Lighthouse-Werte.
   - CSS-Variablen zentral in :root, damit Farben/Abstände an einer
     Stelle angepasst werden können.
   ========================================================================== */

:root {
  /* Farben */
  --color-bg: #ffffff;
  --color-bg-alt: #f6f7fb;
  --color-text: #1c2029;
  --color-text-muted: #5b6270;
  --color-border: #e3e6ec;
  --color-accent: #4f46e5;
  --color-accent-dark: #3c34c5;
  --color-accent-light: #edecfd;
  --color-success: #1a7f4e;
  --color-error: #c0392b;

  /* Typografie */
  --font-base: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --fs-sm: 0.9rem;
  --fs-base: 1rem;
  --fs-lg: 1.15rem;
  --fs-xl: 1.5rem;
  --fs-xxl: 2.25rem;
  --fs-hero: 3rem;

  /* Layout */
  --container-width: 1180px;
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  /* Leicht markentonige (Indigo-getönte) Schatten statt neutralem Grau */
  --shadow-sm: 0 2px 10px rgba(79, 70, 229, 0.1);
  --shadow: 0 14px 34px rgba(79, 70, 229, 0.16);
  --transition: 0.2s ease;
}

/* --------------------------------------------------------------------
   Reset & Grundlagen
   -------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 700;
}

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

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

h3 {
  font-size: var(--fs-xl);
}

p {
  margin: 0 0 1em;
  color: var(--color-text-muted);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

section {
  padding: 5rem 0;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-heading {
  max-width: 640px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section-heading .eyebrow {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.section-heading p {
  margin-bottom: 0;
}

.bg-alt {
  /* Dezenter, markentonig-indigoer Farbverlauf statt Flachfarbe */
  position: relative;
  background: linear-gradient(135deg, #f8f9fc 0%, #eef0fb 55%, #f3eefc 100%);
}

/* Weiche Übergänge oben UND unten: der helle Abschnitt läuft an beiden
   Kanten in Weiß aus, damit er nahtlos in die angrenzenden weißen
   Abschnitte übergeht (kein harter Farbsprung).
   Hinweis: Für #leistungen wird der obere Verlauf durch die spezifischere
   Regel #leistungen::before ersetzt (längerer Übergang vom Hero). */
.bg-alt::before,
.bg-alt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 220px;
  pointer-events: none;
  z-index: 0;
}

.bg-alt::before {
  top: 0;
  background: linear-gradient(
    to bottom,
    var(--color-bg),
    rgba(255, 255, 255, 0)
  );
}

.bg-alt::after {
  bottom: 0;
  background: linear-gradient(to top, var(--color-bg), rgba(255, 255, 255, 0));
}

/* Inhalt über den Verlaufs-Overlays halten */
.bg-alt > .container {
  position: relative;
  z-index: 1;
}

/* Skip-Link für Barrierefreiheit (Tastatur-Nutzer) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus {
  left: 0;
}

/* Sichtbarer Fokus-Ring für Tastaturnutzer auf allen interaktiven Elementen.
   Formularfelder haben ihren eigenen Fokus-Stil (Rahmenfarbe + Ring) und
   werden hier bewusst nicht überschrieben (höhere Selektor-Spezifität). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--fs-base);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition), color var(--transition);
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* Press-Feedback: leichtes Einsinken beim Klicken/Tippen (überschreibt die
   Hover-Anhebung während des Drückens, da gleiche Selektor-Spezifität und
   spätere Reihenfolge im Stylesheet). */
.btn:active {
  transform: scale(0.97);
}

.btn-block {
  width: 100%;
}

/* Kompakter, aber weiterhin mindestens 44px hoch (Touch-Target-Minimum) */
.btn-sm {
  min-height: 44px;
  padding: 0.6rem 1.25rem;
  font-size: var(--fs-sm);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* --------------------------------------------------------------------
   Header / Navigation
   -------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--color-text);
}

.logo:hover {
  text-decoration: none;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--color-accent), #7c73f0);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--color-text);
  font-weight: 500;
  font-size: var(--fs-sm);
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-accent);
  text-decoration: none;
}

.nav-cta {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------
   Hero – zentriertes, randloses Layout mit Raster-Hintergrund
   -------------------------------------------------------------------- */
.hero {
  position: relative;
  /* Volle Fensterbreite, unabhängig vom schmaleren Content-Container.
     Grosszuegiger unterer Abstand, damit der Hero nach unten mehr Raum hat. */
  padding: 7rem 1.5rem 13rem;
  overflow: hidden;
  /* Läuft nach unten sanft in den Farbton des folgenden Abschnitts (.bg-alt)
     aus, damit die Kante zum Leistungen-Bereich verschwindet. Der Verlauf
     beginnt früh und endet exakt im Startton der Überblendung unten
     (#f3f4fb), sodass beide Seiten farblich nahtlos aneinanderstoßen. */
  background: linear-gradient(
    to bottom,
    var(--color-bg) 0%,
    var(--color-bg) 22%,
    #f3f4fb 100%
  );
  text-align: center;
}

/* --- Hintergrund: Raster + Punkte --- */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Raster + Punkte zu den Rändern hin sanft ausblenden */
  -webkit-mask-image: radial-gradient(
    ellipse 80% 75% at 50% 45%,
    #000 55%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 80% 75% at 50% 45%,
    #000 55%,
    transparent 100%
  );
}

/* Feines Raster aus zwei sich kreuzenden Linienscharen (dezentes Indigo).
   --hero-cell steuert die Kachelgröße des Rasters. */
.hero-grid {
  --hero-cell: 96px;
  position: absolute;
  inset: -1px;
  background-image: linear-gradient(
      to right,
      rgba(79, 70, 229, 0.11) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(79, 70, 229, 0.11) 1px, transparent 1px);
  background-size: var(--hero-cell) var(--hero-cell);
}

/* --- Inhalt --- */
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-inner .eyebrow {
  display: inline-block;
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: 1.75rem;
}

.hero-inner h1 {
  font-size: clamp(2.75rem, 6vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 800;
  margin-bottom: 2rem;
}

/* Zweifarbige Headline: markierter Teil dezent grau, Rest kräftig dunkel
   (wie im Referenz-Screenshot). */
.hero-inner h1 .hero-mark {
  color: var(--color-text-muted);
}

.hero-inner .lead {
  font-size: var(--fs-lg);
  max-width: 46ch;
  margin: 0 auto 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Weiche Überblendung am oberen Rand des Leistungen-Bereichs: startet exakt
   im Auslaufton des Hero (#f3f4fb) und wird nach unten transparent, sodass
   der diagonale .bg-alt-Verlauf erst allmählich sichtbar wird und keine
   sichtbare Kante zum Hero entsteht. */
#leistungen {
  position: relative;
}

#leistungen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 620px;
  background: linear-gradient(
    to bottom,
    #f3f4fb 0%,
    rgba(243, 244, 251, 0.7) 30%,
    rgba(243, 244, 251, 0) 100%
  );
  pointer-events: none;
  z-index: 0;
}

#leistungen > .container {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------
   Leistungen / Karten
   -------------------------------------------------------------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2.25rem 1.85rem;
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: transparent;
}

/* "Fly-in": Leistungen-Kacheln kommen beim Einblenden stärker versetzt
   und nacheinander (gestaffelt) hereingeflogen statt nur dezent zu faden. */
.cards-grid .card.reveal {
  transform: translateY(44px) scale(0.96);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.cards-grid .card.reveal.is-visible {
  transform: translateY(0) scale(1);
}

/* Hover: für ALLE Karten gleich schnell und ohne Verzögerung. Höhere
   Spezifität als .is-visible, damit der Lift greift; transition-delta wird
   hier explizit auf 0 gesetzt, damit der frühere Fly-in-Versatz den Hover
   nicht mehr unterschiedlich verzögert. */
.cards-grid .card.reveal:hover,
.cards-grid .card.reveal.is-visible:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: transparent;
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
  transition-delay: 0s;
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-light);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.4rem;
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  margin-bottom: 0.6rem;
}

.card .card-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------
   Über uns / Trust
   -------------------------------------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3.5rem;
  align-items: center;
}

.about-grid img,
.about-grid .media-tile {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
}

.value-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.value-list li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.value-list .value-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-accent-light);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-list strong {
  display: block;
  color: var(--color-text);
}

.value-list p {
  margin: 0.15rem 0 0;
}

/* Team-Kacheln (Platzhalter) */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.75rem;
  margin-top: 2.5rem;
}

.team-card {
  text-align: center;
}

.team-card img,
.team-card .team-tile {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  box-shadow: var(--shadow-sm);
}

/* Kachel mit Initialen statt Portraitfoto */
.team-card .team-tile {
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: 0.02em;
}

.team-card .team-tile::after {
  border-radius: 50%;
}

.team-card strong {
  display: block;
}

.team-card span {
  color: var(--color-text-muted);
  font-size: var(--fs-sm);
}

/* --------------------------------------------------------------------
   Portfolio
   -------------------------------------------------------------------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

/* Referenzkarte ist jetzt ein Link zur jeweiligen Detailseite */
.portfolio-item {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-sm);
  background: var(--color-bg);
  transition: transform var(--transition), box-shadow var(--transition);
}

.portfolio-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

/* Farbige Kachel statt Foto */
.portfolio-tile {
  height: 220px;
  border-radius: 0;
}

.portfolio-tile svg {
  transition: transform 0.4s ease;
}

.portfolio-item:hover .portfolio-tile svg {
  transform: scale(1.08);
}

.portfolio-caption {
  padding: 1.25rem 1.4rem 1.6rem;
}

.portfolio-caption .tag {
  display: inline-block;
  font-size: var(--fs-sm);
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.portfolio-caption h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.portfolio-caption p {
  margin: 0;
  font-size: var(--fs-sm);
}

.portfolio-caption .card-link {
  display: inline-block;
  margin-top: 0.85rem;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--color-accent);
}

/* --------------------------------------------------------------------
   Farbige Kacheln (ersetzen die früheren Platzhalterfotos)
   -------------------------------------------------------------------- */
.media-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--tile-from, #4f46e5),
    var(--tile-to, #7c73f0)
  );
  color: rgba(255, 255, 255, 0.92);
  overflow: hidden;
}

/* Dezentes Punktmuster als Textur über dem Verlauf */
.media-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.18) 1px,
    transparent 1.5px
  );
  background-size: 18px 18px;
  opacity: 0.5;
}

.media-tile svg {
  position: relative;
  z-index: 1;
  width: 34%;
  max-width: 104px;
  height: auto;
}

/* Farbvarianten */
.media-tile--a {
  --tile-from: #4f46e5;
  --tile-to: #7c73f0;
}
.media-tile--b {
  --tile-from: #6366f1;
  --tile-to: #22d3ee;
}
.media-tile--c {
  --tile-from: #7c3aed;
  --tile-to: #ec4899;
}
.media-tile--d {
  --tile-from: #0ea5e9;
  --tile-to: #4f46e5;
}
.media-tile--e {
  --tile-from: #4338ca;
  --tile-to: #8b5cf6;
}
.media-tile--f {
  --tile-from: #4f46e5;
  --tile-to: #14b8a6;
}

/* --------------------------------------------------------------------
   Referenz-Detailseite
   -------------------------------------------------------------------- */
.ref-hero-tile {
  aspect-ratio: 16 / 6;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.ref-hero-tile svg {
  width: 12%;
  max-width: 88px;
}

.ref-detail-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3.5rem;
  align-items: start;
}

.ref-detail-main h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
}

.ref-detail-main h2:first-child {
  margin-top: 0;
}

.ref-detail-main ul {
  list-style: none;
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
}

.ref-detail-main ul li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--color-text-muted);
}

.ref-detail-main ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-accent);
}

.ref-detail-facts {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.75rem;
  background: var(--color-bg);
  position: sticky;
  top: 100px;
}

.ref-detail-facts h3 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.ref-detail-facts dl {
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.9rem;
}

.ref-detail-facts dt {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

.ref-detail-facts dd {
  margin: 0.1rem 0 0;
  font-weight: 600;
  color: var(--color-text);
}

.ref-detail-facts .btn {
  width: 100%;
  margin-top: 0.75rem;
}

/* --------------------------------------------------------------------
   Prozess / Ablauf
   -------------------------------------------------------------------- */
#ablauf {
  position: relative;
  /* Kein overflow:hidden – würde position:sticky der Sticky-Steps brechen. */
  background: linear-gradient(135deg, #ffffff 0%, #f5f3fd 55%, #eef0fb 100%);
}

/* Weiche Verlaufskanten oben und unten (wie bei .bg-alt), damit der
   Abschnitt sanft aus dem vorherigen weißen Bereich auf- und in den
   nächsten übergeht – liegt über der Wireframe-Deko, aber unter dem Text. */
#ablauf::before,
#ablauf::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 220px;
  pointer-events: none;
  z-index: 1;
}

#ablauf::before {
  top: 0;
  background: linear-gradient(to bottom, var(--color-bg), rgba(255, 255, 255, 0));
}

#ablauf::after {
  bottom: 0;
  background: linear-gradient(to top, var(--color-bg), rgba(255, 255, 255, 0));
}

/* Rotierende Wireframe-Deko (Three.js) als Vollflächen-Hintergrund */
.ablauf-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.ablauf-background canvas {
  /* Absolut positioniert, damit die (per JS gesetzte) Canvas-Puffergröße
     die Layout-Höhe des Abschnitts niemals beeinflussen kann. */
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

#ablauf .container {
  position: relative;
  z-index: 2;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  counter-reset: step;
}

.process-step {
  position: relative;
  padding-top: 0.5rem;
}

.process-step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  display: inline-block;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.process-step h3 {
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------
   Kontakt
   -------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h3 {
  margin-top: 2rem;
}

.contact-info h3:first-child {
  margin-top: 0;
}

.contact-channels {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-channel .icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-light);
  color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-channel a,
.contact-channel span {
  font-weight: 500;
  color: var(--color-text);
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: all var(--transition);
}

.social-links a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  text-decoration: none;
}

/* Formular */
.contact-form {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
}

.form-row {
  margin-bottom: 1.35rem;
}

.form-row label {
  display: block;
  font-weight: 600;
  font-size: var(--fs-sm);
  margin-bottom: 0.4rem;
}

.form-row .required {
  color: var(--color-accent);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--fs-base);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-row select {
  cursor: pointer;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-accent-light);
}

.form-row input:invalid[data-touched="true"],
.form-row textarea:invalid[data-touched="true"] {
  border-color: var(--color-error);
}

.form-error {
  color: var(--color-error);
  font-size: var(--fs-sm);
  margin-top: 0.35rem;
  display: none;
}

.form-error.visible {
  display: block;
}

textarea {
  resize: vertical;
  min-height: 130px;
}

/* Honeypot-Feld: für Menschen unsichtbar, für Spam-Bots vorhanden */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  display: none;
}

.form-status.visible {
  display: block;
}

.form-status.success {
  background: #e8f6ee;
  color: var(--color-success);
  border: 1px solid #b9e3c9;
}

.form-status.error {
  background: #fbeae7;
  color: var(--color-error);
  border: 1px solid #f1c3ba;
}

/* Erfolgs-Bestätigung: ersetzt nach dem Absenden das komplette Formular
   durch eine zentrierte Meldung mit grünem Haken. */
.form-success {
  text-align: center;
  padding: 2rem 1rem;
  animation: form-success-in 0.4s ease both;
}

.form-success__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e8f6ee;
  color: var(--color-success);
  margin-bottom: 1.1rem;
}

.form-success__icon svg {
  width: 30px;
  height: 30px;
}

.form-success h3 {
  margin: 0 0 0.4rem;
}

.form-success p {
  color: var(--color-text-muted);
  margin: 0;
}

@keyframes form-success-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-success {
    animation: none;
  }
}

/* --------------------------------------------------------------------
   CTA-Banner
   -------------------------------------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-accent), #372f9e);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 3.5rem 3rem;
  text-align: center;
}

.cta-banner h2 {
  color: #fff;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 50ch;
  margin: 0 auto 2rem;
}

.cta-banner .btn-primary {
  background: #fff;
  color: var(--color-accent-dark);
}

.cta-banner .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* --------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------- */
.site-footer {
  background: #171a23;
  color: #c7cad3;
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid .logo {
  color: #fff;
}

.footer-grid p {
  color: #9298a5;
  max-width: 32ch;
}

.footer-col h4 {
  color: #fff;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1.2rem;
}

.footer-col ul {
  display: grid;
  gap: 0.75rem;
}

.footer-col a {
  color: #c7cad3;
  font-size: var(--fs-sm);
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.75rem;
  font-size: var(--fs-sm);
  color: #9298a5;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  color: #9298a5;
}

.footer-legal a:hover {
  color: #fff;
}

/* --------------------------------------------------------------------
   Einfache Unterseiten-Kopfzeile (Lösungen, Über uns, Kontakt, Impressum...)
   Gleiches Design wie der Hero auf der Startseite: dezentes, statisches
   Raster im Hintergrund (Markup .hero-bg/.hero-grid wird auf den
   Unterseiten wiederverwendet) und derselbe Farbauslauf nach unten in
   #f3f4fb.
   -------------------------------------------------------------------- */
.page-header {
  position: relative;
  overflow: hidden;
  padding: 6rem 1.5rem 10rem;
  text-align: center;
  /* 1:1 wie .hero: läuft unten exakt im Startton der Überblendung des
     Folgeabschnitts (#f3f4fb) aus. */
  background: linear-gradient(
    to bottom,
    var(--color-bg) 0%,
    var(--color-bg) 22%,
    #f3f4fb 100%
  );
}

.page-header > .container {
  position: relative;
  z-index: 2;
}

/* Weiche, lange Überblendung am oberen Rand des Abschnitts direkt unter
   der Kopfzeile – identisch zum Übergang Hero → Leistungen auf der
   Startseite (#leistungen::before). max-height verhindert, dass der
   Verlauf bei sehr kurzen Abschnitten (z. B. Impressum) übersteht. */
.page-header + section {
  position: relative;
}

.page-header + section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 620px;
  max-height: 100%;
  background: linear-gradient(
    to bottom,
    #f3f4fb 0%,
    rgba(243, 244, 251, 0.7) 30%,
    rgba(243, 244, 251, 0) 100%
  );
  pointer-events: none;
  z-index: 0;
}

.page-header + section > .container {
  position: relative;
  z-index: 1;
}

.page-header .eyebrow {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.page-header p {
  max-width: 620px;
  margin: 0 auto;
}

.legal-content {
  max-width: 760px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
}

.legal-content h2:first-child {
  margin-top: 0;
}

/* Scroll-Reveal-Animation (dezent) */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .card,
  .portfolio-item img,
  .social-links a {
    transition: none;
  }

  .btn-primary:hover,
  .btn-secondary:hover,
  .btn:active,
  .card:hover,
  .portfolio-item:hover img {
    transform: none;
  }

  /* Stärkere Fly-in-Transformation der Leistungen-Kacheln ebenfalls
     neutralisieren (höhere Spezifität als die generische .reveal-Regel
     oben, muss daher hier separat aufgeführt werden). */
  .cards-grid .card.reveal,
  .cards-grid .card.reveal.is-visible {
    transform: none;
    transition: none;
    transition-delay: 0ms;
  }

  /* Rotierende Wireframe-Deko für Nutzer mit reduzierter Bewegung
     ausblenden; #ablauf behält seinen Farbverlauf als Hintergrund. */
  .ablauf-background {
    display: none;
  }
}

/* --------------------------------------------------------------------
   Responsive: Tablet
   -------------------------------------------------------------------- */
@media (max-width: 960px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .ref-detail-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .ref-detail-facts {
    position: static;
  }

  .about-grid .about-media {
    order: -1;
    /* width:100% nötig: auto-Margins lassen Grid-Items sonst auf
       Inhaltsbreite schrumpfen (Kachel wäre nur ~100px klein). */
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --------------------------------------------------------------------
   Responsive: Mobile
   -------------------------------------------------------------------- */
@media (max-width: 720px) {
  :root {
    --fs-hero: 2.25rem;
    --fs-xxl: 1.75rem;
  }

  section {
    padding: 3.5rem 0;
  }

  .nav-toggle {
    display: flex;
  }

  /* Mobiles Menü als Panel direkt unter dem Header.
     Wichtig: position:absolute statt fixed – der backdrop-filter des
     Headers macht ihn zum Containing Block für fixed-Nachfahren, wodurch
     ein fixed-Panel auf Header-Höhe (0 Resthöhe) geklippt würde. */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - 76px);
    height: calc(100dvh - 76px);
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 2rem 1.5rem;
    gap: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease,
      visibility 0.25s ease;
    overflow-y: auto;
    border-top: 1px solid var(--color-border);
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  /* CTA im mobilen Menü als vollbreiter Button */
  .nav-cta,
  .nav-cta .btn {
    width: 100%;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }

  .nav-links a {
    font-size: var(--fs-lg);
  }

  .hero {
    padding: 4.5rem 1.25rem 8rem;
  }

  .page-header {
    padding: 4rem 1.25rem 7rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* Rotierende 3D-Deko auf kleinen Screens ausblenden (Performance/Akku);
     #ablauf behält seinen Farbverlauf als Hintergrund. */
  .ablauf-background {
    display: none;
  }

  .cta-banner {
    padding: 2.5rem 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* --------------------------------------------------------------------
   Lösungen: Hero-Kachel mit sanftem 3D-Neige-Effekt (folgt der Maus)
   Markup: .solutions-hero__media (Perspektive) > .solutions-hero__tilt
   (wird per js/tilt.js geneigt) > Kachel + zentrierter Button.
   -------------------------------------------------------------------- */
.solutions-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.solutions-hero__lead {
  max-width: 52ch;
  margin: 2.25rem auto 0;
}

.solutions-hero__media {
  width: 100%;
  max-width: 760px;
  /* Kachel bewusst weiter nach unten gesetzt (deutlicher Abstand zur
     Überschrift), damit sie klar unterhalb des Rasters sitzt. */
  margin: 6rem auto 0;
  /* Perspektive erzeugt die räumliche Wirkung der Neigung. */
  perspective: 1200px;
}

/* Das Raster in den Unterseiten-Kopfzeilen endet bewusst weit oben und
   blendet schnell aus – es füllt nicht die ganze (teils hohe) Kopfzeile,
   sondern läuft zügig in den folgenden Abschnitt über. Gilt für alle
   Unterseiten (Über uns, Referenzen, Kontakt, Lösungen …). */
.page-header .hero-bg {
  height: 300px;
  bottom: auto;
}

.solutions-hero__tilt {
  position: relative;
  transform-style: preserve-3d;
  /* Sanftes Zurückfedern, wenn kein neuer Zielwinkel gesetzt wird. */
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.solutions-hero__tile {
  height: 360px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  /* Rein dekorativ – darf Klicks auf den darüberliegenden Button nie abfangen. */
  pointer-events: none;
}

.solutions-hero__tile svg {
  width: 88px;
  height: 88px;
}

/* Button „schwebt" leicht über der Kachel (Tiefe via translateZ).
   white-space: nowrap verhindert unschönen zweizeiligen Umbruch auf
   schmalen Screens (auf Desktop ohne Auswirkung, passt einzeilig). */
.solutions-hero__btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(48px);
  white-space: nowrap;
}

/* Position beim Hover/Klick beibehalten: der zentrierende Transform darf
   nicht durch die allgemeine .btn-Hover/-Active-Animation (translateY/scale)
   ersetzt werden, sonst „springt" der Button aus der Mitte. */
.solutions-hero__btn:hover,
.solutions-hero__btn:active {
  transform: translate(-50%, -50%) translateZ(48px);
}

@media (max-width: 720px) {
  .solutions-hero__media {
    margin-top: 2.25rem;
  }

  .solutions-hero__tile {
    height: 240px;
  }

  .solutions-hero__tile svg {
    width: 64px;
    height: 64px;
  }
}

/* --------------------------------------------------------------------
   Banner mit rotierendem Gitter (zwischen Referenzen und Ablauf-Schritten)
   -------------------------------------------------------------------- */
.wire-banner {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 5.5rem 0;
  background: linear-gradient(135deg, #ffffff 0%, #f5f3fd 55%, #eef0fb 100%);
}

.wire-banner__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.wire-banner .eyebrow {
  display: inline-block;
  color: var(--color-accent);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.wire-banner p {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------
   Sticky Steps: links scrollende Schritt-Texte, rechts fixiertes Bild,
   das je nach aktivem Schritt wechselt.
   -------------------------------------------------------------------- */
.sticky-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.sticky-steps__text {
  display: flex;
  flex-direction: column;
}

/* Jeder Schritt beansprucht viel Höhe, damit beim Scrollen genug Weg für
   den Bildwechsel bleibt und jeweils ein Schritt mittig steht. */
.sticky-steps__item {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sticky-steps__eyebrow {
  color: var(--color-accent);
  font-weight: 700;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.sticky-steps__item p {
  margin-bottom: 0;
  max-width: 42ch;
}

/* Das fixierte Bild bleibt beim Scrollen im Blick. */
.sticky-steps__sticky {
  position: sticky;
  top: 18vh;
  height: 64vh;
}

.sticky-steps__visual {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease, visibility 0.6s;
}

.sticky-steps__visual.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.sticky-steps__visual .media-tile {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.sticky-steps__visual .media-tile svg {
  width: 96px;
  height: 96px;
}

/* Mobil: einspaltig, ohne fixiertes Bild – die Schritte werden zu einer
   normalen, kompakten Liste (Text fliegt weiterhin via .reveal ein). */
@media (max-width: 960px) {
  .sticky-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sticky-steps__visual-col {
    display: none;
  }

  .sticky-steps__item {
    min-height: auto;
    padding: 1.75rem 0;
  }
}

/* --------------------------------------------------------------------
   Abschluss-CTA mit Neige-Karte (z. B. Ende der Über-uns-Seite)
   Nutzt die .solutions-hero__*-Karte, aber mit großer Überschrift oben
   und Fließtext unter der Karte (Aufbau wie im Vorbild).
   -------------------------------------------------------------------- */
.cta-tilt {
  text-align: center;
}

.cta-tilt__title {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 0;
}

/* Karte sitzt direkt unter der Überschrift (überschreibt den großen
   Standardabstand der Lösungen-Hero-Kachel). */
.cta-tilt .solutions-hero__media {
  margin-top: 2.25rem;
}

.cta-tilt__lead {
  margin: 2.25rem auto 0;
  max-width: 48ch;
  font-size: var(--fs-lg);
}

/* --------------------------------------------------------------------
   Mobile Feinschliff (Desktop unverändert – alles nur in Media Queries)
   -------------------------------------------------------------------- */
@media (max-width: 960px) {
  /* Sicherheitsnetz: nie horizontal scrollen (z. B. durch überstehende
     dekorative Elemente). */
  html,
  body {
    overflow-x: clip;
  }

  /* Kontakt: auf Mobil das Formular zuerst zeigen (Hauptaktion),
     Kontaktdaten/Social darunter. */
  .contact-grid .contact-form {
    order: -1;
  }

  /* Ablauf-Schritte als kompakte Liste: dezente Trennlinien zwischen
     den Schritten für bessere Gliederung. */
  .sticky-steps__item + .sticky-steps__item {
    border-top: 1px solid var(--color-border);
  }
}

@media (max-width: 720px) {
  /* Kopfzeilen kompakter: das Raster endet ohnehin weit oben, der große
     untere Leerraum wird auf Mobil nicht gebraucht. */
  .page-header {
    padding: 3.5rem 1.25rem 4.5rem;
  }

  /* Banner über den Ablauf-Schritten kompakter */
  .wire-banner {
    padding: 3.5rem 0;
  }

  /* Abschluss-CTA (Über uns): Abstände leicht reduziert */
  .cta-tilt .solutions-hero__media {
    margin-top: 1.75rem;
  }

  .cta-tilt__lead {
    margin-top: 1.75rem;
  }
}

/* --------------------------------------------------------------------
   Neige-Variante des CTA-Banners: identischer Look wie der statische
   .cta-banner, folgt aber sanft der Maus (3D). Wird unten auf Lösungen,
   Über uns und Referenzen genutzt (Neige-Logik: js/tilt.js).
   -------------------------------------------------------------------- */
.cta-banner-tilt {
  /* Kleinere Perspektive = stärkere räumliche Wirkung der Neigung. */
  perspective: 850px;
}

.cta-banner[data-tilt] {
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

/* --------------------------------------------------------------------
   MOBIL-Ausbau (nur Mobil; Desktop bleibt unverändert)
   -------------------------------------------------------------------- */

/* 1) Sticky-CTA-Leiste unten (per js/mobile-cta.js eingefügt) */
.mobile-cta-bar {
  display: none;
}

/* Schrittnummern-Zähler (nur mobil sichtbar gemacht, s. u.) */
.sticky-steps__text {
  counter-reset: step;
}
.sticky-steps__item {
  counter-increment: step;
}

@media (max-width: 720px) {
  .mobile-cta-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(180%) blur(10px);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -6px 20px rgba(28, 32, 41, 0.08);
    transform: translateY(130%);
    transition: transform 0.3s ease;
  }

  .mobile-cta-bar.is-visible {
    transform: none;
  }

  /* 2) Ablauf-Schritte als gestapelte Karteikarten: beim Weiterscrollen
     schiebt sich die nächste Karte von unten über die vorherige (per
     position: sticky). Leicht gestaffelte Haltepunkte lassen den Rand der
     darunterliegenden Karte durchblitzen (Stapel-Optik). */
  .sticky-steps,
  .sticky-steps__text {
    display: block;
  }

  .sticky-steps__item {
    position: sticky;
    top: 92px;
    min-height: 48vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.9rem 1.45rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    /* Schatten nach oben: die aufsteigende Karte schwebt sichtbar „über"
       der darunterliegenden. */
    box-shadow: 0 -10px 30px rgba(28, 32, 41, 0.1);
    overflow: hidden;
  }

  .sticky-steps__item:nth-child(1) {
    top: 80px;
  }
  .sticky-steps__item:nth-child(2) {
    top: 92px;
  }
  .sticky-steps__item:nth-child(3) {
    top: 104px;
  }
  .sticky-steps__item:nth-child(4) {
    top: 116px;
  }

  .sticky-steps__item::after {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    top: -0.4rem;
    right: 0.6rem;
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(79, 70, 229, 0.12);
    z-index: 0;
    pointer-events: none;
  }

  .sticky-steps__item > * {
    position: relative;
    z-index: 1;
  }

  /* 3) Kräftigere Scroll-Einblendung auf Mobil (mehr Bewegung ohne Hover) */
  .reveal {
    transform: translateY(28px);
  }
}

/* --------------------------------------------------------------------
   Leistungen als horizontales Wisch-Karussell (nur Startseite, nur mobil).
   Desktop bleibt das Raster (.cards-grid oben unverändert).
   -------------------------------------------------------------------- */
@media (max-width: 720px) {
  #leistungen .cards-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    /* Rand-Bleed über die Container-Ränder: edge-to-edge wischbar, die
       nächste Karte guckt durch (Wisch-Signal). */
    margin: 0 -1.5rem;
    padding: 0.5rem 1.5rem 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 1.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #leistungen .cards-grid::-webkit-scrollbar {
    display: none;
  }

  #leistungen .cards-grid .card {
    flex: 0 0 80%;
    scroll-snap-align: start;
    /* Im Karussell immer sichtbar (kein leeres „Durchgucken" durch .reveal). */
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------
   Referenzen als horizontales Wisch-Karussell (nur Mobil).
   Gilt für den Teaser auf der Startseite und die Referenzen-Seite.
   Desktop bleibt das Raster (.portfolio-grid oben unverändert).
   -------------------------------------------------------------------- */
@media (max-width: 720px) {
  .portfolio-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    margin: 0 -1.5rem;
    padding: 0.5rem 1.5rem 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 1.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .portfolio-grid::-webkit-scrollbar {
    display: none;
  }

  .portfolio-grid .portfolio-item {
    flex: 0 0 82%;
    scroll-snap-align: start;
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------
   Karten: "Stapel → auffächern" beim Scrollen (nur Desktop).
   Wird per [data-stack-fan] markiert; Transform setzt js/stack-fan.js
   scroll-gesteuert. Funktioniert für beliebige Kartengruppen (z. B. die
   Werte-Karten auf der Über-uns-Seite).
   -------------------------------------------------------------------- */
@media (min-width: 721px) {
  [data-stack-fan].is-stack-anim {
    /* Karten dürfen sich beim Stapeln überlappen, ohne umzubrechen. */
    align-items: start;
  }

  [data-stack-fan].is-stack-anim > .card,
  [data-stack-fan].is-stack-anim > .portfolio-item {
    will-change: transform;
    /* Voll sichtbar (überschreibt die .reveal-Start-Opazität/-Versatz);
       den Auftritt übernimmt jetzt das Auffächern. */
    opacity: 1;
    transform: none;
  }

  /* Während die Karten scroll-gesteuert gestapelt/aufgefächert werden, die
     Transform-Transition abschalten. Sonst zieht sie jeden Frame träge nach,
     die Karten rasten unterschiedlich schnell ein und die äußeren schieben
     sich kurz über die mittlere. Der Scroll liefert die Weichheit. */
  [data-stack-fan].is-stacking > .card,
  [data-stack-fan].is-stacking > .portfolio-item {
    transition: none;
  }
}
