/* stylized.works — creative production + design */

@font-face { font-family: "SW Fallback"; src: url("fonts/Inter-Medium.otf") format("opentype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "SW Fallback"; src: url("fonts/Inter-SemiBold.otf") format("opentype"); font-weight: 600; font-display: swap; }

:root {
  --bg: #C8C9CA;
  --fg: #141414;
  --muted: #87888A;
  --mid: #5A5B5D;     /* body text on about: between black and the legal grey */
  /* fluid between phone (440px) and desktop (1200px): no jumps while the window is resized */
  --pad: clamp(12px, calc(12px + (100vw - 440px) * 0.010526), 20px);     /* outer padding */
  --oval-x: clamp(6px, calc(6px + (100vw - 440px) * 0.005263), 10px);    /* side padding inside the nav ovals */
  --fs: clamp(12px, calc(12px + (100vw - 440px) * 0.005263), 16px);      /* base text size */
  --inset: calc(var(--pad) + 1px + var(--oval-x)); /* content aligns with the text of "stylized.works" */
  --top: 24px;        /* nav to content */
  --ah: calc(1.36em + var(--oval-x) + 1px); /* half the width of the "about" oval */
  --font: "Archivo", "SW Fallback", "Helvetica Neue", Arial, sans-serif; /* Archivo (Inter as fallback) */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font); font-weight: 500; font-size: var(--fs); line-height: 1.3;
  letter-spacing: -0.01em; min-height: 100svh; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a.u:hover { text-decoration: underline; text-underline-offset: 2px; }
img { display: block; max-width: 100%; }

/* ---------- navigation ---------- */
.nav { position: relative; display: flex; align-items: center; gap: 4px; min-height: 52px; padding: 0 var(--pad); font-weight: 600; z-index: 10; }
.nav a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: calc(4.5px - .16em) var(--oval-x); border: 1px solid transparent; border-radius: 999px; white-space: nowrap; line-height: 1.2;
}
.nav a { position: relative; -webkit-tap-highlight-color: transparent; }
.nav a:active { opacity: 1; }
.nav .pill { position: absolute; inset: 0; border: 1px solid var(--fg); border-radius: 999px; pointer-events: none; will-change: transform, width; backface-visibility: hidden; }
.nav .left { display: flex; align-items: center; justify-content: space-between; gap: 4px;
  /* phone: "about" sits in the middle of the screen (under the Dynamic Island), "archive" halfway between;
     wider: the group keeps that position and simply flows once the text needs more room, so nothing jumps */
  min-width: calc(min(50vw, 220px) - var(--pad) + var(--ah)); }

main { flex: 1; display: flex; flex-direction: column; }
.page { padding: var(--top) var(--inset) 0; }
.footer { padding: 48px var(--pad) 14px; display: flex; justify-content: flex-end; }

/* ---------- home slides ---------- */
body.home { height: 100svh; overflow: hidden; }
.slides { position: relative; flex: 1; overflow: hidden; background: var(--bg); cursor: e-resize; user-select: none; }
.slides img, .slides video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.slides img.on, .slides video.on { opacity: 1; }
.slides .prev { position: absolute; left: 0; top: 0; bottom: 0; width: 35%; cursor: w-resize; z-index: 2; }
.cap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; justify-content: space-between; gap: 16px; padding: 10px var(--inset) calc(10px + env(safe-area-inset-bottom)); color: var(--muted); pointer-events: none; }
.cap a, .cap .n { pointer-events: auto; color: var(--muted); }
.cap a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cap .n { font-variant-numeric: tabular-nums; }

/* ---------- about ---------- */
.page.about { padding-top: 1.3em; padding-bottom: 20px; }
.about p + p { margin-top: 1.3em; }
.about .intro + p { margin-top: 1.3em; }
.block { max-width: 720px; }
.sec { margin-top: 1.3em; }
.sec h2 { font: inherit; font-weight: 600; }
.just { text-align: justify; hyphens: none; text-wrap: pretty; }
.legal { margin-top: auto; padding-top: 48px; max-width: 720px; font-size: 9px; line-height: 1.4; color: var(--muted); text-align: justify; letter-spacing: 0; }
.legal h3 { font: inherit; font-weight: 600; }
.legal p + h3 { margin-top: 6px; }
@media (max-width: 1199px) { .legal { padding-top: 40px; font-size: 10.5px; max-width: 440px; } }
@media (max-width: 809px)  { .legal { padding-top: 32px; } }
/* tablet: legal as 2 x 2, same width as the text block above */
@media (min-width: 810px) and (max-width: 1199px) {
  .legal { max-width: 720px; padding-top: 72px; font-size: 10.5px; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); grid-template-rows: repeat(4, auto); grid-auto-flow: column; column-gap: 32px; }
  .legal p + h3 { margin-top: 12px; }
  .legal h3:nth-of-type(3) { margin-top: 0; } /* top of the second column: no gap, so row 1 stays one line high */
}
/* ---------- archive ---------- */
.list { list-style: none; }
.row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; padding: 8px 0; }
.row.head { font-weight: 600; padding-top: 0; }
.row > span { min-width: 0; }
/* hover: same oval as the nav, drawn around the title without moving it */
.row .b { display: inline-block; padding: 2px var(--oval-x); margin: -3px calc(-1 * (var(--oval-x) + 1px)); border: 1px solid transparent; border-radius: 999px; }
.row .b:empty { display: none; }
@media (hover: hover) { a.row > span:hover .b { border-color: var(--fg); } }
a.row:focus-visible { outline: none; }
a.row:focus-visible .t .b { border-color: var(--fg); }
.row .mc, .row .mr, .yh { display: none; }
.peek { display: none; position: fixed; right: var(--inset); top: 64px; width: clamp(200px, 22vw, 400px); pointer-events: none; z-index: 20; opacity: 0; transition: opacity .12s, top .2s cubic-bezier(.5,0,.15,1); }
.peek.on { opacity: 1; }

/* archive filter, bottom right: one category at a time, click again to clear */
.flt { position: fixed; right: var(--pad); bottom: 12px; z-index: 30; display: flex; gap: 4px; padding: 3px; border-radius: 999px; background: var(--bg); font-weight: 500; line-height: 1.2; }
.flt button { font: inherit; font-weight: inherit; line-height: inherit; color: var(--mid); background: transparent; border: 1px solid transparent; border-radius: 999px; padding: 2px var(--oval-x); cursor: pointer; transition: color .12s; }
@media (hover: hover) { .flt button:hover { color: var(--fg); border-color: var(--fg); } }
.flt button.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }
li.fh { display: none; }
@media (max-width: 809px) {
  .row { grid-template-columns: 1fr 1fr; gap: 12px; padding: 5px 0; }
  .row .c, .row .t, .row .r, .row .y { display: none; }
  .row .mc, .row .mr { display: block; justify-self: start; min-width: 0; max-width: calc(100% + 2 * (var(--oval-x) + 1px)); padding: 2px var(--oval-x); margin: -3px calc(-1 * (var(--oval-x) + 1px)); border: 1px solid transparent; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .yh { display: block; font-weight: 600; padding: 22px 0 4px; }
  .list > .yh:first-child { padding-top: 0; }
  .row.head { display: none; }
}

/* ---------- project page ---------- */
.meta h1 { font: inherit; font-weight: 600; }
.meta .d { margin-top: 1.3em; max-width: 720px; }
.gal { display: flex; flex-direction: column; gap: 12px; margin-top: 32px; }
.gal img { width: 100%; height: auto; }
.pn { display: flex; justify-content: space-between; margin-top: 32px; }

.row .y, .cap .n { font-variant-numeric: tabular-nums; }
.row .y { text-align: left; }
@media (max-width: 809px) { .row .y { text-align: right; } }
.intro { display: inline-block; }
.intro span { display: block; white-space: nowrap; text-align: justify; text-align-last: justify; }

/* smooth page change: the nav pill glides to the new link */
@view-transition { navigation: auto; }
.nav { view-transition-name: nav; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .14s; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
html { -webkit-tap-highlight-color: transparent; }
.nw { display: inline-block; white-space: nowrap; }
a.x:hover { text-decoration: underline; text-underline-offset: 2px; }
.blk .ln { display: flex; justify-content: space-between; white-space: nowrap; }
.blk-m { position: absolute; visibility: hidden; white-space: nowrap; }
.nav .copy { margin-left: auto; padding-right: calc(var(--oval-x) + 1px); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- grain ---------- */
:root { --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* no grain on the grey ground: only the photos carry it */
.gr { position: relative; margin: 0; }
.slides::after, .gr::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background-image: var(--grain); background-size: 180px; opacity: .22; mix-blend-mode: overlay; }
.slides .prev { z-index: 3; }

/* ---------- desktop ---------- */
@media (min-width: 1200px) {
  .page.about .block { max-width: none; display: grid; grid-template-columns: minmax(0,5fr) minmax(0,7fr); column-gap: 64px; align-items: start; }
  .page.about .block > * { grid-column: 1; }
  .page.about .block > .intro { justify-self: start; }
  .page.about .block > .sec:has(.just) { grid-column: 2; grid-row: 1 / span 4; margin-top: 0; }
  .legal { max-width: none; font-size: clamp(8.5px, 0.7vw, 16px); display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); grid-template-rows: auto auto; grid-auto-flow: column; column-gap: 32px; row-gap: 0; padding-top: 96px; }
  .legal p + h3 { margin-top: 0; }
  main.page:has(.meta) { display: grid; grid-template-columns: minmax(0,4fr) minmax(0,8fr); grid-template-rows: 1fr auto; column-gap: 64px; align-items: start; padding-bottom: 64px; }
  main.page:has(.meta) .meta { position: sticky; top: 24px; align-self: start; grid-column: 1; grid-row: 1; }
  main.page:has(.meta) .gal { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  main.page:has(.meta) .pn { grid-column: 1; grid-row: 2; align-self: end; position: sticky; bottom: 24px; }
  .row { grid-template-columns: repeat(3, minmax(0,1fr)); }   /* the three columns use the full width; the cover preview floats at the right edge */
  .peek { display: block; width: clamp(180px, 16vw, 320px); }
}

/* ---------- sticky nav: solid bar + progressive blur below ---------- */
html, body { overscroll-behavior-y: none; }
.nav { position: sticky; top: 0; z-index: 40; background: var(--bg); }
.nb { position: absolute; left: 0; right: 0; top: 100%; height: 18px; pointer-events: none; }
.nb i { position: absolute; inset: 0; }
.nb i:nth-child(n+5) { display: none; }
.nb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(200,201,202,1) 0%, rgba(200,201,202,.75) 30%, rgba(200,201,202,.3) 65%, rgba(200,201,202,0) 100%); }
.nb i:nth-child(1) { -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 50%, #000 80%, rgba(0,0,0,0) 100%); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 50%, #000 80%, rgba(0,0,0,0) 100%); }
.nb i:nth-child(2) { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 30%, #000 60%, rgba(0,0,0,0) 90%); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 30%, #000 60%, rgba(0,0,0,0) 90%); }
.nb i:nth-child(3) { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 10%, #000 40%, rgba(0,0,0,0) 70%); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 10%, #000 40%, rgba(0,0,0,0) 70%); }
.nb i:nth-child(4) { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 20%, rgba(0,0,0,0) 50%); mask-image: linear-gradient(to bottom, #000 0%, #000 20%, rgba(0,0,0,0) 50%); }
body.home .nav { background: none; }
body.home .nb { display: none; }

/* ---------- narrow archive: same oval as desktop, no underline; on touch it flashes on tap ---------- */
@media (hover: hover) { a.row .mc:hover, a.row .mr:hover { border-color: var(--fg); } }
a.row:focus-visible .mc, a.row.tap .mc { border-color: var(--fg); }

/* ---------- claim, top right in the nav line ---------- */
.nav .claim { margin-left: auto; padding-right: calc(var(--oval-x) + 1px); font-weight: 500; white-space: nowrap; line-height: 1.2; }
@media (max-width: 600px) { .nav .claim { display: none; } }

/* ---------- about: three steps — black (intro, headings), dark grey (body), grey (legal); links turn black on hover, no underline ---------- */
main.about .block { color: var(--mid); }
main.about .intro, main.about .sec h2 { color: var(--fg); }
main.about a { transition: color .12s; }
main.about a.u:hover, main.about a.x:hover { color: var(--fg); text-decoration: none; }
.nav .claim { color: var(--fg); }

/* ---------- archive: title black, with + doing dark grey; the hovered field gets the oval and turns black ---------- */
a.row > span { color: var(--mid); transition: color .12s; }
.row .cm { flex: none; width: calc(2 * (var(--cx) + 1px)); margin: 0; text-align: center; } /* comma between two names, grey like the line; the gap equals the two field paddings, so neighbouring hover fields meet at one exact cut */
a.row > span.c { --cx: calc(var(--oval-x) * .5); display: flex; flex-wrap: wrap; align-items: baseline; }
a.row > span.c .b { padding-left: var(--cx); padding-right: var(--cx); margin-left: calc(-1 * (var(--cx) + 1px)); margin-right: calc(-1 * (var(--cx) + 1px)); } /* names with a smaller overhang than the other columns, so the comma gap stays tight */
@media (hover: hover) {
  a.row > span:hover { color: var(--fg); }
  /* with: every name is its own field (own oval, own link) */
  a.row > span.c:hover { color: var(--mid); }
  a.row > span.c:hover .b { border-color: transparent; }
  a.row > span.c .b:hover { color: var(--fg); border-color: var(--fg); }
  a.row > span.c .b:hover + .cm { color: var(--fg); } /* comma sits inside the black field of the name before it */
}
a.row.tap .mc { color: var(--fg); }

/* ---------- ink: type and ovals get a slightly rough, printed edge (filter is injected by site.js) ---------- */
.ink .nav .left, .ink .nav .claim, .ink main.about .block, .ink .legal, .ink .row.head, .ink .list, .ink .meta, .ink .pn, .ink .cap a { filter: url(#ink); }

/* ---------- cursor: normal arrow in black with a white outline; the hand on links stays the system one ---------- */
html { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='26' viewBox='0 0 18 26'%3E%3Cpath d='M2 2v19.2l4.9-4.6 3.3 7.6 3.1-1.3-3.2-7.4h6.6z' fill='%23000' stroke='%23fff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 2 2, default; }
a, .row .w[data-href] { cursor: pointer; } /* system hand on links for now */

/* slide arrows like on the Mac: two small opposing triangles with a gap, the direction of travel in black, the other one grey */
.slides { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='14' viewBox='0 0 22 14'%3E%3Cg%3E%3Cg fill='none' stroke='%23fff' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M13.5 2.5v9L20 7z'/%3E%3Cpath d='M8.5 2.5v9L2 7z'/%3E%3C/g%3E%3Cpath d='M8.5 2.5v9L2 7z' fill='%238C8D8F'/%3E%3Cpath d='M13.5 2.5v9L20 7z' fill='%23000'/%3E%3C/g%3E%3C/svg%3E") 11 7, e-resize; }
.slides .prev { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='14' viewBox='0 0 22 14'%3E%3Cg transform='translate(22 0) scale(-1 1)'%3E%3Cg fill='none' stroke='%23fff' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M13.5 2.5v9L20 7z'/%3E%3Cpath d='M8.5 2.5v9L2 7z'/%3E%3C/g%3E%3Cpath d='M8.5 2.5v9L2 7z' fill='%238C8D8F'/%3E%3Cpath d='M13.5 2.5v9L20 7z' fill='%23000'/%3E%3C/g%3E%3C/svg%3E") 11 7, w-resize; }

/* home caption: same oval as the nav, filled with the page grey, medium */
.cap { padding: 10px var(--pad) calc(14px + env(safe-area-inset-bottom)); justify-content: flex-end; }
.cap a, .cap a.u:hover { display: inline-flex; align-items: center; padding: calc(4.5px - .16em) var(--oval-x); border: 1px solid var(--fg); border-radius: 999px; background: transparent; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--fg); font-weight: 500; line-height: 1.2; text-decoration: none; max-width: 100%; }
.ink .cap a { filter: none; } /* the printed edge would fight the backdrop blur */

/* ---------- gallery media: images + clips; two portraits share the width of one landscape ---------- */
.gal { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
.gal figure { margin: 0; }
.gal .gr { flex: 0 0 100%; min-width: 0; }
.gal .gr > img, .gal .gr > video { display: block; width: 100%; height: auto; }
.gal .gr.p { flex-basis: calc(50% - 6px); }
.gal .gr.up { flex: 0 0 auto; }
.gal .gr.up > img { width: 320px; max-width: 100%; height: auto; image-rendering: pixelated; } /* small GIF shown at exactly 2x, pixel-sharp */
@media (max-width: 809px) { .gal .gr.p { flex-basis: 100%; } }
.gal .gr .snd { position: absolute; right: 10px; bottom: 10px; z-index: 2; padding: calc(4.5px - .16em) var(--oval-x); border: 1px solid var(--fg); border-radius: 999px; background: var(--bg); color: var(--fg); font-weight: 500; line-height: 1.2; pointer-events: none; }

/* ---------- review mode (preview only): one sheet per project, click = in/out, drag = order, first = cover ---------- */
.rvbar { position: fixed; left: var(--pad); right: var(--pad); bottom: 12px; z-index: 50; display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; pointer-events: none; }
.rvbar > * { pointer-events: auto; }
.rvbar button, .rvbar a, .rvp button { font: inherit; font-weight: 500; line-height: 1.2; color: var(--fg); background: var(--bg); border: 1px solid var(--fg); border-radius: 999px; padding: calc(4.5px - .16em) var(--oval-x); cursor: pointer; }
.rvbar .n { background: var(--bg); border-radius: 999px; padding: calc(4.5px - .16em) var(--oval-x); border: 1px solid transparent; }
.gal .gr.rvout { display: none; }
.nav .rv { margin-left: 8px; font-weight: 500; border-color: var(--fg) !important; }
.rvp { max-width: none; padding-bottom: 80px; }
.rvp h1 { font: inherit; font-weight: 600; }
.rvp .acts { display: flex; gap: 6px; margin-top: 1.3em; flex-wrap: wrap; }
.rvp textarea { display: block; width: 100%; max-width: 900px; height: 150px; margin-top: 1.3em; font: inherit; font-size: 12px; background: transparent; color: var(--fg); border: 1px solid var(--fg); padding: 10px; resize: vertical; }
.rvp section { margin-top: 2.6em; }
.rvp section h2 { font: inherit; font-weight: 600; display: flex; gap: 12px; align-items: baseline; }
.rvp section h2 span { font-weight: 500; color: var(--mid); }
.rvp .tiles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rvp .tile { position: relative; height: 150px; flex: 0 0 auto; cursor: pointer; background: rgba(0,0,0,.08); user-select: none; }
.rvp .tile > img, .rvp .tile > video { display: block; height: 100%; width: auto; pointer-events: none; }
.rvp .tile.out > img, .rvp .tile.out > video { opacity: .15; }
.rvp .tile.drag { opacity: .4; }
.rvp .tile:first-child:not(.out)::after { content: "cover"; position: absolute; left: 4px; bottom: 4px; font-size: 11px; line-height: 1.2; padding: 1px 6px; border-radius: 999px; background: var(--fg); color: var(--bg); }
.rvp .tile .k { position: absolute; left: 4px; top: 4px; font-size: 11px; line-height: 1.2; padding: 1px 6px; border-radius: 999px; background: var(--bg); color: var(--fg); }
.rvp .tile .hm { position: absolute; right: 4px; top: 4px; font: inherit; font-size: 11px; line-height: 1.2; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--fg); background: var(--bg); color: var(--fg); cursor: pointer; opacity: 0; }
.rvp .tile:hover .hm, .rvp .tile .hm.on { opacity: 1; }
.rvp .tile .hm.on { background: var(--fg); color: var(--bg); }

/* ---------- cursor: normal arrow in black with a white outline; the hand on links stays the system one ---------- */
html { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='26' viewBox='0 0 18 26'%3E%3Cpath d='M2 2v19.2l4.9-4.6 3.3 7.6 3.1-1.3-3.2-7.4h6.6z' fill='%23000' stroke='%23fff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 2 2, default; }
a, .row .w[data-href] { cursor: pointer; } /* system hand on links for now */

/* slide arrows like on the Mac: two small opposing triangles with a gap, the direction of travel in black, the other one grey */
.slides { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='14' viewBox='0 0 22 14'%3E%3Cg%3E%3Cg fill='none' stroke='%23fff' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M13.5 2.5v9L20 7z'/%3E%3Cpath d='M8.5 2.5v9L2 7z'/%3E%3C/g%3E%3Cpath d='M8.5 2.5v9L2 7z' fill='%238C8D8F'/%3E%3Cpath d='M13.5 2.5v9L20 7z' fill='%23000'/%3E%3C/g%3E%3C/svg%3E") 11 7, e-resize; }
.slides .prev { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='14' viewBox='0 0 22 14'%3E%3Cg transform='translate(22 0) scale(-1 1)'%3E%3Cg fill='none' stroke='%23fff' stroke-width='2.2' stroke-linejoin='round'%3E%3Cpath d='M13.5 2.5v9L20 7z'/%3E%3Cpath d='M8.5 2.5v9L2 7z'/%3E%3C/g%3E%3Cpath d='M8.5 2.5v9L2 7z' fill='%238C8D8F'/%3E%3Cpath d='M13.5 2.5v9L20 7z' fill='%23000'/%3E%3C/g%3E%3C/svg%3E") 11 7, w-resize; }

/* home caption: same oval as the nav, filled with the page grey, medium */
.cap { padding: 10px var(--pad) calc(14px + env(safe-area-inset-bottom)); justify-content: flex-end; }
.cap a, .cap a.u:hover { display: inline-flex; align-items: center; padding: calc(4.5px - .16em) var(--oval-x); border: 1px solid var(--fg); border-radius: 999px; background: transparent; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); color: var(--fg); font-weight: 500; line-height: 1.2; text-decoration: none; max-width: 100%; }
.ink .cap a { filter: none; } /* the printed edge would fight the backdrop blur */

/* ---------- gallery media: images + clips; two portraits share the width of one landscape ---------- */
.gal { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
.gal figure { margin: 0; }
.gal .gr { flex: 0 0 100%; min-width: 0; }
.gal .gr > img, .gal .gr > video { display: block; width: 100%; height: auto; }
.gal .gr.p { flex-basis: calc(50% - 6px); }
.gal .gr.up { flex: 0 0 auto; }
.gal .gr.up > img { width: 320px; max-width: 100%; height: auto; image-rendering: pixelated; } /* small GIF shown at exactly 2x, pixel-sharp */
@media (max-width: 809px) { .gal .gr.p { flex-basis: 100%; } }
.gal .gr .snd { position: absolute; right: 10px; bottom: 10px; z-index: 2; padding: calc(4.5px - .16em) var(--oval-x); border: 1px solid var(--fg); border-radius: 999px; background: var(--bg); color: var(--fg); font-weight: 500; line-height: 1.2; pointer-events: none; }

/* ---------- review mode (preview only): flag media in / out / cover / home ---------- */
.rvb { position: absolute; left: 10px; top: 10px; z-index: 5; display: flex; gap: 4px; flex-wrap: wrap; }
.rvb button, .rvbar button, .rvp button { cursor: pointer; }
.rvb button, .rvbar button, .rvbar a, .rvp button, .rvp a.btn { font: inherit; font-weight: 500; line-height: 1.2; color: var(--fg); background: var(--bg); border: 1px solid var(--fg); border-radius: 999px; padding: calc(4.5px - .16em) var(--oval-x); cursor: inherit; }
.rvb button.on, .rvbar button.on { background: var(--fg); color: var(--bg); }
.gr.out > img, .gr.out > video { opacity: .18; }
.rvbar { position: fixed; left: var(--pad); right: var(--pad); bottom: 12px; z-index: 50; display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; pointer-events: none; }
.rvbar > * { pointer-events: auto; }
.rvbar .n { background: var(--bg); border-radius: 999px; padding: calc(4.5px - .16em) var(--oval-x); border: 1px solid transparent; }
.nav .rv { margin-left: 8px; font-weight: 500; border-color: var(--fg) !important; }
.rvp { max-width: 900px; }
.rvp h1 { font: inherit; font-weight: 600; }
.rvp .rows { margin-top: 1.3em; }
.rvp .rows a { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; padding: 5px 0; }
.rvp textarea { display: block; width: 100%; height: 260px; margin-top: 1.3em; font: inherit; font-size: 12px; background: transparent; color: var(--fg); border: 1px solid var(--fg); padding: 10px; resize: vertical; }
.rvp .acts { display: flex; gap: 6px; margin-top: 1.3em; flex-wrap: wrap; }

/* image captions with credit */
.gal figcaption { margin-top: 6px; font-size: .8em; line-height: 1.35; color: var(--mid); max-width: 720px; }
.gal .gr:has(figcaption)::after { display: none; } /* the grain layer would also cover the caption */

/* nav v3: no grey band — pure progressive blur behind the nav, hides on scroll down */
.nav { background: none; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.nav.hid { transform: translateY(-100%); }
.nb { top: 0; bottom: auto; height: calc(100% + 36px); z-index: -1; }
.nb::after { display: none; }
.nb i:nth-child(1) { -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 45%, rgba(0,0,0,0) 65%); mask-image: linear-gradient(to bottom, #000 0%, #000 45%, rgba(0,0,0,0) 65%); }
.nb i:nth-child(2) { -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 40%, #000 55%, rgba(0,0,0,0) 78%); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 40%, #000 55%, rgba(0,0,0,0) 78%); }
.nb i:nth-child(3) { -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 55%, #000 72%, rgba(0,0,0,0) 90%); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 55%, #000 72%, rgba(0,0,0,0) 90%); }
.nb i:nth-child(4) { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 70%, #000 85%, rgba(0,0,0,0) 100%); mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 70%, #000 85%, rgba(0,0,0,0) 100%); }

/* project pages: links get the oval instead of an underline (no layout shift: padding offset by negative margin) */
.meta a.x, .meta a.u { text-decoration: none !important; border: 1px solid transparent; border-radius: 999px; padding: calc(4.5px - .16em) var(--oval-x); margin: calc(-5.5px + .16em) calc(-1px - var(--oval-x)); -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: border-color .12s; }
.meta a.x:hover, .meta a.u:hover, .meta a.x:active, .meta a.u:active { border-color: var(--fg); color: var(--fg); }

/* archive peek: one fixed format for every cover */
.peek { aspect-ratio: 4 / 5; object-fit: cover; height: auto; }


/* ---------- links on project pages: grey, black on hover, no underline, no oval ---------- */
.pn a, .pn a.u, .meta a.x, .meta a.u { color: var(--muted); text-decoration: none !important; border: 0; padding: 0; margin: 0; transition: color .12s; }
.pn a:hover, .meta a.x:hover, .meta a.u:hover, .pn a:active, .meta a.x:active, .meta a.u:active { color: var(--fg); border: 0; }

/* ---------- cursor: plus that turns into an x (hitmarker) over anything clickable; inverts what is under it, in greyscale ---------- */
html { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cpath transform='rotate%280 13.0 13.0%29' d='M13.0 4v18M4 13.0h18' stroke='%23000' stroke-width='2.4'/%3E%3C/svg%3E") 13 13, crosshair; }
a, button, .row, .row .w[data-href] { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cpath transform='rotate%280 13.0 13.0%29' d='M13.0 4v18M4 13.0h18' stroke='%23000' stroke-width='2.4'/%3E%3C/svg%3E") 13 13, pointer; }
.slides, .slides .prev, .slides [data-href] { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' viewBox='0 0 26 26'%3E%3Cpath transform='rotate%280 13.0 13.0%29' d='M13.0 4v18M4 13.0h18' stroke='%23000' stroke-width='2.4'/%3E%3C/svg%3E") 13 13, crosshair; }
html.jc, html.jc * { cursor: none !important; }
.hm-cur { position: fixed; left: 0; top: 0; width: 26px; height: 26px; margin: -13.0px 0 0 -13.0px; pointer-events: none; z-index: 9999; visibility: hidden; will-change: transform; }
.hm-cur b { display: block; width: 100%; height: 100%; -webkit-backdrop-filter: grayscale(1) invert(1); backdrop-filter: grayscale(1) invert(1); clip-path: polygon(calc(50% - 1.2px) 4px, calc(50% + 1.2px) 4px, calc(50% + 1.2px) calc(50% - 1.2px), calc(100% - 4px) calc(50% - 1.2px), calc(100% - 4px) calc(50% + 1.2px), calc(50% + 1.2px) calc(50% + 1.2px), calc(50% + 1.2px) calc(100% - 4px), calc(50% - 1.2px) calc(100% - 4px), calc(50% - 1.2px) calc(50% + 1.2px), 4px calc(50% + 1.2px), 4px calc(50% - 1.2px), calc(50% - 1.2px) calc(50% - 1.2px)); }
.hm-cur.on { visibility: visible; }
/* hover on a link: the plus stays, the word itself turns inverted (black block, light text). Archive rows and the filter keep their oval, the home caption keeps its blend. */
a.hm-hov:not(.row), button.hm-hov { background: var(--fg); color: var(--bg) !important; box-shadow: 0 0 0 3px var(--fg); }
.nav a.hm-hov, button.hm-hov { box-shadow: none; border-radius: 999px; }   /* same size as the oval, never bigger */
.cap a.hm-hov { background: transparent; box-shadow: none; color: inherit !important; }
/* nav: the oval is a filled black pill, the word on it turns light; it travels from link to link */
.nav .pill { background: var(--fg); z-index: -1; }
.nav a:has(> .pill) { color: var(--bg) !important; }
/* archive: hover / tap / open = filled black oval */
a.row > span:hover .b, a.row:focus-visible .t .b, a.row > span.c .b:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
a.row .mc:hover, a.row .mr:hover, a.row:focus-visible .mc, a.row.tap .mc { background: var(--fg); color: var(--bg); }
/* several names in one cell (e.g. Krys Huba, soft power e.V.): only the hovered name fills, not the whole cell */
a.row > span.c:hover .b { background: transparent; color: inherit; border-color: transparent; }
a.row > span.c .b:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
/* nav: only the hovered item is filled; the active one steps back while another is hovered */
.nav:has(a.hm-hov) .pill { opacity: 0; transition: none; }
.nav:has(a.hm-hov) a:has(> .pill):not(.hm-hov) { color: var(--fg) !important; }
/* home: no tagline, no chips in the nav. review chip is hidden everywhere (Shift+R opens review mode) */
body.home .nav .claim, body.home .nav a.rv { display: none !important; }
a.rv:not(.fd) { display: none !important; }
/* home captions: hover = black rectangle with light text (the blend is switched off while hovered) */
.cap:has(a.hm-hov) { mix-blend-mode: normal; }
.cap a.hm-hov { background: var(--fg) !important; color: var(--bg) !important; border-color: var(--fg); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* bottom filter words + chips: black box on hover (the button reset used to win against the global rule) */
.foot .claim button.hm-hov, .foot a.rv.hm-hov { background: var(--fg); color: var(--bg) !important; }
/* project page: the title is the selected item, so it gets the black rectangle and a bit more room (same box as a hovered archive title) */
.meta h1 { display: inline-block; background: var(--fg); color: var(--bg); border: 1px solid var(--fg); border-radius: 0; padding: calc(4.5px - .16em) var(--oval-x); margin: calc(-5.5px + .16em) 0 14px; }
.meta h1 a { color: inherit; text-decoration: none; }
.meta h1 a.hm-hov { background: transparent; box-shadow: none; }
.gal .gr.r32 img { aspect-ratio: 3 / 2; width: 100%; height: auto; object-fit: cover; }
/* mobile feed: an opened project's title row gets more room too */
@media (max-width: 809px) { html.feed li.open > a.row { padding-top: 12px; padding-bottom: 12px; } html.feed .fold { padding-top: 10px; } }
/* square instead of oval: delete this block to get the ovals back */
.nav .pill, .row .b, .row .mc, .row .mr, .cap a, .cap a.u:hover, .gal .gr .snd, .rvb button, .rvbar button, .rvbar a, .rvbar .n, .rvp button, .rvp a.btn, .rvp .tile .k, .rvp .tile .hm, .rvp .tile:first-child:not(.out)::after, .meta a.x, .meta a.u, .flt, .flt button, html.feed .fold .more button, button.hm-hov, .nav a, .nav a.hm-hov, .foot .claim button, .foot a.rv { border-radius: 0; }

/* ---------- oval is back on archive rows (hover on desktop, tap on touch); the home caption stays grey -> black ---------- */
/* mobile feed: an opened project keeps its oval on the sticky title, so the title doubles as the section heading */
@media (max-width: 809px) { html.feed li.open > a.row .mc { background: var(--fg); color: var(--bg); border-color: var(--fg); } }
.cap a, .cap a.u:hover { border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; color: #d4d4d4; }
.cap { justify-content: flex-start; mix-blend-mode: difference; }
.ink .cap a { filter: none; }
/* second copy of the caption on top strips the colour from the inverted text: monochrome only */
.cap.cap-s { z-index: 4; mix-blend-mode: saturation; pointer-events: none; }
.cap.cap-s a { color: #808080; pointer-events: none; }

/* nav v4: no sticky, no blur - it simply scrolls away with the page and is back at the top */
body:not(.home) .nav { position: relative; top: auto; transform: none !important; }
.nb { display: none; }

/* gallery-only crop to 3:4 (the file keeps its full frame for the home slides) */
.gal .gr.r34 img { aspect-ratio: 3 / 4; height: auto; object-fit: cover; }
.meta .cr { color: var(--muted); }

/* ---------- desktop crop positions (home slides) ---------- */
@media (min-width: 900px) {
  .slides img[data-src$="alter-schlachthof/76j.jpg"] { object-position: 50% 67%; }
  .slides img[data-src$="cxd-shockwerk/35.jpg"]     { object-position: 50% 92%; }
  .slides img[data-src$="cxd-shockwerk/71c.jpg"]    { object-position: 50% 92%; }
  .slides img[data-src$="alter-schlachthof/01.jpg"] { object-position: 50% 62%; }
  .slides img[data-src$="cxd-detroit/64.jpg"]       { object-position: 50% 66%; }
}

/* home caption: bottom right, grey text + grey frame, no fill; black block with grey text on hover (the left twin and the saturation copy are hidden; the JS keeps the right one in sync) */
body .cap:not(.cap-r) { display: none; }
body .cap.cap-r { mix-blend-mode: normal; justify-content: flex-end; }
body .cap.cap-r a, body .cap.cap-r a.u:hover { background: transparent; color: var(--bg); border: 1px solid var(--bg); max-width: 48vw; }
body .cap.cap-r a.hm-hov, body .cap.cap-r a.u:hover { background: var(--fg) !important; color: var(--bg) !important; border-color: var(--fg) !important; box-shadow: none; }

.meta .d.cr { margin-top: 0; }
.meta p.d:has(a.x) { color: var(--muted); } /* the commas between the links match the links */

/* text selection: grey instead of blue */
::selection{background:#8d8e8f;color:#000}
::-moz-selection{background:#8d8e8f;color:#000}

/* about: while a name shows its black field, the comma behind it disappears */
main.about .nw:has(> a.hm-hov) { color: transparent; }
main.about .nw:has(> a.hm-hov) > a { color: var(--bg) !important; }

/* ---------- phone: nav switches instantly (no pill glide), the "doing" column never fills, no sticky-hover boxes ---------- */
@media (max-width: 809px), (hover: none) {
  .nav { view-transition-name: none; }
  a.row .mr, a.row .mr:hover, a.row.tap .mr { background: transparent !important; color: var(--fg) !important; border-color: transparent !important; }
  a.row:not(.tap) .mc:hover { background: transparent; color: var(--fg); border-color: transparent; }
}

/* phone feed: closed row = title left, clients right (right-aligned, same inset as the left edge); role + year only inside an opened project */
@media (max-width: 809px) {
  a.row > span.t, a.row > span.r, a.row > span.y { display: none !important; }
  html.feed .row.head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 0 0 6px; color: var(--muted); }
  html.feed .row.head > span:nth-child(2) { text-align: right; }
  html.feed .row.head > span:nth-child(3) { display: none; }
  html.feed .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  html.feed .row .mr { display: none; }
  html.feed a.row > span.c { display: block !important; justify-self: end; text-align: right; min-width: 0; pointer-events: none; }
  html.feed a.row > span.c .b, html.feed a.row > span.c .b:hover { display: inline; padding: 0; margin: 0; border: 0; background: transparent !important; color: inherit !important; }
  html.feed a.row > span.c .cm { margin: 0; width: auto; }
  html.feed .fold .fmeta { margin: 0 0 14px; }
  html.feed .fold .fmeta p { margin: 0; }
}
/* CNC projects: a very light grain over images and clips */
figure[data-grain] { position: relative; }
figure[data-grain]::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .05; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 2 -.5'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* phone feed: DOM order is client column first, so place the cells explicitly: title left, clients right */
@media (max-width: 809px) {
  html.feed a.row > .mc { grid-column: 1; grid-row: 1; justify-self: start; }
  html.feed a.row > span.c { grid-column: 2; grid-row: 1; }
}

/* phone feed hierarchy: header black, closed rows light grey, open row black with the box, role dark / year grey inside */
@media (max-width: 809px) {
  html.feed .row.head { color: var(--fg); }
  html.feed li:not(.open) > a.row > .mc, html.feed li:not(.open) > a.row > span.c { color: #8d8e8f; }
  html.feed li.open > a.row > span.c { color: var(--fg); }
  html.feed a.row .mc { transition: none; -webkit-tap-highlight-color: transparent; }
  html.feed .fold .fmeta p.role { color: var(--fg); }
  html.feed .fold .fmeta p.yr { color: #8d8e8f; }
  html.feed .fold .fmeta { margin-bottom: 1.1em; }
  html.feed .fold .meta .d { margin-top: 0; margin-bottom: .9em; }
}

/* "+ n more": same square box as every other button (feed.css loads later and had the pill) */
html.feed .fold .more button, .more button { border-radius: 0 !important; }

/* touch: tapped links get the black block with light text (no sticky grey->black text); .tap is removed again after the OS sheet / on next touch */
@media (hover: none), (max-width: 809px) {
  main.about a.u:hover, main.about a.x:hover, .meta a.x:hover, .meta a.u:hover, .pn a:hover { color: inherit; }
}
main.about a.tap, .meta a.tap, .pn a.tap { background: var(--fg); color: var(--bg) !important; box-shadow: 0 0 0 3px var(--fg); border-radius: 0; text-decoration: none; }

/* phone feed: the clients cell never wraps (tracking is tightened by site.js when a long pair like "Leonis Works, Haus der Visionäre" is too wide); title takes the rest */
@media (max-width: 809px) {
  html.feed li:not(.open) a.row { grid-template-columns: minmax(0, 1fr) auto; }
  html.feed li:not(.open) a.row > span.c { white-space: nowrap; }
  html.feed li:not(.open) a.row > .mc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
}
.gal .gr.full .snd { display: none; }

/* project text hierarchy (desktop page + phone feed fold): title black, all body text + client/role/year mid grey, links + photo credits very light grey */
:root { --faint: #a1a2a4; }
.meta p, .meta .d, html.feed .fold .fmeta p.role, html.feed .fold .fmeta p.yr { color: var(--mid); }
.meta p.d:has(a.x), .meta .cr, .meta .d.cr, .gal figcaption, .meta a.x, .meta a.u { color: var(--faint); }


/* archive overview, desktop: the clients cell stays on one line */
@media (min-width: 810px) { .list a.row > span.c { white-space: nowrap; } }

/* home loader: typed wordmark with the plus as caret -> black wipe -> window -> image crossfade -> full slide */
html.ldr-on .slides, html.ldr-on .cap { visibility: hidden; }
html.ldr-on .nav { opacity: 0; transition: opacity .45s; }
html.ldr-on.ldr-ui .nav { opacity: 1; }
.ldr { position: fixed; inset: 0; z-index: 10000; background: var(--bg); transition: background-color .45s; cursor: none; }
.ldr.clear { background-color: transparent; }
.ldr .bx { --e: cubic-bezier(.5,0,.15,1); position: fixed; overflow: hidden; display: flex; align-items: center; justify-content: center; white-space: nowrap; font-weight: 600; font-size: 15px; line-height: 1.2; color: var(--fg); padding: 3px 8px; box-sizing: border-box; }
.ldr .bx > .t { position: relative; }
.ldr .cr { display: inline-block; width: .62em; height: .62em; margin-left: 3px; background: linear-gradient(currentColor,currentColor) center / 100% 1.5px no-repeat, linear-gradient(currentColor,currentColor) center / 1.5px 100% no-repeat; animation: ldrb .5s steps(1) infinite; }
.ldr .cr.off { visibility: hidden; animation: none; }
@keyframes ldrb { 50% { opacity: 0; } }
.ldr .w { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 3px 8px; background: var(--fg); color: var(--bg); clip-path: inset(0 100% 0 0); transition: clip-path .38s var(--e); }
.ldr .bx.wipe .w { clip-path: inset(0 0 0 0); }
.ldr .w .t { transition: opacity .25s; }
.ldr .bx.win .w .t { opacity: 0; }
.ldr .bx.win { transition: left .45s var(--e), top .45s var(--e), width .45s var(--e), height .45s var(--e); }
.ldr .im { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; filter: blur(10px) brightness(.4); transform: scale(1.12); transition: opacity .9s cubic-bezier(.25,.6,.2,1), filter 1s cubic-bezier(.25,.6,.2,1), transform 1.1s cubic-bezier(.16,1,.3,1); }
.ldr .bx.pic .im { opacity: 1; filter: none; transform: none; }
.ldr .bx.grow { transition: left 1.15s cubic-bezier(.5,0,.1,1), top 1.15s cubic-bezier(.5,0,.1,1), width 1.15s cubic-bezier(.5,0,.1,1), height 1.15s cubic-bezier(.5,0,.1,1); }

/* about: headline black, the two-line subtext in the body grey */
body main.about .intro { color: var(--fg); }
body main.about p.sub { color: var(--mid); }

/* depth home */
.slides canvas.dp{position:absolute;inset:0;width:100%;height:100%;display:block}
.slides.gl img{display:none}


/* ---------- v6: overlay version — nav floats over full-bleed slides; archive / about lie directly on the photos (the grey version is index.html?v=grey) ---------- */
body.home.ovr .nav { position: absolute; top: 0; left: 0; right: 0; color: #C8C9CA; }
body.home.ovr .nav::before { content: ""; position: absolute; z-index: -2; left: 0; right: 0; top: 0; height: 130px; pointer-events: none; background: linear-gradient(rgba(0,0,0,.34), rgba(0,0,0,.14) 55%, rgba(0,0,0,0)); }
body.home.ovr .nav .left, body.home.ovr .nav .claim { position: relative; }
body.home.ovr .nav a, body.home.ovr .nav a.on, body.home.ovr .nav a.hm-hov { background: transparent !important; color: #C8C9CA !important; box-shadow: none !important; border-color: transparent !important; }
body.home.ovr .nav .pill { z-index: -1; background: #C8C9CA; border-color: #C8C9CA; }   /* the selected entry sits on the grey, set in black */
body.home.ovr .nav:has(a.hm-hov) .pill { opacity: 1; }
body.home.ovr .nav a:has(> .pill) { color: #141414 !important; }
@media (hover: hover) { body.home.ovr .nav a:hover:not(:has(> .pill)) { background: rgba(200,201,202,.28) !important; color: #fff !important; text-decoration: none; } }   /* hover = translucent grey block, white word; the selected entry stays solid grey + black */
body.home.ovr.ov-on .nav .claim { visibility: hidden; }
body.ovr .cap { display: none !important; }                              /* project label: out for now */
.ov { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .22s; }
.ov.on { opacity: 1; pointer-events: auto; }
.ov iframe { display: block; width: 100%; height: 100%; border: 0; background: transparent; color-scheme: normal; }
/* inside the overlay: the three grey steps, in light type on the photo */
html.emb { --bg: #121212; --fg: #fff; --mid: rgba(255,255,255,.74); --muted: rgba(255,255,255,.46); --faint: rgba(255,255,255,.46); }
html.emb, html.emb body { background: transparent !important; }
html.emb .nav { visibility: hidden; }
html.emb main.about p.intro, html.emb main.about p.intro span { color: #fff !important; }
html.emb .foot { background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.4) 45%); }

/* project page, desktop: prev / next stays put at the bottom of the text column (fixed, not riding on the image column) */
@media (min-width: 1200px) {
  main.page:has(.meta) .pn { position: fixed; bottom: 24px; left: var(--inset); margin: 0; width: calc((100vw - 2 * var(--inset) - 64px) / 3); }
}

/* ---------- project pages in the overlay version: dark, same language as the overlay ---------- */
html.dk { --bg: #121212; --fg: #f2f2f2; --mid: rgba(255,255,255,.74); --muted: rgba(255,255,255,.46); --faint: rgba(255,255,255,.46); color-scheme: dark; }
html.dk ::selection { background: #555; color: #fff; }
/* phone: stronger dimming, so the list stays readable on any photo; legal text smaller */
@media (max-width: 809px) {
  .ov { background: rgba(0,0,0,.66); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
  html.emb { --muted: rgba(255,255,255,.74); --mid: rgba(255,255,255,.88); }
  .legal { font-size: 8.5px; line-height: 1.4; }
}


/* project texts: even out the right edge and avoid short last lines (left-aligned, no justification) */
.meta .d { text-wrap: pretty; }

/* a clip as a home slide: in depth mode its frames are drawn on the canvas, the element itself stays invisible */
.slides.gl video, .slides.gl video.on { opacity: 0; pointer-events: none; }

/* archive (overlay mode): the cover of the hovered row fills the whole background behind the list, instead of a preview column */
html.emb .peek { display: block; position: fixed; inset: 0; top: 0 !important; right: auto; width: 100vw; height: 100vh; aspect-ratio: auto; object-fit: cover; z-index: -1; filter: brightness(.5); transition: opacity .28s; }

/* archive (overlay mode): the selection is sticky; two cover layers cross-fade slowly, so moving through the list stays calm */
html.emb .peek { transition: opacity .75s ease; }
/* exactly one white field: the sticky one. plain hover highlights are switched off in the overlay archive */
html.emb a.row > span:hover .b, html.emb a.row > span.c .b:hover, html.emb a.row:focus-visible .t .b { background: transparent; color: inherit; border-color: transparent; }
html.emb a.row .b.stk, html.emb a.row > span:hover .b.stk, html.emb a.row > span.c .b.stk:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
html.emb a.row > span.c .b:hover + .cm { color: inherit; }
/* clips: no player; the sound switch is a plain white field with black type */
.gal .gr .snd { background: #fff; color: #111; border-color: #fff; border-radius: 0; }

/* home: project title bottom right — plain inverted text, on hover a white field with black type (like the nav) */
body .cap.cap-r { display: flex !important; justify-content: flex-end; mix-blend-mode: difference; }
body .cap.cap-r a, body .cap.cap-r a.u:hover { border-color: transparent; background: transparent; color: #a8a8a8; padding: calc(4.5px - .16em) var(--oval-x); margin-right: calc(-1 * var(--oval-x)); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; max-width: 70vw; transition: none; }
body .cap.cap-r:has(a.hm-hov) { mix-blend-mode: normal; }
body .cap.cap-r a.hm-hov, body .cap.cap-r a.hm-hov:hover { background: rgba(200,201,202,.28) !important; color: #fff !important; border-color: transparent !important; box-shadow: none !important; }
body.home.ovr.ov-on .cap.cap-r { display: none !important; }

/* home title: second layer takes the colour out of the inversion, so it is always grey, never tinted */
body .cap.cap-rs { display: flex !important; justify-content: flex-end; mix-blend-mode: saturation; pointer-events: none; z-index: 4; }
body .cap.cap-rs a { border-color: transparent; background: transparent; color: #808080; padding: calc(4.5px - .16em) var(--oval-x); margin-right: calc(-1 * var(--oval-x)); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; max-width: 70vw; pointer-events: none; }
body .cap.cap-r:has(a.hm-hov) + .cap.cap-rs, body.home.ovr.ov-on .cap.cap-rs { display: none !important; }

/* archive filter in the overlay: hover is a translucent grey block first, the selected one is the white field */
/* the filter sits in the bottom tagline: hovering an unselected one gives the same translucent grey block as the nav */
html.emb .foot .claim button.hm-hov:not(.on), html.emb .foot a.rv.hm-hov { background: rgba(200,201,202,.28) !important; color: #fff !important; }
html.emb .foot .claim button.on, html.emb .foot .claim button.on.hm-hov { background: var(--fg) !important; color: var(--bg) !important; }
@media (hover: hover) {
  html.emb .foot .claim button:hover:not(.on) { background: rgba(200,201,202,.28); color: #fff; }
  html.emb .flt button:hover:not(.on) { color: #fff; border-color: transparent; background: rgba(200,201,202,.28); }
}

/* phones: the title column takes only what it needs, so the with-column keeps its names on one line */
@media (max-width: 809px) {
  .row { grid-template-columns: auto minmax(0,1fr); }
  .row .mc, .row .c { white-space: nowrap; }
  .row .mr { white-space: nowrap; }
}

/* project pages, desktop: the wordmark holds at the top, and the text column holds below it */
@media (min-width: 810px) { body:not(.home) .nav { position: sticky; top: 0; z-index: 40; background: var(--bg); }
  main.page:has(.meta) .meta { top: 72px; } }
html.emb .nav { position: static; }

/* overlay archive: exactly one field is marked — the sticky one. nothing else may brighten, outline or shift under the cursor */
html.emb a.row > span, html.emb a.row > span:hover, html.emb a.row > span.c:hover, html.emb a.row > span.t:hover, html.emb a.row > span.r:hover { color: var(--mid) !important; }
html.emb a.row > span:hover .b:not(.stk), html.emb a.row > span .b:hover:not(.stk), html.emb a.row > span.c .b:hover:not(.stk), html.emb a.row:focus-visible .b:not(.stk) { background: transparent !important; color: var(--mid) !important; border-color: transparent !important; box-shadow: none !important; }
html.emb a.row > span.c .b:hover:not(.stk) + .cm, html.emb a.row .cm { color: var(--mid) !important; }
/* only the sticky field is marked, and it is the one thing that may go full white */
html.emb a.row .b.stk, html.emb a.row > span:hover .b.stk, html.emb a.row > span.c .b.stk:hover { background: var(--fg) !important; color: var(--bg) !important; border-color: var(--fg) !important; }

/* project pages: the description sets justified, like the intro and the legal block. link and credit lines stay ragged,
   so a short line of two links is never pulled apart across the column. */
.meta p.d { text-wrap: pretty; }
.meta p.d { text-wrap: pretty; }

/* link line and photo credit are one group: same light grey, no gap between them */
.meta p.d:has(a.x), .meta .d.cr, .meta .cr, .meta a.x, .meta a.u { color: var(--faint) !important; }
.meta p.d:has(a.x), html.feed .fold .meta p.d:has(a.x) { margin-bottom: 0 !important; }
.meta .d.cr, .meta .cr, html.feed .fold .meta .d.cr, html.feed .fold .meta .cr { margin-top: 0 !important; }

/* mara, desktop only: the portrait frame is cropped to landscape 5:4, held just below the lamp. the phone keeps the full frame. */
.gal .gr[data-id="mara-fliegen-davon/22"] img { aspect-ratio: 5 / 4; width: 100%; height: auto; object-fit: cover; object-position: 50% 25%; }
.gal .gr[data-id="cxd-detroit/64"] img { aspect-ratio: 5 / 4; width: 100%; height: auto; object-fit: cover; object-position: 50% 65%; }


/* side-by-side pairs must follow the real width of the gallery column, not the window: inside the overlay iframe
   the viewport media queries do not describe the space the pictures actually have. */
.gal { container-type: inline-size; }
@container (max-width: 620px) {
  .gal .gr.p { flex-basis: 100% !important; }
  .gal .gr[data-id="mara-fliegen-davon/22"] img, .gal .gr[data-id="cxd-detroit/64"] img { aspect-ratio: auto !important; object-fit: fill !important; }
}

/* "+ n more" under a project's pictures: the same light grey as the links and credits, not full black */
html.feed .fold .more button, .more button { color: var(--faint) !important; border-color: var(--faint) !important; }
html.feed .fold .more button.hm-hov, .more button.hm-hov { color: var(--bg) !important; background: var(--fg) !important; border-color: var(--fg) !important; }

/* the light-grey rule for links must not survive into the hover field, or the text stays grey on white */
.meta a.x.hm-hov, .meta a.u.hm-hov, .meta a.x:hover, .meta a.u:hover { color: var(--bg) !important; }
html.emb .meta a.x.hm-hov, html.emb .meta a.u.hm-hov { color: #111 !important; }
/* while the page is scrolling the live-filter cursor is hidden: its per-frame repaint drags the sticky column along */
html.scrl .hm-cur { display: none !important; }

/* names that must not be split across two lines (nb is already taken by the nav blur bar) */
.meta .nowrp { white-space: nowrap; }

/* touch: the bottom-right filter has no hover state to show — a tap goes straight to the white field */
@media (hover: none) {
  .foot .claim button.hm-hov, .foot a.rv.hm-hov,
  html.emb .foot .claim button.hm-hov:not(.on), html.emb .foot a.rv.hm-hov,
  .foot .claim button:active, .foot a.rv:active,
  html.emb .foot .claim button:active, html.emb .foot a.rv:active { background: var(--fg) !important; color: var(--bg) !important; }
}

/* wide columns: an upright picture is cropped to 4:5 over the full column width instead of towering over the window.
   the class is set from the real file proportions, see below. */
@container (min-width: 620px) {
  /* the frame carries the proportion and the media fills it completely — on a <video> object-fit only bites
     once the box no longer comes from the file itself, otherwise it sits letterboxed inside its own figure. */
  /* cropped, and on top of that never taller than the window: the picture then sits a little narrower than the
     column rather than forcing a scrollbar for the last few pixels. the figure shrinks with it. */
  .gal .gr.tall:has(> img) { width: fit-content; max-width: 100%; overflow: hidden; }
  /* a pair of 9:16 frames and the single 5:4 frame are capped by the window height as well, so they scale down
     instead of making the page scrollable by a few pixels. what is left over goes to the left, the block stays
     flush with the right edge of the column. chrome above and below: 52 nav + 24 top + 64 bottom. */
  .gal .gr.p.n916 { flex-basis: min(calc(50% - 6px), calc((100svh - 150px) * 9 / 16)); }
  .gal .gr.p.n916 { margin-left: auto; }
  .gal .gr.p.n916 + .gr.p.n916 { margin-left: 0; }
  .gal .gr[data-id="cxd-detroit/64"] { flex-basis: min(100%, calc((100svh - 150px) * 5 / 4)); margin-left: auto; }
  .gal .gr.tall > img { aspect-ratio: 4 / 5; width: auto; max-width: 100%; height: auto; max-height: calc(100svh - 150px); object-fit: cover; }
}

/* keyboard focus: the browser's own blue ring does not belong on these fields — the marked state already shows where you are */
a:focus, a:focus-visible, button:focus, button:focus-visible, [tabindex]:focus, [tabindex]:focus-visible { outline: none; }

/* home, bottom right: no frame and no inversion — plain text in the grey of the mobile nav bar, a signature in
   the corner rather than a label. only once you are on it does it become the solid white field. */
body .cap.cap-r { mix-blend-mode: normal !important; }
body .cap.cap-rs { display: none !important; }
body .cap.cap-r a, body .cap.cap-r a.u:hover { border-color: transparent; color: #c8c9ca; }
body .cap.cap-r a.hm-hov, body .cap.cap-r a.hm-hov:hover { background: var(--fg) !important; color: var(--bg) !important; border-color: var(--fg) !important; box-shadow: none !important; }

/* info: the headings run in the same weight as the opening line — no semibold step in the column */
main.about .sec h2 { font-weight: 500; }

/* info: the two opening sentences each hold their own line and the second one is tracked out until it ends
   flush with the first. the measurement happens in site.js, where the real font metrics are known. */
main.about p.sub span { display: block; width: fit-content; max-width: 100%; white-space: nowrap; }

/* 29.11.: project names + roles lowercase, like the nav */
.meta h1, .meta h1 + p + p, .row .b, .row .mc, .row .mr, .pn a, .cap, .cap a { text-transform: lowercase; }

/* 29.11.: on phones the home picture runs on under the floating Safari bar */
@media (hover: none) { body.home { height: 100lvh; } }


/* 29.11. b */
.gal .gr.p.n916 > video, .gal .gr.p.n916 > img { aspect-ratio: 9 / 16; width: 100%; height: auto; object-fit: cover; }
.gal .gr.v::before { content: ""; position: absolute; inset: 0; z-index: 1; }   /* catches the pointer over clips, so Safari never swaps the plus for its own arrow */
main.about .intro, main.about .intro span, main.about .sec h2 { font-weight: 600; }
.cap a, .cap a.u:hover { color: #7c7c7c; }   /* home titles: a watermark, not a label */
@media (hover: none) {
  html:has(body.home) { background: #141414; }
  body.home { background: var(--bg); }
  .cap { padding-bottom: calc(6px + env(safe-area-inset-bottom)) !important; }
}

/* 29.11. c: narrow window (< 810): project + with (client) per row, the role is dropped; room for the bottom line */
@media (max-width: 809px) { a.row .mr { display: none !important; } a.row .mc { order: -1; } a.row > span.c { display: block; min-width: 0; white-space: nowrap; overflow: visible; } a.row > span.c .cm { display: inline !important; } a.row > span.c.one .cm, a.row > span.c.one .cm ~ .b { display: none !important; } a.row .mc { white-space: normal; overflow: visible; text-overflow: clip; } .list { padding-bottom: 72px; } }

/* 29.11. d: the pair of 9:16 clips fills the whole column, flush left and right with the picture above */
@media (min-width: 810px) { .gal:has(> .gr:not(.n916)) .gr.p.n916 { flex-basis: calc(50% - 6px) !important; margin-left: 0 !important; } }

/* 29.11. e */
/* with: "name + name" — a real space on both sides of the plus, the hover field of a name stops short of it */
a.row > span.c .cm { width: auto !important; margin: 0 !important; padding: 0 calc(var(--cx, 0px) + 2px); }
html.feed a.row > span.c .cm { padding: 0 .22em !important; margin: 0 !important; }
/* pages that are only one row (verzuz: two 9:16 frames, mara: one picture with its credit line) must fit the window
   exactly — no scrollbar for a few pixels. 76 above the gallery, 64 below, 12 to spare. */
@media (min-width: 810px) {
  .gal:not(:has(> .gr:not(.n916))) > .gr.p.n916 { flex-basis: min(calc(50% - 6px), calc((100vh - 152px) * 9 / 16)) !important; }
  .gal:not(:has(> .gr:not(.n916))) > .gr.p.n916:first-child { margin-left: auto !important; }
  .gal > .gr:only-child { flex: 0 1 auto !important; width: fit-content; max-width: 100%; margin-left: auto; }
  .gal > .gr:only-child > img, .gal > .gr:only-child > video { width: auto; max-width: 100%; max-height: calc(100vh - 152px - 2.2em); }
  .gal > .gr:only-child:not(:has(figcaption)) > img, .gal > .gr:only-child:not(:has(figcaption)) > video { max-height: calc(100vh - 152px); }
}
/* home: project name bottom right in the weight of the nav and a darker grey (a watermark, not a label) */
body .cap.cap-r a, body .cap.cap-r a.u:hover { font-weight: 500 !important; }
body .cap.cap-r a:not(.hm-hov), body .cap.cap-r a.u:not(.hm-hov):hover { color: var(--capc, #6f6f6f) !important; } /* the script takes the colour from the photo behind */

/* 29.11. f */
/* clips: no play button from safari over the frame, ever — they start on their own (or on the first click) */
.gal video::-webkit-media-controls, .gal video::-webkit-media-controls-panel, .gal video::-webkit-media-controls-overlay-play-button,
.gal video::-webkit-media-controls-start-playback-button, .gal video::-webkit-media-controls-play-button { display: none !important; -webkit-appearance: none; opacity: 0 !important; }

/* 29.11. g: home title bottom right — hover is the same translucent grey block with white type as the nav */
body .cap.cap-r a.hm-hov, body .cap.cap-r a.hm-hov:hover, body .cap.cap-r a.u.hm-hov:hover { background: rgba(200,201,202,.28) !important; color: #fff !important; border-color: transparent !important; box-shadow: none !important; }

/* 29.11. h */
/* loader: the block blinks on and off (no transition), the window opens quicker and the picture is in from the start */
.ldr .w { transition: none !important; }
.ldr .bx.grow { transition: left .8s cubic-bezier(.7,0,.25,1), top .8s cubic-bezier(.7,0,.25,1), width .8s cubic-bezier(.7,0,.25,1), height .8s cubic-bezier(.7,0,.25,1) !important; }
.ldr .im { filter: none !important; transform: none !important; transition: opacity .8s cubic-bezier(.45,0,.55,1) !important; } /* the black turns into the first picture over the whole opening */
.ldr .bx.win .w { opacity: 0; transition: opacity .2s linear !important; }
/* phone home, full bleed: safari only draws page content behind its bottom bar when the page really continues there.
   so the picture is taller than the screen by the height of that bar; the page itself does not scroll. */
@media (hover: none) {
  html:has(body.home) { overflow: hidden; height: auto; background: #141414 !important; }
  body.home { height: auto !important; overflow: visible !important; background: #141414 !important; }
  body.home .nav { background: var(--bg); }
  body.home .slides { position: relative !important; top: auto !important; flex: none !important; height: calc(100lvh - var(--navh, 52px) + 160px) !important; }
}

/* prev / next: the arrow head of the font's own arrow, without the shaft — same size and stroke as the type */
svg.ah { width: .35em; height: .7em; vertical-align: 0; overflow: visible; margin: 0 .1em; }
svg.ah path { fill: none; stroke: currentColor; stroke-width: 2.45; }
/* narrow window, list not yet switched: still two separate columns, project left, partners flush right (as on the phone) */
@media (max-width: 809px) { html:not(.feed) a.row > span.c { grid-column: 2; justify-self: end; text-align: right; } html:not(.feed) a.row .mc { grid-column: 1; } }
/* narrow window with a mouse: hovering a row puts the white block on the project title (the partners are not separate fields there) */
@media (hover: hover) { html.feed a.row:hover .mc, html.feed a.row.hm-hov .mc { background: var(--fg) !important; color: var(--bg) !important; border-color: var(--fg) !important; } }

/* 29.11. i: phone info — the legal block a shade lighter and further down, closer to the bottom edge */
@media (max-width: 809px) {
  main.about .legal { color: #a3a4a6; padding-top: 56px; }
  main.page.about { padding-bottom: 14px !important; }
}
/* phone info: "design + production" sits straight on the two sentences, like the other headings on their text */
@media (max-width: 809px) { main.about .intro + p, main.about .intro + p.sub { margin-top: 0 !important; } }

/* 29.11. j: archive list, desktop — the white fields are narrower at the sides, and the plus between two partners
   gets the same spacing as the plus inside a name ("cxd + shockwerk"): about one word space each side */
@media (min-width: 810px) {
  a.row > span.t .b, a.row > span.r .b { padding-left: 6px; padding-right: 6px; margin-left: -7px; margin-right: -7px; }
  a.row > span.c { --cx: 2px; }
}

/* 29.11. k: home project name — desktop in the nav (top right), phone as a plus button (bottom right) */
body.home .nav a.pt { margin-left: auto; text-transform: lowercase; white-space: nowrap; max-width: 45vw; overflow: hidden; }
body.home.ovr.ov-on .nav a.pt { visibility: hidden; }
.pbtn { display: none; }
@media (min-width: 810px) and (hover: hover) { body.home .cap { display: none !important; } }
@media (max-width: 809px), (hover: none) {
  body.home .nav a.pt { display: none !important; }
  body.home .cap { display: none !important; }
}

/* 29.11. l */
/* desktop home: the project name top right, grey like the nav; hover and click as the nav */
body.home .nav a.pt { font-weight: 500; } /* grey like archive / info, one step lighter: second level */
/* phone: the nav ends exactly on the centre line — the last letter of "info" sits on 50vw */
@media (max-width: 809px) { .nav .left { min-width: 0; width: calc(50vw - var(--pad) + var(--oval-x) + 1px); } }

/* 29.11. m: phone hotspot — the site cursor resting on the photo, floating a few pixels on its own; tap opens the project */
.slides .hot { display: none; }
@media (max-width: 809px), (hover: none) {
  body.home .slides .hot.on { display: block; position: absolute; z-index: 4; width: 44px; height: 44px; margin: -22px 0 0 -22px; -webkit-tap-highlight-color: transparent; }
  body.home .slides .hot b { position: absolute; left: 9px; top: 9px; width: 26px; height: 26px; animation: hotfl 4.2s ease-in-out infinite;
    -webkit-backdrop-filter: grayscale(1) invert(1); backdrop-filter: grayscale(1) invert(1);
    clip-path: polygon(calc(50% - 1.3px) 3px, calc(50% + 1.3px) 3px, calc(50% + 1.3px) calc(50% - 1.3px), calc(100% - 3px) calc(50% - 1.3px), calc(100% - 3px) calc(50% + 1.3px), calc(50% + 1.3px) calc(50% + 1.3px), calc(50% + 1.3px) calc(100% - 3px), calc(50% - 1.3px) calc(100% - 3px), calc(50% - 1.3px) calc(50% + 1.3px), 3px calc(50% + 1.3px), 3px calc(50% - 1.3px), calc(50% - 1.3px) calc(50% - 1.3px)); }
  html.ldr-on body.home .slides .hot { visibility: hidden; }
}
@keyframes hotfl { 0% { transform: translate(0,0); } 25% { transform: translate(3px,-2px); } 50% { transform: translate(0,-4px); } 75% { transform: translate(-3px,-2px); } 100% { transform: translate(0,0); } }
@media (prefers-reduced-motion: reduce) { body.home .slides .hot b { animation: none; } }
