/* ─────────────────────────────────────────────
   Studio Chroma – ruhig, weiß, Satoshi. Flüssig.
   ───────────────────────────────────────────── */

@font-face { font-family: "Satoshi"; src: url("/assets/fonts/satoshi-300.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/assets/fonts/satoshi-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/assets/fonts/satoshi-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url("/assets/fonts/satoshi-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #121212;
  --text: #333;
  --muted: #8f8f8f;
  --line: #e9e9e9;
  --bg: #fff;
  --pad: clamp(18px, 5vw, 72px);
  --gap: clamp(14px, 1.6vw, 24px);
  --top: 64px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --chroma: conic-gradient(from 200deg, #2f5fd0, #5e35a3, #b42763, #e95a2a, #f59e2a, #2f5fd0);
  --chroma-line: linear-gradient(90deg, #2f5fd0, #7a2f8f, #cc2d4a, #f07c24);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.55 "Satoshi", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid #5e35a3; outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; }

/* Seitenübergänge zwischen Seiten (Chrome, Edge, Safari 18+) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: var(--ease); }
::view-transition-group(*) { animation-duration: .55s; animation-timing-function: var(--ease); }

/* ── Kopfzeile ───────────────────────────── */
.topbar {
  /* Unterseiten: Logo exakt wie auf der Startseite (gleiche Größe, gleicher Abstand oben/links) */
  position: relative; z-index: 20;
  display: flex; justify-content: flex-start; align-items: flex-start;
  padding: clamp(28px, 2.6vw, 48px) var(--pad) 0;
  view-transition-name: topbar;
}
.topnav { display: flex; gap: 20px; font-size: 13px; }
.topnav a { position: relative; color: var(--ink); }

.logo { display: inline-flex; align-items: center; gap: 1px; color: #000; font-weight: 500; font-size: 19px; letter-spacing: .01em; line-height: 1; }
.logo .chroma-c { width: .98em; height: .98em; margin-left: 1px; transition: transform .9s var(--ease); }
.logo:hover .chroma-c { transform: rotate(-360deg); }
@supports (animation-timeline: scroll()) {
  .logo .chroma-c { animation: hue linear both; animation-timeline: scroll(root); }
  @keyframes hue { to { filter: hue-rotate(300deg); } }
}

/* ── Startseite: ein Raster, 1–4 gleich breite Spalten, Intro = Spalte 1 ──
   Spaltenbreite (--col) und Kachel-Positionen setzt das Inline-Skript (scGrid). */
.home {
  --ggap: clamp(28px, 2.6vw, 48px);
  --col: 30vw;
  display: flex; align-items: flex-start; gap: var(--ggap);
  padding: var(--ggap) var(--pad) 10vh;
}
.home > .intro { flex: 0 0 var(--col); width: var(--col); min-width: 0; position: sticky; top: var(--ggap); }
.tiles { position: relative; flex: 1 1 0; min-width: 0; }
.tiles > .card { position: absolute; }
/* Höhe setzt das Raster (gleicht Spalten vor breiten Kacheln aus, Bild wird dafür leicht beschnitten) */
.js .tiles > .card .pic { aspect-ratio: auto !important; height: 100%; }
.intro {
  height: calc(100vh - 2 * var(--ggap)); height: calc(100dvh - 2 * var(--ggap));
  display: flex; flex-direction: column; justify-content: space-between;
}
.intro .logo, .topbar .logo { font-size: clamp(30px, 2.5vw, 46px); font-weight: 500; letter-spacing: 0; }
.intro .logo .chroma-c, .topbar .logo .chroma-c { width: .98em; height: .98em; }
.intro__name {
  margin: 0; font-weight: 400; color: var(--muted);
  font-size: 11px; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.intro__name a { transition: color .3s ease; }
.intro__name a:hover { color: var(--ink); }
.intro__roles {
  list-style: none; margin: 0; padding: 0;
  font-size: 11px; line-height: 1.5; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.filter { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: clamp(40px, 8vh, 88px); font-size: 15px; color: var(--muted); }
.filter a { position: relative; padding: 3px 0; transition: color .3s, transform .5s var(--ease); }
.filter a:hover { color: var(--ink); transform: translateX(4px); }
.filter a[aria-current] { color: var(--ink); font-weight: 500; }
.filter sup { font-size: 9px; margin-left: 3px; color: #b5b5b5; vertical-align: super; }

/* Einspaltig (Handy/schmal): Logo + Filter oben, Fotos, Name + Rollen ganz unten */
.home[data-cols="1"] { flex-direction: column; align-items: stretch; }
.home[data-cols="1"] > .intro { display: contents; }
.home[data-cols="1"] .intro__top { order: 0; padding-bottom: 2vh; }
.home[data-cols="1"] .tiles { order: 1; flex: none; width: 100%; }
.home[data-cols="1"] .intro__bottom { order: 2; padding-top: 6vh; }
.home[data-cols="1"] .filter { flex-direction: row; flex-wrap: wrap; gap: 4px 18px; margin-top: 4vh; }
.home[data-cols="1"] .intro .logo { font-size: 30px; }
@media (max-width: 760px) { .topbar .logo { font-size: 30px; } }

/* ohne JavaScript: einfaches Raster */
html:not(.js) .home { display: block; }
html:not(.js) .home > .intro { position: static; width: auto; height: auto; }
html:not(.js) .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--ggap); margin-top: 6vh; }
html:not(.js) .tiles > .card { position: relative; }

/* Karte: nur das Bild – Infos liegen als Overlay darauf */
.card { position: relative; display: block; overflow: hidden; isolation: isolate; color: #fff; }
.card[hidden] { display: none; }
.card .pic { transition: transform 1.2s var(--ease); }
.card img { transition: transform 1.4s var(--ease), opacity .6s ease, filter .8s ease; }
.card__info {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(14px, 1.3vw, 22px);
  background:
    linear-gradient(180deg, rgba(0,0,0,.38) 0%, rgba(0,0,0,0) 26%),
    linear-gradient(0deg, rgba(0,0,0,.58) 0%, rgba(0,0,0,.18) 34%, rgba(0,0,0,0) 58%);
  opacity: 0; transition: opacity .55s var(--ease);
  text-shadow: 0 1px 12px rgba(0,0,0,.25);
}
.card__top { display: flex; justify-content: space-between; gap: 12px; font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; transform: translateY(-6px); transition: transform .7s var(--ease); }
.card__year { letter-spacing: .08em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.card__title {
  display: flex; align-items: baseline; gap: .4em;
  font-size: clamp(18px, 1.55vw, 26px); line-height: 1.08; letter-spacing: -.02em; font-weight: 400;
  transform: translateY(10px); transition: transform .7s var(--ease);
}
.card__arrow { display: inline-block; opacity: 0; transform: translateX(-10px); transition: opacity .5s ease .08s, transform .7s var(--ease) .08s; }
@media (hover: hover) {
  .card:hover img, .card:focus-visible img { transform: scale(1.04); }
  .card:hover .card__info, .card:focus-visible .card__info { opacity: 1; }
  .card:hover .card__top, .card:hover .card__title,
  .card:focus-visible .card__top, .card:focus-visible .card__title { transform: none; }
  .card:hover .card__arrow, .card:focus-visible .card__arrow { opacity: 1; transform: none; }
}
/* Touch-Geräte: kein Hover → Titel dezent immer sichtbar */
@media (hover: none) {
  .card__info { opacity: 1; background: linear-gradient(0deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 45%); }
  .card__top { display: none; }
  .card__title { transform: none; font-size: 17px; justify-content: space-between; }
  .card__arrow { opacity: .8; transform: none; }
}

/* Bilder mit unscharfem Platzhalter, der zum scharfen Bild "auftaut" */
.pic { position: relative; overflow: hidden; background: #f3f3f3 var(--lqip) center / cover no-repeat; }
.pic::before { content: ""; position: absolute; inset: 0; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: opacity .8s ease; }
.pic img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: opacity .8s ease, transform 1.2s var(--ease); }
.js .pic img { opacity: 0; }
.js .pic.is-loaded img { opacity: 1; }
.pic.is-loaded::before, html:not(.js) .pic::before { opacity: 0; }
.pic--empty { display: grid; place-items: center; background: #111; color: #fff; font-size: 13px; letter-spacing: .1em; }

/* Einblenden beim Scrollen */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ── Projektseite ────────────────────────── */
.project { padding: 0 var(--pad); }
.p-head { max-width: 1400px; padding: 9vh 0 6vh; display: grid; grid-template-columns: 1fr; }
.back { font-size: 13px; color: var(--muted); transition: color .3s, transform .4s var(--ease); justify-self: start; }
.back:hover { color: var(--ink); transform: translateX(-4px); }
.p-title { margin: 4vh 0 0; font-weight: 400; color: var(--ink); font-size: clamp(42px, 7vw, 112px); line-height: .92; letter-spacing: -.045em; }
.p-meta { display: grid; grid-template-columns: repeat(4, minmax(0, max-content)); gap: 8px clamp(28px, 5vw, 80px); margin: 5vh 0 0; }
.p-meta dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.p-meta dd { margin: 4px 0 0; color: var(--ink); }
.p-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.p-story { max-width: 62ch; margin-top: 4vh; font-size: 17px; line-height: 1.6; color: var(--text); }
.p-story p { margin: 0 0 1em; }

.p-hero { margin: 0; }
.p-hero .pic { aspect-ratio: auto !important; width: 100%; height: min(86vh, calc((100vw - 2 * var(--pad)) / var(--ar, 1.5))); cursor: zoom-in; }
.p-hero .pic img { object-fit: cover; }

.gallery { display: flex; flex-direction: column; gap: var(--gap); margin-top: var(--gap); }
.g__row { display: flex; gap: var(--gap); }
.g__row--narrow { justify-content: center; }
.g__row--narrow .g__item { max-width: min(560px, 60%); }
.g__item { margin: 0; min-width: 0; }
.g__item .pic { cursor: zoom-in; }
.g__item figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

.videos { display: grid; gap: var(--gap); margin-top: var(--gap); }
.video { position: relative; aspect-ratio: 16 / 9; background: #0d0d0d var(--poster) center / cover no-repeat; overflow: hidden; }
.video::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.45)); transition: opacity .5s; }
.video:hover::before { opacity: .6; }
.video__play { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 14px; color: #fff; }
.video__icon { width: 84px; height: 84px; border-radius: 50%; background: rgba(255,255,255,.14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); position: relative; transition: transform .6s var(--ease), background .4s; }
.video__icon::after { content: ""; position: absolute; left: 34px; top: 27px; border-left: 22px solid #fff; border-top: 15px solid transparent; border-bottom: 15px solid transparent; }
.video:hover .video__icon { transform: scale(1.08); background: rgba(255,255,255,.24); }
.video__note { font-size: 12px; letter-spacing: .06em; opacity: .8; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.p-next { margin: 16vh 0 4vh; border-top: 1px solid var(--line); }
.p-next a { display: grid; grid-template-columns: 1fr minmax(200px, 38%); grid-template-rows: auto 1fr; gap: 8px var(--gap); padding-top: 4vh; }
.p-next__label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.p-next__title { grid-column: 1; font-size: clamp(32px, 5vw, 76px); line-height: 1; letter-spacing: -.04em; color: var(--ink); }
.p-next__arrow { display: inline-block; transition: transform .6s var(--ease); }
.p-next a:hover .p-next__arrow { transform: translateX(14px); }
.p-next__img { grid-column: 2; grid-row: 1 / span 2; overflow: hidden; }
.p-next__img .pic { aspect-ratio: 16/10 !important; }
.p-next a:hover .p-next__img img { transform: scale(1.04); }

/* ── Lightbox ────────────────────────────── */
.lightbox { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #0b0b0b; color: #eee; overflow: hidden; }
.lightbox::backdrop { background: #0b0b0b; }
.lightbox[open] { animation: lbIn .45s var(--ease); }
@keyframes lbIn { from { opacity: 0; } }
.lb__stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
.lb__frame { position: relative; display: inline-block; line-height: 0; max-width: 100vw; max-height: 100vh; max-height: 100dvh; }
.lb__img { display: block; width: auto; height: auto; max-width: 100vw; max-height: 100vh; max-height: 100dvh; object-fit: contain; transition: opacity .35s ease, transform .5s var(--ease); user-select: none; -webkit-user-drag: none; }
.lb__img.is-swapping { opacity: 0; transform: scale(.985); }
/* Bedienelemente liegen auf dem Foto: dezent, mit leichtem Glas-Hintergrund für helle Bilder */
.lb__btn, .lb__count {
  position: absolute; z-index: 2; color: #fff;
  background: rgba(0,0,0,.28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  text-shadow: 0 1px 6px rgba(0,0,0,.3);
}
.lb__btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; opacity: .8; transition: opacity .3s, transform .4s var(--ease), background .3s; }
.lb__btn:hover { opacity: 1; background: rgba(0,0,0,.45); }
.lb__prev { left: 20px; top: 50%; translate: 0 -50%; }
.lb__next { right: 20px; top: 50%; translate: 0 -50%; }
.lb__prev:hover { transform: translateX(-3px); }
.lb__next:hover { transform: translateX(3px); }
.lb__close { right: 20px; top: 20px; font-size: 16px; }
.lb__count { left: 20px; top: 20px; height: 48px; line-height: 1; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 99px; font-size: 12px; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.lb__bar {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 48px 24px 20px;
  display: flex; gap: 24px; align-items: baseline; font-size: 12px; line-height: 1.4; color: rgba(255,255,255,.85);
  background: linear-gradient(0deg, rgba(0,0,0,.5), rgba(0,0,0,0)); pointer-events: none;
}
.lb__bar[hidden] { display: none; }
.lb__exif { margin-left: auto; letter-spacing: .03em; }

/* ── Index ───────────────────────────────── */
.index { padding: 8vh var(--pad) 10vh; position: relative; }
.page-title { margin: 0 0 6vh; font-weight: 400; color: var(--ink); font-size: clamp(40px, 6vw, 96px); line-height: .95; letter-spacing: -.045em; }
.ix-list { list-style: none; margin: 0; padding: 0; }
.ix { display: grid; grid-template-columns: 48px 2.2fr 1fr 1.6fr 1.1fr 80px; gap: 16px; align-items: baseline; padding: 16px 0; border-top: 1px solid var(--line); font-size: 14px; transition: padding .5s var(--ease), color .3s; }
.ix--head { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-top: 0; padding-bottom: 10px; }
.ix-list li:last-child .ix { border-bottom: 1px solid var(--line); }
.ix__no, .ix__count { color: var(--muted); font-variant-numeric: tabular-nums; }
.ix__count { text-align: right; }
.ix__title { color: var(--ink); font-size: clamp(17px, 1.6vw, 22px); letter-spacing: -.01em; }
.ix__cat, .ix__loc, .ix__year { color: var(--muted); }
.ix--head .ix__title { font-size: inherit; color: inherit; letter-spacing: inherit; }
.ix-list:hover .ix { color: #c4c4c4; }
.ix-list:hover .ix .ix__title { color: #c4c4c4; }
.ix-list .ix:hover, .ix-list .ix:hover .ix__title { color: var(--ink); }
.ix-list .ix:hover { padding-left: 12px; }
.ix-preview { position: fixed; left: 0; top: 0; width: 300px; pointer-events: none; z-index: 30; opacity: 0; transform: translate3d(-50%, -50%, 0) scale(.92); transition: opacity .35s ease, transform .5s var(--ease); }
.ix-preview.is-on { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }
.ix-preview img { width: 100%; height: auto; box-shadow: 0 20px 60px rgba(0,0,0,.18); }

/* ── About ───────────────────────────────── */
.about { display: grid; grid-template-columns: minmax(0, 36%) minmax(0, 1fr); gap: clamp(28px, 6vw, 110px); padding: 10vh var(--pad); align-items: start; }
.about__pic { margin: 0; position: sticky; top: calc(var(--top) + 4vh); }
.about__text { max-width: 64ch; font-size: 17px; line-height: 1.65; }
.about__text .page-title { margin-bottom: 14px; }
.about__roles { margin: 0 0 6vh; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.about__contact { display: grid; gap: 12px; margin: 7vh 0 0; padding-top: 3vh; border-top: 1px solid var(--line); }
.about__contact div { display: grid; grid-template-columns: 90px 1fr; }
.about__contact dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.about__contact dd { margin: 0; color: var(--ink); }
.about__contact a { transition: opacity .3s ease; }
.about__contact a:hover { opacity: .6; }

/* ── Rechtliches / 404 ───────────────────── */
.legal, .notfound { padding: 10vh var(--pad); max-width: 820px; }
.legal h2 { font-size: 15px; font-weight: 500; color: var(--ink); margin: 3em 0 .4em; }
.legal a, .notfound a { text-decoration: underline; text-underline-offset: 3px; }
.legal mark { background: #fff1c2; padding: 0 3px; }

/* ── Fußzeile ────────────────────────────── */
.footer { display: flex; justify-content: space-between; gap: 20px; padding: 28px var(--pad) 32px; font-size: 12px; color: var(--muted); }
.footer nav { display: flex; gap: 18px; }
.footer a:hover { color: var(--ink); }

/* ── Mobil ───────────────────────────────── */
@media (max-width: 760px) {
  :root { --top: 56px; }
  .p-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-hero { margin: 0 calc(var(--pad) * -1); }
  .g__row { flex-direction: column; }
  .g__item { flex: none !important; }
  .g__row--narrow .g__item { max-width: none; }
  .p-next a { grid-template-columns: 1fr; }
  .p-next__img { grid-column: 1; grid-row: auto; }
  .lb__prev { left: 10px; } .lb__next { right: 10px; }
  .lb__close { right: 12px; top: 12px; } .lb__count { left: 12px; top: 12px; }
  .lb__bar { padding: 40px 16px 16px; flex-wrap: wrap; gap: 4px 14px; }
  .lb__exif { margin-left: 0; width: 100%; }
  .ix { grid-template-columns: 32px 1fr auto; }
  .ix__cat, .ix__loc, .ix__count { display: none; }
  .ix-preview { display: none; }
  .about { grid-template-columns: 1fr; padding-top: 6vh; }
  .about__pic { position: static; }
  .footer { flex-direction: column; }
}

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