/* ============ Farben & Schriften – hier zentral anpassen ============ */
:root {
  /* Kühle Palette aus dem Denali-Material: Schnee, Fels, Gletscher */
  --paper: #ffffff;    /* Weiß */
  --ink: #121518;      /* Fels – fast Schwarz mit Blaustich */
  --muted: #69717a;    /* Granit-Grau */
  --line: #e2e5e7;
  --accent: #3e6d8a;   /* Gletscherblau – nur sparsam (Hover, Status) */
  --offline: #8a2f2c;  /* dunkles Rot für Projekte "In post" */
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  /* Überschriften-Schrift: Big Shoulders Display */
  --display: "Big Shoulders Display", Impact, sans-serif;
  --display-weight: 800; --display-style: normal; --display-case: uppercase;
  --display-track: 0; --display-lh: .82; --display-scale: 1.15;
  --gutter: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.muted { color: var(--muted); }

/* ============ Topbar ============ */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  background: rgba(255,255,255,.9); color: var(--ink);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transform: translateY(-100%); transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.topbar.is-visible { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand { font-family: var(--display); font-weight: var(--display-weight); font-style: var(--display-style); text-transform: var(--display-case); letter-spacing: var(--display-track); font-size: calc(19px * var(--display-scale)); }
.topbar nav { display: flex; gap: clamp(14px, 3vw, 36px); font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.topbar nav a { position: relative; }
.topbar nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -3px; height: 1px; background: currentColor; transition: right .3s; }
.topbar nav a:hover::after { right: 0; }

/* ============ Hero: Denali vollflächig ============ */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 110px var(--gutter) 0;
  color: #fff; background: var(--ink);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; animation: drift 30s ease-out both; }
.hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@keyframes drift { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-media::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 80%, rgba(0,0,0,.35) 100%);
}
.hero-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 22px 0; opacity: .85;
}
.hero-watch { text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid rgba(255,255,255,.5); padding-bottom: 2px; }
.hero-watch:hover { border-color: #fff; }
.hero:hover .hero-bar { opacity: 1; }

/* ============ Sections ============ */
.section { padding: clamp(72px, 12vw, 160px) var(--gutter) 0; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap;
  border-bottom: 1px solid var(--ink); padding-bottom: 14px; margin-bottom: clamp(24px, 4vw, 48px);
}
.section-title { font-family: var(--display); font-weight: var(--display-weight); font-style: var(--display-style); text-transform: var(--display-case); letter-spacing: var(--display-track); font-size: calc(clamp(30px, 5vw, 64px) * var(--display-scale)); line-height: .95; }

/* Karten allgemein */
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #ccc; }
.thumb img { transition: transform .9s cubic-bezier(.2,.7,.2,1), filter .5s; }
.card-meta { position: relative; padding-top: 14px; }
.card-meta h3 { font-weight: 600; font-size: clamp(21px, 2.2vw, 30px); line-height: 1.1; letter-spacing: -.015em; margin: 4px 0 6px; }

/* Coming soon */
.soon-grid { display: grid; gap: clamp(16px, 2.5vw, 32px); }
.soon-card { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(16px, 2.5vw, 32px); align-items: end; }
.soon-card .thumb img { filter: grayscale(.35); }
.badge { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Filter */
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button { border: 1px solid var(--line); border-radius: 99px; padding: 7px 14px; transition: all .2s; }
.filters button:hover { border-color: var(--ink); }
.filters button.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Projekt-Raster: erstes Projekt groß, Rest zweispaltig */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(36px, 5vw, 72px) clamp(16px, 2.5vw, 32px); }
.work-card { cursor: pointer; outline: none; }
.work-card.is-hidden { display: none; }
.work-card:hover .thumb img, .work-card:focus-visible .thumb img { transform: scale(1.045); }
.work-card:focus-visible .thumb { outline: 2px solid var(--accent); outline-offset: 4px; }

.play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; background: rgba(255,255,255,.92);
  transform: scale(.6); opacity: 0; transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .25s;
}
.play::after { content: ""; position: absolute; left: 31px; top: 25px; border: 13px solid transparent; border-left: 20px solid var(--ink); border-right: 0; }
.work-card:hover .play, .work-card:focus-visible .play { transform: scale(1); opacity: 1; }
@media (hover: none) { .play { transform: scale(.8); opacity: .95; } }

/* About */
.about { display: grid; grid-template-columns: 1fr 2fr; gap: 32px; }
.about .section-title { border: 0; }
.lead { font-size: clamp(22px, 2.6vw, 36px); line-height: 1.25; letter-spacing: -.015em; margin-bottom: 36px; max-width: 30ch; }
.facts { list-style: none; border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); text-transform: none; font-size: 13px; }
.facts span { color: var(--muted); text-transform: uppercase; }

/* Kontakt */
.contact {
  margin-top: clamp(96px, 14vw, 200px);
  background: var(--ink); color: var(--paper);
  padding: clamp(72px, 12vw, 160px) var(--gutter);
}
.contact .muted { color: #9a968e; }
.contact-big {
  display: inline-block; margin: 18px 0 40px;
  font-family: var(--display); font-weight: var(--display-weight); font-style: var(--display-style); text-transform: var(--display-case); letter-spacing: var(--display-track);
  font-size: calc(clamp(40px, 9vw, 160px) * var(--display-scale)); line-height: .9; white-space: nowrap;
  transition: color .25s;
}
.contact-big:hover { color: var(--accent); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.contact-links a { border-bottom: 1px solid #555; padding-bottom: 2px; }
.contact-links a:hover { border-color: var(--accent); }

.footer { display: flex; justify-content: space-between; padding: 20px var(--gutter); background: var(--ink); color: #9a968e; border-top: 1px solid #2a2a28; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10,10,9,.94); display: grid; place-items: center; padding: var(--gutter); }
.lightbox[hidden] { display: none; }
.lightbox-frame { width: min(1400px, 100%); aspect-ratio: 16 / 9; max-height: 85vh; }
.lightbox-frame iframe { width: 100%; height: 100%; border: 0; }
.lightbox-close { position: absolute; top: 18px; right: var(--gutter); color: #fff; padding: 8px; }
.lightbox-close:hover { color: var(--accent); }

/* Einblenden beim Scrollen */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ============ Handy ============ */
@media (max-width: 760px) {
  .soon-grid, .soon-card, .work-grid, .about { grid-template-columns: 1fr; }
  .facts li { grid-template-columns: 110px 1fr; }
  .footer { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============ WORK: Viewer + Timeline ============ */
.work { position: relative; }
.tl-sticky {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 76px 0 clamp(14px, 2.4vh, 28px);
  --clip-h: clamp(56px, 10vh, 96px);
}

/* Viewer: so groß wie möglich, kleine Titelzeile darüber */
/* Viewer + Timeline als ein Block, mittig im Bildschirm.
   Die Bühne ist so hoch wie ein 16:9-Bild in voller Breite (+ Titelzeile) und schrumpft, wenn der Platz nicht reicht. */
.tl-stage {
  flex: 0 1 auto; min-height: 0; height: calc((100vw - 2 * var(--gutter)) * 9 / 16 + 28px);
  display: flex; justify-content: center; align-items: flex-end;
  padding: 0 var(--gutter); margin-bottom: clamp(16px, 2.6vh, 28px); container-type: size;
}
/* Viewer bleibt immer 16:9: so breit wie möglich, aber nie höher als der verfügbare Platz (abzüglich Titelzeile) */
.tl-frame { --bar: 28px; width: min(100cqw, (100cqh - var(--bar)) * 16 / 9); display: flex; flex-direction: column; }
.tl-bar {
  display: flex; align-items: baseline; gap: 14px; padding-bottom: 8px; font-size: 11px; white-space: nowrap; min-width: 0;
}
.tl-title { color: var(--ink); font-weight: 500; }
.tl-meta { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tl-award { color: var(--accent); font-weight: 500; }
.tl-award[hidden] { display: none; }
.vw-tc { margin-left: auto; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.tl-viewer { position: relative; flex: none; aspect-ratio: 16 / 9; width: 100%; background: #0d0f11; overflow: hidden; border-radius: 3px; cursor: pointer; }
.tl-viewer img, .tl-viewer video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s ease; }
.tl-viewer .vw-still { animation: kenburns 14s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08) translate(-1%, -1%); } }
.tl-viewer .vw-video { opacity: 0; }
.tl-viewer.has-video .vw-video { opacity: 1; }
.tl-viewer.is-switching img, .tl-viewer.is-switching video { opacity: 0; }
.vw-play {
  position: absolute; bottom: 14px; left: 16px; z-index: 2; color: #fff; font-size: 11px; text-shadow: 0 1px 6px rgba(0,0,0,.5);
  opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s;
}
.tl-viewer:hover .vw-play, .tl-viewer:focus-visible .vw-play { opacity: 1; transform: none; }
.tl-viewer.is-offline { cursor: default; }
.tl-viewer.is-offline::after {
  content: "In post – coming soon"; position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #fff;
  background: repeating-linear-gradient(135deg, rgba(18,21,24,.55) 0 12px, rgba(18,21,24,.3) 12px 24px);
}
.tl-viewer.is-offline .vw-play { display: none; }

/* Timeline */
.tl-viewport { position: relative; flex: none; }
.tl-track { position: relative; display: flex; gap: 3px; width: max-content; padding-top: 28px; will-change: transform; }
.tl-ruler {
  position: absolute; left: 0; right: 0; top: 0; height: 20px; border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, var(--muted) 0 1px, transparent 1px 100px) bottom / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 20px) bottom / 100% 4px no-repeat;
}
.tl-ruler span { position: absolute; top: 0; font-family: var(--mono); font-size: 10px; color: var(--muted); letter-spacing: .04em; padding-left: 4px; border-left: 1px solid var(--muted); line-height: 11px; }
.clip {
  flex: none; position: relative; height: var(--clip-h); display: flex; flex-direction: column; overflow: hidden;
  border-radius: 4px; border: 2px solid transparent; background: #20262a; transition: border-color .25s;
}
.clip-frames {
  flex: 1; background-image: var(--thumb); background-size: auto 100%; background-repeat: repeat-x;
  filter: grayscale(.85) brightness(.75); transition: filter .35s;
}
.clip-label {
  height: 22px; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 0 8px; background: #4a5660; color: #fff; font-family: var(--mono); font-size: 10px; letter-spacing: .03em; transition: background .25s;
}
.clip-label span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clip.is-active { border-color: var(--accent); }
.clip.is-active .clip-frames, .clip:hover .clip-frames { filter: none; }
.clip.is-active .clip-label { background: var(--accent); }
.clip:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.clip[data-status="in-post"] { cursor: default; }
.clip[data-status="in-post"].is-active { border-color: var(--offline); }
.clip[data-status="in-post"].is-active .clip-label { background: var(--offline); }
.clip[data-status="in-post"] .clip-frames::after {
  content: ""; position: absolute; inset: 0 0 22px;
  background: repeating-linear-gradient(135deg, rgba(18,21,24,.45) 0 10px, rgba(18,21,24,.15) 10px 20px);
}
.tl-playhead { position: absolute; left: 50%; top: 0; bottom: -8px; width: 2px; margin-left: -1px; background: var(--ink); pointer-events: none; z-index: 3; }
.tl-playhead::before { content: ""; position: absolute; top: 0; left: -6px; border: 7px solid transparent; border-top: 10px solid var(--ink); }

/* Handy (Hochformat): ohne Überschrift, Viewer volle Breite */
@media (max-width: 760px) {
  .tl-sticky { --clip-h: clamp(56px, 10vh, 84px); padding-top: 72px; }
  .tl-stage { height: auto; flex: none; container-type: normal; }
  .tl-frame { width: 100%; }
  /* Feste Höhe (2 Zeilen), damit der Viewer beim Projektwechsel nicht springt */
  .tl-bar {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: 16px 16px;
    column-gap: 10px; row-gap: 4px; align-items: center; white-space: nowrap;
  }
  .tl-title { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .tl-meta { grid-column: 1 / 3; grid-row: 2; }
  .tl-award { grid-column: 3; grid-row: 2; justify-self: end; }
  .tl-award[hidden] { display: block; visibility: hidden; }
}

/* ============ Eigener Cursor ============ */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none;
  width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.94); color: var(--ink);
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  transform: translate3d(var(--x, -200px), var(--y, -200px), 0) scale(0);
  transition: transform .25s cubic-bezier(.2,.7,.2,1), width .25s, height .25s, margin .25s, background .25s, color .25s;
  will-change: transform;
}
.cursor.is-on { transform: translate3d(var(--x), var(--y), 0) scale(1); }
.cursor-label { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.cursor[data-kind="play"] .cursor-label::before { content: ""; border: 4px solid transparent; border-left: 7px solid currentColor; border-right: 0; }
.cursor[data-kind="view"] { width: 48px; height: 48px; margin: -24px 0 0 -24px; background: var(--ink); color: #fff; }
.cursor[data-kind="offline"] { width: 60px; height: 60px; margin: -30px 0 0 -30px; background: var(--offline); color: #fff; }
@media (hover: hover) and (pointer: fine) {
  .tl-viewer, .clip { cursor: none; }
  .tl-viewer .vw-play { display: none; }
}
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ============ Portrait in About ============ */
.about-side { display: flex; flex-direction: column; gap: clamp(20px, 3vw, 36px); }
.portrait { margin: 0; max-width: 360px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 3px; background: var(--line); }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
/* Einblenden: weich aus leichter Unschärfe und Zoom */
.portrait.reveal { opacity: 0; transform: none; }
.portrait.reveal img { transform: scale(1.08); filter: blur(8px); transition: transform 1.6s cubic-bezier(.2,.7,.2,1), filter 1.2s ease; }
.portrait.reveal.is-in { opacity: 1; transition: opacity 1.2s ease; }
.portrait.reveal.is-in img { transform: none; filter: none; }
@media (max-width: 760px) {
  .portrait { max-width: 70%; }
}
