/* Roboto, selbst gehostet (Apache License 2.0). Pfade relativ zu dieser Datei. */
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/roboto-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/roboto-latin-500-normal.woff2") format("woff2"); }

:root {
  --pad: clamp(20px, 3.4vw, 48px);
  --gap: 20px;
  --header-h: 88px;
  --ink: #000;
  --paper: #fff;
  --soft: rgba(0, 0, 0, .5);
  --placeholder: #f1f1f1;
  --shadow: 0 2px 18px rgba(0, 0, 0, .11);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.menu-open { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.5 "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; padding-top: calc(var(--header-h) + 48px); }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* ---------- Kopfleiste ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  padding: 0 var(--pad);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: var(--paper);
  box-shadow: var(--shadow);
  transition: transform .35s ease;
}
.site-header.is-hidden { transform: translateY(calc(-100% - 30px)); }
html.menu-open .site-header { transform: none; }

/* Logo */
.wm { justify-self: start; display: block; line-height: 0; }
.wm img { height: 50px; width: auto; }

.nav { display: flex; gap: 40px; }
.nav a { font-size: 19px; text-decoration: none; padding: 6px 0; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 7px; }
.social { justify-self: end; display: inline-flex; padding: 6px; margin-right: -6px; }
.social svg { width: 28px; height: 28px; }

/* Drei Striche (nur auf dem Handy) */
.burger { display: none; justify-self: end; background: none; border: 0; padding: 10px 6px 10px 10px; margin-right: -6px; color: inherit; cursor: pointer; line-height: 0; }
.burger svg { width: 32px; height: 24px; }
.burger line { stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; }
.burger .i-close { display: none; }
.burger[aria-expanded="true"] .i-burger { display: none; }
.burger[aria-expanded="true"] .i-close { display: block; }

/* Menü über der Seite (nur auf dem Handy) */
.menu {
  display: none;
  position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--paper);
  padding: 40px var(--pad) 28px;
  flex-direction: column; overflow-y: auto;
  visibility: hidden; opacity: 0;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
.menu.is-open { visibility: visible; opacity: 1; transition: opacity .25s ease; }
.menu__nav a { display: table; font-size: 34px; font-weight: 300; line-height: 1.2; margin-bottom: 26px; text-decoration: none; }
.menu__nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 9px; }
.menu__ig { margin-top: auto; display: flex; align-items: center; gap: 12px; font-size: 17px; text-decoration: none; border-top: 1px solid rgba(0, 0, 0, .15); padding-top: 22px; }
.menu__ig svg { width: 28px; height: 28px; }

/* Unter 768 px: Handy-Ansicht */
@media (max-width: 767px) {
  :root { --header-h: 84px; }
  main { padding-top: calc(var(--header-h) + 20px); }
  .site-header { grid-template-columns: 1fr auto; }
  .wm img { height: 42px; }
  .nav, .social { display: none; }
  .burger { display: inline-flex; }
  .menu { display: flex; }

  /* ohne JavaScript: Menü bleibt sichtbar, zweite Zeile */
  html:not(.js) .site-header { height: auto; grid-template-columns: 1fr; row-gap: 4px; padding: 10px var(--pad) 8px; }
  html:not(.js) .nav { display: flex; gap: 28px; }
  html:not(.js) .burger, html:not(.js) .menu { display: none; }
  html:not(.js) main { padding-top: 150px; }
}

/* ---------- Raster (Work + Projektseiten) ---------- */
.grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap); align-items: start;
  padding: 0 var(--pad);
}
.tile { display: block; text-decoration: none; color: inherit; }
.tile--wide, .item--wide { grid-column: 1 / -1; }
.media { position: relative; aspect-ratio: var(--ar, 16 / 9); background: var(--placeholder); overflow: hidden; }
.media video, .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cap { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0 22px; font-size: 14px; }
.cap__meta { color: var(--soft); text-align: right; }
.work .tile .media, .work .tile .cap { transition: opacity .25s ease; }   /* auf Bild und Text, nicht auf die Kachel selbst: .reveal setzt deren Deckkraft */
@media (hover: hover) { .work .tile:hover .media, .work .tile:hover .cap, .work .tile:focus-visible .media, .work .tile:focus-visible .cap { opacity: .7; } }   /* Kachel samt Beschriftung hellt beim Darüberfahren auf */
.item { margin-bottom: 0; }
/* ---------- Work-Übersicht (wie Buck): 8er-Raster, Kacheln groß (5 Spalten) und klein (3 Spalten) im Wechsel ---------- */
.work {
  --bgap: clamp(12px, 1.6vw, 24px);
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: var(--bgap);
  row-gap: clamp(64px, 8.5vw, 150px); align-items: start;
  padding: 0 var(--pad);   /* volle Breite wie bei Buck */
}
.work .tile--l { grid-column: span 5; }
.work .tile--s { grid-column: span 3; }
.work .cap { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--bgap); padding: .9em 0 0; font-size: clamp(16px, 1.4vw, 26px); line-height: 1.4; }
.work .tile--l .cap { grid-template-columns: 4fr 5fr; }
.cap__main { display: block; }
.cap__title, .cap__text { display: block; }
.cap__text { margin-top: .5em; color: var(--soft); }
@media (max-width: 1000px) {
  .work .cap, .work .tile--l .cap { grid-template-columns: 1fr; row-gap: .15em; }
}
@media (max-width: 767px) {
  .work { grid-template-columns: 1fr; row-gap: 56px; }
  .work .tile--l, .work .tile--s { grid-column: 1 / -1; }
  .work .cap { font-size: 16px; }
}

@media (max-width: 767px) {
  .grid { grid-template-columns: 1fr; gap: 0; }
  .cap { font-size: 13px; padding: 9px 0 20px; }
  .item { margin-bottom: 12px; }
}

/* ---------- Projektseiten: 8er-Raster (wie bei Buck): Textzeilen + Medienzeilen ---------- */
.blocks {
  --bgap: clamp(12px, 1.6vw, 24px);
  --space-text: clamp(40px, 5.6vw, 86px);   /* Abstand Text → Medium darunter */
  --space-media: clamp(80px, 11.5vw, 180px); /* Abstand Medium → nächster Text */
  max-width: calc(1600px + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad);
}
.row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); column-gap: var(--bgap); row-gap: var(--bgap); }
.row--text { align-items: start; margin-bottom: var(--space-text); font-size: clamp(16px, 1.4vw, 26px); line-height: 1.4; text-align: left; }
.row__title { grid-column: 3 / 6; margin: 0; font-size: inherit; font-weight: 400; }   /* Spalten 3–5 */
.row__title a, .row__body a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.row__body { grid-column: 6 / 9; }                                                       /* Spalten 6–8 */
.row__body p { margin: 0 0 .9em; }
.row__body p:last-child { margin-bottom: 0; }
.row--media { margin-bottom: var(--space-media); }
.row--text.row--gap { margin-bottom: var(--space-media); }   /* Text mit "gapAfter": "media": derselbe große Abstand wie zwischen Clip-Zeilen */
.cell { min-width: 0; }
.row--full .cell { grid-column: 1 / -1; }         /* Spalten 1–8 */
.row--wider .cell { grid-column: 2 / -1; }        /* Spalten 2–8 */
.row--wide .cell { grid-column: 3 / -1; }         /* Spalten 3–8 */
.row--left .cell { grid-column: 1 / 7; }          /* Spalten 1–6 */
.row--left5 .cell { grid-column: 1 / 6; }        /* Spalten 1–5, rund zwei Drittel der Breite */
.row--halves .cell { grid-column: span 4; }       /* 4 + 4 */
.row--pair .cell { grid-column: span 3; }         /* 3 + 3, ab Spalte 3 */
.row--pair .cell:first-child { grid-column: 3 / span 3; }
.row--trio .cell { grid-column: span 2; }         /* 2 + 2 + 2, ab Spalte 1; jede Reihe hat drei, Spalten 7–8 bleiben frei */
.row--trio .cell:nth-child(3n+1) { grid-column: 1 / span 2; }
.row--trioright .cell { grid-column: span 2; }       /* wie trio, aber rechtsbündig: Spalten 3–8 */
.row--trioright .cell:nth-child(3n+1) { grid-column: 3 / span 2; }
.row--thirds { grid-template-columns: repeat(3, minmax(0, 1fr)); }   /* drei gleich breite Medien über die volle Breite (Spalten 1–8), gleicher Abstand */
.row--thirds .cell { grid-column: auto; }
.row--sameheight .cell { grid-column: auto; }   /* Medien gleich hoch nebeneinander, Breiten aus dem Seitenverhältnis (Spaltenbreiten setzt build.mjs inline) */
.blocks > :last-child { margin-bottom: 0; }

/* Klick-zum-Abspielen (langes Video mit Ton) */
.play { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; width: 100%; height: 100%; padding: 0; border: 0; background: none; color: #fff; cursor: pointer; }
.play[hidden] { display: none; }
.play svg { width: clamp(60px, 5.6vw, 88px); height: auto; filter: drop-shadow(0 1px 10px rgba(0, 0, 0, .25)); transition: transform .2s ease; }
.play:hover svg, .play:focus-visible svg { transform: scale(1.08); }
.play:focus-visible { outline-offset: -4px; outline-color: #fff; }

/* Tablet: etwas breiterer Textbereich */
@media (min-width: 768px) and (max-width: 1000px) {
  .row__title { grid-column: 2 / 5; }
  .row__body { grid-column: 5 / 9; }
}

@media (max-width: 767px) {
  .row--text { font-size: 16px; grid-template-columns: 1fr; row-gap: 16px; }
  .row__title, .row__body { grid-column: 1 / -1; }
  .blocks { --space-text: 32px; --space-media: 84px; }
  .row--wider .cell, .row--wide .cell, .row--left .cell, .row--left5 .cell, .row--halves .cell, .row--trio .cell, .row--trioright .cell, .row--trioright .cell:nth-child(3n+1) { grid-column: 1 / -1; }
  .row--thirds { grid-template-columns: 1fr; }
  .row--media.row--sameheight { grid-template-columns: 1fr !important; }
  .row--pair .cell, .row--pair .cell:first-child { grid-column: span 4; }   /* zwei Quadrate bleiben nebeneinander */
  .play svg { width: 60px; }
}

.pager { display: flex; justify-content: space-between; gap: 24px; padding: 36px var(--pad) 8px; font-size: 15px; }
.pager a { text-decoration: none; }
.pager a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding: 0 var(--pad); max-width: 1400px; }
.lead { font-size: clamp(20px, 2.2vw, 28px); line-height: 1.4; font-weight: 300; margin: 0 0 40px; max-width: 34ch; }
.about section { margin-bottom: 28px; }
h2.label { font-size: 15px; font-weight: 500; margin: 0 0 4px; }
.about p, .contact p, .legal p { margin: 0 0 12px; }
.about section p { font-size: 16px; }
.about__portrait { margin: 0; }
.about__portrait img { width: 100%; max-width: 208px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--placeholder); }
.about .lead { font-size: 19px; font-weight: 400; line-height: 1.4; }
@media (max-width: 767px) { .about { grid-template-columns: 1fr; } .about__portrait { order: -1; max-width: 420px; } }

/* ---------- Contact / Rechtliches ---------- */
.contact, .legal { padding: 0 var(--pad); }
.contact { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); max-width: 1400px; }
.contact section { margin-bottom: 40px; }
.map { position: relative; aspect-ratio: 7 / 8; background: var(--placeholder); overflow: hidden; }
.map img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease; }
.map img.on { opacity: 1; }
.map__pin { position: absolute; left: 50%; top: 50%; width: 8%; height: 9%; min-width: 40px; min-height: 48px; transform: translate(-50%, -100%); z-index: 2; cursor: pointer; }
.map__zoom { z-index: 3; position: absolute; right: 12px; bottom: 34px; display: flex; flex-direction: column; background: var(--paper); box-shadow: var(--shadow); }
.map__zoom button { width: 40px; height: 40px; font: inherit; font-size: 26px; line-height: 1; color: var(--ink); background: none; border: 0; cursor: pointer; }
.map__zoom button + button { border-top: 1px solid rgba(0, 0, 0, .12); }
.map__zoom button:hover:not(:disabled) { background: var(--placeholder); }
.map__zoom button:disabled { color: rgba(0, 0, 0, .25); cursor: default; }
@media (prefers-reduced-motion: reduce) { .map img { transition: none; } }
@media (max-width: 767px) { .contact { grid-template-columns: 1fr; } }
.contact a, .legal a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.legal { max-width: 760px; font-size: 16px; }
.legal h1, .legal h2.part { font-size: 28px; font-weight: 300; margin: 0 0 24px; }
.legal h2.part { margin-top: 64px; }
.legal h3 { font-size: 15px; font-weight: 500; margin: 28px 0 6px; }

/* ---------- Fußzeile ---------- */
.site-footer { padding: 96px var(--pad) 56px; font-size: 16px; }
.site-footer p { margin: 0 0 18px; }
.site-footer a { text-decoration: none; }
.site-footer .site-footer__legal { color: var(--soft); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.site-footer a:hover { opacity: .7; }
@media (max-width: 767px) { .site-footer { padding: 56px var(--pad) 40px; } }

/* ---------- Einblenden ---------- */
.js .reveal { opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .site-header, .menu { transition: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Slideshow (wie bei Buck): Klick links = zurück, rechts = weiter, Bilder rutschen ---------- */
.ss { overflow: hidden; touch-action: pan-y; outline-offset: 4px; }
.ss__slide { position: absolute; inset: 0; transform: translateX(100%); transition: transform .65s cubic-bezier(.65, 0, .35, 1); will-change: transform; }
.ss__slide:first-child { transform: none; }
.ss__nav { position: absolute; top: 0; bottom: 0; z-index: 2; width: 50%; margin: 0; padding: 0; border: 0; background: none; -webkit-tap-highlight-color: transparent; cursor: pointer; }
.ss__nav--prev { left: 0; cursor: url("cursor-prev.svg") 48 24, w-resize; }
.ss__nav--next { right: 0; cursor: url("cursor-next.svg") 48 24, e-resize; }
.ss__nav:focus { outline: none; }
.ss__foot { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 14px; }
.ss__count { margin: 0; text-align: right; font-size: clamp(20px, 2vw, 32px); font-weight: 300; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.mcap { margin-top: 12px; font-size: 15px; line-height: 1.2; text-align: left; }
@media (prefers-reduced-motion: reduce) { .ss__slide { transition: none; } }
/* ohne JavaScript: Bilder untereinander */
html:not(.js) .ss { aspect-ratio: auto; overflow: visible; background: none; }
html:not(.js) .ss__slide { position: relative; aspect-ratio: 16 / 9; transform: none; margin-bottom: var(--bgap); }
html:not(.js) .ss__nav, html:not(.js) .ss__count { display: none; }

/* optionaler schwarzer Rand ("frame": true) */
.media--blank { background: none; }
.media--contain { background: #fff; }
.media--contain video, .media--contain img { object-fit: contain; }   /* ganzes Bild im Rahmen, nichts wird angeschnitten */
.media--frame::after { content: ""; position: absolute; inset: 0; border: 2px solid #000; pointer-events: none; z-index: 1; }

/* Bildunterschrift unter einer Medienzeile: beginnt an der linken Kante des Mediums */
.row__cap { grid-column: 1 / -1; margin-top: calc(12px - var(--bgap)); }
.row--wider .row__cap { grid-column: 2 / -1; }
.row--wide .row__cap, .row--pair .row__cap { grid-column: 3 / -1; }
.row--left .row__cap { grid-column: 1 / 7; }
.row--left5 .row__cap { grid-column: 1 / 6; }
@media (max-width: 767px) { .row .row__cap { grid-column: 1 / -1; margin-top: calc(12px - var(--bgap)); } }
