:root {
  color-scheme: dark;
  --ink: #101113;
  --paper: #f4f0e9;
  --quiet: #b6b3af;
  --line: #363639;
  --signal: #e0b783;
  --mono: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --display: 'Avenir Next Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --gutter: clamp(18px, 3.4vw, 64px);
}
* { box-sizing: border-box; }
html { background: var(--ink); }
body { margin: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; color: var(--paper); font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
a { color: inherit; }
a:focus-visible, summary:focus-visible, video:focus-visible, .feed:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
i { color: var(--signal); font-style: normal; }
.mast {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 68px;
  padding: 0 var(--gutter); gap: 12px; border-bottom: 1px solid var(--line); background: #111214; z-index: 1;
}
.brand, .mast nav { display: flex; align-items: center; }
.brand { justify-self: start; min-height: 46px; gap: 10px; font: 800 17px/1 var(--display); letter-spacing: .09em; text-decoration: none; white-space: nowrap; }
.brand b { color: var(--signal); }
.edition { font: 11px/1.3 var(--mono); letter-spacing: .15em; color: var(--quiet); }
.mast nav { justify-content: end; gap: clamp(12px, 2vw, 30px); }
.mast nav a { min-height: 44px; display: flex; align-items: center; gap: 4px; font-size: 13px; text-decoration: none; white-space: nowrap; }
.mast nav a span, .mast nav a:hover { color: var(--signal); }

.feed { flex: 1; min-height: 0; overflow: auto; scroll-snap-type: y mandatory; scroll-behavior: smooth; }
.feed:focus-visible { outline-offset: -3px; }
.reel, .closing, .credits { scroll-snap-align: start; }
.reel { scroll-snap-stop: always; display: grid; align-items: center; min-height: calc(100vh - 68px); min-height: calc(100dvh - 68px); padding: 32px var(--gutter); }
.fire { --signal: #efbc7a; --glow: #32221b; }
.deep { --signal: #a9d9eb; --glow: #142934; }
.charge { --signal: #ddd1ff; --glow: #241e30; }
.inky, .glass { --signal: #d2d7bd; --glow: #222820; }
.mannequin { --signal: #f0bbce; --glow: #33202b; }
.jelly, .fractal { --signal: #a9d9eb; --glow: #142934; }
.machine { --signal: #efbc7a; --glow: #292624; }
.pigment, .sintel { --signal: #ddd1ff; --glow: #241e30; }
.reel { background: radial-gradient(ellipse at 27% 45%, var(--glow), transparent 69%), var(--ink); }
.exhibit {
  width: 100%; max-width: 1500px; margin: auto; min-width: 0; display: grid; align-items: center;
  grid-template-columns: minmax(0, 2.8fr) minmax(230px, 1fr);
  grid-template-areas: 'plate copy' 'screen copy' 'caption copy' 'foot foot';
  column-gap: clamp(28px, 4vw, 66px);
}
.plate, .stage-caption, .reel-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font: 11px/1.4 var(--mono); letter-spacing: .075em; color: var(--quiet);
}
.plate { grid-area: plate; padding-bottom: 10px; }
.plate > span:last-child { text-align: right; }
.plate > span:first-child, .reel-foot b { color: var(--signal); font-weight: 600; }
.screen { grid-area: screen; background: #090a0c; border: 1px solid #565158; display: grid; place-items: center; min-width: 0; min-height: 110px; }
.pigment .screen video { aspect-ratio: 712/532; }
.screen video { display: block; width: 100%; max-height: 68dvh; aspect-ratio: 16/9; object-fit: contain; background: #08090b; }
.screen-portrait { background: linear-gradient(90deg, #131613, #090a0b 39%, #090a0b 61%, #131613); }
.screen-portrait video { aspect-ratio: 9/16; width: auto; height: min(66dvh, 680px); max-height: none; max-width: 100%; }
.stage-caption { grid-area: caption; padding-top: 10px; }
.stage-caption span:last-child { text-align: right; white-space: nowrap; }
.copy { grid-area: copy; align-self: center; min-width: 0; }
.kind { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; color: var(--quiet); font: 11px/1.2 var(--mono); letter-spacing: .06em; }
.kind b { border: 1px solid var(--signal); color: var(--signal); padding: 4px 7px; letter-spacing: .09em; }
.copy h1, .copy h2 { margin: 0; font: 800 clamp(39px, 5.1vw, 90px)/.94 var(--display); letter-spacing: -.026em; text-transform: uppercase; text-wrap: balance; overflow-wrap: break-word; }
.inky h2 { font-size: clamp(35px, 4.4vw, 72px); }
.context, .reveal, .lenses { color: var(--quiet); font-size: 15px; margin: 20px 0 0; }
.step {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 47px; margin-top: 23px;
  border-top: 1px solid var(--line); color: var(--signal); text-decoration: none; font: 12px/1.3 var(--mono);
}
.step:hover span { text-decoration: underline; text-underline-offset: 4px; }
.step b { font: 20px/1 sans-serif; }
.reveal summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 8px; border: 1px solid var(--line); cursor: pointer; color: var(--paper); font: 12px/1.2 var(--mono); }
.reveal summary::-webkit-details-marker { display: none; }
.reveal summary::after { content: '+'; color: var(--signal); font-size: 17px; }
.reveal[open] summary::after { content: '−'; }
.reveal p { margin: 7px 0 0; }
.lenses { border: 0; padding: 0; min-width: 0; }
.lenses legend { padding: 0; margin-bottom: 4px; font: 11px/1.4 var(--mono); color: var(--quiet); }
.lenses input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.lenses label { display: inline-grid; place-items: center; min-height: 44px; min-width: 76px; margin-right: 5px; padding: 0 8px; color: var(--paper); border: 1px solid var(--line); cursor: pointer; font: 12px/1 var(--mono); }
.lenses input:focus-visible + label { outline: 2px solid var(--signal); outline-offset: 2px; }
.lenses input:checked + label { background: var(--signal); border-color: var(--signal); color: #101113; }
.lenses p { margin: 8px 0 0; }
.lens-story, .lens-frame { display: none; }
#lens-story:checked ~ .lens-story, #lens-frame:checked ~ .lens-frame { display: block; }
.reel-foot { grid-area: foot; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 24px; }
.reel-foot b { margin-left: 4px; }

.closing, .credits { padding: clamp(32px, 7vw, 100px) var(--gutter); }
.closing { background: radial-gradient(ellipse at 24% 0%, #32251b, #141315 76%); min-height: min(420px, 85dvh); }
.closing-kicker { margin: 0 0 12px; color: var(--quiet); font: 12px/1.4 var(--mono); letter-spacing: .1em; }
.closing h2, .credits h2 { margin: 0; font: 800 clamp(37px, 8vw, 108px)/.98 var(--display); letter-spacing: -.025em; text-transform: uppercase; }
.closing p:not(.closing-kicker) { margin: 16px 0 22px; color: var(--quiet); }
.closing-links { display: flex; flex-wrap: wrap; gap: 10px; }
.closing-links a { display: inline-flex; gap: 10px; align-items: center; padding: 0 10px; min-height: 44px; border: 1px solid var(--line); text-decoration: none; font: 12px/1.4 var(--mono); }
.closing-links a:first-child { background: var(--signal); color: var(--ink); }
.closing-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.credits { background: #0d0e10; border-top: 1px solid var(--line); }
.credits h2 { font-size: clamp(37px, 5vw, 76px); }
.credits dl { margin: 26px 0; max-width: 1050px; }
.credits dl div { padding: 13px 0; display: grid; grid-template-columns: 1fr 1.8fr; gap: 10px; border-top: 1px solid var(--line); }
.credits dt { font-weight: 700; }
.credits dd { margin: 0; color: var(--quiet); font-size: 14px; }
.credits dd a { text-underline-offset: 3px; }
.colophon { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; border-top: 1px solid var(--line); padding-top: 15px; font-size: 13px; color: var(--quiet); }
.colophon b { color: var(--paper); font-family: var(--mono); }
.colophon a { min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 3px; }

@media (max-width: 900px) {
  .mast { min-height: 56px; grid-template-columns: minmax(0, 1fr) auto; }
  .edition { display: none; }
  .brand { font-size: 15px; gap: 7px; }
  .brand img { width: 26px; height: 26px; }
  .reel { min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px); padding: 12px var(--gutter) 15px; }
  .reel { background: radial-gradient(ellipse at 48% 32%, var(--glow), transparent 74%), var(--ink); }
  .exhibit {
    align-self: stretch; margin: 0 auto; max-width: 660px; align-items: stretch;
    grid-template: 'plate' auto 'screen' minmax(0, 1fr) 'caption' auto 'copy' auto 'foot' auto / minmax(0, 1fr);
  }
  .plate, .stage-caption { font-size: 10px; letter-spacing: .04em; }
  .screen { margin-inline: calc(-1 * var(--gutter)); border-inline: 0; }
  .screen video { max-height: 55dvh; }
  .screen-portrait video { height: min(51dvh, 515px); max-height: none; }
  .stage-caption { padding-top: 8px; }
  .copy { margin-top: 14px; }
  .copy h1, .copy h2, .inky h2 { font-size: clamp(36px, 10.4vw, 62px); text-wrap: initial; }
  .copy h1 br, .copy h2 br { display: none; }
  .kind { margin-bottom: 8px; font-size: 10px; }
  .context, .reveal, .lenses { margin-top: 9px; font-size: 14px; }
  .step { margin-top: 9px; min-height: 44px; }
  .reel-foot { margin-top: 1px; padding-top: 8px; font-size: 10px; letter-spacing: .02em; }
  .reel-foot > span:first-child { display: none; }
}
@media (max-width: 900px) and (max-height: 670px) {
  .reel { padding-block: 8px; }
  .plate { padding-bottom: 6px; }
  .screen video { max-height: 34dvh; }
  .screen-portrait video { width: 100%; height: 37dvh; max-height: none; background: transparent; }
  .reel-foot { display: none; }
  .copy { margin-top: 8px; }
  .copy h1, .copy h2, .inky h2 { font-size: clamp(27px, 8.5vw, 44px); }
  .kind { margin-bottom: 5px; }
  .context, .reveal, .lenses { margin-top: 6px; }
}
@media (max-width: 520px) {
  .credits dl div { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 540px) {
  .mast nav .reel-link { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .feed { scroll-behavior: auto; scroll-snap-type: y proximity; }
}

/* The mobile matte extends the color of the still, never the moving frame. */
@media (max-width: 900px) {
  .fire { --still: url("../images/032j-01-ocean.jpg"); }
  .deep { --still: url("../images/032j-02-wall.jpg"); }
  .charge { --still: url("../images/032j-03-planet-eaters.jpg"); }
  .mannequin { --still: url("../images/032j-05-dark-water.jpg"); }
  .jelly { --still: url("../images/032j-06-leshy.jpg"); }
  .machine { --still: url("../images/032j-07-sleeping-titans.jpg"); }
  .glass { --still: url("../images/032j-08-rolling-giant.jpg"); }
  .sintel { --still: url("../images/032j-10-moon-wakes.jpg"); }
  .pigment { --still: url("../images/032j-09-sea-eater.jpg"); }
  .fractal { --still: url("../images/032j-11-the-abyss.jpg"); }
  .screen:not(.screen-portrait) { position: relative; overflow: clip; isolation: isolate; }
  .screen:not(.screen-portrait)::before {
    content: ""; position: absolute; inset: -28px; z-index: -1;
    background: var(--still) center / cover no-repeat; filter: blur(24px) saturate(.75); opacity: .35;
  }
}
@media (max-width: 900px) and (max-height: 670px) {
  .screen:not(.screen-portrait) video { max-height: 42dvh; }
}

/* Keep fragment jumps inside the reel, not on the document viewport. */
html, body { overflow: clip; }
@media (min-width: 901px) {
  .charge h2 { font-size: clamp(37px, 4.55vw, 82px); }
}
.feed { position: relative; }

/* Language only changes inline copy; media and interaction elements stay mounted. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.t-es, .t-ru,
body:has(#language-es:checked) .t-en,
body:has(#language-ru:checked) .t-en { display: none; }
body:has(#language-es:checked) .t-es,
body:has(#language-ru:checked) .t-ru { display: inline; }
.copy :is(h1,h2) > .t-es { font-size: .94em; }
.copy :is(h1,h2) > .t-ru { font-size: .83em; }
.language-menu { position: relative; font: 12px/1.2 var(--mono); }
.language-menu summary {
  display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 8px 0 11px;
  border-inline-start: 1px solid var(--line); cursor: pointer; list-style: none; color: var(--paper);
}
.language-menu summary::-webkit-details-marker { display: none; }
.language-arrow { font-size: 15px; color: var(--signal); }
.language-menu[open] .language-arrow { transform: rotate(180deg); }
.language-menu fieldset {
  position: absolute; inset-block-start: calc(100% + 5px); inset-inline-end: 0;
  min-inline-size: 154px; margin: 0; padding: 5px; border: 1px solid var(--line);
  background: #111214; box-shadow: 0 8px 22px #0008;
}
.language-menu label {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 44px; padding: 0 10px; color: var(--quiet); cursor: pointer; white-space: nowrap;
}
.language-menu label:hover { background: #252429; color: var(--paper); }
.language-menu label:has(:checked) { color: var(--paper); background: #232026; }
.language-menu label:has(:focus-visible) { outline: 2px solid var(--signal); outline-offset: -2px; }
.language-menu input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.language-tick { color: var(--signal); visibility: hidden; }
.language-menu input:checked ~ .language-tick { visibility: visible; }
.credits dd { overflow-wrap: anywhere; }

/* Help Safari distinguish fully off-screen videos from the current reel. */
@supports (animation-timeline: view()) {
  .screen video {
    animation: reel-visibility 1ms step-end both;
    animation-timeline: view(block);
  }
  @keyframes reel-visibility {
    0%, 97%, 100% { visibility: hidden; }
    3%, 96.99% { visibility: visible; }
  }
}
