/* ==========================================================================
   JV Coding Solutions — Portfolio-Website
   Markenfarben aus dem JV-Logo: Dunkelblau #0E3B81, Grau #505055
   ========================================================================== */

/* ---------- Font (self-hosted, DSGVO-konform) ---------- */
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Design-Tokens ---------- */
:root {
  --color-primary: #0e3b81;
  --color-primary-dark: #0a2c61;
  --color-primary-light: #1a56c4;
  --color-accent-bg: #eef3fb;
  --color-accent: #7dfb6a;
  --color-cta: #24c66d;
  --color-cta-dark: #1ba85b;
  --color-hero-card: #4569d8;
  --color-gray: #505055;
  --color-text: #22262e;
  --color-text-muted: #5a6070;
  --color-border: #e3e8f0;
  --color-bg: #ffffff;
  --color-footer: #0b2a5b;

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

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --shadow-sm: 0 1px 3px rgba(14, 59, 129, 0.08);
  --shadow-md: 0 6px 24px rgba(14, 59, 129, 0.1);
  --shadow-lg: 0 16px 48px rgba(14, 59, 129, 0.16);

  --container: 1200px;
  --header-height: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

a,
button {
  touch-action: manipulation;
}

a:hover {
  text-decoration: underline;
}

/* ---------- Barrierefreiheit: Fokus & Skip-Link ---------- */
:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 0.7em 1.2em;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transform: translateY(-200%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: none;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  color: var(--color-primary-dark);
  font-weight: 750;
  margin: 0 0 0.6em;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.3rem);
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.35rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1em;
}

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

.section {
  padding: clamp(3.5rem, 8vw, 5.5rem) 0;
}

/* Erste Section nach dem Hero: der weiße Sockel des Heros liefert bereits
   Abstand, daher hier weniger Top-Padding, um die Lücke zu verkleinern. */
.hero + .section {
  padding-top: clamp(1.25rem, 3vw, 2rem);
}

.section--tint {
  background: var(--color-accent-bg);
}

.section-head {
  max-width: 750px;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

/* Portfolio: weniger Kopf-Abstand, damit die App-Karten nach dem
   Ankersprung vollständig sichtbar sind. */
#portfolio {
  padding-top: clamp(1.5rem, 3.5vw, 2.5rem);
}

#portfolio .section-head {
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

/* Kontakt: kompakter als die übrigen Sektionen, damit nach dem Ankersprung
   Kalenderkarte UND Kontaktkacheln gemeinsam im Bildschirm liegen.
   #appointment ist dieselbe Sektion in der englischen Fassung. */
#termin,
#appointment {
  padding-top: clamp(2.25rem, 4vw, 2.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

#termin .section-head,
#appointment .section-head {
  margin-bottom: 0.5rem;
}

/* Der margin-bottom von 0.6em kollabiert sonst mit dem des Elternelements und
   begrenzt den Abstand nach unten hin — daher hier auf 0. Im gestapelten Layout
   steht unter dem h2 nichts (der .lead ist ausgeblendet, s. u.); das
   Zwei-Spalten-Layout ab 1420px setzt den Abstand für sich wieder. */
#termin .section-head h2,
#appointment .section-head h2 {
  margin-bottom: 0;
}

/* Der Fließtext füllt die rechte Spalte des Zwei-Spalten-Layouts weiter unten.
   Im gestapelten Layout gibt es diese Spalte nicht — dort würde er die ohnehin
   zu hohe Sektion um weitere ~100px strecken, deshalb erst ab 1420px sichtbar. */
#termin .section-head .lead,
#appointment .section-head .lead {
  display: none;
}

/* Calendly rendert oberhalb seines Kalenders ~67px Leerraum innerhalb des iframes,
   der von außen nicht stylebar ist (cross-origin). Der negative Margin zieht diesen
   leeren Bereich weg; abgeschnitten wird dabei nichts. Erst ab Tablet, weil Calendly
   im Mobil-Layout deutlich weniger Innenabstand mitbringt und dort bereits kompakt
   sitzt. Der Kindselektor stellt sicher, dass nur das frei stehende Widget getroffen
   wird und nicht ein evtl. in eine Karte eingebettetes. */
@media (min-width: 821px) {
  #termin > .container > .calendly-inline-widget,
  #appointment > .container > .calendly-inline-widget {
    margin-top: -1.25rem;
  }
}

/* Ab dieser Breite liegen Kontaktspalte (links) und Kalender (rechts)
   nebeneinander, damit die Sektion nach dem Ankersprung komplett auf einen
   14"-Bildschirm passt (748 statt 1035px bei 1512x860). Die Schwelle gibt
   Calendly vor: unter rund 1000px Spaltenbreite klappt das Widget in sein
   Mobil-Layout um, in dem die Datumsauswahl erst nach Scrollen im iframe
   erreichbar ist. 320 Spalte + 40 Gap + 1000 + 40 Container-Padding = 1400;
   1420 als Reserve. */
@media (min-width: 1420px) {
  #termin,
  #appointment {
    padding-top: 1.25rem;
    padding-bottom: 1.75rem;
  }

  #termin > .container,
  #appointment > .container {
    max-width: 1440px;
    display: grid;
    grid-template-columns: 320px minmax(1000px, 1fr);
    /* Kopfzeile nur so hoch wie nötig, damit die Kacheln direkt darunter sitzen
       und nicht über die volle Kalenderhöhe auseinandergezogen werden. */
    grid-template-rows: max-content 1fr;
    column-gap: 40px;
    align-items: start;
  }

  /* Kalender über beide Zeilen. Der negative Margin aus dem 821px-Block wird
     zurückgesetzt: über dem Widget steht hier keine Überschrift mehr, deren
     Abstand zu schließen wäre. */
  #termin > .container > .calendly-inline-widget,
  #appointment > .container > .calendly-inline-widget {
    grid-column: 2;
    grid-row: 1 / -1;
    min-width: 0;
    margin-top: 0;
  }

  /* Die Zentrierung aus .section-head--center wird hier bewusst aufgehoben. */
  #termin .section-head,
  #appointment .section-head {
    grid-column: 1;
    grid-row: 1;
    max-width: none;
    margin: 0 0 1.75rem;
    text-align: left;
  }

  #termin .section-head h2,
  #appointment .section-head h2 {
    font-size: 1.95rem;
    margin-bottom: 0.5em;
  }

  #termin .section-head .lead,
  #appointment .section-head .lead {
    display: block;
    font-size: 1rem;
    margin: 0;
  }

  #termin .contact-alt,
  #appointment .contact-alt {
    grid-column: 1;
    grid-row: 2;
    max-width: none;
    margin: 0;
  }

  /* In der schmalen Spalte stehen die beiden Kacheln untereinander. */
  #termin .contact-channels,
  #appointment .contact-channels {
    grid-template-columns: 1fr;
  }
}

.kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary-light);
  margin-bottom: 0.7em;
}

.lead {
  font-size: 1.08rem;
  color: var(--color-text-muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.7em;
  border-radius: var(--radius-sm);
  font-weight: 640;
  font-size: 1rem;
  line-height: 1.2;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}

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

.btn--cta {
  background: var(--color-cta);
  color: #fff;
  box-shadow: 0 12px 32px rgba(2, 10, 30, 0.4);
}

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

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn--ghost:hover {
  background: var(--color-accent-bg);
}

.btn--small {
  padding: 0.55em 1.1em;
  font-size: 0.92rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  border-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-height);
}

.site-header__logo img {
  width: 190px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.site-nav a {
  color: var(--color-text);
  font-weight: 560;
  font-size: 0.98rem;
  /* Der Header hat eine feste Höhe — ein umbrechender Eintrag wie
     "So entsteht deine App" würde oben abgeschnitten und unten herauslaufen. */
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--color-primary-light);
  text-decoration: none;
}

.site-nav .btn {
  color: #fff;
}

.site-nav .btn:hover {
  color: #FFFFFF;
  /* Nur Farbwechsel — der Kontakt-Button in der Navi soll nicht springen. */
  transform: none;
}

/* Container in Form und Höhe des Kontakt-Buttons (.btn--small). */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  /* 0.75em statt 1.1em: Zusammen mit dem 0.35em-Padding der DE/EN-Links ergibt
     sich der gleiche Kante-zu-Text-Abstand wie beim Kontakt-Button (1.1em). */
  padding: 0.55em 0.75em;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: rgba(14, 59, 129, 0.06);
  /* 0.98rem statt 0.92rem: In der Navi überschreibt `.site-nav a` die
     `.btn--small`-Schriftgröße, der Kontakt-Button rendert also mit 0.98rem. */
  font-size: 0.98rem;
  line-height: 1.2;
  color: var(--color-text-muted);
  transition: background 0.2s ease;
}

.lang-switch:hover {
  background: rgba(14, 59, 129, 0.1);
}

.lang-switch a {
  position: relative;
  color: var(--color-text-muted);
  font-weight: 600;
  padding: 0 0.35em;
}

/* Touch-Ziel: DE/EN sind visuell klein. Ein unsichtbares ::after-Overlay
   vergrößert die Trefferfläche auf ~44px, ohne das Layout der Navigation zu
   verändern. Die Werte sind so gewählt, dass sich die beiden Flächen nicht
   überlappen (sonst würde der rechte Rand von „DE" auf „EN" auslösen). */
.lang-switch a::after {
  content: "";
  position: absolute;
  inset: -15px -4px;
}

.lang-switch a:hover {
  color: var(--color-primary-light);
  text-decoration: none;
}

.lang-switch .is-active {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--color-primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

/* ---------- Hero ----------
   Abgerundetes Panel, das leicht von den Seitenrändern eingerückt ist. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(115% 95% at 22% 8%, #173e8f 0%, #0c2258 48%, #081a44 100%);
  margin: clamp(8px, 1vw, 16px);
  border-radius: var(--radius-lg);
  padding: clamp(3rem, 7vw, 5rem) 0 0;
  /* Höhe des weißen Sockels; koppelt .hero__floor und .hero__text,
     damit das Porträt bündig darauf steht. */
  --hero-floor-h: clamp(40px, 5vw, 84px);
}

/* Weißer Sockel: Porträt und untere Kachelreihe stehen darauf und
   leiten optisch in den weißen Seiteninhalt über. */
.hero__floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: var(--hero-floor-h);
  background: var(--color-bg);
}

.hero h1 {
  color: #fff;
  font-size: clamp(2.1rem, 3.6vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero__text {
  position: relative;
  z-index: 6;
  /* Höhe entspricht dem weißen Sockel (.hero__floor): stellt die frühere
     Größe der blauen Hero-Fläche wieder her und hält die Bullet-Points
     oberhalb des Sockels im blauen Bereich. */
  padding-bottom: var(--hero-floor-h);
}

.hero__text .lead {
  color: rgba(233, 240, 252, 0.88);
}

.hero__text .lead strong {
  color: #fff;
}

.hero__platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.hero__platforms li {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.7em 1.15em;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.hero__platforms svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Kurz-Stichpunkte im Hero (ersetzt die Kacheln) */
.hero__points {
  display: grid;
  gap: 0.75rem;
  max-width: 30rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.hero__points li {
  position: relative;
  padding-left: 1.9rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
}

.hero__points li::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.15em;
  width: 0.5rem;
  height: 0.85rem;
  border: solid var(--color-accent);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

/* ---------- Leistungs-Liste (Bereich „Leistungen") ---------- */
/* Accordion nach demselben Muster wie die FAQ (.faq-item), aber über die volle
   Container-Breite statt auf 780px begrenzt. Die Liste selbst ist nur noch
   Layout-Container ohne eigene Fläche; jedes Item trägt seinen eigenen Rahmen.
   gap wie bei der FAQ (.faq-list). */
.service-list {
  margin: 0;
  /* explizit: sonst greift der ul-Standardeinzug des Browsers (40px). */
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* 1px wie bei allen ruhenden Karten der Seite (.faq-item, .project-card) — 2px
   ist den Zuständen der Buttons vorbehalten. Sichtbar bleibt der Rahmen über die
   kräftige Farbe (dasselbe Blau wie .kicker), nicht über die Stärke. */
.service-list__item {
  background: var(--color-bg);
  border: 1px solid var(--color-primary-light);
  border-radius: var(--radius-md);
  transition: box-shadow 0.2s ease;
}

.service-list__item[open] {
  box-shadow: var(--shadow-sm);
}

.service-list__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  list-style: none;
}

.service-list__head::-webkit-details-marker {
  display: none;
}

.service-list__head:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.service-list__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--color-accent-bg);
  color: var(--color-primary-light);
}

.service-list__icon svg {
  width: 26px;
  height: 26px;
}

.service-list__head h3 {
  flex: 1;
  margin: 0;
  font-size: 1.375rem;
}

/* Fluchtet mit der linken Icon-Kante (= Head-Padding). */
.service-list__body {
  padding: 0 1.5rem 1.5rem;
}

.service-list__body p {
  margin: 0 0 1.25rem;
  max-width: 60rem;
  color: var(--color-text-muted);
}

.service-list__points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-list__points li {
  position: relative;
  padding-left: 1.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Häkchen wie im Hero (.hero__points), nur in Markenblau statt Grün. */
.service-list__points li::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 0.15em;
  width: 0.45rem;
  height: 0.8rem;
  border: solid var(--color-primary-light);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.hero .btn--primary {
  background: #fff;
  color: var(--color-primary-dark);
  box-shadow: 0 12px 32px rgba(2, 10, 30, 0.4);
}

.hero .btn--primary:hover {
  background: #d9e6ff;
  color: var(--color-primary-dark);
}

.hero .btn--ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.hero .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.hero :focus-visible {
  outline-color: #9cc0ff;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: end;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.hero__answer {
  color: #8fb8ff;
}

/* Gestaffelter Einstieg beim Laden — nur ohne Reduced Motion */
@media (prefers-reduced-motion: no-preference) {
  .hero__eyebrow,
  .hero h1,
  .hero__platforms,
  .hero__text .lead,
  .hero__actions,
  .hero__points,
  .hero__visual {
    animation: hero-rise 0.55s ease-out both;
  }

  .hero h1 { animation-delay: 0.08s; }
  .hero__platforms { animation-delay: 0.02s; }
  .hero__text .lead { animation-delay: 0.2s; }
  .hero__actions { animation-delay: 0.28s; }
  .hero__points { animation-delay: 0.36s; }
  .hero__visual { animation-delay: 0.16s; }
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero__text .lead {
  max-width: 30rem;
  font-size: 1.2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

/* Geräte-Mockups vor dem Porträt, Porträt rechts unten verankert.
   Die Spalte füllt die volle Zeilenhöhe, damit die Kulisse oben bündig
   mit den Plattform-Chips beginnt. */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  align-self: stretch;
  margin-bottom: calc(-1 * clamp(3rem, 7vw, 5rem));
}

.hero__portrait {
  position: absolute;
  right: -40%;
  bottom: 2%;
  z-index: 8;
}

.hero__portrait img {
  display: block;
  width: clamp(580px, 27vw, 830px);
  max-width: none;
  height: auto;
  margin-left: auto;
  margin-right: 30px;
  filter: drop-shadow(0 20px 44px rgba(2, 9, 24, 0.55));
}

/* IDE-Screenshot als Kulisse hinter Geräten und Porträt */
.hero__ide {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 120%;
  max-width: none;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6);
}

.hero__phone {
  position: absolute;
  z-index: 4;
  bottom: 40%;
  width: auto;
  height: min(40%, 430px);
  filter: drop-shadow(0 28px 44px rgba(0, 0, 0, 0.5));
}

.hero__phone--a {
  left: -20%;
  transform: rotate(-4deg);
}

.hero__phone--b {
  left: 10%;
  bottom: 40%;
  transform: rotate(2deg);
}

/* ---------- Leistungen ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.6rem;
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
}

.service-card__icon img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.card ul {
  margin: 1em 0 0;
  padding-left: 1.2em;
  color: var(--color-text-muted);
}

.card li {
  margin-bottom: 0.35em;
}

.usp-banner {
  margin-top: 1.6rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  padding: 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-md);
}

.usp-banner h3 {
  color: #fff;
  margin: 0 0 0.25em;
}

.usp-banner p {
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.85);
  max-width: 46rem;
}

.usp-banner .btn {
  flex-shrink: 0;
}

/* ---------- Referenz-Karten (App Reference Card) ----------
   Layout nach dem Claude-Design-Entwurf „App Reference Card":
   Kopf (Icon + Titel), zwei überlappende Geräte-Mockups, Fuß mit
   Plattform-Chips und „Ansehen"-Link. Schrift bleibt Inter (DSGVO,
   selbst gehostet) statt der Sora/Manrope-Vorlage. */
.projects-grid {
  display: grid;
  /* Karten bleiben bei max. 340px (Vorlagenbreite) und zentrieren sich;
     auto-fit klappt 3 → 2 → 1 Spalte ohne feste Breakpoints um. */
  grid-template-columns: repeat(auto-fit, minmax(300px, 340px));
  justify-content: center;
  gap: 24px;
}

/* Trennt die Projektkarten vom CTA-Banner — dieselbe Zäsur, die vorher die
   Leistungsliste abschloss. Auf getöntem Grund ist --color-border (#e3e8f0)
   gegen #eef3fb fast unsichtbar, daher die kräftigere Blauabstufung. Die
   Abstände oben und unten sind gleich, damit die Linie mittig liegt und
   außerhalb des Kartenschattens bleibt. */
#portfolio .projects-grid {
  padding-bottom: clamp(2.25rem, 4.5vw, 3rem);
  border-bottom: 1px solid rgba(12, 34, 88, 0.12);
}

#portfolio .usp-banner {
  margin-top: clamp(2.25rem, 4.5vw, 3rem);
}

.project-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  border-radius: 26px;
  overflow: hidden;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(12, 34, 88, 0.06);
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.18);
  color: #0c2258;
  /* Bezugsrahmen für den Stretch-Link, der die ganze Karte klickbar macht. */
  position: relative;
}

.project-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.project-card__icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.project-card__head h3 {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.4px;
  line-height: 1.15;
  margin: 0;
  color: #0c2258;
}

.project-card__subtitle {
  font-size: 14px;
  color: #5a6b96;
}

.project-card__media {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 340px;
  margin-top: 20px;
}

/* Die Bilder stecken in <picture> (WebP + Fallback); im Flex-Layout ist damit
   das <picture> das Flex-Item, nicht mehr das <img>. */
.project-card__media picture {
  display: flex;
  align-items: flex-end;
}

.project-card__media img {
  height: 300px;
  width: auto;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.18));
  transition: transform 0.3s ease;
}

/* Zweites Gerät überlappt das erste leicht nach hinten/unten versetzt. */
.project-card__media picture:first-child {
  position: relative;
  z-index: 1;
}

.project-card__media picture + picture {
  margin-left: -40px;
  margin-bottom: 20px;
}

.project-card:hover .project-card__media img {
  transform: translateY(-6px);
}

.project-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Auf sehr schmalen Viewports (~320px) passen Plattform-Chips und Link nicht
     nebeneinander — der Link rutscht dann in die nächste Zeile, statt aus der
     Karte zu laufen. Ab ca. 360px bleibt die Zeile unverändert einzeilig. */
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-primary);
}

.project-card__platforms {
  display: flex;
  gap: 8px;
}

.platform-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(12, 34, 88, 0.3);
  border-radius: 12px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
}

.platform-chip svg {
  flex-shrink: 0;
  fill: #0c2258;
}

.project-card__link {
  font-size: 14px;
  font-weight: 700;
  color: #1777f4;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.project-card__link:hover {
  text-decoration: none;
  color: var(--color-primary);
}

/* Ganze Karte klickbar: „Ansehen" bleibt der einzige echte Link, sein
   ::after-Overlay spannt sich über die Karte. z-index über den Mockups
   (die first-child liegt bei z-index:1), damit auch sie den Link auslösen. */
.project-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
}

.chips li {
  background: var(--color-accent-bg);
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 640;
  padding: 0.28em 0.85em;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Arbeitsweise ---------- */
/* Timeline über die volle Container-Breite: Der Nummernkreis sitzt oben links
   in der Karte, zwischen zwei Karten verbindet ein kurzes Linienstück senkrecht
   unter der Badge-Mitte. Kartenoptik wie .service-list__item. */
.steps {
  /* --steps-gap steuert zugleich den Kartenabstand und die Länge des
     Verbindungsstücks; --steps-pad-x hält die Linie unter der Badge-Mitte. */
  --steps-gap: 2rem;
  --steps-badge: 56px;
  --steps-pad-x: 1.5rem;
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--steps-gap);
}

.steps > li {
  position: relative;
}

/* Verbindungsstück: sitzt komplett im Abstand unter der Karte (top: 100%),
   ist also nur zwischen den Items sichtbar. */
.steps > li::after {
  content: "";
  position: absolute;
  top: 100%;
  height: var(--steps-gap);
  /* Kartenrahmen + Innenabstand + halbe Badge-Breite − halbe Linienbreite */
  left: calc(1px + var(--steps-pad-x) + var(--steps-badge) / 2 - 1px);
  width: 2px;
  background: var(--color-border);
}

.steps > li:last-child::after {
  content: none;
}

.steps__card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem var(--steps-pad-x);
}

/* display: flex macht das Pseudo-Element zum Block — der Kreis steht dadurch
   auf einer eigenen Zeile über der Überschrift. */
.steps__card::before {
  counter-increment: step;
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--steps-badge);
  height: var(--steps-badge);
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.steps h3 {
  font-size: 1.375rem;
  margin: 0 0 0.4em;
}

.steps p {
  margin: 0;
  /* Bewusst ohne max-width: Der Fließtext läuft über die volle Kartenbreite,
     damit links und rechts derselbe Innenabstand (--steps-pad-x) steht. */
  color: var(--color-text-muted);
}

.steps p + p {
  margin-top: 0.75rem;
}

/* Stichpunkte unter dem Fließtext. .steps p hat margin: 0, der Abstand nach
   oben muss also hier entstehen. */
.steps__points {
  /* .steps vererbt list-style: none — hier bewusst zurückgeholt. */
  list-style: disc;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* Spaltenweise füllen: Punkt 1+2 links, 3+4 rechts. Setzt vier Einträge pro
     Liste voraus — bei einer ungeraden Anzahl entstünde eine dritte Spalte. */
  grid-template-rows: repeat(2, auto);
  grid-auto-flow: column;
  gap: 0.5rem 2rem;
  /* Schmaler als der Fließtext (.steps p, 60rem): Stichpunkte sind kurz, ohne
     Begrenzung reißt das Raster die beiden Spalten weit auseinander. */
  max-width: 40rem;
  margin: 1rem 0 0;
  padding: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Der Einzug sitzt am li, nicht an der Liste: So bekommt jede Spalte ihren
   eigenen Platz für den Marker, statt ihn nur der ersten zu geben. */
.steps__points li {
  margin-left: 1.25em;
}

.steps__points li::marker {
  color: var(--color-primary-light);
}

/* ---------- Über mich ---------- */
.about {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

/* Variante für das Hochformat-Porträt (7:10) — breitere Bildspalte. */
.about--portrait {
  grid-template-columns: 420px 1fr;
}

.about__photo {
  position: relative;
}

.about__photo img {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about__photo::after {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-lg);
  opacity: 0.25;
  z-index: -1;
}

.about__body .lead {
  margin-bottom: 1.2em;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 780px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--color-accent-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item[open] {
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 640;
  font-size: 1.05rem;
  color: var(--color-text);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.faq-item__question {
  flex: 1;
}

/* Das +/−-Icon wird von der FAQ und der Leistungs-Liste gemeinsam genutzt. */
.faq-item__icon,
.service-list__toggle {
  flex: 0 0 auto;
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-primary);
  transition: background 0.2s ease;
}

.faq-item:hover .faq-item__icon,
.service-list__item:hover .service-list__toggle {
  background: var(--color-primary-light);
}

/* + / − Zeichen aus zwei Strichen */
.faq-item__icon::before,
.faq-item__icon::after,
.service-list__toggle::before,
.service-list__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 2px;
  background: #fff;
  transform: translate(-50%, -50%);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.faq-item__icon::after,
.service-list__toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

/* im offenen Zustand wird aus dem + ein − */
.faq-item[open] .faq-item__icon::after,
.service-list__item[open] .service-list__toggle::after {
  transform: translate(-50%, -50%) rotate(0deg);
  opacity: 0;
}

.faq-item__body {
  padding: 0 1.5rem 1.4rem;
  color: var(--color-text-muted);
}

.faq-item__body p {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .faq-item[open] .faq-item__body,
  .service-list__item[open] .service-list__body {
    animation: faq-reveal 0.25s ease;
  }
}

@keyframes faq-reveal {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Calendly / Termin ---------- */
.calendly-section {
  text-align: center;
}

/* Die Maße standen ursprünglich als Inline-Style im Embed-Snippet von Calendly.
   Hier im CSS lassen sie sich vom Zwei-Spalten-Layout (Media Query oben) ohne
   !important überschreiben. 700px ist die Höhe, unterhalb derer Calendly einen
   eigenen Scrollbalken im iframe einblendet. */
.calendly-inline-widget {
  min-width: 320px;
  height: 700px;
}

.calendly-card {
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.calendly-placeholder {
  padding: clamp(2rem, 4vw, 2.5rem) 2rem;
}

.calendly-placeholder h3 {
  margin-bottom: 0.4em;
}

.calendly-placeholder p {
  color: var(--color-text-muted);
  max-width: 34rem;
  margin: 0 auto 1.2em;
}

/* Breiter als der Erklärtext, damit der Rechtssatz in eine Zeile passt */
.calendly-placeholder .privacy-note {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  max-width: 44rem;
  margin: 1.1em auto 0;
}

.calendly-embed {
  height: 760px;
}

.calendly-error {
  color: #b42318;
  font-weight: 600;
  margin-top: 1em;
}

.btn:disabled {
  opacity: 0.55;
  cursor: default;
  pointer-events: none;
}

.calendly-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Kontakt: schriftliche Alternativen zum Termin ---------- */
.contact-alt {
  max-width: 860px;
  margin: clamp(1.5rem, 3vw, 2rem) auto 0;
}

/* Beschriftete Trennlinie: setzt die Kacheln als Alternative zum Kalender ab */
.contact-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 clamp(1rem, 2.5vw, 1.25rem);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
}

.contact-divider::before,
.contact-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.contact-channels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
  padding: 1.1rem 1.35rem;
  text-align: left;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  transition: transform 0.15s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.contact-channel:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-md);
}

/* Gleiche Icon-Fläche wie bei den Leistungen (.service-list__icon) */
.contact-channel__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--color-accent-bg);
  color: var(--color-primary-light);
}

.contact-channel__icon svg {
  width: 26px;
  height: 26px;
}

/* PNG etwas größer als das SVG, damit beide Glyphen optisch gleich wirken */
.contact-channel__icon img {
  width: 30px;
  height: auto;
}

.contact-channel__text {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.contact-channel__label {
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.3;
}

.contact-channel__value {
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-footer);
  color: rgba(255, 255, 255, 0.82);
  padding: 3.5rem 0 2rem;
  font-size: 0.95rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.site-footer__logo {
  width: 210px;
  margin-bottom: 1rem;
}

.site-footer h4 {
  color: #fff;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1em;
}

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

/* Touch-Ziele: Die Links werden per Padding auf ~44px Höhe gebracht (Google
   empfiehlt mind. 44px). Das margin-bottom wird entsprechend reduziert, damit
   die Spalten nicht auseinanderlaufen. Die Adresszeile ist kein Link und
   bekommt das Padding deshalb direkt. */
.site-footer li {
  margin-bottom: 0.15em;
}

.site-footer li a {
  display: inline-block;
  padding: 10px 0;
}

.footer-contact li:first-child {
  padding: 10px 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.82);
}

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

.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.footer-contact svg {
  width: 18px;
  height: 18px;
  vertical-align: -4px;
  margin-right: 0.5em;
}

/* ---------- Projekt-Detailseiten ---------- */
.case-hero {
  background: linear-gradient(180deg, #f7faff 0%, #ffffff 100%);
  padding: clamp(3rem, 7vw, 4.5rem) 0 clamp(2rem, 5vw, 3rem);
}

.case-hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.case-hero__media {
  display: flex;
  justify-content: center;
}

.case-hero__media picture {
  display: flex;
  min-width: 0;
}

.case-hero__media img {
  max-height: 460px;
  width: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.case-hero__media img.is-phone {
  border: 8px solid #1c1f26;
  border-radius: 32px;
}

/* Geräte-Mockups bringen Rahmen und Schatten bereits im Bild mit */
.case-hero__media img.is-mockup {
  border-radius: 0;
  box-shadow: none;
}

/* Zwei Geräte im Case-Hero — gleiche Komposition wie die Projekt-Karte auf der
   Startseite: zweites Gerät nach hinten/unten versetzt, leicht überlappend. */
.case-hero__media--pair {
  align-items: flex-end;
}

.case-hero__media--pair picture {
  align-items: flex-end;
}

.case-hero__media--pair img {
  max-height: 420px;
  /* Statt box-shadow ein drop-shadow, damit der Schatten der Gerätesilhouette
     folgt und nicht dem Bild-Rechteck (identisch zur Karte). */
  box-shadow: none;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.18));
}

.case-hero__media--pair picture:first-child {
  position: relative;
  z-index: 1;
}

/* Bei .is-phone (dunkler CSS-Rahmen um einen dunklen Screenshot) verschwimmt die
   Kante zum dahinterliegenden Gerät. Das vordere Gerät wirft daher zusätzlich
   einen gerichteten Schatten nach rechts. Mockups mit hellem, eingebackenem
   Rahmen brauchen das nicht. */
.case-hero__media--pair picture:first-child img.is-phone {
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.18))
    drop-shadow(8px 0 12px rgba(0, 0, 0, 0.45));
}

.case-hero__media--pair picture + picture {
  margin-left: -40px;
  margin-bottom: 20px;
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  margin-bottom: 1.2rem;
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-primary-light);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.feature-list li {
  position: relative;
  padding-left: 2rem;
  color: var(--color-text-muted);
}

.feature-list li strong {
  color: var(--color-text);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg>')
    center / 11px no-repeat;
}

.gallery {
  display: flex;
  gap: 1.2rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 0.25rem 1.2rem;
  -webkit-overflow-scrolling: touch;
}

/* Flex- und Snap-Verhalten gehört ans <picture>, das hier das Flex-Item ist. */
.gallery picture {
  display: flex;
  flex-shrink: 0;
  scroll-snap-align: start;
}

.gallery img {
  height: 440px;
  width: auto;
}

.gallery img.is-mockup {
  border: none;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 14px 28px rgba(14, 59, 129, 0.22));
}

.gallery--tablets {
  flex-wrap: wrap;
  overflow: visible;
}

.gallery--tablets picture {
  max-width: min(520px, 100%);
}

.gallery--tablets img {
  height: auto;
  max-width: 100%;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
}

.tech-grid .card {
  padding: 1.4rem 1.5rem;
}

.tech-grid h3 {
  font-size: 1rem;
  margin-bottom: 0.3em;
}

.tech-grid p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.case-cta {
  text-align: center;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4rem) 2rem;
  box-shadow: var(--shadow-lg);
}

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

.case-cta p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 38rem;
  margin: 0 auto 1.6em;
}

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

.case-cta .btn:hover {
  background: var(--color-accent-bg);
}

/* ---------- Rechtsseiten ---------- */
.legal-content {
  max-width: 780px;
}

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

.legal-content h3 {
  font-size: 1.1rem;
  margin-top: 1.6em;
}

/* ---------- Scroll-Reveal ----------
   Nur aktiv, wenn JS läuft (html.js wird in main.js gesetzt) —
   ohne JavaScript bleiben alle Inhalte sichtbar. */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  html.js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover,
  .contact-channel:hover,
  .card:hover,
  .project-card:hover .project-card__media img {
    transform: none;
  }
}

/* ---------- Responsive ---------- */
/* Unterhalb dieser Breite würden Kulisse und Mockups die Leistungs-Kacheln überdecken */
/* Unter 1080px (gesamter Mini-Collage-Bereich): Hero-Collage von der
   gestreckten Grid-Spalte auf eine in sich geschlossene, große Box umstellen
   und neu schichten — IDE hinten, Porträt (auf dem weißen Sockel) davor,
   Phones links ganz vorne. Phones bleiben links/tief, damit Gesicht & Hals
   des Porträts frei bleiben. Gilt für 2-Spalten (820–1080) UND gestapelt. */
@media (max-width: 1080px) {
  /* Porträt-Spalte etwas schmaler, damit der Textblock nicht zu eng wird. */
  .about--portrait {
    grid-template-columns: 340px 1fr;
  }

  .hero__visual {
    position: relative;
    width: 100%;
    align-self: stretch;
    justify-content: initial;
    align-items: initial;
    margin-bottom: calc(-1 * clamp(3rem, 7vw, 5rem));
  }

  /* IDE oben bündig mit den Android/iOS-Chips (top: 0), aber Höhe begrenzt →
     Unterkante ~ wie im Desktop-Layout (nicht bis zum Sockel). Da die Box
     schmaler ist als das Bildseitenverhältnis, bleibt die volle IDE-Höhe
     sichtbar (inkl. Statusleiste) und nur die rechte Seite wird beschnitten. */
  .hero__ide {
    top: 0;
    left: 0;
    width: 100%;
    height: 62%;
    object-fit: cover;
    object-position: left top;
    z-index: 1;
  }

  .hero__portrait {
    position: absolute;
    right: -6%;
    left: auto;
    bottom: 0;
    width: 72%;
    z-index: 5;
  }

  .hero__portrait img {
    width: 100%;
    min-width: 0;
  }

  .hero__phone {
    height: 50%;
    bottom: 0;
    z-index: 9;
  }

  .hero__phone--a {
    left: -8%;
  }

  .hero__phone--b {
    left: 12%;
    bottom: 3%;
  }
}

/* Nur 2-Spalten-Bereich (821–1080px): Porträt deutlich größer, sodass sein
   oberes Drittel vor der (in der Höhe begrenzten) IDE liegt. */
@media (min-width: 821px) and (max-width: 1080px) {
  .hero__portrait {
    width: 120%;
  }
}

@media (max-width: 980px) {
  /* .projects-grid regelt das Umbrechen selbst über auto-fit. */
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Navigation ins Hamburger-Menü, sobald die fünf Einträge nicht mehr einzeilig
   neben Logo, Sprachumschalter und Kontakt-Button passen. Gemessen reißt die
   Zeile ab ca. 1010px — 1060px lässt Luft für breitere Schriftrenderings.
   Bewusst getrennt vom 820px-Block: dort hängen Hero- und Sektions-Layouts
   dran, die erst deutlich später umbrechen sollen. */
@media (max-width: 1060px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    padding: 0.6rem 20px 1.4rem;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s;
  }

  body.nav-open .site-nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  body.nav-open {
    overflow: hidden;
  }

  body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }

  body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }

  .site-nav a {
    padding: 0.8em 0;
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav .lang-switch {
    align-self: flex-start;
    margin-top: 1em;
  }

  /* Die generische mobile Nav-Link-Regel darf den Container nicht aufreißen. */
  .site-nav .lang-switch a {
    padding: 0 0.35em;
    border-bottom: none;
  }

  .site-nav .btn {
    margin-top: 1rem;
    justify-content: center;
  }
}

@media (max-width: 820px) {
  .hero__inner,
  .case-hero__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero__text {
    padding-bottom: 0;
    text-align: left;
  }

  .hero__visual {
    /* Gestapelt (eine Spalte): keine Zeile zum Strecken → feste Höhe, damit die
       absolut positionierten Bilder Raum haben. Positionierung/Schichtung kommt
       aus dem @media (max-width: 1080px)-Block. */
    order: 2;
    aspect-ratio: 1 / 1;
  }

  /* Phones nach rechts schieben: links nicht abgeschnitten, rechts daneben
     bleibt (unter der begrenzten IDE) blauer Hintergrund sichtbar. */
  .hero__phone--a {
    left: 2%;
  }

  .hero__phone--b {
    left: 26%;
  }

  .service-list {
    gap: 0.75rem;
  }

  .service-list__head {
    padding: 1rem 1.25rem;
    gap: 0.75rem;
  }

  /* Der Toggle-Button nimmt Platz weg — kleinere Überschrift, damit die
     Titel nicht über drei Zeilen umbrechen. */
  .service-list__head h3 {
    font-size: 1.125rem;
  }

  .service-list__icon {
    width: 44px;
    height: 44px;
  }

  .service-list__icon svg {
    width: 22px;
    height: 22px;
  }

  .service-list__body {
    padding: 0 1.25rem 1.25rem;
  }

  .service-list__points {
    grid-template-columns: 1fr;
  }

  /* Timeline kompakter: Linienposition folgt automatisch aus --steps-badge
     und --steps-pad-x. */
  .steps {
    --steps-gap: 1.5rem;
    --steps-badge: 44px;
    --steps-pad-x: 1.25rem;
  }

  .steps__card {
    padding: 1.25rem var(--steps-pad-x);
  }

  .steps__card::before {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .steps h3 {
    font-size: 1.125rem;
  }

  /* Eine Spalte: grid-auto-flow zurück auf row, sonst würden trotz einer
     Spaltendefinition weiter Spalten angelegt. */
  .steps__points {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-auto-flow: row;
  }

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

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

  .about__photo {
    max-width: 300px;
  }

  .about--portrait .about__photo {
    max-width: 360px;
    margin-inline: auto;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .gallery img {
    height: 360px;
  }
}

@media (max-width: 560px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
  }

  .site-header__logo img {
    width: 150px;
  }

  .calendly-embed {
    height: 900px;
  }

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

  /* Zwei Geräte nebeneinander brauchen auf schmalen Displays weniger Höhe,
     sonst schiebt das Paar den Container über die Viewport-Breite hinaus. */
  .case-hero__media--pair img {
    max-height: 320px;
  }

  .case-hero__media--pair picture + picture {
    margin-left: -32px;
  }
}
