@font-face { font-family: "Urbanist"; src: url("fonts/urbanist-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Urbanist"; src: url("fonts/urbanist-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* Räuchereiche: warm grey-brown, never black */
:root {
  --bg: #2e2925;
  --bg-2: #383230;
  --seam: #241f1c;
  --text: #ede6dc;
  --muted: #b0a598;
  --line: #5a514a;
  --red: #c8312b; /* only the ² of the logo */
  --gap: 6px;
  --pad: clamp(1rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 300 1.0625rem/1.6 "Urbanist", system-ui, sans-serif;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .25em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--text); color: var(--bg); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: .5rem; }

/* header: nav split around the wordmark, like a hinge */
.top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 1.1rem var(--pad); gap: 1rem;
}
.top a { text-decoration: none; font-weight: 500; letter-spacing: .01em; }
.top a:hover, .top a[aria-current="page"] { text-decoration: underline; }
.top .l { justify-self: start; }
.top .r { justify-self: end; }
.mark { display: flex; align-items: center; gap: .7rem; }
.mark svg { width: 3.2rem; height: 3.2rem; color: var(--text); }
.mark span { font-weight: 300; font-size: .95rem; white-space: nowrap; }
@media (max-width: 640px) { .mark span { display: none; } }

/* opening work: no text before it */
.opener { margin: 0; position: relative; }
.opener img { width: 100%; aspect-ratio: 1600 / 720; object-fit: cover; }
@media (max-width: 640px) { .opener img { aspect-ratio: 4 / 3; object-position: 40% 50%; } }
.opener figcaption {
  display: flex; justify-content: space-between; gap: .2rem 1rem; flex-wrap: wrap;
  padding: .7rem var(--pad) 0; color: var(--muted); font-size: .95rem;
}

/* the 8 fields: squares, like the logo */
.fields { padding: clamp(3rem, 8vw, 6rem) 0 0; }
.fields h2, .bio h2, .theme h2, .page-head h1 { font-weight: 300; }
.fields > h2 { padding: 0 var(--pad); margin: 0 0 1rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.grid {
  list-style: none; margin: 0; padding: var(--gap); background: var(--seam);
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap);
}
@media (min-width: 900px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.field a { position: relative; display: block; aspect-ratio: 1; overflow: hidden; text-decoration: none; }
.field img { width: 100%; height: 100%; object-fit: cover; }
.field a::after { /* the thin square frame of the logo, drawn in on hover/focus */
  content: ""; position: absolute; inset: 14px; border: 1px solid var(--text);
  opacity: 0; transition: opacity .25s, inset .35s cubic-bezier(.2,.7,.2,1);
}
.field a:hover::after, .field a:focus-visible::after { opacity: 1; inset: 10px; }
.field a:focus-visible { outline-offset: -2px; }
.field .name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 2.2rem .9rem .75rem;
  background: linear-gradient(transparent, rgb(30 26 23 / .82));
  font-size: clamp(1.05rem, 2.2vw, 1.5rem); font-weight: 500; line-height: 1.15;
}
.field .name sup, .filter sup { font-size: .55em; font-weight: 300; margin-left: .1em; }

.tag {
  position: absolute; top: .55rem; right: .55rem; font-size: .7rem; line-height: 1;
  padding: .3rem .45rem; background: rgb(30 26 23 / .78); color: var(--text); font-weight: 500;
}

/* bio */
.bio {
  display: grid; gap: 1.5rem 3rem; padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
  grid-template-columns: 1fr; max-width: 78rem;
}
@media (min-width: 900px) { .bio { grid-template-columns: 1fr 1.4fr; } }
.bio h2 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.2; }
.bio p { margin: 0 0 1rem; max-width: 38rem; }
.bio .services { color: var(--muted); }

/* footer */
.foot {
  border-top: 1px solid var(--line); padding: 2rem var(--pad) 2.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; justify-content: space-between;
  color: var(--muted); font-size: .95rem;
}
.foot address { font-style: normal; }
.foot nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* projekte */
.page-head { padding: clamp(2rem, 6vw, 4rem) var(--pad) 1rem; }
.page-head h1 { margin: 0; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1; }
.filter {
  position: sticky; top: 0; z-index: 2; background: var(--bg);
  display: flex; gap: .35rem 1.4rem; flex-wrap: wrap; padding: .9rem var(--pad);
  border-bottom: 1px solid var(--line);
}
.filter a { text-decoration: none; color: var(--muted); padding: .2rem 0; font-weight: 500; }
.filter a:hover { color: var(--text); }
.filter a[aria-current="true"] { color: var(--text); text-decoration: underline; }
.theme { padding: 2.5rem var(--pad) 1rem; scroll-margin-top: 4rem; }
.theme[hidden] { display: none; }
.theme h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 1rem; }
/* justified rows: each photo grows by its aspect ratio */
.row { display: flex; flex-wrap: wrap; gap: var(--gap); }
.row figure { margin: 0; flex: var(--r) 1 calc(var(--r) * 11rem); max-width: calc(var(--r) * 26rem); position: relative; }
.row figure > a { display: block; position: relative; cursor: zoom-in; }
.row figure > a:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.row img { width: 100%; height: auto; }
.row figcaption { color: var(--muted); font-size: .9rem; padding: .5rem 0 .2rem; max-width: 40rem; }
.row figcaption a { color: var(--text); }

/* lightbox */
dialog.lb {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(36 31 28 / .97); color: var(--text);
}
dialog.lb::backdrop { background: rgb(36 31 28 / .9); }
.lb-inner { height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; padding: .8rem var(--pad); }
.lb button { background: none; color: var(--text); border: 1px solid var(--line); font: inherit; font-weight: 500; padding: .45rem .9rem; cursor: pointer; }
.lb button:hover { border-color: var(--text); }
.lb-stage { min-height: 0; display: grid; place-items: center; padding: 0 var(--pad); }
.lb-stage img { max-height: calc(100dvh - 9.5rem); max-width: 100%; width: auto; object-fit: contain; }
.lb-cap { padding: .8rem var(--pad) 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.lb-cap p { margin: 0; max-width: 44rem; }
.lb-cap .nav { display: flex; gap: .5rem; }
.lb-cap .note { color: var(--muted); font-size: .85rem; display: block; }

/* projekt-detail */
.detail { margin: 0; }
.detail img { width: 100%; }
.facts { padding: 2rem var(--pad) 4rem; display: grid; gap: 2rem 3rem; max-width: 78rem; }
@media (min-width: 900px) { .facts { grid-template-columns: 1fr 1.4fr; } }
.facts h1 { margin: 0; font-weight: 300; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; }
.facts dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: .6rem 2rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.back { display: inline-block; margin-top: 1.5rem; font-weight: 500; }

/* kontakt */
.contact { padding: clamp(2rem, 6vw, 4rem) var(--pad); display: grid; gap: 3rem; max-width: 78rem; }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1fr; } }
.contact h1 { margin: 0 0 1.5rem; font-weight: 300; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1; }
.contact h2 { font-weight: 500; font-size: 1.1rem; margin: 0 0 .6rem; }
.contact address { font-style: normal; font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.5; }
.contact address a { display: inline-block; padding: .15rem 0; }
.contact p { max-width: 36rem; }
.credits { padding: 0 var(--pad) 4rem; color: var(--muted); font-size: .9rem; max-width: 78rem; }
.credits h2 { color: var(--text); font-weight: 500; font-size: 1.1rem; }
.credits ul { padding: 0; list-style: none; columns: 2 18rem; column-gap: 3rem; }
.credits li { break-inside: avoid; padding: .15rem 0; }

@media (prefers-reduced-motion: reduce) { *, *::after { transition: none !important; } }
@media (max-width: 899px) { .filter { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; } }
