/* =========================================================================
   thuli.siv — v2 (personenfokussiertes Layout, inspiriert von Alvaro Gellings)
   Design-Tokens siehe BUILD.md §4. Keine zusätzlichen Farben.
   ========================================================================= */

/* Self-gehostete Fonts (kein Google Fonts CDN mehr — keine IP-Übertragung an Google) */
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Farben */
  --bg: #0A0A0B;
  --bg-elev: #131316;
  --bg-line: #1F1F23;
  --text: #FFFFFF;
  --text-muted: #A0A0A5;
  --text-dim: #8C8C92;
  --text-faint: #404045;
  --accent: #FFFFFF;
  --accent-subtle: rgba(255, 255, 255, 0.08);

  /* Typografie */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Schriftgrößen */
  --fs-mega: clamp(4rem, 18vw, 14rem);
  --fs-hero: clamp(2rem, 4vw, 3rem);
  --fs-h1: clamp(3rem, 6vw, 5rem);
  --fs-h2: clamp(1.5rem, 2.5vw, 2rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.875rem;
  --fs-label: 0.75rem;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 1.5rem;
  --space-l: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 8rem;

  --max-width: 1400px;
  --radius: 8px;

  --header-h: 72px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--bg);
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, p, figure, ul { margin: 0; }
ul { list-style: none; padding: 0; }

a {
  color: inherit;
  text-decoration: none;
}

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

code { font-family: var(--font-mono); font-size: 0.9em; }

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

input, textarea {
  font-family: inherit;
  font-size: var(--fs-body);
  color: var(--text);
}

/* ---------- Focus / A11y ---------- */
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-s);
  top: -120px;
  z-index: 200;
  background: var(--text);
  color: var(--bg);
  padding: var(--space-xs) var(--space-m);
  border-radius: var(--radius);
  font-size: var(--fs-small);
  transition: top 0.2s ease;
}
.skip-link:focus { top: var(--space-s); }

/* ---------- Sprachumschaltung ---------- */
[data-lang] { display: none; }
html[lang="de"] [data-lang="de"],
html[lang="en"] [data-lang="en"] { display: block; }

/* ---------- Layout-Helfer ---------- */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 4vw;
}

/* =========================================================================
   Header (sticky, transparent)
   ========================================================================= */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
}

.site-header .wrap {
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-m);
}

.logo {
  grid-column: 1;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  justify-self: start;
}
.logo .dot { color: var(--text-faint); }

.nav {
  grid-column: 2;
  justify-self: center;
}
.nav ul {
  display: flex;
  gap: var(--space-l);
}
.nav a {
  font-size: 1rem;
  color: var(--text-muted);
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--text); }

.header-right {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--space-s);
}

/* Sprachschalter */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: var(--fs-small);
}
.lang-switch button {
  color: var(--text-dim);
  transition: color 0.2s ease;
  padding: 2px 2px;
}
.lang-switch button[aria-pressed="true"] { color: var(--text); }
.lang-switch .sep { color: var(--text-faint); }

/* Burger */
.burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
}
.burger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  position: relative;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.burger span::before,
.burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 22px; height: 2px;
  background: var(--text);
  transition: transform 0.25s ease;
}
.burger span::before { top: -7px; }
.burger span::after { top: 7px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-7px) rotate(-45deg); }

.mobile-contact {
  display: none;
}

/* =========================================================================
   HERO  (siehe ANIMATIONS.md)
   ========================================================================= */
#hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

/* Wrapper trägt die Zentrierung (CSS), inneres Element die GSAP-Transform. */
.hero-mega-center {
  position: absolute;
  bottom: -2vw;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 1;
  pointer-events: none;
}
.hero-mega-text {
  font-size: var(--fs-mega);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-faint);
  will-change: transform;
}

.hero-person-center {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}
.hero-person-center::before {
  content: "";
  position: absolute;
  bottom: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.12) 40%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}
.hero-person {
  height: 90vh;
  width: auto;
  will-change: transform;
  -webkit-user-select: none;
  user-select: none;
}

.hero-mission {
  position: absolute;
  top: 50%;
  left: 4vw;
  transform: translateY(-50%);
  max-width: 380px;
  z-index: 3;
  will-change: transform, opacity;
}
.hero-mission p {
  font-size: var(--fs-hero);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

.hero-socials {
  display: flex;
  gap: var(--space-m);
  margin-top: var(--space-l);
}
.hero-socials a {
  color: var(--text-dim);
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
}
.hero-socials a:hover { color: var(--text); transform: translateY(-2px); }
.hero-socials svg { width: 20px; height: 20px; }

/* Play-Icon (wiederverwendbar) */
.play-icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 54px; height: 54px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.play-icon::after {
  content: "";
  width: 0; height: 0;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.9);
  margin-left: 3px;
}

/* About-Overlay (Teil der Hero-Sektion, faded ein) */
.about-heading {
  position: absolute;
  top: 10%;
  right: 4vw;
  font-size: var(--fs-h1);
  font-weight: 500;
  color: var(--text-dim);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  will-change: transform, opacity;
}
.about-body {
  position: absolute;
  top: 22%;
  right: 4vw;
  max-width: 560px;
  color: var(--text-muted);
  opacity: 0;
  z-index: 3;
  pointer-events: none;
  will-change: opacity;
}
.about-lede {
  font-size: var(--fs-h2);
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: var(--space-s);
}
.about-body [data-lang] p + p { margin-top: 0.65rem; }
.about-body p { font-size: var(--fs-body); line-height: 1.45; }
.about-disclaimer { color: var(--text-dim); margin-top: var(--space-s) !important; }
.about-disclaimer em { font-style: italic; }

/* =========================================================================
   SELECTED WORK
   ========================================================================= */
.section {
  position: relative;
  padding: var(--space-2xl) 0;
}

.section-head { max-width: 620px; }
.section-title {
  font-size: var(--fs-h1);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text);
}
.section-desc {
  margin-top: var(--space-m);
  color: var(--text-muted);
  font-size: var(--fs-body);
}

.work-layout {
  margin-top: var(--space-xl);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-m);
}

/* Grid: alle Projekte im Hochformat */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.work-item {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--bg-line);
  transition: transform 0.3s ease;
}
.work-item:hover { transform: scale(1.01); }

/* Overlay auf Thumbnails */
.thumb-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-m);
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 55%);
}
.thumb-category {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.thumb-title {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text);
  margin-top: 2px;
}
.thumb-medium {
  display: block;
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-top: 2px;
}
.thumb-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-top: var(--space-xs);
  transition: color 0.2s ease, transform 0.2s ease;
}
.work-item:hover .thumb-cta {
  color: var(--text);
  transform: translateX(2px);
}

/* =========================================================================
   CONTACT
   ========================================================================= */
.contact-layout {
  margin-top: var(--space-xl);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.field label {
  font-size: var(--fs-small);
  color: var(--text);
}
.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--bg-line);
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-dim); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--text);
}
.field textarea { resize: vertical; min-height: 130px; }

.consent {
  display: flex;
  gap: var(--space-s);
  align-items: flex-start;
}
.consent input {
  margin-top: 0.3rem;
  width: 16px; height: 16px;
  accent-color: var(--text);
  flex: 0 0 auto;
}
.consent label {
  font-size: var(--fs-small);
  color: var(--text-dim);
  line-height: 1.45;
}
.consent label a {
  color: var(--text-muted);
  text-decoration: underline;
}
.consent label a:hover {
  color: var(--text);
}

.btn-submit {
  align-self: flex-end;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: var(--fs-small);
  padding: 0.85rem 2rem;
  border-radius: 999px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.btn-submit:hover { opacity: 0.85; transform: translateY(-1px); }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer {
  border-top: 1px solid var(--bg-line);
  padding: var(--space-xl) 0;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
}
.footer-socials {
  display: flex;
  gap: var(--space-m);
}
.footer-socials a {
  color: var(--text-muted);
  transition: color 0.2s ease;
  display: inline-flex;
}
.footer-socials a:hover { color: var(--text); }
.footer-socials svg { width: 20px; height: 20px; }

.footer-right {
  display: flex;
  align-items: center;
  gap: var(--space-l);
  font-size: var(--fs-small);
  color: var(--text-muted);
}
.footer-right a { transition: color 0.2s ease; }
.footer-right a:hover { color: var(--text); }
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* =========================================================================
   CASE-STUDY-SEITEN
   ========================================================================= */
.case-study {
  max-width: var(--max-width);
  margin-inline: auto;
  padding: calc(var(--header-h) + var(--space-xl)) 4vw var(--space-2xl);
}
.case-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-bottom: var(--space-l);
}
.case-back:hover { color: var(--text); }

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--bg-line);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-placeholder {
  position: absolute;
  inset: 0;
}

.case-header {
  max-width: 720px;
  margin: var(--space-xl) auto 0;
  text-align: left;
}
.case-category {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.case-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-top: var(--space-s);
  /* Lange deutsche Komposita (z. B. "Immobilienfotografie") etwas kleiner
     skalieren, damit sie auf eine Zeile passen und NICHT mit Bindestrich
     getrennt werden. break-word bleibt nur als Sicherheitsnetz gegen
     horizontalen Überlauf auf sehr schmalen Screens. */
  overflow-wrap: break-word;
}

.case-section {
  max-width: 720px;
  margin: var(--space-xl) auto 0;
}
.case-section h2 {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: var(--space-s);
}
.case-section p { color: var(--text-muted); }

.next-project {
  max-width: 720px;
  margin: var(--space-2xl) auto 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-top: var(--space-l);
  border-top: 1px solid var(--bg-line);
  transition: opacity 0.2s ease;
}
.next-project span {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.next-project strong {
  font-size: var(--fs-h2);
  font-weight: 500;
  color: var(--text);
}
.next-project:hover strong { color: var(--text-muted); }

/* Foto-Galerie (Case-Study-Seiten mit Bildern statt Video)
   Alle Bilder gleich BREIT (Spaltenbreite), behalten aber ihr Original-
   Seitenverhältnis — Hochformat bleibt hoch, Querformat breit, kein Zuschnitt.
   Fallback OHNE JS: CSS-Columns (spaltenweise Reihenfolge). MIT JS verteilt
   gallery.js die Bilder in echte Zeilen-Reihenfolge (links -> rechts). */
.photo-gallery {
  max-width: var(--max-width);
  margin: var(--space-xl) auto 0;
  padding-inline: 4vw;
  column-count: 3;
  column-gap: var(--space-m);
}
.photo-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--bg-line);
  margin-bottom: var(--space-m);
  break-inside: avoid;
}

/* Mit JS aktiv: Flex-Spalten -> Bilder in echter Reihenfolge
   (Reihe 1 links nach rechts, dann Reihe 2 ...). */
.photo-gallery.masonry-ready {
  display: flex;
  align-items: flex-start;
  gap: var(--space-m);
}
.photo-gallery.masonry-ready img { margin-bottom: 0; }
.photo-gallery.masonry-ready .masonry-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
}
.photo-gallery .gallery-placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--bg-line);
  background: var(--bg-elev);
  margin-bottom: var(--space-m);
  break-inside: avoid;
}
/* .full-Bilder werden im gleichmässigen Grid wie alle anderen Kacheln behandelt */

/* Video-Grid (Case-Study-Seiten mit mehreren Reels statt einem Hauptvideo) */
.video-grid {
  max-width: var(--max-width);
  margin: var(--space-xl) auto 0;
  padding-inline: 4vw;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-m);
}
.video-grid .reel-embed {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--bg-line);
}
.video-grid .wide-embed {
  grid-column: 1 / -1;
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--bg-line);
}
.video-grid iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 1024px) {
  .about-body { max-width: 44vw; }
  .hero-mission { max-width: 300px; }
}

/* Mobile-spezifische Anpassungen ab <960px: Nav wird zum Dropdown-Menü, Burger sichtbar */
@media (max-width: 960px) {
  /* Auf Mobile ist die Nav ein Fixed-Dropdown, nicht Teil der Leiste. Das
     3-Spalten-Grid (1fr auto 1fr) kann sich hier intrinsisch breiter als der
     Viewport rechnen -> stattdessen einfaches Flex mit Logo links, Controls rechts. */
  .site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-s);
  }

  .burger {
    display: flex;
  }

  .nav {
    display: none;
    position: fixed;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    z-index: 99;
    max-height: calc(100vh - var(--header-h) - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--bg-line);
    padding: var(--space-m) 6vw calc(var(--space-m) + env(safe-area-inset-bottom, 0px));
  }
  .nav[data-open] {
    display: block;
  }
  .nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-m);
  }
  .nav a {
    font-size: 1.0625rem;
    color: var(--text);
  }

  .mobile-contact {
    display: inline-block;
    font-size: 1rem;
    color: var(--text-muted);
    transition: color 0.2s ease;
  }
  .mobile-contact:hover {
    color: var(--text);
  }
}

/* Tablet / Mobile-Layout */
@media (max-width: 720px) {
  :root { --space-2xl: 5rem; }

  /* Hero: vertikales Stack-Layout wie Alvaro Gellings Referenz */
  #hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: auto;
    padding: calc(var(--header-h) + env(safe-area-inset-top, 0px) + var(--space-l)) 6vw 0;
    overflow: visible;
  }

  /* 1. Mission-Text: statisch oben */
  .hero-mission {
    position: relative;
    top: auto; left: auto;
    /* !important überschreibt einen evtl. von GSAP hinterlassenen Inline-Transform
       (translateY(-50%) aus dem Desktop-Layout) beim Resize Desktop -> Mobile. */
    transform: none !important;
    max-width: 100%;
    order: 1;
    margin-bottom: var(--space-m);
  }
  .hero-mission p { font-size: clamp(1.5rem, 6vw, 2rem); }

  /* 2. Mega-Text ausblenden auf Mobile */
  .hero-mega-center {
    display: none;
  }

  /* 3. Person-Foto: sichtbar, zentriert, nach Mission + Socials */
  .hero-person-center {
    position: relative;
    bottom: auto; left: auto;
    transform: none;
    order: 2;
    display: flex;
    justify-content: center;
    margin-top: var(--space-m);
    z-index: 2;
  }
  .hero-person-center::before {
    /* Gradient auch auf Mobile anpassen */
    bottom: 5%;
    width: 70%;
  }
  .hero-person {
    height: auto;
    width: 75%;
    max-width: 360px;
    opacity: 1;
  }

  /* 5. About wird statisch unter den Hero gerendert */
  .about-heading,
  .about-body {
    position: relative;
    top: auto; right: auto;
    opacity: 1 !important;
    transform: none !important;
    max-width: 100%;
  }
  .about-heading {
    order: 4;
    margin-top: var(--space-2xl);
    padding-inline: 6vw;
  }
  .about-body {
    order: 5;
    margin-top: var(--space-m);
    padding-inline: 6vw;
    padding-bottom: var(--space-2xl);
  }

  /* Work-Grid 1-spaltig */
  .work-grid { grid-template-columns: 1fr; }

  /* Case-Study-Titel kleiner, damit lange Wörter auf dem Handy passen */
  .case-title { font-size: clamp(1.9rem, 9vw, 3rem); }

  /* Foto-Galerie 2-spaltig (mehr Bilder auf einen Blick, Tippen öffnet die Lightbox) */
  .photo-gallery { column-count: 2; column-gap: var(--space-s); padding-inline: 6vw; }
  .photo-gallery.masonry-ready { gap: var(--space-s); }
  .photo-gallery.masonry-ready .masonry-col { gap: var(--space-s); }

  /* Video-Grid 2-spaltig (Reels bleiben klein aber bedienbar) */
  .video-grid { grid-template-columns: repeat(2, 1fr); padding-inline: 6vw; }

  /* Contact 1-spaltig */
  .contact-layout {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }
  .btn-submit { align-self: stretch; text-align: center; }

  .site-footer .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-l);
  }
}

/* =========================================================================
   prefers-reduced-motion: statischer End-State, keine Scroll-Animation
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-person { transition: none; }
  .about-heading,
  .about-body { opacity: 1; }
  .work-item:hover { transform: none; }
}

/* =========================================================================
   FOTO-LIGHTBOX (Vollbild-Ansicht mit Pfeil-/Swipe-Navigation)
   Wird per gallery.js aktiviert (Klasse .lightbox-enabled). Ohne JS bleiben
   die Galeriebilder normale Bilder — Progressive Enhancement.
   ========================================================================= */
.photo-gallery.lightbox-enabled img {
  cursor: zoom-in;
  transition: opacity 0.2s ease;
}
.photo-gallery.lightbox-enabled img:hover { opacity: 0.9; }
.photo-gallery.lightbox-enabled img:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* Body-Scroll sperren, solange die Lightbox offen ist */
html.lightbox-open { overflow: hidden; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: rgba(10, 10, 11, 0.97);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: calc(env(safe-area-inset-top, 0px) + 0.75rem) 0
           calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
}
.lightbox[hidden] { display: none; }

/* Bühne mit dem Hauptbild */
.lightbox-stage {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(3.5rem, 9vw, 6rem); /* Platz für die seitlichen Pfeile */
}
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Positions-Ansage nur für Screenreader — visuell ausgeblendet, damit kein
   Text über dem Bild liegt (war auf hellen Motiven schlecht lesbar). */
.lightbox-caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Buttons (Schliessen + Navigation) */
.lightbox-close,
.lightbox-nav {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.16); }
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.lightbox-close {
  top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
  right: clamp(0.75rem, 3vw, 1.5rem);
  width: 44px; height: 44px;
  font-size: 1.75rem;
  line-height: 1;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  font-size: 2rem;
  line-height: 1;
}
.lightbox-prev { left: clamp(0.5rem, 2vw, 1.25rem); }
.lightbox-next { right: clamp(0.5rem, 2vw, 1.25rem); }

/* Thumbnail-Leiste unten */
.lightbox-thumbs {
  flex: 0 0 auto;
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem clamp(1rem, 3vw, 2rem) 0;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.lightbox-thumb {
  flex: 0 0 auto;
  width: 84px;
  height: 56px;
  padding: 0;
  border: 1px solid transparent;
  overflow: hidden;
  background: none;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.lightbox-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.lightbox-thumb:hover { opacity: 0.85; }
.lightbox-thumb.is-active { opacity: 1; border-color: var(--text); }
.lightbox-thumb:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

/* Mobile-Anpassungen: kleinere Pfeile/Thumbs, mehr Platz fürs Bild */
@media (max-width: 720px) {
  .lightbox-stage { padding: 0 0.5rem; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.5rem; opacity: 0.9; }
  .lightbox-prev { left: 0.35rem; }
  .lightbox-next { right: 0.35rem; }
  .lightbox-thumb { width: 64px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .photo-gallery.lightbox-enabled img,
  .lightbox-close,
  .lightbox-nav,
  .lightbox-thumb { transition: none; }
}
