/* Schrift lokal gehostet (keine Verbindung zu Google, DSGVO-freundlich) */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Anthrazit mit Hellblau */
  --concrete: #2a2e32;   /* Hintergrund, Anthrazit */
  --ink: #b7d3ec;        /* Fließtext und Links */
  --title: #93c0e8;      /* Hellblau für große Titel */
  --mute: #84a2bd;       /* Untertitel, Beschriftungen */
  --rule: #40464c;       /* Linien */
  --steel: #e2eefa;      /* Hover und Fokus */
  --frame: #33383d;      /* Platzhalter für Bilder */
  --gutter: clamp(1.25rem, 3.5vw, 3rem);
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

/* Weiche Überblendung beim Seitenwechsel (Chrome, Edge, Safari 18+).
   Kopfzeile bleibt dabei ruhig stehen. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) {
  animation-duration: 0.45s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}
.site-header { view-transition-name: site-header; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--concrete);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.5;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}
main { flex: 1; padding: 0 var(--gutter); }
a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: color 0.35s var(--ease), text-decoration-color 0.35s var(--ease);
}
a:hover { text-decoration-color: currentColor; }
a:hover { color: var(--steel); }
:focus-visible { outline: 2px solid var(--steel); outline-offset: 3px; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- Kopf ---------- */
.site-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.15rem 2rem;
  padding: clamp(1.25rem, 3vw, 2.25rem) var(--gutter) clamp(2rem, 6vw, 4.5rem);
}
.site-name {
  font-size: clamp(1.375rem, 2.3vw, 2rem);
  font-weight: 300;
  font-stretch: 108%;
  line-height: 1.1;
  letter-spacing: 0.005em;
  font-kerning: normal;
  font-feature-settings: "kern" 1;
  text-decoration: none;
  color: var(--steel);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.site-roles { margin-top: 0.4rem !important; font-size: 0.875rem; letter-spacing: 0.01em; }
.site-roles { margin: 0; grid-column: 1; color: var(--mute); font-size: 0.9375rem; }
.site-nav {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem 1.5rem;
  font-size: 0.9375rem;
}
.site-nav a { text-decoration: none; }
.site-nav a[aria-current="page"] { text-decoration: underline; }

/* ---------- Work: Titelliste mit Vorschau ---------- */
.work {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}
.work-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.work-list li { border-bottom: 1px solid var(--rule); }
.work-item {
  display: grid;
  gap: 0.25rem;
  padding: 0.95rem 0 1.05rem;
  text-decoration: none;
}
.work-thumb { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--frame); margin-bottom: 0.75rem; }
.work-title {
  font-size: clamp(1.625rem, 3.4vw, 2.875rem);
  font-stretch: 118%;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--title);
  display: inline-block;
  transition: color 0.55s var(--ease), transform 0.7s var(--ease);
}
.work-meta { color: var(--mute); font-size: 0.9375rem; }
.work-item:hover, .work-item:focus-visible { color: var(--ink); }
.work-meta { transition: color 0.55s var(--ease); }
.work-item:hover .work-title,
.work-item:focus-visible .work-title,
.work-item.is-active .work-title { color: var(--steel); transform: translateX(0.12em); }
.work-thumb { transition: opacity 0.6s var(--ease); }
.work-item:hover .work-thumb { opacity: 0.85; }

.work-preview { display: none; }

@media (min-width: 900px) and (hover: hover) {
  .work { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; gap: clamp(2rem, 5vw, 5rem); }
  .work-thumb { display: none; }
  .work-preview {
    display: block;
    position: sticky;
    top: 2rem;
    aspect-ratio: 16 / 9;
    background: var(--frame);
    overflow: hidden;
  }
  .work-preview img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0;
    transform: scale(1.025);
    transition: opacity 0.7s var(--ease), transform 1.4s var(--ease);
  }
  .work-preview img.is-visible { opacity: 1; transform: scale(1); }
  /* Nicht aktive Titel treten zurück, sobald einer gewählt ist */
  .work-list:has(.is-active) .work-item.is-active .work-title { color: var(--steel); }
  .work-list:has(.is-active) .work-item:not(.is-active) .work-title { color: #5d7890; }
}

/* ---------- Projektseite ---------- */
.project { max-width: 1400px; }
/* Player in Originalformat, nie höher als der Bildschirm */
.player {
  --ar: 1.7778;
  aspect-ratio: var(--ar);
  width: min(100%, calc(86svh * var(--ar)));
  background: #000;
}
@media (max-width: 699px) {
  .player { width: calc(100% + 2 * var(--gutter)); margin: 0 calc(var(--gutter) * -1); }
}

.project-text {
  display: grid;
  gap: 1.5rem 3rem;
  padding: clamp(1.5rem, 4vw, 3rem) 0;
}
@media (min-width: 900px) {
  .project-text { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .project-head { grid-column: 1 / -1; }
}
.project-head h1 {
  margin: 0;
  color: var(--title);
  font-size: clamp(1.75rem, 3.4vw, 2.875rem);
  font-stretch: 118%;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.project-subtitle { margin: 0.6rem 0 0; color: var(--mute); font-size: 1.125rem; }
.project-description { max-width: 62ch; }
.project-description p:first-child { margin-top: 0; }

.credits, .contact-list { margin: 0; display: grid; gap: 0; align-content: start; border-top: 1px solid var(--rule); }
.credits > div, .contact-list > div {
  display: grid;
  grid-template-columns: minmax(7rem, 38%) 1fr;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
}
.credits dt, .contact-list dt { color: var(--mute); }
.credits dd, .contact-list dd { margin: 0; }

.project-pager {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--rule);
}
.project-pager a { text-decoration: none; font-stretch: 112%; font-size: 1.25rem; display: grid; }
.project-pager a span { font-stretch: 100%; font-size: 0.875rem; color: var(--mute); }
.project-pager a[rel="next"] { text-align: right; }

/* ---------- Textseiten ---------- */
.text-page { max-width: 62ch; }
.text-page h1 {
  margin: 0 0 2rem;
  color: var(--title);
  font-size: clamp(1.75rem, 3.4vw, 2.875rem);
  font-stretch: 118%;
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.prose { font-size: 1.1875rem; line-height: 1.55; }
.prose p:first-child { margin-top: 0; }
.empty { color: var(--mute); }

/* ---------- Fuß ---------- */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 4rem var(--gutter) 1.75rem;
  color: var(--mute);
  font-size: 0.875rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
.footer-links a { text-decoration: none; }

@media (max-width: 560px) {
  .site-header { grid-template-columns: 1fr; }
  .site-nav { grid-column: 1; grid-row: auto; justify-content: flex-start; margin-top: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  @view-transition { navigation: none; }
  .work-item.is-active .work-title, .work-item:hover .work-title { transform: none; }
}

/* Gumlet-Player */
.player { position: relative; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.project-description:empty { display: none; }

/* Mehrere Filme in einem Projekt: Auswahl unter dem Player */
.player iframe { transition: opacity 0.35s var(--ease); }
.player.is-switching iframe { opacity: 0; }
.player { transition: aspect-ratio 0.5s var(--ease), width 0.5s var(--ease); }

.video-switch {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 1rem;
}
.video-option {
  all: unset;
  box-sizing: border-box;
  display: grid;
  gap: 0.55rem;
  width: 100%;
  cursor: pointer;
  color: var(--mute);
  transition: color 0.45s var(--ease);
}
.video-option:focus-visible { outline: 2px solid var(--steel); outline-offset: 4px; }
.video-thumb { display: block; aspect-ratio: 16 / 9; background: var(--frame); overflow: hidden; }
.video-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.45;
  transform: scale(1.02);
  transition: opacity 0.55s var(--ease), transform 0.9s var(--ease);
}
.video-option:hover { color: var(--ink); }
.video-option:hover .video-thumb img { opacity: 0.8; transform: scale(1); }
.video-option.is-current { color: var(--steel); cursor: default; }
.video-option.is-current .video-thumb img { opacity: 1; transform: scale(1); }
.video-caption { display: flex; gap: 0.75rem; font-size: 0.9375rem; }
.video-num { font-variant-numeric: tabular-nums; color: var(--mute); }

/* Kontaktseite: ruhiger Text, darunter dezente Links im Stil der Work-Liste */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.text-page--contact { max-width: 56rem; }
.contact-intro {
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  max-width: 34ch;
  font-size: clamp(1.1875rem, 1.9vw, 1.5rem);
  font-stretch: 105%;
  font-weight: 300;
  line-height: 1.45;
  color: var(--ink);
}
.contact-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.contact-links li { border-bottom: 1px solid var(--rule); }
.contact-link {
  display: grid;
  gap: 0.15rem 2rem;
  padding: 0.85rem 0 0.95rem;
  text-decoration: none;
}
@media (min-width: 700px) {
  .contact-link { grid-template-columns: 9rem 1fr; align-items: baseline; }
}
.contact-label { color: var(--mute); font-size: 0.875rem; transition: color 0.55s var(--ease); }
.contact-value {
  display: inline-block;
  justify-self: start;
  font-size: clamp(1.25rem, 2.4vw, 1.875rem);
  font-stretch: 112%;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--title);
  overflow-wrap: anywhere;
  transition: color 0.55s var(--ease), transform 0.7s var(--ease);
}
.contact-link:hover .contact-value,
.contact-link:focus-visible .contact-value { color: var(--steel); transform: translateX(0.12em); }
.contact-link:hover .contact-label { color: var(--ink); }
.contact-links:has(.contact-link:hover) .contact-link:not(:hover) .contact-value { color: #5d7890; }
@media (prefers-reduced-motion: reduce) {
  .contact-link:hover .contact-value { transform: none; }
}

/* Kunden auf der Kontaktseite */
.clients {
  display: grid;
  gap: 0.6rem 2rem;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}
@media (min-width: 700px) {
  .clients { grid-template-columns: 9rem 1fr; align-items: baseline; }
}
.clients h2 { margin: 0; font-weight: 400; }
.client-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 2rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
}
.client-list li { break-inside: avoid; }
@media (min-width: 1000px) { .client-list { columns: 3; } }

/* Impressum und Datenschutz */
.text-page--legal { max-width: 46rem; }
.legal { font-size: 1rem; line-height: 1.6; color: var(--ink); }
.legal h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.25rem;
  font-stretch: 112%;
  font-weight: 400;
  color: var(--title);
}
.legal h2:first-child { margin-top: 0; }
.legal h3 { margin: 1.75rem 0 0.5rem; font-size: 1rem; font-weight: 600; color: var(--steel); }
.legal p { margin: 0 0 0.9rem; }
.legal strong { font-weight: 600; color: var(--steel); }
.legal a { overflow-wrap: anywhere; }
.legal-source { margin-top: 2.5rem !important; font-size: 0.875rem; color: var(--mute); }

/* ---------- Einwilligung (Gumlet) ---------- */
.footer-consent {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: color 0.35s var(--ease);
}
.footer-consent:hover { color: var(--steel); }

.consent-banner {
  position: fixed;
  z-index: 50;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  max-width: 40rem;
  display: grid;
  gap: 1rem;
  padding: 1.15rem 1.25rem 1.25rem;
  background: #202427;
  border: 1px solid var(--rule);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.4);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
  opacity: 0;
  transform: translateY(0.75rem);
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease);
}
.consent-banner.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.consent-banner p { margin: 0; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* Beide Schaltflächen gleich gewichtet, wie es die Aufsichtsbehörden erwarten */
.consent-actions button, .consent-load {
  font: inherit;
  font-size: 0.9375rem;
  color: var(--steel);
  background: transparent;
  border: 1px solid var(--mute);
  padding: 0.5rem 1.15rem;
  cursor: pointer;
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}
.consent-actions button:hover, .consent-load:hover {
  background: var(--steel);
  border-color: var(--steel);
  color: var(--concrete);
}

.consent-gate {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
  transition: opacity 0.5s var(--ease);
}
.consent-gate-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}
.consent-gate-box {
  position: relative;
  display: grid;
  gap: 1rem;
  justify-items: center;
  max-width: 30rem;
  padding: 1.25rem;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink);
}
.consent-gate-box p { margin: 0; }
.player.is-unlocked .consent-gate { opacity: 0; pointer-events: none; }
@media (max-width: 560px) {
  .consent-gate-box { font-size: 0.8125rem; gap: 0.6rem; padding: 0.75rem 1rem; }
}
