:root {
  color-scheme: light;
  --ground: #fff;
  --ink: #232422;
  --muted: #514942;
  --line: #acaeaa;
  --signal: #232422;
  --content: 'DM Sans', Arial, sans-serif;
  --label: 'IBM Plex Mono', monospace;
  --gutter: clamp(24px, 5vw, 80px);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.65 var(--content); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .25em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.16; }
h1, h2 { font-size: clamp(24px, calc(3vw + 1px), 35px); }
h3, h4 { font-size: 22px; }
p + p { margin-top: .85rem; }
img { display: block; width: 100%; height: auto; }
section[id], article[id] { scroll-margin-top: 24px; }
.kh-header, .kh-main, .kh-footer {
  width: min(calc(100% - var(--gutter) * 2), 1320px);
  margin-inline: auto;
}
.kh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding-block: 17px;
}
.kh-name { font-size: 16px; font-weight: 700; white-space: nowrap; }
.kh-nav { display: flex; flex-wrap: wrap; gap: 8px 19px; font-size: 13px; }
.languages { display: flex; align-items: center; gap: 4px; font: 12px var(--label); }
.languages button { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; padding: 8px 4px; }
.languages [aria-pressed="true"] { text-decoration: underline; text-underline-offset: 4px; }
.kh-header { min-height: 86px; border-bottom: 0; }
.kh-name { text-transform: uppercase; font: 13px var(--label); letter-spacing: .17em; }
.kh-nav { margin-left: auto; }
.kh-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.kh-cover {
  min-height: calc(100svh - 86px);
  display: grid;
  place-items: center;
  padding-block: 24px clamp(40px, 8vh, 105px);
}
.kh-cover-image {
  display: block;
  width: min(72%, 840px, calc(64svh * 1280 / 839));
}
.kh-cover-image img { width: 100%; height: auto; }
.kh-meta, .kh-film-index { font: 12px/1.55 var(--label); }
.kh-index-page {
  width: min(100%, 620px);
  margin: 0 auto;
  padding-block: clamp(42px, 8vw, 92px);
}
.kh-index-page h2 { margin-bottom: 24px; }
.kh-index-page h3 { margin: 34px 0 12px; }
.kh-index-sections { display: flex; flex-wrap: wrap; gap: 8px 17px; font-size: 14px; }
.kh-index-sections a { text-decoration: underline; text-underline-offset: .25em; }
.kh-film-index { display: grid; font-size: 14px; }
.kh-film-index a {  padding-block: 8px; }
.kh-film-feature {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 18px clamp(20px, 4vw, 55px);
  align-items: start;
  padding-block: 21px clamp(58px, 9vw, 118px);
}
.kh-film-heading, .kh-film-stills { grid-column: 1 / -1; }
.kh-film-heading h3 { font: 500 clamp(19px, calc(2.1vw + 1px), 26px)/1.2 var(--label); margin-bottom: 6px; }
.kh-meta { color: var(--muted); }
.kh-film-copy { min-width: 0; max-width: 62ch; }
.kh-film-copy details { margin-top: 13px; }
.kh-film-copy summary { cursor: pointer; color: var(--signal); font-size: 14px; }
.kh-film-preview { min-width: 0; }
.kh-film-preview video { display: block; width: 100%; height: auto; background: #151319; }
.kh-film-preview figcaption { margin-top: 8px; }
.kh-film-stills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.kh-film-stills img { aspect-ratio: 2 / 3; object-fit: cover; }
.kh-katastrofa-stills, .kh-echo-stills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kh-katastrofa-stills img, .kh-echo-stills img { aspect-ratio: 16 / 9; }
.kh-resistance-stills img { aspect-ratio: 720 / 470; }

.kh-work-grid, .kh-forest, .kh-with, .kh-opening, .kh-contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 20px clamp(22px, 5vw, 75px);
  
  padding-block: 25px clamp(46px, 8vw, 100px);
}
.kh-work-grid h3, .kh-entry h3, .kh-forest h3, .kh-offer h3 { margin-bottom: 8px; }
.kh-map figure { margin-bottom: 12px; }
.kh-map h4 { margin-block: 5px; }
.kh-entry, .kh-foundation, .kh-offer {  padding-block: 12px; }
.kh-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 16px; }
.kh-text-link, .kh-links a, .kh-contact a { color: var(--signal); text-decoration: underline; text-underline-offset: .25em; }
.kh-text-link { display: inline-block; margin-top: 12px; }
.kh-opening {
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  align-items: start;
  column-gap: clamp(28px, 6vw, 86px);
  row-gap: clamp(24px, 4vw, 42px);
  width: min(100%, 940px);
  margin-inline: auto;
  padding-block: clamp(18px, 4vw, 48px) 54px;
  border-top: 0;
}
.kh-with {
  padding-block-start: clamp(58px, 8vw, 128px);
  row-gap: clamp(32px, 5vw, 62px);
}
.kh-with h2 { margin-bottom: clamp(20px, 3vw, 36px); }
.kh-with-contact { margin-top: 1.6rem; }
.kh-about-art {
  width: min(100%, 460px);
  align-self: start;
  justify-self: center;
}
.kh-about-art img { mix-blend-mode: multiply; }
.kh-about {
  max-width: 57ch;
  font-size: clamp(15px, calc(1.4vw + 1px), 17px);
  line-height: 1.65;
}
.kh-about p + p { margin-top: 1.2em; }
.kh-about p:last-child { margin-top: 1.5em; }
.kh-contact p { max-width: 62ch; }
.kh-contact a { grid-column: 2; }
.kh-footer { border-top: 1px solid var(--line); color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px 32px; padding-block: 22px; font-size: 13px; }
.kh-footer > * { margin-inline: 0; }

@media (max-width: 760px) {
  .kh-header, .kh-main, .kh-footer { width: calc(100% - 36px); }
  .kh-header { flex-wrap: wrap; gap: 8px 14px; }
  .kh-nav { order: 1; flex-basis: 100%; gap: 5px 13px; }
  .kh-nav a { padding-block: 3px; }
  .kh-film-feature, .kh-forest, .kh-with, .kh-opening, .kh-contact, .kh-work-grid { grid-template-columns: minmax(0, 1fr); }
  .kh-contact a { grid-column: 1; }
  .kh-film-stills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kh-katastrofa-stills, .kh-echo-stills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


/* Every section and artwork occupies its own navigable view. */
:root {
  --content: "EB Garamond", Georgia, serif;
  --label: var(--content);
}
[hidden] { display: none !important; }
body { font-size: 14px; line-height: 1.75; }
button, summary { font-family: inherit; }
.kh-page :is(h1,h2,h3,h4,.kh-name,.kh-nav,.kh-film-index,.kh-film-heading h2,.kh-cover-feature h2) {
  font-family: var(--content);
  font-size: 13px;
}
.kh-page :is(.languages,.kh-meta,.kh-footer,.kh-links,.kh-film-copy summary) {
  font-family: var(--content);
  font-size: 12px;
}
.kh-header { min-height: 74px; }
.kh-nav { gap: 6px 19px; }
.kh-nav a[aria-current], .kh-film-index a[aria-current] { text-decoration: underline; text-underline-offset: .25em; }
.kh-cover { min-height: calc(100svh - 74px); }
.kh-cover > img { width: auto; height: min(57svh, 490px); max-width: 90%; object-fit: contain; }
.kh-main { min-height: calc(100svh - 74px); }
.kh-main > [tabindex="-1"]:focus { outline: none; }

.kh-main > .kh-film-index {
  width: min(100%, 860px);
  display: flex;
  flex-wrap: wrap;
  gap: 5px 17px;
  margin: 0 auto 30px;
  padding-block: 13px;
}
.kh-film-index h2 { flex-basis: 100%; margin-bottom: 4px; }
.kh-film-index a { border: 0; padding-block: 4px; }

.kh-main .kh-film-feature {
  width: min(100%, 1000px);
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-inline: auto;
  padding: 5px 0 35px;
  border: 0;
}
.kh-main .kh-film-feature :is(.kh-film-heading,.kh-film-copy,.kh-film-stills,.kh-film-preview) {
  grid-column: 1;
  grid-row: auto;
  width: 100%;
}
.kh-main .kh-film-feature :is(.kh-film-heading, .kh-film-copy),
.kh-main [data-work].kh-film-feature > p {
  width: min(100%, 640px);
  max-width: none;
  justify-self: start;
}
.kh-main .kh-film-feature .kh-film-heading { grid-row: 1; }
.kh-film-heading h2 { margin-bottom: 6px; }
.kh-main .kh-film-feature .kh-film-preview { margin: 8px 0 0; }
.kh-main .kh-film-stills { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px; }
.kh-main .kh-film-stills img { display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }
.kh-work-arrows { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;  padding-top: 12px; }
.kh-work-arrows a { font-size: 12px; }
.kh-work-arrows .next { margin-left: auto; }
.kh-main > .kh-short-work { display: block; }
.kh-short-work p, .kh-short-work h2 { margin-bottom: 11px; }
.kh-short-work figure { margin-bottom: 13px; }
.kh-short-work .kh-work-arrows { margin-top: 22px; }

@media (max-width: 760px) {
  .kh-header { flex-wrap: wrap; min-height: 0; }
  .kh-nav { margin: 0; order: 1; flex-basis: 100%; gap: 4px 14px; }
  .kh-main > .kh-film-index { margin-bottom: 18px; }
  .kh-cover { min-height: calc(100svh - 104px); }
  .kh-main .kh-film-stills { grid-template-columns: minmax(0, 1fr); }
}

.kh-cover { align-content: center; row-gap: 14px; }
.kh-film-index > a img { display: none; }
.kh-main > .kh-film-index-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 1200px);
  gap: 0;
  border-block: 0;
  padding-top: 8px;
}
.kh-film-index-gallery h2 { grid-column: 1 / -1; margin-bottom: 5px; }
.kh-film-index-gallery > a { display: grid; gap: 0; align-content: start; padding: 0; }
.kh-film-index-gallery > a span { font-size: 11px; padding: 2px 1px 4px; }
.kh-film-index-gallery > .kh-index-text { grid-column: 1 / -1;  padding-top: 3px; }
.kh-film-index-gallery > a > img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.kh-film-index-gallery > a:hover > img { filter: contrast(1.08); }
.kh-film-index-gallery > a[href="#yang-yang"] { overflow: hidden; }
.kh-film-index-gallery > a[href="#yang-yang"] img { object-fit: cover; }


@media (max-width: 640px) {
  .kh-main > .kh-film-index-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.kh-header { width: calc(100% - clamp(36px, 5vw, 80px)); max-width: none; }
.kh-cover {
  padding-block: 20px 32px;
  row-gap: 14px;
}
.kh-cover .kh-cover-image {
  width: min(100%, 1150px, calc(76svh * 1280 / 719));
}
.kh-cover-image img { height: auto; }
.kh-forest-map {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 960px);
  margin-top: 15px;
}
.kh-forest-map figcaption { margin-top: 8px; }
@media (max-width: 760px) {
  .kh-cover .kh-cover-image { width: 100%; }
}


.kh-header { min-height: 58px; padding-block: 10px; }
.kh-header .kh-name { letter-spacing: .12em; }
.kh-header :is(.kh-name,.kh-nav) { font-size: 11px; }
.kh-nav a[aria-current], .kh-film-index a[aria-current] { color: #762e24; }
.kh-cover { min-height: calc(100svh - 58px); padding-block: 10px 20px; }
.kh-cover .kh-cover-image { width: min(100%, 1280px, calc(80svh * 1280 / 719)); }
.kh-main > .kh-film-index:not(.kh-film-index-gallery) { margin-bottom: 12px; gap: 3px 12px; padding-block: 8px; }
.kh-main > .kh-film-index:not(.kh-film-index-gallery) h2 { display: none; }
.kh-main > .kh-film-index:not(.kh-film-index-gallery) a { font-size: 11px; }
.kh-main .kh-film-feature .kh-film-preview { margin-top: 12px; }
.kh-main .kh-film-feature .kh-film-copy { margin-block: 14px 4px; }
.kh-film-still-wide { grid-column: 1 / -1; }

.kh-still-viewer {
  width: 100%;
  margin: 9px 0 14px;
}
.kh-still-stage {
  display: grid;
  place-items: center start;
  aspect-ratio: 16 / 9;
}
.kh-still-stage img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: left center;
}
.kh-still-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}
.kh-still-controls button {
  border: 0;
  background: transparent;
  color: inherit;
  min-width: 38px;
  min-height: 36px;
  cursor: pointer;
  font-size: 20px;
}
.kh-still-controls button:hover { color: var(--ink); }
.kh-still-count { min-width: 6ch; text-align: center; }
.kh-main .kh-film-feature .kh-film-copy { margin-block: 0 12px; }
.kh-film-excerpt {
  width: min(100%, 640px);
  justify-self: start;
  margin-block: 0 12px;
}
.kh-film-excerpt > .kh-meta { margin-bottom: .5rem; }

#rosebud-video { width: 100%; }
#rosebud .kh-still-stage,
#rosebud-video video { aspect-ratio: 960 / 672; }
#rosebud .kh-still-stage img,
#rosebud-video video { object-fit: cover; }

.kh-work-list { order: 1; flex-basis: 100%; font-size: 13px; }
.kh-work-list summary { cursor: pointer; width: fit-content; }
.kh-work-list ul { list-style: none; margin: 8px 0 0; padding: 0; }
.kh-work-list li a { display: inline-block; padding: 4px 0; }
.kh-work-list a[aria-current] { text-decoration: underline; text-underline-offset: .25em; }

.kh-credits-panel {
  width: min(100%, 640px);
  justify-self: start;
  margin-block: 3px 18px;
  padding-top: 12px;
}
.kh-page .kh-credits-panel h3 {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}
.kh-film-credits { margin: 0; font-size: 13px; line-height: 1.55; }
.kh-film-credits > div {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  column-gap: clamp(12px, 4vw, 32px);
  padding-block: 4px;
}
.kh-film-credits dt { color: var(--muted); }
.kh-film-credits dd { margin: 0; overflow-wrap: anywhere; }
.kh-film-credits dd a { text-decoration: underline; text-underline-offset: .2em; }

.kh-work-arrows .next:has(img) {
  width: min(46%, 230px);
  display: grid;
  gap: 5px;
  text-align: right;
}
.kh-work-arrows .next img { width: 100%; height: auto; }
.kh-index-return { align-self: start; text-underline-offset: .2em; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
::view-transition-group(film-frame) {
  animation-duration: 360ms;
  animation-timing-function: cubic-bezier(.2, .66, .3, 1);
}

/* The cover is an image sequence. Its text and controls live inside the frame. */
body:has(.kh-sequence:not([hidden])) .kh-footer { padding-block: 12px 16px; }
body:has(.kh-sequence:not([hidden])) .kh-footer > :not(.kh-copyright) { display: none; }
.kh-footer .kh-copyright { flex-basis: 100%; font-size: inherit; }
.kh-cover.kh-sequence {
  min-height: calc(100svh - 58px);
  padding: 0;
  display: grid;
  place-items: center;
}
.kh-sequence-stage { width: min(100%, 1440px); position: relative; }
.kh-sequence-slide {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, calc(min(82svh, 900px) * var(--frame-ratio)));
  margin-inline: auto;
}
.kh-sequence-slide > img { width: 100%; height: auto; }
.kh-sequence-info {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.kh-sequence-caption {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: clamp(18px, 4vw, 56px);
  padding-bottom: clamp(62px, 8vw, 100px);
  background: linear-gradient(transparent, rgb(17 15 12 / 93%));
  color: #fffaf0;
  opacity: 0;
  pointer-events: none;
  max-height: 100%;
  overflow: auto;
  font: 13px/1.55 'Work Sans', Arial, sans-serif;
}
.kh-sequence-caption:empty { display: none; }
.kh-sequence-caption > * { max-width: 58ch; }
.kh-sequence-caption .kh-meta, .kh-sequence-caption dt { color: #efe5d4; }
.kh-sequence-caption .kh-credits-panel { border-color: #c4b9aa; }
.kh-page .kh-sequence-caption > h2 {
  font: 500 clamp(17px, calc(2vw + 1px), 27px)/1.15 'Work Sans', Arial, sans-serif;
  letter-spacing: .065em;
  margin-bottom: 10px;
}
.kh-sequence-controls {
  display: flex;
  gap: 5px;
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  opacity: 0;
}
.kh-sequence-controls :is(button,a) {
  font: 17px/1 'IBM Plex Mono', monospace;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: #fffaf0;
  background: #211d18;
  border: 1px solid #8d8377;
  cursor: pointer;
}
.kh-sequence-stage:focus-within .kh-sequence-controls,
.kh-sequence-revealed .kh-sequence-controls { opacity: 1; }
.kh-sequence-revealed .kh-sequence-caption,
.kh-sequence-stage:has(.kh-sequence-info:focus-visible) .kh-sequence-caption {
  opacity: 1;
  pointer-events: auto;
}
@media (hover: hover) {
  .kh-sequence-slide:hover .kh-sequence-caption,
  .kh-sequence-stage:has(.kh-sequence-info:hover) .kh-sequence-caption,
  .kh-sequence-stage:hover .kh-sequence-controls { opacity: 1; }
  .kh-sequence-slide:hover .kh-sequence-caption,
  .kh-sequence-stage:has(.kh-sequence-info:hover) .kh-sequence-caption { pointer-events: auto; }
}
@media (max-width: 640px) {
  .kh-sequence-slide { width: min(100%, calc(75svh * var(--frame-ratio))); }
  .kh-sequence-caption { padding-inline: 14px; }
  .kh-sequence-controls { bottom: 8px; right: 8px; }
}

.kh-sequence-stage { width: min(100%, 1440px, calc(min(82svh, 900px) * var(--active-ratio, 1.777777))); }
.kh-sequence-slide { width: 100%; }
@media (max-width: 640px) {
  .kh-sequence-stage { width: min(100%, calc(75svh * var(--active-ratio, 1.777777))); }
  .kh-sequence-slide { width: 100%; }
}

.kh-sequence-work { position: absolute; inset: 0; z-index: 2; cursor: pointer; }
.kh-sequence-controls { z-index: 3; opacity: .78; }
.kh-sequence-stage .kh-sequence-caption {
  inset: 0;
  display: grid;
  place-items: end start;
  padding: clamp(10px, 2vw, 24px);
  padding-inline-end: 158px;
  background: none;
  pointer-events: none;
  opacity: 0;
}
.kh-sequence-stage .kh-sequence-caption:empty { display: none; }
.kh-page .kh-sequence-caption > h2 {
  margin: 0;
  color: #f4eee3;
  text-align: left;
  font: 400 clamp(23px, calc(3vw + 1px), 43px)/1.2 'Pinyon Script', 'EB Garamond', serif;
  letter-spacing: .03em;
}
.kh-sequence-stage:has(.kh-sequence-work:focus-visible) .kh-sequence-slide:not(.kh-sequence-leaving) .kh-sequence-caption,
.kh-sequence-stage:not(.kh-sequence-playing):hover .kh-sequence-slide:not(.kh-sequence-leaving) .kh-sequence-caption {
  animation: none;
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .kh-sequence-stage .kh-sequence-slide .kh-sequence-caption { animation: none; opacity: 1; }
}

.kh-sequence-outgoing {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: var(--outgoing-width);
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

@font-face {
  font-family: 'Pinyon Script';
  src: url('/fonts/pinyon-script/PinyonScript-Regular.ttf') format('truetype');
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}
.kh-header .kh-name {
  font: 400 clamp(22px, calc(2.4vw + 1px), 32px)/1.2 'Pinyon Script', 'EB Garamond', serif;
  text-transform: none;
  letter-spacing: .02em;
}
.kh-header .kh-nav { font-size: 14px; }

.kh-sequence-slide > img,
.kh-sequence-outgoing {
  mask: url('/project-media/cover-mist.svg?v=2') center / 100% 100% no-repeat;
}
.kh-sequence-stage .kh-sequence-caption {
  place-items: center;
  padding: 12%;
}
.kh-page .kh-sequence-caption > h2 {
  color: #fff;
  position: absolute;
  left: var(--title-x);
  top: var(--title-y);
  translate: -50% -50%;
  width: max-content;
  max-width: 72%;
  font-family: 'Pinyon Script', 'EB Garamond', serif;
  font-style: normal;
  letter-spacing: .03em;
  font-size: clamp(16px, calc(var(--title-size) + 1px), 30px);
  text-align: center;
  filter: none;
  text-shadow: 0 1px 3px rgb(15 14 12 / 45%), 0 0 15px rgb(15 14 12 / 42%);
}
.kh-sequence-slide[data-film="verdauung"] { --title-size: 2.25vw; --title-x: 24%; --title-y: 30%; --drift-x: -4px; --drift-y: 5px; }
.kh-sequence-slide[data-film="resistance"] { --title-size: 2vw; --title-x: 61%; --title-y: 33%; --drift-x: 0px; --drift-y: 0px; }
.kh-sequence-slide[data-film="justified-inactivity"] { --title-size: 2.15vw; --title-x: 73%; --title-y: 37%; --drift-x: 23px; --drift-y: -14px; }
.kh-sequence-slide[data-film="yang-yang"] { --title-size: 2.35vw; --title-x: 24%; --title-y: 34%; --drift-x: -12px; --drift-y: -9px; }
.kh-sequence-slide[data-film="katastrofa"] { --title-size: 2.2vw; --title-x: 80%; --title-y: 16%; --drift-x: -25px; --drift-y: 2px; }
.kh-sequence-slide[data-film="news-from-borussia"] { --title-size: 2.2vw; --title-x: 24%; --title-y: 35%; --drift-x: -16px; --drift-y: -12px; }
.kh-sequence-controls {
  right: clamp(8px, 8%, 100px);
  bottom: clamp(4px, 5%, 60px);
  gap: 4px;
}
.kh-sequence-controls button {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #2d2823;
}
.kh-sequence-controls button::before {
  content: "";
  display: block;
  filter: drop-shadow(0 0 3px #fff);
}
.kh-sequence-controls [data-sequence-step] {
  color: #24201c;
  background: rgb(255 250 240 / 88%);
  border-radius: 50%;
}
.kh-sequence-controls [data-sequence-step]::before { content: none; }
.kh-sequence-controls [data-sequence-step] svg { pointer-events: none; }
.kh-sequence-play[aria-pressed="false"]::before {
  
  border-left: 10px solid;
  margin-left: 2px;
}
.kh-sequence-play[aria-pressed="true"]::before {
  width: 10px;
  height: 12px;
  border-inline: 3px solid;
}
@keyframes kh-title-drift {
  0% { transform: translate(0, 0); }
  to { transform: translate(calc(var(--drift-x) * 2.5), calc(var(--drift-y) * 2.5)); }
}
@media (prefers-reduced-motion: reduce) {
  .kh-sequence-playing .kh-sequence-slide:not([hidden]) .kh-sequence-caption > h2 { animation: none; }
}

/* Keep different image ratios centred on a single, stable stage. */
.kh-cover .kh-sequence-stage {
  width: min(100%, 1440px, calc(78svh * 16 / 9));
  aspect-ratio: 16 / 9;
}
.kh-sequence-stage .kh-sequence-slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100%, calc(100% * var(--frame-ratio) * 9 / 16));
  transform: translate(-50%, -50%);
}
.kh-sequence-stage .kh-sequence-leaving {
  z-index: 1;
  pointer-events: none;
}
.kh-sequence-stage:not(.kh-sequence-playing) .kh-sequence-caption {
  transition: opacity .75s ease;
}
@media (prefers-reduced-motion: reduce) {
  .kh-sequence-playing .kh-sequence-ready .kh-sequence-caption > h2 { animation: none; }
}

.kh-sequence-stage { isolation: isolate; }
.kh-sequence-stage .kh-sequence-light {
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;
  mask: radial-gradient(ellipse 44% 58% at 26% 47%, #000 12%, transparent 97%);
}

.kh-cast-portraits {
  margin-block: clamp(2rem, 5vw, 4rem);
}
.kh-cast-portraits h3,
.kh-cast-portraits p {
  margin: 0 0 .5rem;
}
.kh-portrait-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 1rem;
}
.kh-portrait-grid img {
  display: block;
  width: 100%;
  height: auto;
}

.kh-sequence-slide[data-film="rosebud"] { --title-size: 2.2vw; --title-x: 20%; --title-y: 63%; --drift-x: -4px; --drift-y: -3px; }
.kh-sequence-slide[data-film="agreement"] { --title-size: 2.2vw; --title-x: 24%; --title-y: 38%; --drift-x: 10px; --drift-y: -8px; }
.kh-sequence-slide[data-film="landscape-of-fear"] { --title-size: 2.2vw; --title-x: 24%; --title-y: 37%; --drift-x: 10px; --drift-y: -8px; }

.kh-header .kh-name {
  margin-inline-start: clamp(11px, calc(3vw + 5px), 53px);
  transform: translateY(10px);
}

.kh-header .kh-name img {
  display: block;
  width: clamp(83px, 8.5vw, 114px);
  height: auto;
}

.kh-page .kh-sequence-slide[data-film="verdauung"] .kh-sequence-caption > h2 {
  left: 20%;
  top: 28%;
  width: clamp(64px, 15%, 164px);
  filter: drop-shadow(0 0 2px rgb(255 255 255 / 48%))
          drop-shadow(0 0 6px rgb(255 255 255 / 36%))
          drop-shadow(0 1px 2px rgb(15 14 12 / 40%));
}
.kh-sequence-caption > h2 img {
  display: block;
  width: 100%;
  height: auto;
}

.kh-page .kh-sequence-caption > .kh-handwritten-title {
  width: clamp(64px, var(--handwritten-width, 15%), var(--handwritten-max, 164px));
  filter: drop-shadow(0 0 2px rgb(255 255 255 / 48%))
          drop-shadow(0 0 6px rgb(255 255 255 / 36%))
          drop-shadow(0 1px 2px rgb(15 14 12 / 40%));
}
.kh-sequence-stage .kh-sequence-caption { overflow: visible; }
.kh-sequence-slide[data-film="news-from-borussia"] {
  --handwritten-width: 18%;
  --handwritten-max: 188px;
  --title-x: 17%;
}
.kh-sequence-slide[data-film="yang-yang"] {
  --handwritten-width: 14%;
  --handwritten-max: 152px;
  --title-x: 15%;
}
.kh-sequence-slide[data-film="rosebud"] { --handwritten-width: 13%; --handwritten-max: 140px; }
.kh-sequence-slide[data-film="agreement"] { --handwritten-width: 15%; --handwritten-max: 158px; }
.kh-sequence-slide[data-film="resistance"] {
  --handwritten-width: 14%;
  --handwritten-max: 170px;
  --title-x: 63%;
  --title-y: 35%;
}

html[lang="pl"] .kh-handwritten-title [data-title-lang="en"],
html[lang="en"] .kh-handwritten-title [data-title-lang="pl"] {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  .kh-sequence-playing .kh-sequence-ready[data-film="resistance"] .kh-sequence-caption {
    mask-image: linear-gradient(to right, #000 73%, transparent 83%);
  }
  .kh-sequence-playing .kh-sequence-ready[data-film="resistance"] .kh-handwritten-title {
    animation: kh-title-into-hair var(--title-drift-span) linear both;
  }
}

@keyframes kh-title-into-hair {
  0% { left: var(--title-x); opacity: 1; }
  72% { opacity: 1; }
  100% { left: 83%; opacity: 0; }
}

.kh-landscape-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  align-items: start;
  gap: clamp(16px, 4vw, 48px);
  margin-block: 2rem;
}
.kh-landscape-images figure { margin: 0; }
.kh-landscape-images img { display: block; width: 100%; height: auto; }

/* Place each title in the open space of its own frame. */
.kh-sequence-slide[data-film="justified-inactivity"] { --title-x: 76%; --title-y: 79%; --drift-x: -3px; --drift-y: -4px; }
.kh-sequence-slide[data-film="yang-yang"] { --title-x: 21%; --title-y: 62%; --drift-x: 3px; --drift-y: -4px; }
.kh-sequence-slide[data-film="katastrofa"] { --title-x: 77%; --title-y: 14%; --drift-x: -4px; --drift-y: 2px; }
.kh-sequence-slide[data-film="news-from-borussia"] { --title-x: 20%; --title-y: 21%; --drift-x: 2px; --drift-y: 3px; }
.kh-sequence-slide[data-film="agreement"] { --title-x: 69%; --title-y: 43%; --drift-x: 0px; --drift-y: -4px; }
.kh-sequence-slide[data-film="landscape-of-fear"] { --title-x: 23%; --title-y: 77%; --drift-x: 4px; --drift-y: 0px; }

.kh-page .kh-sequence-slide .kh-sequence-caption > h2 {
  filter: none;
  text-shadow: 0 1px 3px rgb(15 14 12 / 65%), 0 0 6px rgb(255 255 255 / 35%);
}
.kh-page .kh-sequence-slide .kh-handwritten-title {
  filter: drop-shadow(0 0 5px rgb(255 255 255 / 36%)) drop-shadow(0 1px 2px rgb(15 14 12 / 55%));
}
@media (prefers-reduced-motion: no-preference) {

  .kh-sequence-playing .kh-sequence-ready:not([data-film="resistance"]) .kh-sequence-caption > h2 {
    animation: kh-title-drift var(--title-drift-span, 10s) linear both;
  }
}
@media (max-width: 640px) {
  .kh-sequence-slide[data-film="landscape-of-fear"] { --title-x: 29%; }
  .kh-sequence-slide[data-film="justified-inactivity"] { --title-x: 69%; }
}

.kh-sequence-playing .kh-sequence-ready .kh-sequence-caption { opacity: 1; }

.kh-sequence-slide[data-film="batrachomyomachia"] { --title-size: 2vw; --title-x: 66%; --title-y: 33%; --drift-x: -3px; --drift-y: 3px; }

.kh-sequence-playing .kh-sequence-ready[data-film="batrachomyomachia"] .kh-sequence-caption > h2 {
  animation: none;
}

.kh-film-index-gallery > a[href="#batrachomyomachia"] img:hover {
  filter: none;
}

.kh-film-index-gallery > .kh-index-image { position: relative; }
.kh-film-index-gallery > a > .kh-index-handwriting {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
}
.kh-film-index-gallery .kh-index-handwriting > img {
  display: block;
  width: auto;
  height: clamp(23px, 4.4vw, 46px);
  max-width: 94%;
  object-fit: contain;
  filter: brightness(0);
}

/* Touch screens keep the title visible. Pointer and keyboard reveal it on demand. */
.kh-film-index-gallery > a > .kh-index-handwriting {
  background: rgb(255 255 255 / 82%);
}
@media (hover: hover) and (pointer: fine) {
  .kh-film-index-gallery > a > .kh-index-handwriting {
    opacity: 0;
    transition: opacity .3s ease;
  }
  .kh-film-index-gallery > a:is(:hover, :focus-visible) > .kh-index-handwriting {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .kh-film-index-gallery > a > .kh-index-handwriting { transition: none; }
}

.kh-film-index-gallery > .kh-index-image > span:not(.kh-index-handwriting) {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 7px 9px;
  color: white;
  background: linear-gradient(transparent, rgb(0 0 0 / 65%));
}
@media (max-width: 360px) {
  .kh-film-index-gallery .kh-index-handwriting > img { height: 20px; }
}

/* Compensate for tall flourishes around the letterforms. */
.kh-film-index-gallery > a:is([href="#rosebud"], [href="#agreement"], [href="#yang-yang"]) .kh-index-handwriting > img {
  height: clamp(28px, 5.3vw, 55px);
}
@media (max-width: 360px) {
  .kh-film-index-gallery > a:is([href="#rosebud"], [href="#agreement"], [href="#yang-yang"]) .kh-index-handwriting > img {
    height: 24px;
  }
}

.kh-sequence-stage .kh-sequence-caption[hidden] { display: none; }

html[lang="pl"] .kh-vacation-catalogue div[lang="en"],
html[lang="en"] .kh-vacation-catalogue div[lang="pl"] { display: none; }
.kh-vacation-catalogue details { margin-block: .65rem; }
.kh-vacation-catalogue summary { cursor: pointer; }

.kh-vacation-media { margin-block: 1.65rem; }
.kh-vacation-media h3 { margin-bottom: .5rem; }
.kh-vacation-documentation { width: 86%; }
@media (max-width: 600px) {
  .kh-vacation-documentation { width: 100%; }
}
.kh-vacation-catalogue-page img {
  display: block;
  width: 100%;
  height: auto;
}
.kh-vacation-catalogue-pages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
  align-items: start;
}
.kh-vacation-catalogue-page {
  margin: 0;
}
.kh-vacation-catalogue-page img {
  border: 1px solid var(--line);
}
.kh-vacation-catalogue-page figcaption {
  margin-top: .6rem;
}
.kh-vacation-catalogue-page h4 {
  margin: 0 0 .4rem;
}
.kh-vacation-catalogue-page summary {
  cursor: pointer;
}
.kh-vacation-press {
  width: min(100%, 640px);
  margin: 1.4rem 0 0;
}
.kh-vacation-press blockquote {
  margin: 0;
  padding-inline-start: 1rem;
  border-inline-start: 1px solid var(--line);
}

.kh-anielskie-media {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  max-width: 750px;
  gap: 1rem;
  align-items: start;
  margin-block: 1.5rem;
}
.kh-anielskie-media > section:first-child { grid-row: span 2; }
.kh-anielskie-media a { display: block; }
.kh-anielskie-media a:not([lang]) { max-width: 205px; }
@media (max-width: 600px) {
  .kh-anielskie-media { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .kh-anielskie-media > section:first-child { grid-row: auto; max-width: 360px; }
}
.kh-anielskie-media img { display: block; width: 100%; height: auto; }
html[lang="pl"] .kh-anielskie-media a[lang="en"],
html[lang="en"] .kh-anielskie-media a[lang="pl"] { display: none; }

.kh-sequence-stage .kh-cover-verse {
  inset: auto 6% 4% auto;
  width: 43%;
  display: block;
  padding: 0;
  mask-image: none;
  opacity: 1;
}
.kh-cover-verse > svg {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  filter: drop-shadow(0 1px 2px rgb(0 0 0 / 45%));
}
.kh-sequence-slide:nth-of-type(even) .kh-cover-verse {
  right: auto;
  left: 6%;
}
@media (max-width: 640px) {
  .kh-sequence-stage .kh-cover-verse { width: 54%; bottom: 8%; }
}
.kh-sequence-playing .kh-sequence-ready[data-film="resistance"] .kh-cover-verse {
  mask-image: none;
}

@media (prefers-reduced-motion: no-preference) {
  .kh-sequence-ready .kh-cover-verse rect {
    transform-box: fill-box;
    transform-origin: left center;
    animation: kh-cover-write 3.6s linear both;
    animation-delay: var(--verse-delay, .45s);
  }
}
@keyframes kh-cover-write {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.kh-sequence-slide[data-film="agreement"] .kh-cover-verse {
  inset: 14% 5% auto auto;
}

.kh-sequence-stage .kh-sequence-slide[data-film="katastrofa"] .kh-cover-verse {
  inset: 0 auto auto 18%;
  width: 37%;
}
.kh-sequence-slide[data-film="katastrofa"] .kh-cover-verse > svg {
  filter: drop-shadow(0 1px 2px rgb(15 14 12 / 85%)) drop-shadow(0 0 3px rgb(15 14 12 / 50%));
}


.kh-cover-source {
  margin: .4rem 0 0;
  color: #55504a;
  font-size: 12px;
  text-align: center;
}

/* Keep the title, image and text distinct on work pages. */
.kh-main [data-work].kh-film-feature {
  --work-section-space: clamp(24px, 4vw, 54px);
  padding-block: clamp(30px, 5vw, 72px) clamp(42px, 6vw, 80px);
  row-gap: clamp(16px, 2vw, 26px);
}
.kh-main [data-work] .kh-film-heading h2 { margin-bottom: .65rem; }
/* The work grid supplies the gap after media, including its caption. */
.kh-main [data-work] > :is(.kh-still-viewer, .kh-landscape-images, .kh-film-excerpt) {
  margin-block-end: 0;
}
.kh-main [data-work] > figure figcaption { margin-top: .55rem; }
#voices-from-the-forest > figure > figcaption { max-width: 62ch; }
#voices-from-the-forest > .kh-voices-note + .kh-film-copy {
  margin-block-start: max(0px, calc(var(--work-section-space) - clamp(16px, 2vw, 26px)));
}
#voices-from-the-forest .kh-film-copy > h3 {
  font-weight: 700;
}
#voices-from-the-forest .kh-film-copy > h3 + :is(p, ul) {
  margin-top: 1.15rem;
}
#voices-from-the-forest .kh-landscape-images {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(4px, 1vw, 12px);
  margin-block-start: clamp(16px, 3vw, 32px);
}
#voices-from-the-forest .kh-landscape-images img {
  aspect-ratio: 1059 / 1500;
  object-fit: cover;
}
#batrachomyomachia .kh-film-excerpt { width: 100%; }
#batrachomyomachia .kh-still-stage { aspect-ratio: 1.66; }
#batrachomyomachia .kh-still-stage img { object-position: center; }
#batrachomyomachia .kh-film-synopsis {
  margin-block: clamp(16px, 3vw, 38px) clamp(12px, 2vw, 24px);
}

.kh-main [data-work] :is(.kh-film-copy, section) > :is(p, details, ul) + :is(h3, h4) {
  margin-top: var(--work-section-space);
}
.kh-main [data-work] :is(.kh-film-copy, section) > :is(h3, h4) + :is(p, ul, figure) {
  margin-top: .75rem;
}
.kh-main [data-work] .kh-film-copy p + p { margin-top: 1.2rem; }
.kh-main [data-work] > .kh-vacation-media { margin-block: .5rem 1rem; }
.kh-main [data-work] > .kh-work-arrows { margin-top: clamp(16px, 3vw, 36px); }

.kh-related-work {
  width: min(100%, 640px);
  
  padding-top: 1rem;
  margin-top: 1rem;
}
.kh-related-work a {
  display: grid;
  grid-template-columns: minmax(84px, 144px) 1fr;
  align-items: center;
  gap: .85rem;
}
.kh-related-work img { aspect-ratio: 16 / 9; object-fit: cover; }
.kh-related-work p { margin-top: .75rem; max-width: 62ch; }
.kh-voices-note { margin-top: .75rem; }
@media (hover: none), (pointer: coarse), (max-width: 640px) {
  .kh-film-index-gallery > .kh-index-image > span {
    position: static;
    display: block;
    padding: .3rem .4rem .55rem;
    color: var(--ink);
    background: none;
    opacity: 1;
  }
  .kh-film-index-gallery .kh-index-handwriting > img {
    height: clamp(26px, 7vw, 46px);
    margin-inline: auto;
  }
}
@media (max-width: 640px) {
  .kh-sequence-stage .kh-cover-verse { width: 64%; }
  .kh-sequence-slide[data-film="agreement"] .kh-cover-verse { width: 53%; }
  .kh-sequence-controls { right: 4px; bottom: 0; gap: 0; }
  .kh-sequence-controls button { width: 44px; height: 44px; }
}

.kh-work-handwriting > img,
.kh-writing-handwritten img {
  display: block;
  width: auto;
  height: clamp(43px, 8vw, 88px);
  max-width: min(100%, 440px);
  object-fit: contain;
  object-position: left center;
  filter: brightness(0);
}

.kh-work-handwriting > img[src*="anielskie-siostry"],
.kh-work-handwriting > img[src*="justified-inactivity-pl"] {
  height: clamp(64px, 11vw, 120px);
}

/* Give the two-line Angelic Sisters lettering the same visual weight as single-line titles. */
.kh-film-index-gallery > a[href="#anielskie-siostry-jasnowidzki"] .kh-index-handwriting > img {
  height: clamp(42px, 7vw, 76px);
}

.kh-cv {
  grid-column: 1 / -1;
  width: min(100%, 740px);
}
.kh-cv summary { cursor: pointer; width: fit-content; }
.kh-cv > section { margin-block: 1.5rem; }
.kh-cv ul { padding-inline-start: 1.25rem; }
.kh-cv li + li { margin-top: .55rem; }

@media (max-width: 760px) {
  .kh-opening { grid-template-columns: minmax(0, 1fr); }
  .kh-about-art { width: min(90%, 380px); }
}

@media (min-width: 761px) {
  .kh-opening { padding-top: clamp(42px, 6vw, 80px); }
  .kh-about {
    margin-block-start: clamp(44px, 6vw, 78px);
    margin-inline-start: clamp(24px, 4vw, 56px);
  }
  .kh-cv { margin-inline-start: clamp(24px, 4vw, 56px); }
}

.kh-writing {
  width: min(100%, 1000px);
  margin-inline: auto;
  padding-block: clamp(30px, 6vw, 74px);
}
.kh-writing > article > h3 { margin-bottom: clamp(26px, 4vw, 48px); }
.kh-writing-photos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.035fr);
  gap: 0;
  margin-top: clamp(18px, 3vw, 32px);
}
.kh-writing-photos figcaption { margin-top: .55rem; }
.kh-writing > article > .kh-writing-note { margin-top: clamp(12px, 1.6vw, 18px); max-width: 58ch; }
.kh-writing-contact { margin-top: clamp(36px, 7vw, 70px); }

.kh-writing-quotation { margin: clamp(2.75rem, 5vw, 4.5rem) 0 .5rem; }
.kh-writing-quotation figcaption { margin-top: .75rem; }
.kh-substack-excerpt {
  margin: 0;
  font-style: italic;
  font-size: 15px;
  line-height: 1.7;
}

.kh-writing-nav { display: flex; flex-wrap: wrap; gap: .55rem 1.5rem; }
.kh-writing-nav a { text-decoration: underline; text-underline-offset: .25em; }
.kh-writing-footer { margin-top: clamp(64px, 9vw, 120px); }

@media (min-width: 701px) {
  .kh-substack-excerpt { column-count: 2; column-gap: clamp(30px, 5vw, 72px); }
  .kh-excerpt-second-column { break-before: column; }
  .kh-substack-excerpt p:last-child { break-inside: avoid; }
}

#writing-revisions { width: 100%; }
#writing-revisions > :not(.kh-writing-feature),
#writing-revisions .kh-writing-feature > :not(.kh-writing-photos) {
  display: block;
  width: min(100%, 1000px);
  margin-inline: auto;
}
#writing-revisions > .kh-writing-nav { display: flex; }

.kh-revisions-excerpt {
  max-width: 64ch;
  margin: 0;
  font-style: italic;
}

.kh-writing-intro { max-width: 62ch; margin-bottom: clamp(24px, 4vw, 46px); }

#writing {
  width: min(100%, 940px);
  padding-block-start: clamp(46px, 8vw, 110px);
}
@media (min-width: 761px) {
  #writing {
    padding-block-start: clamp(86px, 12vw, 158px);
    padding-inline-start: clamp(24px, 4vw, 56px);
  }
}

.kh-writing-nav { align-items: center; }

.kh-writing-handwritten a { display: inline-block; max-width: 100%; }
.kh-writing-handwritten img { filter: none; }

/* Multi-line lettering uses the same scale as taller film titles. */
.kh-writing-handwritten img {
  height: clamp(72px, 11vw, 120px);
  max-width: min(100%, 440px);
  object-position: left center;
}

#writing .kh-writing-nav {
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(14px, 3vw, 28px);
}
#writing .kh-writing-nav > a { max-width: 100%; }
