
/* ---------- Basis ---------- */
:root {
  --bg: #0b0b0c;
  --bg-soft: #121214;
  --bg-elev: #17171a;
  --fg: #f2efe9;
  --muted: #a19c92;
  --line: rgba(242, 239, 233, 0.13);
  --line-strong: rgba(242, 239, 233, 0.26);
  --accent: #c9a86a;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --pad: clamp(20px, 5vw, 72px);
  --header-h: 72px;
  --maxw: 1480px;
}

*,
*::before,
*::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.no-scroll { overflow: hidden; }

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

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #0b0b0c; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0 0 1em; }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #0b0b0c;
  padding: 10px 16px;
  z-index: 999;
  font-size: 14px;
}
.skip:focus { left: 12px; top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  z-index: 80;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(11, 11, 12, 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}

.header-inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
}

.nav a {
  position: relative;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
  transition: color 0.25s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.nav a:hover,
.nav a:focus-visible { color: var(--fg); }
.nav a:hover::after,
.nav a:focus-visible::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--fg); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  appearance: none;
  background: none;
  border: 0;
  color: var(--fg);
  padding: 10px;
  margin-right: -10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: currentColor;
  margin: 6px 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.is-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.is-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: clamp(40px, 8vh, 96px);
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--bg-soft);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0.7;
  transform: scale(1.04);
  animation: heroIn 2.4s var(--ease) forwards;
}
@keyframes heroIn { to { transform: scale(1); } }

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 11, 12, 0.72) 0%, rgba(11, 11, 12, 0.18) 38%, rgba(11, 11, 12, 0.92) 100%),
    radial-gradient(120% 80% at 15% 100%, rgba(11, 11, 12, 0.9), transparent 60%);
}

.hero-content { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }

.hero .eyebrow { margin-bottom: 18px; color: var(--fg); opacity: 0.78; }

.hero h1 {
  font-size: clamp(3.4rem, 12.5vw, 11rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.15em;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; color: var(--accent); }

.hero-lead {
  max-width: 48ch;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: rgba(242, 239, 233, 0.82);
  margin-bottom: 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn:hover { background: var(--fg); color: #0b0b0c; border-color: var(--fg); transform: translateY(-1px); }
.btn--solid { background: var(--accent); border-color: var(--accent); color: #0b0b0c; }
.btn--solid:hover { background: #dcc08a; border-color: #dcc08a; color: #0b0b0c; }
.btn .arrow { transition: transform 0.3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.hero-meta {
  position: absolute;
  right: var(--pad);
  bottom: clamp(40px, 8vh, 96px);
  text-align: right;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: none;
}
@media (min-width: 900px) { .hero-meta { display: block; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 9vw, 120px); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(28px, 4vw, 52px);
  flex-wrap: wrap;
}

.section-head h2 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  letter-spacing: -0.02em;
}

.link-more {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
  white-space: nowrap;
}
.link-more:hover { color: var(--fg); border-color: var(--accent); }

/* ---------- Projekt-Kacheln ---------- */
.covers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, clamp(260px, 28vw, 380px)), 1fr));
  gap: clamp(14px, 2vw, 30px);
}

.cover-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bg-soft);
  border-radius: 2px;
}
.cover-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.cover-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease), opacity 0.6s var(--ease);
  opacity: 1;
}
.cover-card img.is-loaded { opacity: 1; }
.cover-card:hover img { transform: scale(1.045); }
.cover-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(9, 9, 10, 0.82) 100%);
  opacity: 0.9;
  transition: opacity 0.4s var(--ease);
}
.cover-card:hover::after { opacity: 1; }

.cover-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
}
.cover-title {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.7vw, 1.6rem);
  line-height: 1.1;
}
.cover-year {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-bottom: 4px;
}
.cover-count {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.count-badge {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(242, 239, 233, 0.72);
  background: rgba(9, 9, 10, 0.55);
  border: 1px solid rgba(242, 239, 233, 0.16);
  border-radius: 999px;
  padding: 4px 9px;
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.cover-card:hover .count-badge { opacity: 1; }

/* ---------- Seitenkopf ---------- */
.page-head {
  padding-top: calc(var(--header-h) + clamp(48px, 9vw, 110px));
  padding-bottom: clamp(32px, 5vw, 64px);
}
.page-head .eyebrow { margin-bottom: 18px; }
.page-head h1 {
  font-size: clamp(2.8rem, 8vw, 6.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.page-head .lead {
  max-width: 56ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}
.page-head-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 28px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Projektseite ---------- */
.project-head {
  padding-top: calc(var(--header-h) + clamp(40px, 7vw, 90px));
  padding-bottom: clamp(24px, 4vw, 48px);
}
.project-head .back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 26px;
  transition: color 0.25s var(--ease);
}
.project-head .back:hover { color: var(--fg); }
.project-head h1 {
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  letter-spacing: -0.03em;
}
.project-head .meta {
  display: flex;
  gap: 22px;
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.prose { max-width: 68ch; color: rgba(242, 239, 233, 0.86); }
.prose p:last-child { margin-bottom: 0; }

.masonry {
  columns: 3;
  column-gap: clamp(10px, 1.4vw, 20px);
}
@media (max-width: 1100px) { .masonry { columns: 2; } }
@media (max-width: 640px) { .masonry { columns: 1; } }

.masonry figure {
  margin: 0 0 clamp(10px, 1.4vw, 20px);
  break-inside: avoid;
  position: relative;
  background: var(--bg-soft);
  cursor: zoom-in;
  overflow: hidden;
}
.masonry img {
  width: 100%;
  height: auto;
  opacity: 1;
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease);
}
.masonry img.is-loaded { opacity: 1; }
.masonry figure:hover img { transform: scale(1.012); }
.masonry figure::after {
  content: "↗";
  position: absolute;
  right: 10px;
  bottom: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.masonry figure:hover::after { opacity: 1; }

.wide-figure { margin: clamp(28px, 5vw, 64px) auto; max-width: 1180px; }
.wide-figure img { width: 100%; height: auto; background: var(--bg-soft); }

/* ---------- Video ---------- */
.video-list { display: grid; gap: clamp(28px, 4vw, 56px); }
.video-card {
  position: relative;
  background: #000;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.video-card video,
.video-card iframe { width: 100%; height: 100%; display: block; border: 0; object-fit: contain; background: #000; }
.video-card img.poster { width: 100%; height: 100%; object-fit: cover; opacity: 0.9; }
.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.45));
  color: #fff;
  cursor: pointer;
  transition: background 0.3s var(--ease);
}
.video-play:hover { background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.3)); }
.video-play-inner {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.7);
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.25);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.video-play:hover .video-play-inner { transform: scale(1.06); background: rgba(201, 168, 106, 0.9); border-color: transparent; }
.video-play svg { width: 22px; height: 22px; margin-left: 3px; }
.video-caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 8vw, 120px);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 48px; } }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { border-top: 1px solid var(--line); padding: 18px 0; }
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list .label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-list a {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.contact-list a:hover { color: var(--accent); border-color: var(--accent); }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--fg);
  font: inherit;
  font-weight: 300;
  padding: 10px 0;
  border-radius: 0;
  transition: border-color 0.25s var(--ease);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field input::placeholder,
.field textarea::placeholder { color: rgba(161, 156, 146, 0.55); }

.form .btn { justify-self: start; margin-top: 8px; cursor: pointer; }
.form-note { font-size: 12px; color: var(--muted); }
.form-status { font-size: 13px; color: var(--accent); min-height: 1.2em; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(48px, 8vw, 100px);
  padding-block: 40px 48px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.footer-brand { font-family: var(--serif); font-size: 28px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.footer-links a:hover { color: var(--fg); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ---------- Reveal ---------- */
.reveal-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal-ready .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal-ready .reveal { opacity: 1; transform: none; } }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--fg);
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  background: rgba(8, 8, 9, 0.97);
  backdrop-filter: blur(10px);
}
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lb-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px var(--pad);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.lb-close, .lb-prev, .lb-next {
  appearance: none;
  background: none;
  border: 0;
  color: var(--fg);
  cursor: pointer;
  padding: 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: var(--accent); }
.lb-stage { position: relative; display: grid; place-items: center; padding: 0 var(--pad); min-height: 0; }
.lb-stage img { position: absolute; inset: 0; margin: auto; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lb-controls { display: flex; justify-content: space-between; align-items: center; padding: 10px var(--pad) 18px; }
.lb-count { font-size: 11px; letter-spacing: 0.18em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .js .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: rgba(11, 11, 12, 0.97);
    backdrop-filter: blur(18px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s var(--ease);
    z-index: 90;
  }
  .js .is-open .nav { opacity: 1; visibility: visible; pointer-events: auto; }
  .nav a { font-size: 15px; letter-spacing: 0.22em; padding: 14px 0; }
  .js .nav-toggle { display: block; position: relative; z-index: 95; }
  .header-inner { position: relative; z-index: 95; }
  .project-head .meta { gap: 14px; }
  .lb-controls { padding-bottom: 24px; }
  .lb-stage { padding: 0 8px; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }
  .cover-info { padding: 14px 16px; }
}

/* ---------- Druck ---------- */
@media print {
  .site-header, .site-footer, .hero-actions, .video-play, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .masonry { columns: 2; }
}

/* Full-width photos share the accessible image viewer. */
.gallery-open { display: block; cursor: zoom-in; }
.gallery-open:focus-visible { outline-offset: -4px; }
.wide-figure figure { margin: 0; }
.lightbox::backdrop { background: rgba(8, 8, 9, 0.97); }
.cover-card:focus-visible .count-badge { opacity: 1; }
@media (hover: none) { .count-badge { opacity: 1; } }
@media (max-width: 820px) {
  html:not(.js) .site-header { position: static; height: auto; padding-block: 16px; }
  html:not(.js) .header-inner { flex-wrap: wrap; }
  html:not(.js) .nav { flex-wrap: wrap; gap: 12px 18px; }
}

/* ---------- Rechtliche Seiten ---------- */
.legal h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 2.2em 0 0.6em; }
.legal h2:first-child { margin-top: 0; }
.legal ul:not(.contact-list) { padding-left: 1.2em; margin: 0 0 1em; }
.legal li { margin-bottom: 0.3em; }
.legal p a, .legal li a:not(.contact-list a) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal .contact-list { margin: 0.4em 0 1em; }
.footer-legal { display: flex; gap: 18px; }
.footer-legal a:hover { color: var(--fg); }
