/* Diatype Variable Font */
@font-face {
  font-family: 'Diatype';
  src: url('/assets/DiatypeVariable.woff2') format('woff2-variations');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --size: 390;
}
@media (min-width: 650px) {
  :root {
    --size: 1500;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

::before,
::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  max-height: 100%;
  min-height: 100%;
  overflow: hidden;
  position: fixed;
  touch-action: none;
  width: 100%;
  background: #000;
  color: #fff;
  font-family: 'Diatype', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

html {
  font-size: clamp(5px, 20px, 10 * 100vw / var(--size));
  -webkit-text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.4;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

/* Grabbing cursor states */
html.grabbable, html.grabbable * {
  cursor: grab;
}
html.grabbing, html.grabbing * {
  cursor: grabbing !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

/* WebGL canvas layer */
.gl {
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: 10;
}
.gl canvas {
  inset: 0;
  position: absolute;
  width: 100%;
  height: 100%;
  display: block;
}

/* Label styling matching Jesper Landberg */
.label {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Four corners navigation */
.chrome {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 4rem;
}
@media (min-width: 650px) {
  .chrome {
    padding: 4rem 8rem;
  }
}

.chrome-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.chrome-bottom {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.chrome a,
.chrome button {
  pointer-events: auto;
  position: relative;
  transition: opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.chrome a::before,
.chrome button::before {
  content: "";
  position: absolute;
  inset: -1.5rem;
}

.chrome a:hover,
.chrome button:hover {
  opacity: 0.6;
}

.nav-views {
  display: flex;
  gap: 0.5rem;
}

.nav-views a.active {
  opacity: 1;
}
.nav-views a:not(.active) {
  opacity: 0.5;
}

/* Main gallery container */
main.gallery-main {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 20;
  pointer-events: none;
}

.gallery-track {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Gallery cards in DOM */
.gallery-card {
  position: absolute;
  top: 0;
  left: 0;
  visibility: hidden;
  cursor: pointer;
  pointer-events: auto;
  border-radius: 1.5rem;
  overflow: visible;
  touch-action: none;
  user-select: none;
  will-change: transform;
}
.ribbon-ready .card-caption {
  /* The readable text remains in the DOM; visible ink is drawn on the card. */
  opacity: 0;
}
.flat-gallery .gallery-card {
  overflow: hidden;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}
.flat-gallery .gallery-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(transparent 55%, rgb(0 0 0 / 70%));
}
@media (min-width: 650px) {
  .gallery-card {
    border-radius: 2rem;
  }
}

.card-caption {
  pointer-events: none;
  position: absolute;
  bottom: 1.8rem;
  left: 2rem;
  right: 2rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  color: #fff;
  z-index: 5;
}
@media (min-width: 650px) {
  .card-caption {
    bottom: 2.5rem;
    left: 2.8rem;
    right: 2.8rem;
  }
}

.caption-text {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-title {
  white-space: nowrap;
  font-size: clamp(1.6rem, 2.08vw, 2.72rem);
  opacity: 0.7;
  letter-spacing: -0.05em;
  font-weight: 500;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.card-subtitle {
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  opacity: 0.85;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.card-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: #000;
  overflow: hidden;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
  flex-shrink: 0;
}
.card-pill svg { width:100%; height:100%; }
.card-pill path { vector-effect:non-scaling-stroke; stroke-width:1px; }
.card-pill .arrow-shaft { transform:translateX(-95%); }
.card-pill .arrow-upper { transform:translate(-67%,-67%); }
.card-pill .arrow-lower { transform:translate(-67%,67%); }
.flat-gallery .card-caption { bottom:1rem; left:1rem; right:1rem; }
@media (min-width:650px) { .flat-gallery .card-caption { left:2rem; right:2rem; } }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .card-pill path { transition:transform .75s cubic-bezier(.16,1,.3,1); }
  .gallery-card:hover .arrow-out { transform:translateX(95%); }
  .gallery-card:hover .arrow-shaft,.gallery-card:hover .arrow-upper,.gallery-card:hover .arrow-lower { transform:none; transition-duration:1s; }
}

/* Modals (Profile & Contact) */
.modal-shield {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 50;
  width: 90vw;
  max-width: 35rem;
  text-align: center;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1), transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), visibility 0.5s;
}
@media (min-width: 650px) {
  .modal-shield {
    max-width: 45rem;
  }
}

.modal-shield.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.modal-bio {
  font-size: 1.4rem;
  line-height: 1.4;
  letter-spacing: -0.02em;
  margin-bottom: 2.5rem;
}
@media (min-width: 650px) {
  .modal-bio {
    margin-bottom: 3rem;
  }
}

.modal-meta {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  opacity: 0.6;
  margin-bottom: 2.5rem;
}
@media (min-width: 650px) {
  .modal-meta {
    margin-bottom: 3rem;
  }
}

.modal-links {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2rem;
}
.modal-links a,
.modal-links button {
  font-size: 1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  pointer-events: auto;
  position: relative;
  transition: opacity 0.2s ease;
}
.modal-links a:hover,
.modal-links button:hover {
  opacity: 0.6;
}

.copy-feedback {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 1rem;
  min-height: 1.2em;
  transition: opacity 0.3s ease;
}

/* White Project Sheet Detail Modal (« Sheet Flight ») */
.project-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1), visibility 0.4s;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.project-sheet-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.project-sheet-container {
  position: absolute;
  inset: 1.5rem;
  background: #fff;
  color: #000;
  border-radius: 2rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  transform: scale(0.96) translateY(20px);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 650px) {
  .project-sheet-container {
    inset: 3rem 5rem;
    flex-direction: row;
    border-radius: 2rem;
  }
}
@media (min-width: 1200px) {
  .project-sheet-container {
    inset: 3.5rem 7.5rem;
  }
}

.project-sheet-overlay.active .project-sheet-container {
  transform: scale(1) translateY(0);
}

.sheet-layout {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
@media (min-width: 650px) {
  .sheet-layout {
    display: flex;
    overflow: hidden;
  }
}

/* Close round button with morphing cross */
.sheet-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.2s ease;
}
@media (min-width: 650px) {
  .sheet-close-btn {
    top: 2.5rem;
    right: 2.5rem;
    width: 4.5rem;
    height: 4.5rem;
  }
}
.sheet-close-btn:hover {
  transform: scale(1.08) rotate(90deg);
  background: #222;
}
.sheet-close-btn svg {
  width: 1.8rem;
  height: 1.8rem;
  stroke: currentColor;
  stroke-width: 2.2;
}

/* Left info column */
.sheet-info-col {
  padding: 3rem 2.5rem 2rem;
  min-width: 0;
}
.sheet-info-col .sheet-title { padding-right: 4rem; }
@media (min-width: 650px) {
  .sheet-info-col {
    width: 42%;
    flex: 0 0 42%;
    padding: 5rem 4rem 4rem 5rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .sheet-info-col .sheet-title { padding-right: 0; }
  .sheet-identity { flex: none; }
  .sheet-copy-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
}

.sheet-title {
  font-size: clamp(2.6rem, 3.5vw, 4.8rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1.05;
  margin-bottom: 1.8rem;
}

.sheet-category {
  font-size: 1.1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.6;
  margin-bottom: 2.5rem;
}

.sheet-headline {
  font-size: 1.6rem;
  line-height: 1.35;
  letter-spacing: -0.025em;
  margin-bottom: 2rem;
  font-weight: 400;
}

.sheet-body {
  font-size: 1.35rem;
  line-height: 1.5;
  color: #333;
  margin-bottom: 2.5rem;
}

.sheet-meta-group {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.sheet-meta-item {
  display: flex;
  font-size: 1.1rem;
  line-height: 1.4;
}
.sheet-meta-label {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.5;
  width: 9rem;
  flex-shrink: 0;
}
.sheet-meta-value {
  color: #111;
}

/* Close control inside the reading dialogs. */
.sheet-nav-btn {
  font-size: 1.1rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.sheet-nav-btn:hover {
  opacity: 0.6;
  transform: translateX(3px);
}

/* Right media column */
.sheet-media-col {
  padding: 1.5rem 2rem 4rem;
  min-width: 0;
  --media-gap: 3rem;
}
@media (min-width: 650px) {
  .sheet-media-col {
    width: 58%;
    flex: 0 0 58%;
    padding: 5rem 6rem 6rem 2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    touch-action: pan-y;
    --media-gap: 4.5rem;
  }
}

.sheet-media-item {
  width: 100%;
  border-radius: 1.5rem;
  overflow: hidden;
  background: #f4f4f4;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.sheet-media-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* The left pane stays on the project presentation. */
.sheet-reading-links { display: flex; flex-wrap: wrap; gap: .8rem 1.8rem; margin: 1.5rem 0; }
.sheet-reading-links button, .film-reference { font: inherit; font-size: max(13px,1.15rem); text-decoration: underline; text-underline-offset: .25em; }
.film-reference { display: block; width: fit-content; margin-bottom: .5rem; }
.sheet-presentation .sheet-headline, .sheet-reading-dialog .sheet-headline { font-weight: 400; max-width: 42ch; }
.sheet-presentation .sheet-body, .sheet-reading-dialog .sheet-body { max-width: 65ch; font-size: max(14px,1.35rem); }

/* Each image occupies its natural aspect ratio in the continuous visual rail. */
.case-artwork + .case-artwork { margin-top: var(--media-gap); }
.case-artwork .sheet-media-item { display: block; cursor: zoom-in; }
.case-film-stage { position: relative; aspect-ratio: 16/9; overflow: hidden; border-radius: 1.5rem; background: #111; }
.case-film-player { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }
.case-artwork:has(.portrait-film) { width:min(100%, calc((100svh - 12rem) * 2 / 3)); margin-inline:auto; }
@media (max-width: 649.98px) {
  .sheet-media-col .case-artwork { margin: 0 0 var(--media-gap); }
}
@media (min-width: 650px) and (max-width: 899px) {
  .project-sheet-container { inset: 14px; border-radius: 18px; }
  .sheet-info-col { padding: 22px 12px 18px 18px; }
  .sheet-media-col { padding: 22px 16px 18px 8px; --media-gap: 20px; }
  .sheet-close-btn { top: 8px; right: 8px; width: 32px; height: 32px; }
  .sheet-close-btn svg { width: 15px; height: 15px; }
  .sheet-title { font-size: clamp(22px,4vw,32px); margin-bottom: 10px; }
  .sheet-category { font-size: 10px; margin-bottom: 18px; }
  .sheet-headline { font-size: 16px; margin-bottom: 12px; }
  .sheet-presentation .sheet-body { font-size: 14px; margin-bottom: 16px; }
  .sheet-reading-links button { font-size: 13px; }
  .sheet-meta-group { margin-top: 12px; padding-top: 12px; gap: 8px; }
  .sheet-meta-item { font-size: 11px; flex-direction: column; }
  .sheet-reading-links { margin: 10px 0; gap: 4px 10px; }
  .sheet-nav-btn { font-size: 10px; }
  .sheet-media-item, .case-film-stage { border-radius: 10px; }
}
@media (min-width: 650px) and (max-height: 500px) {
  .sheet-info-col { display: block; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; }
  .sheet-copy-scroll { overflow: visible; }
}
.sheet-reading-dialog { margin: auto; width: min(92vw,740px); max-height: 84dvh; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; border: 0; border-radius: 1.5rem; padding: clamp(20px,4vw,48px); color: #111; background: white; }
.sheet-reading-dialog::backdrop { background: rgb(0 0 0 / .55); }
.sheet-reading-dialog form { display: flex; justify-content: flex-end; position: sticky; top: 0; }
.sheet-reading-dialog form button { padding: .6em 1em; background: #111; color: white; border-radius: 2em; font-size: max(12px,1.1rem); }
.sheet-reading-dialog .sheet-category { margin: 1.5rem 0 .7rem; }
#sheet-reading-title { font-size: max(24px,2rem); }
.case-large-image { display: block; width: 100%; height: auto; margin-top: 1rem; }
.sheet-reading-dialog:has(.case-large-image) { width:min(96vw,1600px); max-height:94dvh; padding:clamp(12px,2vw,24px); }
.film-poster { display:block; width:100%; height:100%; object-fit:contain; }
.film-interactive .film-poster { visibility:hidden; }
/* Project sheets share a single horizontal stage. The exposed neighbours
   are the navigation; the centre of the stage keeps its original layout. */
.project-sheet-overlay { overflow: hidden; isolation: isolate; }
.project-sheet-overlay.active { background:#000; backdrop-filter:none; }
.project-sheet-overlay.sheet-arriving { background:transparent; }
.sheet-arriving .project-sheet-container,.sheet-arriving .sheet-edge { opacity:0; pointer-events:none; }
body:has(.project-sheet-overlay.active) .chrome { visibility:hidden; }
.project-sheet-container, .sheet-edge {
  inset: var(--sheet-inset,1.5rem 2rem); border-radius: var(--sheet-radius,1.5rem);
}
@media (min-width:650px) {
  .project-sheet-overlay { --sheet-inset:2rem 5rem; --sheet-radius:2rem; }
  .sheet-layout { padding-inline:4rem 12rem; column-gap:10rem; }
  .sheet-info-col { flex:1 1 0; width:auto; padding:4rem 0; }
  .sheet-media-col { flex:0 0 70rem; width:70rem; padding:4rem 0 0; --media-gap:6rem; }
  .sheet-title { font-size:4.5rem; line-height:1; }
  .sheet-close-btn { top:3rem; right:3rem; width:4.5rem; height:4.5rem; }
}
@media (max-width:649.98px) {
  .sheet-layout { padding-inline:1rem; }
  .sheet-info-col { padding:4rem 1.5rem 0; }
  .sheet-title { font-size:3.5rem; line-height:1; }
  .sheet-media-col { padding:4rem 0 0; --media-gap:3rem; }
  .sheet-close-btn { top:auto; bottom:1.5rem; right:1.5rem; width:4rem; height:4rem; }
  .sheet-info-col .sheet-title { padding-right:0; }
}
.project-sheet-container { z-index: 3; }
.sheet-edge {
  display:block; position:absolute; z-index:1; margin:0; width:auto; height:auto;
  padding:0; border:0; overflow:hidden; color:#111; background:#fff;
  text-align:left; cursor:pointer; transform-origin:center;
}
.sheet-edge::after,.study-motion .project-sheet-container::after {
  content:''; position:absolute; inset:0; border-radius:inherit;
  background:rgb(0 0 0 / var(--shade,0)); pointer-events:none; z-index:9;
}
.sheet-edge:focus-visible { outline:3px solid white; outline-offset:3px; }
#sheet-edge-before { transform:translateX(-92%) scale(.82); --shade:.58; }
#sheet-edge-after { transform:translateX(92%) scale(.82); --shade:.58; }
.edge-preview { pointer-events:none; opacity:var(--reveal,0); }
.edge-preview .sheet-info-col, .edge-preview .sheet-media-col { overflow:hidden; }
.edge-preview .sheet-reading-links span { font-size:max(13px,1.15rem); text-decoration:underline; text-underline-offset:.25em; }
.sheet-reading-links { margin:0 0 1.5rem; }
.sheet-presentation > .sheet-body { max-width:40rem; margin-bottom:1.2rem; }
.sheet-meta-value { min-width:0; overflow-wrap:break-word; }
.sheet-surface { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index:2; }
.sheet-surface[hidden] { display:none; }
.study-motion .project-sheet-container { transition:none; }
.study-motion .sheet-layout,.study-motion .sheet-media-col { position:relative; }
.study-motion .sheet-layout { overflow:clip; touch-action:none; }
@media (min-width:650px) {
  .study-motion .sheet-media-col { overflow:clip; touch-action:none; }
}
.sheet-media-col,.sheet-layout,.sheet-copy-scroll,.sheet-info-col { scrollbar-width:none; }
.sheet-media-col::-webkit-scrollbar,.sheet-layout::-webkit-scrollbar,
.sheet-copy-scroll::-webkit-scrollbar,.sheet-info-col::-webkit-scrollbar { display:none; }
.sheet-bending .project-sheet-container,.sheet-bending-fallback .project-sheet-container { background:transparent; box-shadow:none; }
.sheet-bending .surface-replaced { opacity:0; }
.study-motion .sheet-media-item:focus-visible { outline:2px solid currentColor; outline-offset:-3px; }
.sheet-bending-fallback .sheet-media-item { transform-origin:0 0; }
.sheet-dragging,.sheet-dragging * { cursor:grabbing !important; }
.sheet-film-launch { position:absolute; inset:0; z-index:1; cursor:pointer; }
.sheet-film-launch span {
  position:absolute; left:1rem; bottom:1rem; border-radius:999px; background:rgb(0 0 0 / .76);
  color:white; padding:.45em .9em; font-size:max(12px,1rem);
}
.case-film-stage:not(.film-interactive):has(.sheet-film-launch) iframe { pointer-events:none; }
.study-motion .case-film-stage { transform-origin:0 0; }
.film-interactive .sheet-film-launch { inset:.5rem .5rem auto auto; }
.film-interactive .sheet-film-launch span { position:static; display:block; }
/* Full Index View (« /tout ») */
.full-index-overlay {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1), visibility 0.5s;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem;
}
.full-index-overlay.active {
  justify-content:flex-start;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.full-index-list {
  flex:none;
  margin-block:auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  list-style: none;
  text-align: center;
  max-width: 90rem;
}
@media (min-width: 650px) {
  .full-index-list {
    gap: 2rem;
  }
}

.full-index-item {
  position: relative;
  display: inline-block;
}

.full-index-link {
  font-size: clamp(2rem, 3.8vw, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1.1;
  color: #fff;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: inline-block;
  cursor: pointer;
}
.full-index-list:has(.full-index-link:hover) .full-index-link:not(:hover) {
  opacity: 0.3;
}
.full-index-link:hover {
  opacity: 1;
  transform: scale(1.02);
}

.full-index-bullet {
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translate(1rem, -50%);
  font-size: 0.8rem;
  opacity: 0.4;
}

/* Floating hover preview in full index */
.index-hover-preview {
  position: fixed;
  pointer-events: none;
  z-index: 30;
  width: 28rem;
  aspect-ratio:var(--preview-format,16/9);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1), transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.index-hover-preview.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.index-hover-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Backdrop dimmer */
.dim-curtain {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 45;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.dim-curtain.active {
  opacity: 0.85;
  pointer-events: auto;
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* Les Domaines: paired films and independent soundtracks. */
.case-media-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(12px,2.2vw,40px); margin-bottom:var(--media-gap); }
.sheet-media-col .case-media-row .case-artwork { width:80%; min-width:0; margin:0 auto; }
.paired-media .case-media-row { --pair-gap:clamp(12px,2.2vw,40px); padding-bottom:calc(30% - var(--pair-gap) * .30); }
.paired-media .case-media-row .case-artwork:nth-child(2) { transform:translateY(50%); }
.project-audio { margin-top:2.5rem; padding-bottom:1rem; }
.project-audio h3 { font-size:13px; font-weight:500; margin:0 0 1rem; color:#777; }
.audio-track { display:grid; grid-template-columns:32px minmax(0,1fr) auto; gap:6px 12px; align-items:center; padding:12px 0; border-top:1px solid #ededed; }
.audio-title { grid-column:1 / -1; font-size:13px; font-weight:500; }
.audio-play { width:32px; height:32px; border:0; border-radius:50%; background:#f3f3f5; color:#242424; display:grid; place-items:center; cursor:pointer; }
.audio-play svg { width:18px; height:18px; fill:currentColor; }
.audio-play:focus-visible,.audio-wave:focus-within { outline:2px solid #007aff; outline-offset:3px; }
.audio-wave { position:relative; height:28px; min-width:0; }
.audio-bars { display:flex; align-items:center; height:100%; gap:1px; overflow:hidden; }
.audio-bars i { flex:1; min-width:0; border-radius:2px; background:#d1d1d6; }
.audio-bars i.played { background:#45454a; }
.audio-wave input { position:absolute; inset:0; width:100%; height:100%; opacity:0; cursor:pointer; margin:0; }
.audio-time { color:#86868b; font-size:11px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.audio-track audio { display:none; }
@media(max-width:649px) { .project-audio { margin-top:24px; } .case-media-row { gap:12px; } }
@media(max-width:649px) { .paired-media .case-media-row { --pair-gap:12px; } }
