/* production-designer.de */

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/SpaceGrotesk-Variable.woff2?v=7d321858") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* dark (default) */
  --fg: #e8e8e6;
  --bg: #111;
  --muted: #8a8a88;
  --line: #2a2a2a;
  --tile: #1c1c1c;
  --veil: .18;
  --pad: 20px;
  --font: "Space Grotesk", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

/* light variant, kept for reference – active with <html data-theme="light"> */
:root[data-theme="light"] {
  --fg: #000;
  --bg: #fff;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --tile: #eee;
  --veil: .12;
  color-scheme: light;
}



* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 15px/1.45 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

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

/* ---------- header / footer */

.site-header {
  position: sticky;   /* bleibt beim Scrollen oben – Work/About immer erreichbar */
  top: 0;
  z-index: 8;
  background: var(--bg);
  transition: transform .3s ease;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: var(--pad);
}
.site-name {
  font-size: clamp(19px, 1.5vw, 24px);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.site-role { color: var(--muted); font-weight: 400; }
.site-nav { display: flex; gap: 22px; font-size: 16px; }

.site-footer {
  display: flex;
  gap: 20px;
  padding: 40px var(--pad) var(--pad);
  font-size: 13px;
  color: var(--muted);
}
.site-footer span { margin-right: auto; }

/* ---------- home grid: flush, no gaps */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--tile);
}
.tile img,
.tile .placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity .25s ease;
}
.tile:hover { text-decoration: none; }

.tile-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-size: clamp(22px, 2vw, 32px);
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0;
  transition: opacity .25s ease;
}
.tile:hover img,
.tile:focus-visible img { opacity: var(--veil); }
.tile:hover .tile-title,
.tile:focus-visible .tile-title { opacity: 1; }

/* touch devices: title always visible */
@media (hover: none) {
  .tile-title {
    opacity: 1;
    inset: auto auto 0 0;
    padding: 5px 9px;
    font-size: 15px;
    text-align: left;
    background: var(--bg);
  }
  .tile:hover img { opacity: 1; }
}

.placeholder { background: var(--tile); }
.placeholder.wide { aspect-ratio: 3 / 2; width: 100%; }

@media (max-width: 700px)  {
  .grid { grid-template-columns: repeat(2, 1fr); }
  /* odd number of tiles: lead project full width on top, no gap at the end */
  .grid.odd .tile:first-child { grid-column: 1 / -1; }
  :root { --pad: 16px; }
  .site-header { flex-direction: column; gap: 6px; }
  /* Handy: Kopfzeile weicht beim Runterscrollen aus, kommt beim Hochscrollen sofort zurück */
  .site-header.away { transform: translateY(-100%); }
}

/* ---------- project page */

.project-head {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 40px 64px;
  padding: 48px var(--pad) 56px;
}
.project-head h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}
.intro {
  margin: 0;
  max-width: 34em;
  font-size: 18px;
  line-height: 1.5;
}
.quote {
  margin: 24px 0 0;
  max-width: 34em;
  color: var(--muted);
}
.quote span { display: block; }
.quote span + span { margin-top: 10px; }

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 20px;
  margin: 0;
  align-self: end;
  font-size: 14px;
}
.facts dt, .facts dd {
  margin: 0;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.facts dt { color: var(--muted); }

.images {
  padding: 0 var(--pad);
}

.group + .group { margin-top: 96px; }

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 8px 64px;
  margin-bottom: 24px;
}
.section-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}
.section-head p {
  margin: 0;
  max-width: 34em;
  color: var(--muted);
}

.row {
  display: flex;
  gap: 8px;
}
.row + .row { margin-top: 8px; }
.row figure { margin: 0; min-width: 0; }
.row img { width: 100%; cursor: zoom-in; }
.row figcaption {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.project-nav {
  display: flex;
  justify-content: space-between;
  padding: 80px var(--pad) 0;
}

@media (max-width: 700px) {
  .project-head, .section-head { grid-template-columns: 1fr; }
  .project-head { padding-top: 32px; gap: 32px; }
  .group + .group { margin-top: 64px; }
  .row { flex-direction: column; }
  .row figure { flex: none !important; }
}

/* ---------- text pages */

.text-page {
  padding: 40px var(--pad) 0;
  max-width: 760px;
}
.text-page h1 { font-size: 32px; font-weight: 500; margin: 0 0 24px; }
.text-page h2 { font-size: 15px; font-weight: 500; margin: 40px 0 8px; }
.text-page a { text-decoration: underline; text-underline-offset: 3px; }
.bio { font-size: 18px; }
.note { color: var(--muted); margin-top: 0; }

.credit-list { list-style: none; margin: 0; padding: 0; }
.credit-list li {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.credit-list .y, .credit-list .role { color: var(--muted); }
/* titles with a project page: quiet underline, brighter on hover */
.text-page .credit-link {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: text-decoration-color .2s;
}
.text-page .credit-link:hover { text-decoration-color: var(--fg); }

/* ---------- lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  touch-action: pan-y;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: calc(100vw - 2 * var(--pad));
  max-height: calc(100vh - 110px);
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
}
.lightbox .lb-caption {
  min-height: 1.45em;
  margin-top: 12px;
  padding: 0 var(--pad);
  color: var(--muted);
  text-align: center;
}
.lightbox button {
  position: absolute;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  cursor: pointer;
  padding: var(--pad);
}
.lightbox .lb-close { top: 0; right: 0; }
.lightbox .lb-prev,
.lightbox .lb-next { top: 0; bottom: 0; width: 30%; }
.lightbox .lb-prev { left: 0; text-align: left; }
.lightbox .lb-next { right: 0; text-align: right; }
.lightbox .lb-prev:hover,
.lightbox .lb-next:hover { text-decoration: underline; }
.lightbox .lb-count {
  position: absolute; top: 0; left: 0; padding: var(--pad); color: var(--muted);
}
@media (hover: none) {
  .lightbox .lb-prev, .lightbox .lb-next { font-size: 0; } /* swipe instead */
}
body.lb-open { overflow: hidden; }

:focus-visible { outline: 1px solid var(--fg); outline-offset: 2px; }

/* ---------- project page: presentation layout (hero, strips, essay) */

.hero { padding: 0 var(--pad); }
.hero figure { margin: 0; }
.hero img { width: 100%; cursor: zoom-in; }

.section-head h2 {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.row-3 figcaption, .row-2 figcaption { font-size: 12px; }

.essay {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 8px 64px;
  padding: 120px var(--pad) 0;
}
.essay h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.essay-text {
  columns: 2 22em;
  column-gap: 40px;
}
.essay-text p { margin: 0 0 1em; break-inside: avoid-column; }

@media (max-width: 700px) {
  .essay { grid-template-columns: 1fr; padding-top: 80px; }
}

/* ---------- big image + stack of small ones (like page 5 of the presentation)
   Column widths come from build.py (inline style), calculated from the image
   formats so both sides are the same height - no image is cropped. */

.row.side {
  display: grid;
  gap: 8px;
  align-items: start;
}
.row.side.flip > figure { order: 2; }

.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.row.side figure {
  position: relative;
  flex: none !important;
}
/* captions sit on the image as a small label, so they don't change the height */
.row.side figcaption {
  position: absolute;
  left: 0;
  bottom: 0;
  margin: 0;
  padding: 3px 7px;
  background: var(--bg);
  color: var(--fg);
  font-size: 12px;
}

@media (max-width: 700px) {
  .row.side { grid-template-columns: 1fr !important; }
  .row.side.flip > figure { order: 0; }
  .row.side figcaption { position: static; padding: 0; margin-top: 6px; background: none; color: var(--muted); }
}

/* ---------- poster next to the title (optional, "poster" in projects.json) */

.project-head:has(.poster) {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 200px;
}
.poster { margin: 0; align-self: start; }
.poster img { width: 100%; }

@media (max-width: 1000px) and (min-width: 701px) {
  .project-head:has(.poster) { grid-template-columns: minmax(0, 1fr) 160px; }
  .project-head:has(.poster) .facts { grid-column: 1 / -1; }
  .project-head .poster { grid-row: 1; grid-column: 2; }
}
@media (max-width: 700px) {
  .project-head:has(.poster) { grid-template-columns: minmax(0, 1fr) 110px; gap: 24px 16px; }
  .project-head:has(.poster) .facts { grid-column: 1 / -1; }
  .project-head .poster { grid-row: 1; grid-column: 2; }
}

/* ---------- text tile (project without images yet, e.g. "Upcoming") */

.text-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: var(--tile);
  transition: background .25s ease;
}
.text-tile:hover { background: var(--line); text-decoration: none; }
.tt-title {
  font-size: clamp(24px, 3vw, 44px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}
.tt-meta { color: var(--muted); font-size: 14px; }
@media (max-width: 700px) {
  .text-tile { padding: 12px; }
  .tt-meta { font-size: 12px; }
}

.project-note { color: var(--muted); margin: 0; }

/* tile showing the whole image (e.g. a square key visual) */
.tile img.contain { object-fit: contain; }

/* ---------- awards as laurels */

.laurels {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin: 28px 0 4px;
}
.laurel {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--fg);
}
.laurel .branch {
  width: 26px;
  height: 66px;
  flex: none;
  fill: currentColor;
}
.laurel .branch.r { transform: scaleX(-1); }
.laurel-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 12px;
  line-height: 1.3;
  max-width: 150px;
}
.laurel-text strong { font-size: 14px; font-weight: 500; }
.laurel-text .res {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.laurel-text .yr { color: var(--muted); }

/* ---------- title on the opening image (variant A) / above it (variant B) */

.hero-wrap { position: relative; }
.hero.overlay .hero-wrap::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0));
  pointer-events: none;
}
.hero-title {
  position: absolute;
  left: 32px;
  right: 32px;
  bottom: 28px;
  z-index: 1;
  color: #fff;
  pointer-events: none;
}
.hero-title h1,
.title-above h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 88px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero-title p,
.title-above p {
  margin: 10px 0 0;
  font-size: 14px;
  opacity: .85;
}
.title-above { padding: 32px var(--pad) 24px; }
.title-above p { color: var(--muted); opacity: 1; }

@media (max-width: 700px) {
  .hero-title { left: 14px; right: 14px; bottom: 12px; }
  .hero-title p { font-size: 12px; }
}
/* variant A: full width, title at the top of the image so it is visible right away */
.hero.overlay .hero-wrap::after {
  top: 0; bottom: auto;
  height: 40%;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
}
.hero.overlay .hero-title { top: 28px; bottom: auto; }
@media (max-width: 700px) {
  .hero.overlay .hero-title { top: 12px; }
}

/* ---------- about: portrait next to the bio */

.about-intro {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.about-intro .bio { margin: 0; }
.portrait { margin: 0; }
.portrait img { width: 100%; height: auto; }
.portrait figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); }
@media (max-width: 700px) {
  .about-intro { grid-template-columns: 1fr; gap: 20px; }
  .portrait { max-width: 220px; }
}

/* ---------- scroll cue on project pages (see site.js) */
.scroll-cue {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 5;
  width: 56px;
  height: 56px;
  margin-left: -28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: #111;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .45);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.scroll-cue.show { opacity: 1; pointer-events: auto; animation: cue-bob 2.4s ease-in-out infinite; }
.scroll-cue:hover { background: #fff; }
@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}
@media (prefers-reduced-motion: reduce) { .scroll-cue.show { animation: none; } }
body.lb-open .scroll-cue { display: none; }
