/* =====================================================
   Klemens Müller – Portfolio
   Monochrom, minimalistisch. Keine Frameworks.
   ===================================================== */

/* ---------- Variablen ---------- */
:root {
  --white: #fff;
  --black: #111;

  --font-display: 'Syne', system-ui, sans-serif;
  --font-body: 'Space Grotesk', system-ui, sans-serif;

  --container: 1400px;
  --container-pad: clamp(20px, 5vw, 64px);
  --section-pad: clamp(96px, 12vw, 160px);
  --nav-height: 72px;
}

/* ---------- Reset / Basis ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

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

.section--dark {
  background: var(--black);
  color: var(--white);
}

/* Blur-Flash an den Sektionsgrenzen: der Streifen überlappt die
   Hell/Dunkel-Kante und verwischt sie kurz beim Einscrollen (JS). */
.section,
.footer {
  position: relative;
}

.section-flash {
  position: absolute;
  top: -60px;
  left: 0;
  right: 0;
  height: 120px;
  z-index: 5;
  pointer-events: none;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
}

.section-flash.is-flashing {
  animation: boundary-flash 0.8s ease;
}

@keyframes boundary-flash {
  0%   { opacity: 0; }
  35%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ---------- Typografie-Bausteine ---------- */
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-align: center;
}

/* ---------- Scroll-Reveal ----------
   Der Anfangszustand greift nur mit JS (html.js),
   damit Inhalte ohne JavaScript sichtbar bleiben. */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* Gestaffeltes Reveal: Der Container bleibt sichtbar, die Kinder
   (Profil-Fakten) fahren beim Einscroll einzeln versetzt von unten ein. */
.js .reveal--stagger {
  opacity: 1;
  transform: none;
}

.js .reveal--stagger .stat {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.js .reveal--stagger .stat:nth-child(2) { transition-delay: 0.15s; }
.js .reveal--stagger .stat:nth-child(3) { transition-delay: 0.3s; }

/* ---------- Headline-Buchstaben-Animation ----------
   JS zerlegt .split-title in .char-Spans (--i = Index);
   beim Einscroll fahren die Buchstaben einzeln hoch.
   .word hält die Buchstaben eines Wortes zusammen,
   damit Umbrüche nur zwischen Wörtern entstehen. */
.split-title .word {
  display: inline-block;
}

.split-title .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em);
  transition: opacity 0.45s ease, transform 0.45s ease;
  transition-delay: calc(var(--i) * 0.04s);
}

.split-title.is-visible .char {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================
   Navigation
   ===================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding-inline: clamp(20px, 4vw, 48px);
  color: var(--black);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.nav--on-dark {
  color: var(--white);
}

.nav--on-dark.is-scrolled {
  background: rgba(17, 17, 17, 0.75);
}

.nav-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

/* Logo-Text: Ziel des Scramble-Effekts (main.js) */
.nav-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-size: 15px;
  letter-spacing: -0.01em;
  -webkit-user-select: none; /* Safari kennt nur die Prefix-Variante */
  user-select: none;
  cursor: pointer;
}

/* Logo-Farben folgen dem Nav-Theme:
   hell → schwarzer Kreis / weißes KM, dunkel → invertiert */
.nav .logo-circle { fill: var(--black); transition: fill 0.3s ease; }
.nav .logo-km     { fill: var(--white); transition: fill 0.3s ease; }
.nav--on-dark .logo-circle { fill: var(--white); }
.nav--on-dark .logo-km     { fill: var(--black); }

.nav-menu {
  display: flex;
  gap: 40px;
}

.nav-menu a {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 44px;
}

/* E-Mail ganz rechts: erbt die Theme-Farbe, sekundär über Leichtgewicht */
.nav-mail {
  font-size: 14px;
  font-weight: 300;
  text-decoration: none;
  color: inherit;
}

.nav-mail:hover,
.nav-mail:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-toggle {
  display: none;
  position: relative;
  z-index: 2;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s ease;
}

/* =====================================================
   Hero
   ===================================================== */
#hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh; /* mobile Browser: ohne URL-Leiste gerechnet, Ticker bleibt sichtbar */
  background: var(--white);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 56px 40px;
}

/* Dachzeile über der Headline */
.hero-kicker {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--black);
  margin: 0 0 18px;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(44px, 9.5vw, 150px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--black);
  margin: 0 0 24px;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 400;
  line-height: 1.7;
  color: var(--black);
  max-width: 620px;
  margin: 0 0 48px;
}

.hero-bottom {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--black);
  font-family: var(--font-body);
  font-size: clamp(11px, 0.9vw, 13px);
  font-weight: 400;
  color: var(--black);
}

.hero-cta {
  margin-left: auto;
  color: var(--black);
  text-decoration: none;
  font-weight: 500;
  font-style: normal;
}

.hero-cta:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Ticker --- */
.hero-ticker {
  background: var(--black);
  padding: 13px 0;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
}

.ticker-track {
  display: inline-block;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--white);
  animation: ticker-scroll 28s linear infinite;
}

.ticker-dot {
  margin: 0 14px;
  opacity: 0.35;
}

.hero-ticker:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =====================================================
   KM-Logo im Hero
   Wrapper-Ebenen: außen JS-Parallax, innen CSS-Floating –
   so überschreiben sich die Transforms nicht.
   ===================================================== */
#km-logo-outer {
  position: absolute;
  /* an der rechten Inhaltskante (Hero-Padding 56px) – weiter links
     würde das Logo den großen Namen überlappen */
  right: 56px;
  /* vertikal zentriert im weißen Raum (Ticker ~40px berücksichtigt) */
  top: 50%;
  margin-top: -190px;
  z-index: 1;
  will-change: transform;
}

#km-logo-inner {
  animation: km-float 4.5s ease-in-out infinite;
}

@keyframes km-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

#km-hero-svg {
  display: block;
  width: 340px;
  height: 340px;
  overflow: visible; /* Kreis-Stroke (Invert) liegt auf der viewBox-Kante */
  cursor: pointer;
}

#km-hero-svg circle {
  fill: var(--black);
  stroke: transparent;
  stroke-width: 3px;
  transition: fill 0.35s ease, stroke 0.35s ease;
}

#km-hero-svg .cls-1 {
  fill: var(--white);
  transition: fill 0.35s ease;
}

#km-hero-svg.inverted circle {
  fill: var(--white);
  stroke: var(--black);
}

#km-hero-svg.inverted .cls-1 {
  fill: var(--black);
}

/* Unterhalb der Desktop-Breite: Logo kleiner und oben links,
   bündig mit dem Textfluss darunter */
@media (max-width: 1279px) {
  #km-logo-outer {
    top: 96px;
    left: 56px;
    right: auto;
    margin-top: 0;
  }

  #km-hero-svg {
    width: clamp(120px, 18vw, 220px);
    height: auto;
  }
}

/* Flache Viewports (z. B. Laptop-Fenster): Logo zusätzlich verkleinern,
   damit es die unten verankerte Headline nicht überlappt */
@media (max-width: 1279px) and (max-height: 780px) {
  #km-hero-svg {
    width: clamp(96px, 12vw, 150px);
  }
}

@media (max-width: 767px) {
  #km-logo-outer {
    top: 88px;
    left: 24px;
    right: auto;
  }
}

@media (max-width: 768px) {
  .hero-content {
    padding: 0 24px 32px;
  }

  .hero-bottom {
    flex-wrap: wrap;
    gap: 10px;
  }

  .hero-cta {
    margin-left: 0;
  }
}

/* =====================================================
   Portfolio
   ===================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 32px;
  margin: 48px 0 64px;
}

.filter-btn {
  position: relative;
  padding: 8px 2px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
}

.filter-btn::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--white);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.filter-btn:hover::after,
.filter-btn:focus-visible::after,
.filter-btn.is-active::after {
  transform: scaleX(1);
}

/* --- Galerie --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.gallery-noscript {
  color: var(--white);
  font-weight: 300;
  text-align: center;
  grid-column: 1 / -1;
}

.project-card {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Karten erscheinen beim Einscroll gestaffelt (JS setzt .is-revealed
   mit 0.1s Versatz pro Karte) */
.js .project-card {
  opacity: 0;
  transform: translateY(20px);
}

.project-card.is-revealed {
  opacity: 1;
  transform: none;
}

.project-card.is-hidden {
  opacity: 0;
  transform: scale(0.98);
  pointer-events: none;
}

.project-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--black);
  text-align: left;
  transition: transform 0.4s ease;
}

button.project-media {
  cursor: pointer;
}

.project-card:hover .project-media,
.project-media:focus-visible {
  transform: scale(1.04);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* CSS-generierter Platzhalter, solange kein echtes Bild vorliegt */
.project-media.is-placeholder::before {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--white);
  color: var(--white);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* --- Hover-Overlay mit Titel + Tags --- */
.project-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  background: rgba(10, 10, 10, 0.65);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay,
.project-media:focus-visible .project-overlay {
  opacity: 1;
}

.project-overlay h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}

.project-overlay p {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
}

/* =====================================================
   Über mich
   ===================================================== */
#ueber-mich {
  position: relative;
  background: var(--white);
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 58% 42%;
  min-height: 85vh;
}

.about-content {
  padding: 72px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid var(--black);
}

.about-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--black);
  display: block;
  margin-bottom: 22px;
}

.about-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--black);
  margin: 0 0 22px;
}

.about-rule {
  width: 32px;
  height: 2px;
  background: var(--black);
  margin-bottom: 22px;
  flex-shrink: 0;
}

.about-bio {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 400;
  font-style: normal;
  line-height: 1.8;
  color: var(--black);
  margin: 0 0 32px;
  max-width: 500px;
}

.about-stats {
  display: flex;
  padding: 20px 0;
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  margin-bottom: 28px;
}

.stat {
  flex: 1;
  padding-right: 16px;
}

.stat + .stat {
  border-left: 1px solid var(--black);
  padding-left: 20px;
}

.stat-n {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(16px, 1.5vw, 22px);
  color: var(--black);
  line-height: 1.15;
}

.stat-l {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 300;
  font-style: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--black);
  margin-top: 5px;
}

.about-services {
  margin-bottom: 22px;
}

.meta-label {
  display: block;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 10px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-block;
  padding: 5px 13px;
  border: 1px solid var(--black);
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  font-style: normal;
  color: var(--black);
  line-height: 1;
}

/* --- Leistungen: Intro + drei Bereiche --- */
.services-intro {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 400;
  line-height: 1.8;
  color: var(--black);
  max-width: 500px;
  margin: 0 0 24px;
}

.service {
  padding: 18px 0;
  border-top: 1px solid var(--black);
}

.service:last-child {
  border-bottom: 1px solid var(--black);
}

.service-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--black);
  margin: 0 0 6px;
}

.service-text {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--black);
  max-width: 480px;
  margin: 0 0 12px;
}

.about-tools {
  margin-top: 0;
}

.tools-text {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 300;
  font-style: normal;
  color: var(--black);
  margin: 0;
  letter-spacing: 0.03em;
}

.about-photo {
  position: relative;
  overflow: hidden;
  background: #e0e0e0; /* Platzhalter, bis das Porträtfoto vorliegt */
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-photo {
    height: 65vw;
    min-height: 280px;
    order: -1;
    border-bottom: 1px solid var(--black);
  }

  .about-content {
    padding: 48px 24px;
    border-right: none;
  }
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
  background: var(--black);
  color: var(--white);
  padding: clamp(80px, 10vw, 120px) 0 40px;
}

/* --- Kontakt-CTA: spricht Freelance-Kunden und Arbeitgeber an --- */
.footer-cta {
  margin-bottom: clamp(48px, 7vw, 88px);
}

.footer-cta-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.footer-cta-text {
  max-width: 640px;
  font-size: clamp(14px, 1.15vw, 16px);
  font-weight: 300;
  line-height: 1.8;
  margin: 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 56px;
  align-items: start;
}

.footer .logo-circle { fill: var(--white); }
.footer .logo-km     { fill: var(--black); }

.footer-name {
  margin-top: 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.footer-role {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 300;
  color: var(--white);
}

.footer-contact {
  min-width: min(360px, 100%);
}

.footer-contact > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  padding: 13px 0;
  border-bottom: 1px solid var(--white);
  font-size: 14px;
}

.footer-contact dt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white);
}

.contact-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

/* Telefon prominent: direkter Draht für Anfragen */
.footer-phone dd a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
}

.footer-contact a {
  text-decoration: none;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-legal {
  margin-top: 96px;
  padding-top: 28px;
  border-top: 1px solid var(--white);
  text-align: center;
  font-size: 12px;
  font-weight: 300;
  color: var(--white);
}

.footer-legal a {
  color: inherit;
  text-decoration: none;
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =====================================================
   Lightbox (Vimeo)
   ===================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--container-pad);
  background: rgba(10, 10, 10, 0.93);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

.lightbox-content {
  width: min(88vw, 1080px);
  margin: 0;
}

.lightbox-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
}

.lightbox-media iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.lightbox-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--white);
  color: var(--white);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.lightbox-caption {
  margin-top: 14px;
  text-align: center;
  color: var(--white);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Blätter-Pfeile */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 16px;
  font-size: 28px;
  line-height: 1;
  color: var(--white);
  transition: transform 0.25s ease;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-prev:focus-visible {
  transform: translateY(-50%) translateX(-4px);
}

.lightbox-next:hover,
.lightbox-next:focus-visible {
  transform: translateY(-50%) translateX(4px);
}

@media (max-width: 600px) {
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 36px;
  line-height: 1;
  color: var(--white);
  padding: 8px;
  transition: transform 0.25s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  transform: scale(1.15);
}

/* =====================================================
   Unterseiten (Impressum / Datenschutz)
   ===================================================== */
.legal-page {
  max-width: 720px;
  margin-inline: auto;
  padding: 160px var(--container-pad) 120px;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 40px;
}

.legal-page p {
  margin-bottom: 20px;
  color: var(--black);
}

.legal-page .muted {
  font-size: 13px;
  font-weight: 300;
  color: var(--black);
}

.back-link {
  display: inline-block;
  margin-bottom: 48px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--black);
}

.back-link:hover,
.back-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 1023px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }

  /* E-Mail ist sekundär (steht im Footer) – schafft Luft in der Tablet-Nav */
  .nav-mail {
    display: none;
  }
}

@media (max-width: 767px) {
  /* Mobile Navigation: Slide-in-Menü */
  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    background: var(--black);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
    visibility: hidden;
  }

  .nav.menu-open .nav-menu {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-menu a {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--white);
  }

  /* Offenes Menü ist immer dunkel → Nav-Elemente hell */
  .nav.menu-open {
    color: var(--white);
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .nav.menu-open .logo-circle { fill: var(--white); }
  .nav.menu-open .logo-km     { fill: var(--black); }

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

  .nav.menu-open .nav-toggle span:nth-child(2) {
    transform: translateY(-4.25px) rotate(-45deg);
  }
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Profil-Fakten: untereinander, sonst werden die Spalten zu schmal */
  .about-stats {
    flex-direction: column;
    gap: 18px;
  }

  .stat {
    padding-right: 0;
  }

  .stat + .stat {
    border-left: none;
    border-top: 1px solid var(--black);
    padding-left: 0;
    padding-top: 18px;
  }

  .footer-contact > div {
    grid-template-columns: 100px 1fr;
    gap: 16px;
  }
}

/* =====================================================
   Reduzierte Bewegung
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  .section-flash {
    display: none;
  }

  .ticker-track {
    animation: none;
  }

  #km-logo-inner {
    animation: none;
  }

  .js .reveal,
  .js .reveal--stagger .stat,
  .js .project-card,
  .split-title .char {
    opacity: 1;
    transform: none;
  }
}
