/* Poppins, lokal gehostet (keine Verbindung zu Google) */
@font-face { font-family: "Poppins"; font-weight: 300; font-display: swap; src: url("fonts/poppins-300.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("fonts/poppins-600.woff2") format("woff2"); }

:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --text: #141414;
  --muted: #6b6a66;
  --line: #dcdad4;
  --accent: #141414;
  --overlay: linear-gradient(to top, rgba(0,0,0,.62) 0%, rgba(0,0,0,.18) 45%, rgba(0,0,0,0) 70%);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --header-h: 72px;
  --ease: cubic-bezier(.2,.7,.2,1);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0e0e; --surface: #171717; --text: #ecebe7; --muted: #9a9993; --line: #2b2b2a; --accent: #ecebe7;
  }
}
:root[data-theme="dark"] { --bg: #0e0e0e; --surface: #171717; --text: #ecebe7; --muted: #9a9993; --line: #2b2b2a; --accent: #ecebe7; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 300; font-size: 16px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
h1, h2, h3 { font-weight: 600; line-height: 1.15; letter-spacing: .02em; margin: 0; }
p { margin: 0 0 1.1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter); color: #fff;
  transition: background .35s var(--ease), color .35s var(--ease), box-shadow .35s var(--ease);
}
.site-header::before { /* leichte Abdunklung oben, damit Navigation auf hellen Bildern lesbar bleibt */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,0)); transition: opacity .35s;
}
/* deckender Hintergrund als eigene Ebene: ein backdrop-filter direkt am Header
   würde das fixierte Handy-Menü auf die Höhe des Headers einsperren */
.site-header::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line); transition: opacity .35s var(--ease);
}
.site-header.solid, body.no-hero .site-header { color: var(--text); }
.site-header.solid::after, body.no-hero .site-header::after { opacity: 1; }
.site-header.solid::before, body.no-hero .site-header::before { opacity: 0; }
.logo { font-weight: 600; font-size: 20px; letter-spacing: .04em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 36px); font-size: 14px; font-weight: 400; letter-spacing: .06em; }
.nav a { position: relative; padding: 4px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.social { display: flex; gap: 14px; margin-left: 12px; }
.social a { display: grid; place-items: center; width: 20px; height: 20px; opacity: .9; }
.social svg { width: 16px; height: 16px; fill: currentColor; }
.menu-btn { display: none; background: none; border: 0; color: inherit; padding: 8px; margin-right: -8px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 1.5px; background: currentColor; margin: 5px 0; transition: transform .3s var(--ease), opacity .2s; }

@media (max-width: 760px) {
  :root { --header-h: 60px; }
  .logo { font-size: 17px; position: relative; z-index: 2; }
  .hero-text h1 br { display: none; }
  .menu-btn { display: block; position: relative; z-index: 2; }
  .nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 28px;
    background: var(--bg); color: var(--text); font-size: 26px; font-weight: 500;
    opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
  }
  .social { margin: 12px 0 0; gap: 26px; }
  .social svg { width: 22px; height: 22px; }
  body.menu-open { overflow: hidden; }
  body.menu-open .nav { opacity: 1; visibility: visible; }
  body.menu-open .site-header { color: var(--text); }
  body.menu-open .site-header::before { opacity: 0; }
  body.menu-open .menu-btn span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  body.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  body.menu-open .menu-btn span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 520px; color: #fff; overflow: hidden; background: #111; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: hero-in 1.6s var(--ease) both; }
.hero::after { content: ""; position: absolute; inset: 0; background: var(--overlay); }
.hero-text { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(32px, 7vh, 80px); z-index: 1; }
.hero-text h1 { font-size: clamp(32px, 5.6vw, 76px); letter-spacing: .01em; }
.hero-text .eyebrow { color: rgba(255,255,255,.85); margin-bottom: 14px; }
.hero-text a.more { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; font-size: 14px; letter-spacing: .08em; border-bottom: 1px solid rgba(255,255,255,.6); padding-bottom: 4px; }
.scroll-hint { position: absolute; right: var(--gutter); bottom: clamp(32px, 7vh, 80px); z-index: 1; font-size: 12px; letter-spacing: .16em; writing-mode: vertical-rl; opacity: .8; }
@keyframes hero-in { from { transform: scale(1.06); opacity: .4; } to { transform: none; opacity: 1; } }
.hero.short { height: 78svh; }

/* ---------- Projekt-Raster ---------- */
.section { padding: clamp(56px, 9vw, 120px) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: clamp(24px, 4vw, 44px); }
.section-head h2 { font-size: clamp(22px, 2.6vw, 30px); }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(10px, 1.4vw, 20px); }
.grid .tile:nth-child(5n+1) { grid-column: span 2; }
.grid .tile:nth-child(5n+1) .tile-media { aspect-ratio: 21/9; }
.tile { position: relative; display: block; color: #fff; overflow: hidden; background: #1a1a1a; }
.tile-media { aspect-ratio: 3/2; overflow: hidden; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), opacity .6s; }
.tile::after { content: ""; position: absolute; inset: 0; background: var(--overlay); transition: opacity .5s; }
.tile-text { position: absolute; left: clamp(16px, 2vw, 28px); right: clamp(16px, 2vw, 28px); bottom: clamp(14px, 2vw, 26px); z-index: 1; }
.tile-text h3 { font-size: clamp(18px, 2.1vw, 30px); }
.tile-text .eyebrow { color: rgba(255,255,255,.82); margin-top: 6px; }
.tile:hover .tile-media img { transform: scale(1.04); }
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .grid .tile:nth-child(5n+1) { grid-column: auto; }
  .grid .tile .tile-media, .grid .tile:nth-child(5n+1) .tile-media { aspect-ratio: 4/3; }
}

/* ---------- Weitere Arbeiten ---------- */
.works { display: grid; grid-template-columns: repeat(4, 1fr); align-items: start; gap: clamp(24px, 3vw, 40px) clamp(14px, 2vw, 24px); }
@media (max-width: 1100px) { .works { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .works { grid-template-columns: 1fr; } }
.work { display: block; text-align: left; background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.work .thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #1a1a1a; }
.work .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease), filter .5s; }
.work:hover .thumb img { transform: scale(1.04); filter: brightness(.85); }
.work h3 { font-size: 15px; font-weight: 500; margin-top: 14px; letter-spacing: .04em; }
.work .eyebrow { margin-top: 4px; font-size: 11px; }
.play { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.play i { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.16); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.55); transition: transform .35s var(--ease), background .35s; }
.play i::before { content: ""; margin-left: 4px; border-left: 15px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.work:hover .play i, .video:hover .play i { transform: scale(1.08); background: rgba(255,255,255,.28); }

/* ---------- Video (Klick zum Laden) ---------- */
.video { position: relative; aspect-ratio: 16/9; background: #111; overflow: hidden; }
.video > button { all: unset; position: absolute; inset: 0; cursor: pointer; }
.video > button img { width: 100%; height: 100%; object-fit: cover; }
.video > button::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.18); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video .note { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 10px 14px; font-size: 11px; line-height: 1.5; color: rgba(255,255,255,.82); background: linear-gradient(to top, rgba(0,0,0,.55), transparent); pointer-events: none; }
.video-title { margin: 14px 0 0; }

/* ---------- Projektseite ---------- */
.project-intro { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.project-intro .lead p { font-size: clamp(16px, 1.25vw, 18px); }
.project-intro .lead p:first-child::first-line { font-weight: 400; }
.subtitle { font-size: clamp(18px, 1.6vw, 22px); font-weight: 400; margin: 0 0 18px; }
.facts { border-top: 1px solid var(--line); }
.facts dl { margin: 0; }
.facts .row { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 400; letter-spacing: .02em; }
.awards { margin-top: clamp(40px, 5vw, 64px); }
.awards ul { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 32px; }
.awards li { padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; }
.awards li b { display: block; font-weight: 500; letter-spacing: .03em; }
.awards li span { color: var(--muted); }
.small-print { font-size: 13px; color: var(--muted); margin-top: 28px; }
.stills { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(10px, 1.4vw, 20px); }
.stills figure { margin: 0; cursor: zoom-in; overflow: hidden; background: #1a1a1a; }
.stills figure.wide { grid-column: span 2; }
.stills img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.stills figure:hover img { transform: scale(1.02); }
.poster { max-width: 420px; }
.poster img { cursor: zoom-in; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); }
.project-videos { display: grid; gap: clamp(32px, 5vw, 64px); }
.pager { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.pager a { padding: clamp(28px, 4vw, 48px) 0; display: block; }
.pager a + a { text-align: right; border-left: 1px solid var(--line); padding-left: 24px; }
.pager a:first-child { padding-right: 24px; }
.pager h3 { font-size: clamp(16px, 2vw, 26px); margin-top: 6px; transition: opacity .3s; }
.pager a:hover h3 { opacity: .6; }
@media (max-width: 900px) {
  .project-intro { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .stills { grid-template-columns: 1fr; }
  .stills figure.wide { grid-column: auto; }
  .facts .row { grid-template-columns: 8em 1fr; }
}

/* ---------- Fotografie ---------- */
.photos { display: flex; flex-wrap: wrap; gap: clamp(8px, 1vw, 14px); }
.photos::after { content: ""; flex-grow: 1000; } /* letzte Reihe nicht aufblähen */
.photos button { all: unset; cursor: zoom-in; overflow: hidden; background: #1a1a1a;
  flex-grow: var(--r); flex-basis: calc(var(--r) * var(--row-h, 300px)); aspect-ratio: var(--r); }
.photos img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.photos button:hover img { transform: scale(1.025); }
.photos button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.photos { --row-h: 380px; }
@media (max-width: 1100px) { .photos { --row-h: 280px; } }
@media (max-width: 600px) { .photos { --row-h: 170px; } }
/* mit JavaScript: feste Reihen, jede Reihe bündig */
.photos.justified { display: block; }
.photos.justified::after { display: none; }
.photos.justified .row { display: flex; gap: var(--gap); margin-bottom: var(--gap); }
.photos.justified button { flex: none; aspect-ratio: auto; }

/* ---------- Info ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.about .portrait { position: sticky; top: calc(var(--header-h) + 24px); }
.about h1 { font-size: clamp(30px, 4.5vw, 56px); margin-bottom: 28px; }
.about .lead p { font-size: clamp(16px, 1.25vw, 18px); }
.contact { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; font-size: 15px; }
.contact a { border-bottom: 1px solid var(--line); transition: border-color .3s; }
.contact a:hover { border-color: currentColor; }
blockquote { margin: 0; font-size: clamp(18px, 2vw, 26px); line-height: 1.55; font-weight: 300; max-width: 46em; }
blockquote footer { margin-top: 20px; font-size: 14px; color: var(--muted); }
.lists { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: clamp(32px, 5vw, 72px); }
.lists ul { list-style: none; margin: 16px 0 0; padding: 0; columns: 2 160px; column-gap: 24px; font-size: 14px; line-height: 2; }
.lists .one ul { columns: 1; }
.lists a:hover { opacity: .6; }
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .about .portrait { position: static; max-width: 480px; }
  .lists { grid-template-columns: 1fr; }
}

/* ---------- Text-Seiten ---------- */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 32px; }
.prose h2 { font-size: 18px; margin: 40px 0 12px; }
.prose a { border-bottom: 1px solid var(--line); }
.page-top { padding-top: calc(var(--header-h) + clamp(40px, 7vw, 96px)); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; font-size: 13px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a:hover { color: var(--text); }
.theme-toggle { background: none; border: 1px solid var(--line); color: inherit; border-radius: 99px; padding: 4px 12px; font: inherit; cursor: pointer; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(8,8,8,.96); display: none; align-items: center; justify-content: center; color: #fff; }
.lightbox.open { display: flex; animation: fade .25s ease both; }
.lightbox figure { margin: 0; max-width: calc(100vw - 2 * var(--gutter)); max-height: calc(100svh - 120px); display: grid; place-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100svh - 120px); width: auto; height: auto; object-fit: contain; }
.lightbox .video { width: min(1280px, calc(100vw - 2 * var(--gutter))); }
.lightbox button.lb { position: absolute; background: none; border: 0; color: #fff; cursor: pointer; padding: 16px; font: inherit; font-size: 13px; letter-spacing: .12em; opacity: .8; }
.lightbox button.lb:hover { opacity: 1; }
.lb-close { top: 8px; right: 8px; }
.lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 4px; top: 50%; transform: translateY(-50%); }
.lb-prev svg, .lb-next svg, .lb-close svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.lb-count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: .14em; opacity: .7; }
.lb-caption { position: absolute; bottom: 18px; left: var(--gutter); right: var(--gutter); text-align: center; font-size: 13px; letter-spacing: .06em; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Einblenden beim Scrollen ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Einleitung Startseite ---------- */
.intro { padding-bottom: clamp(40px, 6vw, 80px); }
.intro-text { font-size: clamp(19px, 2.1vw, 28px); line-height: 1.5; max-width: 34em; margin-bottom: 22px; }
.intro-links { display: flex; flex-wrap: wrap; gap: 10px 32px; font-size: 14px; letter-spacing: .04em; }
.intro-links a { border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .3s; }
.intro-links a:hover { border-color: currentColor; }
.page-title { font-size: clamp(34px, 6vw, 80px); }
