/* ==========================================================================
   Quentin Boeser — VFX Artist
   Ein Stylesheet für alle Seiten.
   Startseite dunkel (Video), Unterseiten und Projekt-Panel hell (.light).

   Schriften:
   - Satoshi (--sans): große Elemente, Navigation, Nummern, kurze Labels
   - Playfair Display (--serif): Fließtext und kleine Texte, immer Regular
   ========================================================================== */

@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/satoshi-300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/satoshi-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/satoshi-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../assets/fonts/satoshi-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Playfair Display nur in Regular (nie fett) */
@font-face {
  font-family: "Playfair Display";
  src: url("../assets/fonts/playfair-display-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("../assets/fonts/playfair-display-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --black: #000;
  --white: #fff;
  --paper: #f2f2f0;     /* helle Seiten */
  --chalk: #e6e5e0;     /* Leiste unten auf der Startseite */
  --chalk-hi: #f1f0ec;  /* ... beim Hovern */
  --ink: #3a3a37;       /* Dunkelgrau auf Chalk */

  /* Rollen (dunkel). .light überschreibt sie. */
  --bg: #000;
  --fg: #fff;
  --muted: #8c8c8c;
  --faint: #4a4a4a;
  --rule: #262626;
  --fill: #111;
  --veil: rgba(0, 0, 0, 0.6);

  --sans: "Satoshi", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;

  --fs-xs: 11px;
  --fs-s: 12px;
  --fs: 14px;
  --fs-serif: 15px;
  --fs-display: clamp(36px, 4.4vw, 64px);

  --pad: clamp(14px, 1.6vw, 24px);     /* Seitenrand */
  --gutter: clamp(14px, 1.6vw, 24px);  /* Spaltenabstand im Raster */
  --row: 18px;

  --bar-h: max(15vh, 108px);           /* Chalk-Leiste unten (Startseite) */

  --fade: 250ms;
  --slide: 420ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
@supports (height: 1dvh) {
  :root {
    --bar-h: max(15dvh, 108px);
  }
}

.light {
  color-scheme: light;
  --bg: var(--paper);
  --fg: #111;
  --muted: #77776f;
  --faint: #a2a29b;
  --rule: #d3d3cd;
  --fill: #e4e4df;
  --veil: rgba(242, 242, 240, 0.8);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-size: var(--fs-serif);
  line-height: 1.5;
  font-synthesis: none;      /* nie künstlich fett/kursiv */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font: inherit;
  color: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  cursor: pointer;
}

h1, h2, h3, p, ul, ol, dl, dd, figure {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

h1, h2, h3, b, strong {
  font-size: inherit;
  font-weight: inherit;
}

:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- Typo-Bausteine --------------------------------------------------- */

/* Navigation und kleine Bedienelemente: Satoshi, Kleinbuchstaben */
.ui {
  font-family: var(--sans);
  font-size: var(--fs);
  font-weight: 500;
  line-height: var(--row);
  letter-spacing: 0.005em;
  text-transform: lowercase;
}

/* Kurzes fettes Label, z. B. "[03] building the cave" */
.label {
  font-family: var(--sans);
  font-size: var(--fs-s);
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.01em;
}
.idx {
  color: var(--muted);
  margin-right: 0.5em;
}

/* Eine große, fette Zeile pro Seite */
.display {
  font-family: var(--sans);
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.serif {
  font-family: var(--serif);
  font-size: var(--fs-serif);
  line-height: 1.5;
}
.serif p + p {
  margin-top: 0.8em;
}

.muted {
  color: var(--muted);
}

.link {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--faint);
  transition: text-decoration-color var(--fade);
}
.link:hover {
  text-decoration-color: currentColor;
}

.placeholder {
  color: var(--muted);
}

/* ==========================================================================
   Kopfzeile (alle Seiten): alles Satoshi, Kleinbuchstaben
   ========================================================================== */

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  column-gap: 16px;
  padding: var(--pad);
  font-family: var(--sans);
  text-transform: lowercase;
}

.nav {
  display: flex;
  gap: 1.6em;
}
.nav--right {
  justify-content: flex-end;
}
.nav a,
.nav button {
  display: inline-block;
}
.nav a:hover,
.nav button:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Name fett, Rolle dünn im Blocksatz auf Namensbreite */
.brand {
  --name: 30px;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  justify-self: center;
}
.brand-name {
  display: block;
  font-size: var(--name);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.035em;
  white-space: nowrap;
}
.brand-role {
  display: block;
  width: 0;
  min-width: 100%;        /* so breit wie der Name, nicht breiter */
  margin-top: calc(var(--name) * 0.2);
  font-size: calc(var(--name) * 0.37);
  font-weight: 300;
  line-height: 1.2;
  text-align: justify;
  text-align-last: justify;
}

/* Unterseiten: aktuelle Seite dunkel, andere grau */
.page .nav a:not([aria-current="page"]),
.page .nav button {
  color: var(--muted);
  transition: color var(--fade);
}
.page .nav a:hover,
.page .nav button:hover {
  color: var(--fg);
}

/* ==========================================================================
   Startseite
   ========================================================================== */

.home {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  --row: 22px;
}
.home .ui {
  font-size: 18px;
}
.home .brand {
  --name: clamp(36px, 3.2vw, 50px);
}

.stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--black);
}

/* Videos füllen den Bereich über der Chalk-Leiste */
.stage-media {
  position: absolute;
  inset: 0 0 var(--bar-h) 0;
  overflow: hidden;
  transition: filter var(--slide) ease, transform var(--slide) ease;
}

/* Overlay offen (Projekt oder Contact): Video weichzeichnen,
   Kopf- und Fußzeile ausblenden. scale verdeckt die weichen Ränder. */
body:has(dialog.is-open) .stage-media {
  filter: blur(24px);
  transform: scale(1.08);
}
body:has(dialog.is-open) .stage .site-header,
body:has(dialog.is-open) .tracks,
body:has(dialog.is-open) .cursor {
  opacity: 0;
}
.stage-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  background: var(--black);
  opacity: 0;
  transition: opacity var(--fade) ease;
}
.stage-video.is-active {
  opacity: 1;
}

/* Unsichtbare Spalten über dem Video für die Hover-Steuerung */
.zones {
  position: absolute;
  inset: 0 0 var(--bar-h) 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.zone {
  cursor: pointer;
}
.has-cursor .zone {
  cursor: none;
}

/* Kopfzeile über dem Video: Navigation invertiert, Name weiß */
.stage .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  color: var(--white);
  pointer-events: none;
  transition: opacity var(--fade) ease;
}
.stage .nav {
  mix-blend-mode: difference;
}
.stage .site-header a,
.stage .site-header button {
  pointer-events: auto;
}

/* --- Chalk-Leiste mit Balken und Projektnamen ------------------------- */

.tracks {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--bar-h);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--chalk);
  color: var(--ink);
  transition: opacity var(--fade) ease;
}

.track {
  background: var(--chalk);
  transition: background-color var(--fade) ease;
}
.track + .track {
  box-shadow: inset 1px 0 0 rgba(58, 58, 55, 0.12);
}
.track:hover,
.track.is-hover {
  background: var(--chalk-hi);
}

.track-link {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
  padding: calc(var(--pad) * 0.9) var(--pad);
}

/* Balken als Box: Rahmen + Füllung */
.bar {
  position: relative;
  display: block;
  flex: none;
  height: 12px;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  opacity: 0.4;
  transition: opacity var(--fade) ease;
}
.track.is-active .bar,
.track:hover .bar,
.track.is-hover .bar {
  opacity: 1;
}
.bar-fill {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  will-change: transform;
}
.track.is-active .bar-fill {
  opacity: 1;
}

.track-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 14px;
  row-gap: 4px;
  opacity: 0.6;
  transition: opacity var(--fade);
}
.track.is-active .track-title,
.track:hover .track-title,
.track.is-hover .track-title {
  opacity: 1;
}
.track-num {
  font-family: var(--sans);
  font-size: clamp(30px, 3.4vw, 52px);
  font-weight: 700;
  line-height: 0.8;
  letter-spacing: -0.045em;
}
.track-name {
  font-family: var(--serif);
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.1;
}

/* --- Cursor-Kreis über dem Video ------------------------------------- */

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 3;
  width: 78px;
  height: 78px;
  margin: -39px 0 0 -39px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  pointer-events: none;
  -webkit-backdrop-filter: blur(4px) invert(1) brightness(1.12);
  backdrop-filter: blur(4px) invert(1) brightness(1.12);
  opacity: 0;
  scale: 0.5;
  transition: opacity var(--fade) ease, scale var(--fade) var(--ease);
}
.cursor.is-on {
  opacity: 1;
  scale: 1;
}
.cursor-label {
  color: var(--white);
  mix-blend-mode: difference;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Dialoge: Projekt-Panel und Contact
   ========================================================================== */

dialog {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  overflow: hidden;
}
dialog::backdrop {
  background: transparent;
}

html:has(dialog[open]) {
  overflow: hidden;
}

/* Klickfläche über dem Hintergrund (schließt den Dialog). */
.dialog-blur {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--slide) ease;
}

/* "close" sitzt dort, wo in der Kopfzeile "contact" steht */
.dialog-close {
  position: absolute;
  top: var(--pad);
  right: var(--pad);
  z-index: 2;
  opacity: 0;
  mix-blend-mode: difference;
  color: var(--white);
  transition: opacity var(--fade) ease;
}
.home .dialog-close {
  font-size: 18px;
  line-height: 22px;
}
.dialog-close:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

dialog.is-open .dialog-blur,
dialog.is-open .dialog-close {
  opacity: 1;
}

/* --- Projekt-Panel: fährt von unten hoch, 15 % bleiben frei ------------- */

.panel {
  --dur: var(--slide);
  --tab-h: 46px;
}

.sheet-wrap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 85%;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--slide) var(--ease);
}
.panel.is-open .sheet-wrap {
  transform: none;
}

/* Tabs: Rechtecke mit 4px Lücke. Aktiver Tab geht ins Blatt über,
   die anderen sind abgedunkelt und leicht transparent. */
.tabs {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 4px;
  padding: 0 var(--pad);
}
.tab {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-width: 0;
  height: var(--tab-h);
  padding: 12px 18px 0;
  background: #c4c4be;
  color: #111;
  opacity: 0.72;
  transition: opacity var(--fade) ease, background-color var(--fade) ease;
}
.tab:hover {
  opacity: 0.92;
}
.tab[aria-current="true"] {
  background: var(--paper);
  opacity: 1;
}
.tab-num {
  flex: none;
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
}
.tab-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--serif);
  font-size: 16px;
}
.tab:focus-visible {
  outline-offset: -4px;
}

.sheet {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--bg);
  color: var(--fg);
}
.sheet:focus {
  outline: none;
}

/* ==========================================================================
   Seitenraster: 4 Spalten. Alles sitzt auf diesen Linien.
   Klassen wie c-2-4 = von Spalte 2 bis vor Spalte 4.
   ========================================================================== */

.grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: calc(var(--pad) * 2.5);
  align-items: start;
}

.c-1-2 { grid-column: 1 / 2; }
.c-1-3 { grid-column: 1 / 3; }
.c-1-4 { grid-column: 1 / 4; }
.c-1-5 { grid-column: 1 / 5; }
.c-2-3 { grid-column: 2 / 3; }
.c-2-4 { grid-column: 2 / 4; }
.c-2-5 { grid-column: 2 / 5; }
.c-3-4 { grid-column: 3 / 4; }
.c-3-5 { grid-column: 3 / 5; }
.c-4-5 { grid-column: 4 / 5; }
.self-end { align-self: end; }

/* Textblock: Label (Satoshi fett) + kurzer Fließtext (Playfair) */
.t .label {
  display: block;
  margin-bottom: 8px;
}
.t p {
  max-width: 30em;
}

/* Abbildung mit Bildunterschrift darunter */
.fig img,
.fig video,
.ph {
  width: 100%;
  height: auto;
}
.fig video {
  background: var(--fill);
}
.fig figcaption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}
.fig figcaption b {
  display: block;
  font-family: var(--sans);
  font-size: var(--fs-s);
  font-weight: 700;
  line-height: 16px;
  color: var(--fg);
}
/* Zugehöriger Text direkt unter dem Bild */
.fig figcaption p {
  max-width: 30em;
  margin-top: 8px;
  font-size: var(--fs-serif);
  line-height: 1.5;
  color: var(--fg);
}

/* Platzhalter für Bilder, die später kommen */
.ph {
  display: flex;
  align-items: flex-end;
  aspect-ratio: 16 / 9;
  padding: 10px;
  background: var(--fill);
  color: var(--faint);
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: lowercase;
}
.ph--wide {
  aspect-ratio: 1920 / 804;
}
.ph--portrait {
  aspect-ratio: 4 / 5;
}

/* Tabellen-Zeilen (Projekt-Übersicht, About) */
.rows > div,
.rows > li {
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}
.rows > :last-child {
  border-bottom: 1px solid var(--rule);
}

/* ==========================================================================
   Projektseite (im Panel)
   ========================================================================== */

.project {
  padding: calc(var(--pad) * 2.2) var(--pad) calc(var(--pad) * 3);
}

.p-head {
  row-gap: calc(var(--pad) * 3);
}
.p-titleblock {
  display: flex;
  align-items: flex-end;
  gap: 18px;
}
.p-num {
  font-family: var(--sans);
  font-size: clamp(64px, 8vw, 128px);
  font-weight: 300;
  line-height: 0.75;
  letter-spacing: -0.06em;
}
.p-title {
  font-family: var(--sans);
  font-size: var(--fs-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

/* Übersicht als Tabelle: Label | Wert */
.p-meta > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  column-gap: var(--gutter);
  align-items: baseline;
}

/* Trennstrich zwischen Kopf und Breakdown */
.p-rule {
  height: 0;
  margin: calc(var(--pad) * 5) 0;
  border: 0;
  border-top: 2px solid var(--fg);
}

/* Module des Breakdowns */
.m + .m {
  margin-top: calc(var(--pad) * 6);
}

.project-next {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: calc(var(--pad) * 6);
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.project-next a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* --- Vorher/Nachher-Slider ------------------------------------------- */

.compare {
  position: relative;
  aspect-ratio: 1920 / 804;
  overflow: hidden;
  background: var(--fill);
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  --pos: 50%;
}
.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}
.compare-top {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}
.compare-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 1px;
  margin-left: -0.5px;
  background: var(--white);
  pointer-events: none;
}
.compare-knob {
  position: absolute;
  top: 50%;
  left: var(--pos);
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.1em;
  pointer-events: none;
}
.compare-tag {
  position: absolute;
  top: 10px;
  color: var(--white);
  mix-blend-mode: difference;
  pointer-events: none;
  font-size: var(--fs-s);
}
.compare-tag--l { left: 12px; }
.compare-tag--r { right: 12px; }
.compare-range {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.compare:has(.compare-range:focus-visible) {
  outline: 1px solid var(--fg);
  outline-offset: 3px;
}

/* --- Contact-Overlay -------------------------------------------------- */

/* Auf allen Seiten gleich: Hintergrund stark abgedunkelt, Schrift weiß */
.contact {
  --dur: var(--fade);
  color-scheme: dark;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.6);
  --faint: rgba(255, 255, 255, 0.4);
  color: var(--fg);
}
.contact .dialog-blur {
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition-duration: var(--fade);
}
.home .contact .dialog-blur {
  -webkit-backdrop-filter: none;
  backdrop-filter: none; /* der Blur sitzt auf dem Video */
}

.contact-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--pad);
  opacity: 0;
  transition: opacity var(--fade) ease;
}
.contact.is-open .contact-body {
  opacity: 1;
}

.contact-list {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 2em;
  row-gap: 10px;
  align-items: baseline;
}
.contact-list dt {
  color: var(--muted);
  text-align: right;
}
.contact-list dd {
  font-size: 17px;
}

.contact-legal {
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--pad);
  display: flex;
  justify-content: center;
  gap: 2em;
  color: var(--muted);
}
.contact-legal a:hover {
  color: var(--fg);
}

/* ==========================================================================
   Unterseiten (Work, About, Imprint, Privacy)
   ========================================================================== */

.page-main {
  padding: calc(var(--pad) * 3) var(--pad) calc(var(--pad) * 3);
}

.page-head {
  margin-bottom: calc(var(--pad) * 4);
}

.block + .block {
  margin-top: calc(var(--pad) * 5);
}

/* Rechtstexte: Überschrift links, Text in Spalte 2–3 */
.cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: calc(var(--pad) * 2);
}
.cols > .col-content {
  grid-column: 2 / 4;
  max-width: 40em;
}

.page-footer {
  display: flex;
  gap: 2em;
  margin-top: calc(var(--pad) * 6);
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}
.page-footer a:hover {
  color: var(--fg);
}

/* --- Work: Reel ------------------------------------------------------- */

.reel-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--fill);
}
.reel-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.reel-load {
  position: absolute;
  inset: 0;
  width: 100%;
  display: block;
}
.reel-load img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity var(--fade);
}
.reel-load:hover img {
  opacity: 1;
}
.reel-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 8px 14px;
  white-space: nowrap;
  background: var(--white);
  color: var(--black);
}
.reel-note {
  margin-top: 12px;
  font-size: 13px;
}

/* --- Work: Projektindex mit Liste/Grid -------------------------------- */

/* Label links, schlichter Schalter mittig, beide auf einer Höhe */
.index-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: var(--pad) 0 calc(var(--pad) * 2.5);
}
.view-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.view-switch-label {
  color: var(--muted);
  transition: color var(--fade);
}
.view-switch-label.is-on {
  color: var(--fg);
}
.switch {
  position: relative;
  width: 38px;
  height: 20px;
  border: 1.5px solid var(--fg);
  border-radius: 10px;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--fg);
  transition: translate var(--fade) var(--ease);
}
.switch[aria-checked="true"]::after {
  translate: 18px 0;
}

/* Liste: gleiche 4 Spalten wie das Seitenraster */
.project-index[data-view="list"] .item {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas: "lead title role soft";
  column-gap: var(--gutter);
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.project-index[data-view="list"] li:last-child .item {
  border-bottom: 1px solid var(--rule);
}
.project-index[data-view="list"] .item-num {
  grid-area: lead;
  justify-self: start;
}
.project-index[data-view="list"] .item-thumb {
  grid-area: lead;
  justify-self: end;
  width: calc(100% - 3.4em);
  max-width: 160px;
}

.item-num {
  font-family: var(--sans);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.045em;
}
.item-title {
  grid-area: title;
  font-size: 18px;
}
.item-role { grid-area: role; color: var(--muted); }
.item-soft { grid-area: soft; color: var(--muted); }
.item-role,
.item-soft {
  font-size: 14px;
  transition: color var(--fade);
}
.item:hover .item-role,
.item:hover .item-soft {
  color: var(--fg);
}

.item-thumb img {
  width: 100%;
  aspect-ratio: 1920 / 804;
  object-fit: cover;
  background: var(--fill);
}

/* Grid: klein, mittig, viel Weißfläche */
.project-index[data-view="grid"] {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 3vw, 48px);
  row-gap: 40px;
  max-width: 640px;
  margin: 0 auto;
}
.project-index[data-view="grid"] .item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "thumb thumb"
    "num   title"
    "num   role"
    "num   soft";
  column-gap: 10px;
  row-gap: 0;
  align-items: start;
}
.project-index[data-view="grid"] .item-thumb {
  grid-area: thumb;
  margin-bottom: 10px;
}
.project-index[data-view="grid"] .item-thumb img {
  aspect-ratio: 4 / 3;
}
.project-index[data-view="grid"] .item-num {
  grid-area: num;
  font-size: 22px;
  line-height: 0.85;
}
.project-index[data-view="grid"] .item-title {
  font-size: 14px;
  line-height: 1.2;
}
.project-index[data-view="grid"] .item-role,
.project-index[data-view="grid"] .item-soft {
  font-size: 12px;
  line-height: 1.35;
}

/* --- Seitenkopf About/Work: Bild in Spalte 1, Überschrift + Text rechts -- */

.split {
  margin-bottom: calc(var(--pad) * 5);
}
.split--tight {
  margin-bottom: calc(var(--pad) * 2.5);   /* Work: Projekte näher am Kopf */
}
.split > .split-media {
  grid-column: 1 / 2;
}
.split > .split-text {
  grid-column: 2 / -1;
}
/* Reel auf der Work-Seite etwa so breit wie das Portrait auf About */
.split-media > .reel-frame,
.split-media > .reel-caption {
  width: min(100%, 230px);
}
.reel-caption {
  margin-top: 10px;
}
.reel-caption .label {
  margin-bottom: 4px;
}
.reel-caption .reel-note {
  margin-top: 0;
}
.split-text > .display + * {
  margin-top: calc(var(--pad) * 1.6);
}

/* --- About ------------------------------------------------------------ */

/* Portrait nie höher als Überschrift + Text daneben */
.split > .about-portrait {
  align-self: stretch;
  contain: size;            /* Bild bestimmt die Zeilenhöhe nicht mit */
}
.about-portrait img {
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left top;
}
.about-bio {
  max-width: 34em;
}

/* Infos als Tabelle wie die Work-Liste: Label | 3 Spalten */
.info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gutter);
}
.info > h2 {
  grid-column: 1 / 2;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
}
.info > ul {
  grid-column: 2 / 5;
}
.info li {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid var(--rule);
}
.info:last-of-type {
  border-bottom: 1px solid var(--rule);
}
.info li > :first-child {
  font-size: 17px;
}
.info li > :not(:first-child) {
  font-size: 14px;
  color: var(--muted);
}
.info li .link {
  color: var(--fg);
}

/* --- Rechtstexte ------------------------------------------------------ */

.legal h2 {
  margin-top: 1.6em;
  margin-bottom: 0.4em;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
}
.legal h2:first-child {
  margin-top: 0;
}
.legal p + p {
  margin-top: 0.7em;
}

/* ==========================================================================
   Mittlere Breite: Raster 2-spaltig, Bilder volle Breite
   ========================================================================== */

@media (max-width: 1000px) {
  .grid4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid4 > * {
    grid-column: 1 / -1;
  }
  .grid4 > .t {
    grid-column: auto / span 1;
  }
  .split > .split-media { grid-column: 1 / 2; }
  .split > .split-text { grid-column: 2 / -1; }

  .cols > .col-content {
    grid-column: 2 / 5;
  }
}

/* ==========================================================================
   Kleine Bildschirme / Touch
   ========================================================================== */

@media (max-width: 700px) {
  :root {
    --pad: 14px;
    --gutter: 12px;
  }

  .site-header {
    column-gap: 8px;
  }
  .nav {
    flex-direction: column;
    gap: 2px;
  }
  .nav--right {
    align-items: flex-end;
  }
  .brand {
    --name: 22px;
  }

  .home {
    --row: 18px;
  }
  .home .ui,
  .home .dialog-close {
    font-size: 14px;
    line-height: 18px;
  }
  .home .brand {
    --name: 26px;
  }
  .track-link {
    padding: 12px 10px;
    gap: 8px;
  }
  .bar {
    height: 10px;
  }
  .track-title {
    flex-direction: column;
    align-items: flex-start;
  }
  .track-num {
    font-size: 26px;
  }
  .track-name {
    font-size: 13px;
  }

  .panel {
    --tab-h: 40px;
  }
  .tab {
    gap: 6px;
    padding: 11px 10px 0;
  }
  .tab-num {
    font-size: 17px;
  }
  .tab-name {
    font-size: 12px;
  }

  /* Alles einspaltig */
  .grid4,
  .cols,
  .info {
    grid-template-columns: 1fr;
    row-gap: 18px;
  }
  .grid4 > *,
  .grid4 > .t,
  .cols > .col-content,
  .info > h2,
  .info > ul {
    grid-column: 1 / -1;
  }
  .info {
    row-gap: 0;
  }
  .info > h2 {
    padding-bottom: 4px;
  }
  .info li {
    grid-template-columns: 1fr 1fr;
    row-gap: 2px;
  }
  .info li > :first-child {
    grid-column: 1 / -1;
  }
  .p-head {
    row-gap: 24px;
  }
  .p-rule {
    margin: calc(var(--pad) * 3.5) 0;
  }
  .m + .m {
    margin-top: calc(var(--pad) * 4);
  }

  .split > .split-media,
  .split > .split-text {
    grid-column: 1 / -1;
  }
  .split > .split-media {
    max-width: 46%;
  }
  .split-media > .reel-frame {
    width: 100%;
  }
  .split > .about-portrait {
    contain: none;
  }
  .about-portrait img {
    height: auto;
  }

  .project-index[data-view="list"] .item {
    grid-template-columns: 2.2em 96px minmax(0, 1fr);
    grid-template-areas:
      "num thumb title"
      "num thumb role"
      "num thumb soft";
    column-gap: 12px;
    row-gap: 0;
    align-items: start;
  }
  .project-index[data-view="list"] .item-num {
    grid-area: num;
  }
  .project-index[data-view="list"] .item-thumb {
    grid-area: thumb;
    width: 100%;
  }
  .item-num {
    font-size: 24px;
  }
  .item-title {
    font-size: 16px;
  }
  .item-role,
  .item-soft {
    font-size: 13px;
  }
  .project-index[data-view="grid"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 82%;
    row-gap: 28px;
  }
}

/* Sehr flache Fenster: Kopfzeile enger */
@media (max-height: 420px) {
  :root {
    --pad: 10px;
  }
  .brand-role {
    display: none;
  }
  .track-num {
    font-size: 26px;
  }
  .track-title {
    flex-direction: row;
  }
}

/* ==========================================================================
   Reduzierte Bewegung: keine Übergänge
   ========================================================================== */

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