/* 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: 17px; 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; }
.tile:hover .cap__title, .tile:focus-visible .cap__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.item { margin-bottom: 0; }
@media (max-width: 767px) {
  .grid { grid-template-columns: 1fr; gap: 0; }
  .cap { font-size: 13px; padding: 9px 0 20px; }
  .item { margin-bottom: 12px; }
}

.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%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: var(--placeholder); }
@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 { max-width: 720px; }
.contact .lead { margin-bottom: 32px; }
.contact a, .legal a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.legal { max-width: 760px; font-size: 16px; }
.legal h1 { font-size: 28px; font-weight: 300; margin: 0 0 24px; }
.legal h2 { font-size: 15px; font-weight: 500; margin: 28px 0 6px; }

/* ---------- Fußzeile ---------- */
.site-footer { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 28px var(--pad) 34px; font-size: 13px; color: var(--soft); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 767px) { .site-footer { padding: 6px var(--pad) 22px; font-size: 11px; gap: 6px 14px; } }

/* ---------- 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; }
}
