/* Design tokens — Figma „Desktop“ Frame */
:root {
  --black: #0a0b0f;
  --blue-900: #101421;
  --blue-700: #4358ca;
  --gray-100: #fafafa;
  --white: #ffffff;
  --stroke: 4px;
  --space-200: 4px;
  --space-300: 6px;
  --space-400: 8px;
  --space-500: 12px;
  --space-600: 16px;
  --space-700: 24px;
  --space-800: 32px;
  --space-900: 48px;
  --space-1000: 64px;
  --space-1100: 80px;
  --space-1200: 96px;
  --space-1400: 160px;
  --max-wide: 1440px;
  --max-narrow: 880px;
  --max-contact: min(856px, 100%);
  --max-text: 856px;
  --font-body: 20px;
  --lh-body: 26px;
  --nav-height: 52px;
  /* Abstand beim Anspringen von Ankern, damit nichts unter der sticky Nav liegt */
  --nav-anchor-offset: clamp(4.25rem, 10vw, 5.75rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: var(--nav-anchor-offset);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: "Outfit", system-ui, sans-serif;
  color: var(--gray-100);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1400);
  padding-top: 0;
  padding-bottom: var(--space-1100);
  background: linear-gradient(90deg, var(--blue-900) 0%, var(--black) 100%);
}

/* Kontakt sitzt bündig am Footer (kein Seiten-Padding darunter) */
.page:has(> .block--contact:last-child) {
  padding-bottom: 0;
}

/* ——— Nav ——— */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: var(--black);
  padding: var(--space-500) var(--space-500);
}

.nav__inner {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-600);
}

.logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 220ms ease;
}

.logo:hover {
  transform: translateY(-1px);
}

.logo:focus-visible {
  outline: 2px solid var(--gray-100);
  outline-offset: 4px;
  border-radius: 6px;
}

.logo__mark {
  position: relative;
  display: block;
  width: 46px;
  height: 28px;
  animation: logoFloat 4s ease-in-out infinite;
}

.logo__half {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44.64%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo__half--left {
  left: 0;
  transform-origin: right center;
  transition: transform 280ms ease;
}

.logo__half--right {
  right: 0;
  transform-origin: left center;
  transition: transform 280ms ease;
}

.logo__half img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo:hover .logo__half--left,
.logo:focus-visible .logo__half--left {
  transform: translateX(-1px);
}

.logo:hover .logo__half--right,
.logo:focus-visible .logo__half--right {
  transform: translateX(1px);
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-1px);
  }
}

@keyframes heroImageKenBurns {
  0% {
    transform: scale(1.03) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.08) translate3d(-1.2%, -0.8%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo__mark {
    animation: none;
  }

  .hero__image img {
    animation: none;
    transform: none;
  }

  .logo,
  .logo__half--left,
  .logo__half--right {
    transition: none;
  }
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-200);
  align-items: center;
  justify-content: flex-end;
}

.nav__link {
  font-family: "Outfit", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 100%;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  padding: var(--space-200) var(--space-500);
  transition: font-weight 0.15s ease, text-decoration-color 0.15s ease;
}

.nav__link:hover {
  font-size: 16px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav__link.is-active {
  font-size: 16px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav__link.is-active:hover {
  font-size: 16px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav__link:focus-visible {
  outline: 2px solid var(--gray-100);
  outline-offset: 3px;
}

/* ——— Hero ——— */
.hero {
  width: 100%;
  max-width: none;
  min-height: calc(100svh - var(--nav-height));
  padding: var(--space-1000) 0 var(--space-1000);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1000);
  background: #fafafa;
  box-sizing: border-box;
}

.hero__image-wrap {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 var(--space-500);
  box-sizing: border-box;
  background: transparent;
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
}

.hero__image {
  position: relative;
  width: min(1300px, 100%);
  height: clamp(620px, 72vh, 820px);
  margin-left: auto;
  overflow: hidden;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.03);
  animation: heroImageKenBurns 14s ease-in-out infinite alternate;
  will-change: transform;
}

.hero__title-wrap {
  position: absolute;
  left: calc(-1 * var(--space-500));
  top: auto;
  bottom: 142px;
  z-index: 2;
  width: 584px;
  max-width: calc(100% + var(--space-500));
  box-sizing: border-box;
  padding: var(--space-700);
  background: #4358ca;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: var(--space-500);
}

.hero__title {
  margin: 0;
  width: 100%;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 42px;
  line-height: 52.2px;
  letter-spacing: 0;
  word-spacing: -0.12em;
  text-align: left;
  color: var(--gray-100);
}

.hero__title-line {
  display: block;
}

.hero__intro {
  margin: 0;
  width: 100%;
  text-align: left;
  font-weight: 400;
  font-size: var(--font-body);
  line-height: var(--lh-body);
  color: rgba(250, 250, 250, 0.9);
}

/* ——— Sections ——— */
.block {
  width: 100%;
  max-width: var(--max-narrow);
  padding: 0 var(--space-500);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-800);
}

.block--wide {
  max-width: var(--max-wide);
}

.block--grid {
  max-width: var(--max-wide);
  min-height: 114px;
  align-items: flex-start;
  justify-content: space-between;
}

.h-section {
  margin: 0;
  width: 100%;
  text-align: center;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 42px;
  line-height: normal;
  color: var(--gray-100);
}

.body-center {
  margin: 0;
  width: 100%;
  max-width: 100%;
  text-align: center;
  font-weight: 400;
  font-size: var(--font-body);
  line-height: var(--lh-body);
  color: var(--gray-100);
}

.body-center--fixed {
  max-width: 518px;
  margin: 0 auto;
}

/* ——— Skills chips ——— */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-700);
  align-items: center;
  justify-content: center;
  width: 100%;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-400) var(--space-500);
  background: var(--gray-100);
  font-weight: 600;
  font-size: var(--font-body);
  line-height: normal;
  color: var(--black);
  white-space: nowrap;
}

.chip--on-light {
  background: var(--gray-100);
}

.chip--blue-text,
.chip-row--blue-text .chip {
  color: var(--blue-900);
}

.label--blue-text {
  color: var(--blue-900);
}

/* ——— Case studies ——— */
#arbeit {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-700);
}

.h-section--projects {
  width: 100%;
  max-width: var(--max-narrow);
  padding: 0 var(--space-500);
  box-sizing: border-box;
}

#arbeit > .case:first-of-type {
  padding-top: 0;
}

#arbeit > .case + .case {
  margin-top: 120px;
}

.case {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-900);
  padding: var(--space-900) 0 var(--space-1200);
}

.case__text {
  align-items: flex-start;
  gap: var(--space-700);
  max-width: var(--max-wide);
}

.case__text .case__title,
.case__text .case__body {
  max-width: var(--max-text);
  width: 100%;
}

.case__text .label {
  width: fit-content;
  max-width: min(var(--max-text), 100%);
}

.label {
  display: inline-flex;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  align-items: center;
  justify-content: center;
  padding: var(--space-400) var(--space-500);
  background: var(--gray-100);
  font-weight: 600;
  font-size: var(--font-body);
  line-height: normal;
  color: var(--black);
  white-space: nowrap;
}

.label--on-light {
  background: var(--gray-100);
}

.case__title {
  margin: 0;
  font-weight: 600;
  font-size: 32px;
  line-height: normal;
  color: var(--gray-100);
}

.case__body {
  margin: 0;
  font-weight: 400;
  font-size: var(--font-body);
  line-height: normal;
  color: var(--gray-100);
}

.case__gallery {
  --gallery-gap: var(--space-800);
  --gallery-image-height: 570px;
  --case-marquee-speed: 32.5px;
  max-width: var(--max-wide);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-500);
  box-sizing: border-box;
}

.case__gallery-viewport {
  position: relative;
  width: 100%;
  height: var(--gallery-image-height);
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}

.case__gallery-open {
  position: absolute;
  top: var(--space-600);
  right: var(--space-600);
  z-index: 3;
  cursor: pointer;
  touch-action: manipulation;
}

.case__gallery-viewport.is-dragging {
  cursor: grabbing;
}

.case__gallery-marquee {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--gallery-gap);
  width: max-content;
  height: var(--gallery-image-height);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.case__gallery-group {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: var(--gallery-gap);
  height: var(--gallery-image-height);
  flex-shrink: 0;
}

.case__gallery-group img {
  display: block;
  height: var(--gallery-image-height);
  width: auto;
  max-width: none;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--blue-900);
  -webkit-user-drag: none;
  user-select: none;
  cursor: zoom-in;
  touch-action: manipulation;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ——— Galerie Lightbox (Bild ohne Fläche, nur Scrollbar) ——— */
.gallery-lightbox {
  --gallery-lightbox-max-width: var(--max-wide);
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  background: transparent;
  overflow: hidden;
  color: var(--gray-100);
}

.gallery-lightbox[open] {
  display: block;
}

.gallery-lightbox::backdrop {
  background: var(--black);
}

.gallery-lightbox__shell {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: start;
  row-gap: var(--space-700);
  padding: var(--space-700);
  box-sizing: border-box;
  min-height: 0;
}

.gallery-lightbox__content {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(32px, 1fr) minmax(0, var(--gallery-lightbox-max-width)) minmax(32px, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  align-self: stretch;
  column-gap: var(--space-700);
  min-height: 0;
  height: 100%;
  width: 100%;
  max-width: 100%;
  justify-self: center;
}

.gallery-lightbox__header {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  justify-content: center;
  z-index: 2;
}

.gallery-lightbox__header-inner {
  width: 100%;
  max-width: var(--gallery-lightbox-max-width);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-700);
}

.gallery-lightbox__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-family: "Outfit", sans-serif;
  font-size: 32px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  color: var(--gray-100);
}

.gallery-lightbox__close {
  flex-shrink: 0;
}

.gallery-lightbox__side {
  grid-row: 1;
  justify-self: center;
  align-self: center;
  z-index: 2;
  flex-shrink: 0;
}

.gallery-lightbox__side--prev {
  grid-column: 1;
}

.gallery-lightbox__side--next {
  grid-column: 3;
}

.gallery-lightbox__viewport {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: var(--gallery-lightbox-max-width);
  height: 100%;
  min-height: 0;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

.gallery-lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  margin: 0;
  background: transparent;
}

.gallery-lightbox__counter {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.case__gallery-controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-700);
  margin: 0;
  width: auto;
  flex-shrink: 0;
}

.case__gallery-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  color: var(--gray-100);
  background: transparent;
  border: var(--stroke) solid var(--gray-100);
  cursor: pointer;
  transition:
    background-color 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease;
}

/* Default: Outline-Icon; Hover: heller Block + schwarzes Icon (wie Figma) */
.case__gallery-btn:hover:not(:disabled) {
  background: var(--gray-100);
  color: var(--black);
  border-color: var(--white);
  box-shadow: 0 0 0 1px rgba(250, 250, 250, 0.35);
}

.case__gallery-btn.case__gallery-open {
  color: var(--black);
  background: var(--white);
  border-color: var(--black);
  box-shadow: none;
}

.case__gallery-btn.case__gallery-open:hover:not(:disabled) {
  color: var(--white);
  background: var(--black);
  border-color: var(--black);
  box-shadow: none;
}

.case__gallery-btn:focus-visible {
  outline: 2px solid var(--gray-100);
  outline-offset: 3px;
}

.case__gallery-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.case__gallery-btn:disabled:hover {
  background: transparent;
  color: var(--gray-100);
  border-color: var(--gray-100);
  box-shadow: none;
}

/* Pausiert = gleicher „aktiver“ Look wie Hover */
.case__gallery-btn--pause.is-paused:not(:disabled) {
  background: var(--gray-100);
  color: var(--black);
  border-color: var(--white);
  box-shadow: 0 0 0 1px rgba(250, 250, 250, 0.35);
}

.case__gallery-btn__svg {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  pointer-events: none;
}

/* Mitte: Pause solange die Galerie läuft, Play wenn gestoppt (erneut klicken = weiter) */
.case__gallery-btn--pause .case__gallery-btn__svg--play-icon {
  display: none;
}

.case__gallery-btn--pause.is-paused:not(:disabled) .case__gallery-btn__svg--pause-icon {
  display: none;
}

.case__gallery-btn--pause.is-paused:not(:disabled) .case__gallery-btn__svg--play-icon {
  display: block;
}

/* Reduzierte Bewegung: nur Pause, kein „Play“-Hinweis */
.case__gallery-btn--pause:disabled .case__gallery-btn__svg--play-icon {
  display: none !important;
}

.case__gallery-btn--pause:disabled .case__gallery-btn__svg--pause-icon {
  display: block !important;
}

.case__gallery + .case__caption-row {
  margin-top: calc(var(--space-700) - var(--space-900));
}

.case__caption-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  row-gap: var(--space-700);
  column-gap: var(--space-700);
  padding: 0 var(--space-500);
  width: 100%;
  max-width: var(--max-wide);
  box-sizing: border-box;
}

.case__caption {
  display: flex;
  flex-direction: column;
  gap: var(--space-400);
  max-width: 416px;
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 300;
  line-height: normal;
  color: var(--gray-100);
}

.case__caption-title {
  margin: 0;
  font-size: var(--font-body);
  width: 100%;
}

.case__caption-sub {
  margin: 0;
  font-size: 14px;
  width: 100%;
}

/* ——— Tools ——— */
.tool-grid {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-700);
  align-items: stretch;
  justify-content: center;
}

.tool-card.tool-box {
  flex: 1 1 270px;
  min-width: 270px;
  max-width: 100%;
  border: var(--stroke) solid var(--gray-100);
  padding: var(--space-700);
  display: flex;
  flex-direction: column;
  gap: var(--space-600);
  align-items: center;
  justify-content: center;
  background: transparent;
  cursor: default;
  transition:
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.32s ease,
    background-color 0.28s ease,
    border-color 0.28s ease,
    color 0.28s ease;
}

.tool-card.tool-box:hover {
  transform: translateY(-5px) scale(1.03);
  background: var(--gray-100);
  color: var(--black);
  border-color: var(--white);
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(250, 250, 250, 0.35);
}

.tool-card.tool-box:hover .tool-card__name,
.tool-card.tool-box:hover .tool-card__label {
  color: var(--black);
}

.tool-card.tool-box .icon-slot img {
  transition: filter 0.28s ease;
}

.tool-card.tool-box:hover .icon-slot img {
  filter: brightness(0);
}

.tool-card__name {
  margin: 0;
  width: 100%;
  font-weight: 700;
  font-size: var(--font-body);
  line-height: normal;
  color: var(--white);
  transition: color 0.28s ease;
}

.tool-card__row {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-600);
}

.tool-card__label {
  font-weight: 300;
  font-size: 14px;
  line-height: normal;
  color: var(--white);
  text-align: center;
  white-space: nowrap;
  transition: color 0.28s ease;
}

.tool-card__icons {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-400);
  min-height: 24px;
}

.icon-slot {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.icon-slot img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* ——— Kontakt (Blue 700 Band, volle Breite; schmale Lesespalte) ——— */
.block.block--contact {
  align-self: stretch;
  width: 100%;
  max-width: none;
  padding: var(--space-1400) var(--space-500);
  background-color: var(--blue-700);
  box-sizing: border-box;
}

.block--contact__inner {
  width: 100%;
  max-width: var(--max-contact);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-700);
}

.block--contact .contact-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-700);
  width: 100%;
}

.block--contact .body-center {
  max-width: 100%;
  color: var(--gray-100);
}

.block--contact .contact-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1000);
  width: 100%;
}

@media (max-width: 600px) {
  .block.block--contact {
    padding: var(--space-1200) var(--space-500);
  }
}

.email-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: none;
  background: var(--white);
  cursor: pointer;
  color: var(--blue-700);
  text-decoration: none;
  transition:
    background-color 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.email-btn:hover {
  background: var(--black);
  box-shadow: none;
  color: var(--white);
  transform: translateY(-2px);
}

.email-btn:hover .email-btn__icon:first-of-type {
  transform: translateX(-4px);
}

.email-btn:hover .email-btn__icon:last-of-type {
  transform: translateX(4px);
}

.email-btn:hover .email-btn__text {
  color: var(--white);
}

.email-btn:focus-visible {
  outline: 2px solid var(--gray-100);
  outline-offset: 4px;
}

.email-btn__text {
  font-weight: 600;
  font-size: var(--font-body);
  line-height: normal;
  color: var(--blue-700);
  white-space: nowrap;
  transition: color 0.28s ease;
}

.email-btn__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.email-btn__chevron {
  display: block;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

/* ——— Impressum, Datenschutz & Footer ——— */
.legal-subpage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(90deg, var(--blue-900) 0%, var(--black) 100%);
}

.legal-subpage__main {
  flex: 1 0 auto;
  width: 100%;
  padding: var(--space-1000) var(--space-500) var(--space-1200);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.legal-subpage__main .legal {
  margin: 0 auto;
}

.legal {
  text-align: left;
  align-items: stretch;
}

.legal .h-section {
  text-align: center;
}

.legal__body {
  width: 100%;
  max-width: 62ch;
  margin: 0 auto;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: rgba(250, 250, 250, 0.88);
}

.legal__body p {
  margin: 0 0 1rem;
}

.legal__body p:last-child {
  margin-bottom: 0;
}

.legal__h3 {
  margin: 1.75rem 0 0.5rem;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--gray-100);
}

.legal__body > .legal__h3:first-of-type {
  margin-top: 0.75rem;
}

.legal__lead {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(250, 250, 250, 0.92);
}

.legal__body a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal__body a:hover {
  opacity: 0.9;
}

.site-footer {
  width: 100%;
  background: var(--black);
  padding: var(--space-500) var(--space-500);
}

.site-footer__inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-600);
  font-family: "Outfit", sans-serif;
  line-height: normal;
  color: var(--white);
}

.site-footer__brand {
  margin: 0;
  padding: var(--space-200) var(--space-500);
  font-weight: 400;
  font-size: 20px;
  line-height: normal;
  color: var(--white);
}

.site-footer__meta {
  margin: 0;
  font-weight: 400;
  font-size: 20px;
  line-height: normal;
  color: var(--white);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-200);
}

.site-footer__nav .site-footer__link {
  font-family: "Outfit", sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 100%;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  padding: var(--space-200) var(--space-500);
  transition: font-weight 0.15s ease, text-decoration-color 0.15s ease;
}

.site-footer__nav .site-footer__link:hover {
  font-size: 14px;
  font-weight: 300;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__link {
  font-family: "Outfit", sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 100%;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
  padding: var(--space-200) var(--space-500);
  transition: font-weight 0.15s ease, text-decoration-color 0.15s ease;
}

.site-footer__link:hover {
  font-size: 16px;
  font-weight: 300;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__link--inline {
  font-weight: 300;
  padding: 0;
  margin: 0;
  font-size: inherit;
  line-height: inherit;
}

.site-footer__link--inline:hover {
  font-size: inherit;
  font-weight: 300;
}

.site-footer__nav .site-footer__link[aria-current="page"] {
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__nav .site-footer__link[aria-current="page"]:hover {
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__link[aria-current="page"] {
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__link[aria-current="page"]:hover {
  font-size: 16px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__link:focus-visible {
  outline: 2px solid var(--gray-100);
  outline-offset: 3px;
}

.site-footer__sep {
  color: rgba(250, 250, 250, 0.45);
  user-select: none;
  font-weight: 300;
}

/* ——— Responsive (Frame ist Desktop-first) ——— */
@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding: var(--space-500) 0;
    gap: var(--space-900);
  }

  .hero__title {
    font-size: clamp(32px, 6.4vw, 42px);
    line-height: 1.2;
  }

  .hero__image {
    width: 100%;
    height: min(680px, 80vw);
  }

  .hero__image-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .hero__intro {
    font-size: 19px;
  }

  .hero__title-wrap {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    margin-top: var(--space-500);
    padding: var(--space-700) var(--space-600);
    background: #4358ca;
  }

  .h-section {
    font-size: clamp(28px, 6vw, 42px);
  }

  .page {
    gap: var(--space-1000);
  }

  #arbeit {
    gap: var(--space-1000);
  }

  #arbeit > .case + .case {
    margin-top: 0;
  }

  .block--software-extras {
    margin-block: var(--space-1000);
  }

  .case__caption-row .case__gallery-controls {
    flex-basis: 100%;
    justify-content: center;
  }

  .gallery-lightbox__shell {
    padding: var(--space-500);
    row-gap: var(--space-700);
  }

  .gallery-lightbox__content {
    grid-template-columns: 1fr auto auto 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    column-gap: var(--space-700);
    row-gap: var(--space-700);
  }

  .gallery-lightbox__viewport {
    grid-column: 1 / -1;
    grid-row: 1;
    height: 100%;
    min-height: 0;
  }

  .gallery-lightbox__side--prev {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .gallery-lightbox__side--next {
    grid-column: 3;
    grid-row: 2;
    justify-self: start;
  }
}

@media (max-width: 600px) {
  .nav__inner {
    flex-direction: row;
    align-items: center;
    gap: var(--space-400);
  }

  .nav__links {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: var(--space-200);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nav__links::-webkit-scrollbar {
    display: none;
  }

  .nav__link {
    flex-shrink: 0;
    padding: var(--space-200) var(--space-400);
    font-size: 14px;
  }

  .nav__link:hover,
  .nav__link.is-active,
  .nav__link.is-active:hover {
    font-size: 14px;
  }

  .hero {
    padding: var(--space-500) 0;
    gap: var(--space-700);
  }

  .hero__image-wrap {
    padding: 0 var(--space-500);
  }

  .hero__title-wrap {
    position: static;
    width: 100%;
    margin-top: 0;
    padding: var(--space-600);
    background: #4358ca;
    border: none;
    gap: var(--space-400);
  }

  .hero__title {
    font-size: clamp(30px, 9.5vw, 40px);
    line-height: 1.2;
  }

  .hero__intro {
    font-size: 18px;
  }

  .hero__image-wrap {
    padding: var(--space-800) var(--space-500) var(--space-500);
  }

  .hero__image-wrap {
    padding: 0;
  }

  .hero__intro {
    font-size: 19px;
  }

  .chip {
    white-space: normal;
    text-align: center;
  }

  .block--software-extras {
    margin-block: var(--space-1200);
  }

  .tool-card.tool-box {
    min-width: 100%;
  }

  .case__gallery {
    --gallery-image-height: min(570px, 52vw);
  }

  .site-footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-400);
    flex-wrap: nowrap;
  }

  .site-footer__brand {
    flex-shrink: 0;
    padding: var(--space-200) var(--space-400);
    font-size: 16px;
  }

  .site-footer__meta {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    padding-right: var(--space-400);
    font-size: 13px;
    line-height: 1.35;
  }

  .site-footer__nav {
    flex-shrink: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: var(--space-200);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .site-footer__nav::-webkit-scrollbar {
    display: none;
  }

  .site-footer__nav .site-footer__link {
    flex-shrink: 0;
    padding: var(--space-200) var(--space-400);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-card.tool-box {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  }

  .tool-card.tool-box:hover {
    transform: none;
    box-shadow: none;
  }

  .email-btn,
  .email-btn__icon {
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .email-btn:hover,
  .email-btn:hover .email-btn__icon {
    transform: none;
  }

  .nav__link,
  .site-footer__link {
    transition: none;
  }
}
