/* =====================================================================
   ANTITLED STUDIO — site.css
   Brand Guidelines V4 (2026): Terracotta / Deep Navy / Cool Grey / Off White
   Switzer (headlines, body) + Instrument Serif Italic (highlights; SangBleu Kingdom later)
   ===================================================================== */

/* Fonts are served from our own server (assets/fonts/): no requests to
   Google or Fontshare, so visitors' IPs never leave the site. */
@font-face {
  font-family: "Switzer"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/Switzer-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Switzer"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/Switzer-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "Switzer"; font-weight: 600; font-style: normal; font-display: swap;
  src: url("../fonts/Switzer-Semibold.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("../fonts/InstrumentSerif-Italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("../fonts/InstrumentSerif-Italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* palette */
  --terra: #BD462A;      /* Primary / Accent — never on the logo */
  --navy:  #041023;      /* Text / Contrast */
  --grey:  #E5E8EA;      /* Support 02 — grids, separators */
  --paper: #FDFDFF;      /* Support 01 — backgrounds */

  /* semantic */
  --bg: var(--paper);
  --fg: var(--navy);
  --muted: rgba(4, 16, 35, .62); /* 5.3:1 on paper (AA for small text) */
  --line: var(--grey);
  --line-strong: rgba(4, 16, 35, .16);

  --sans: "Switzer", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif; /* SangBleu Kingdom (assets/fonts/) on hold until the web licence */

  /* interface type scale: note (tags, draft, cursor) · label (captions, footnotes) · ui (menu, buttons) */
  --fs-note: 11px;
  --fs-label: 12px;
  --fs-ui: 13px;
  --col-label: 120px;                   /* label column of the info tables (project, contact) */

  --gutter: clamp(16px, 2.6vw, 40px);
  --bar-h: 64px;
  --dot-ratio: 26.96 / 31.63;          /* the square dot of the i */
  --dot-ratio-rot: 31.63 / 26.96;      /* rotated 90° */

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.75, 0, .2, 1);
  /* one scale of durations: fast = state changes, med = reveals, slow = page elements, reveal = titles and big moves */
  --t-fast: .2s;
  --t-med: .45s;
  --t-slow: .7s;
  --t-reveal: 1.05s;

  --z-view: 1; --z-bar: 50; --z-intro: 80;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 16px; line-height: 1.5; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 500; letter-spacing: 0;
  font-size-adjust: cap-height .68; } /* same cap height as Switzer, whichever serif loads */
::selection { background: var(--terra); color: var(--paper); }
:focus-visible { outline: 2px solid var(--terra); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -48px; z-index: 100; background: var(--navy); color: var(--paper); padding: 10px 14px; transition: top var(--t-fast); }
.skip:focus { top: 12px; }

.label { font-size: var(--fs-label); line-height: 1.2; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }

/* ============ VIEW SWITCHING ============ */
.view[hidden] { display: none !important; }
main:focus { outline: none; }

/* ============ HEADER BAR ============ */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-bar);
  height: var(--bar-h);
  display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: stretch;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background var(--t-med), color var(--t-med), border-color var(--t-med), transform var(--t-slow) var(--ease-io);
}
body[data-view="intro"] .bar { transform: translateY(-100%); }

.bar__logo {
  display: flex; align-items: center; padding: 0 var(--gutter);
  border-right: 1px solid var(--line);
}
.bar__logo svg { height: 18px; width: auto; min-width: 128px; }
.bar__logo { transition: color var(--t-fast); }
.bar__logo:hover { color: var(--muted); }
.bar__logo .lg-u { display: none; }

.bar__filters { display: flex; align-items: stretch; justify-content: center; }
.filter {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 0 clamp(14px, 2vw, 28px); min-height: 44px;
  font-size: var(--fs-ui); font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  color: var(--muted);
  transition: color var(--t-fast);
}
.filter + .filter { border-left: 1px solid var(--line); }
.filter i {
  width: 9px; aspect-ratio: var(--dot-ratio);
  border: 1px solid currentColor; transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.filter:hover { color: var(--fg); }
.filter[aria-pressed="true"] { color: var(--fg); }
.filter[aria-pressed="true"] i { background: var(--terra); border-color: var(--terra); }
.filter:active i { transform: scale(.8); }

.bar__work {
  display: none; align-items: center; padding: 0 clamp(16px, 2vw, 28px);
  font-size: var(--fs-ui); font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  border-left: 1px solid var(--line);
  transition: color var(--t-fast);
}
.bar__work::before { content: ""; width: 9px; aspect-ratio: var(--dot-ratio); background: var(--terra); margin-right: 10px; }
.bar__work:hover { color: var(--terra); }
.bar__work.is-back::before { display: none; }
.bar__work svg { width: 15px; height: 15px; margin-right: 10px; transition: transform var(--t-med) var(--ease); }
.bar__work.is-back:hover svg { transform: translateX(-4px); }

.bar__aside {
  display: flex; align-items: center; gap: 10px; padding: 0 var(--gutter);
  border-left: 1px solid var(--line); color: var(--muted);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.bar__aside b { color: var(--fg); font-weight: 600; }

/* bar per view */
body:not([data-view="work"]) .bar__filters { visibility: hidden; }
body:not([data-view="work"]) .bar__index { display: none; }

/* Index switch: the i-dot slides in a hairline track */
.bar__index {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 clamp(14px, 2vw, 24px);
  border-left: 1px solid var(--line); color: var(--muted);
  font-size: var(--fs-ui); font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  transition: color var(--t-fast);
}
.bar__index:hover, .bar__index[aria-expanded="true"] { color: var(--fg); }
.bar__index .fn {
  position: relative; top: -.55em; margin-left: -7px; min-width: .6em;
  font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--terra);
}
.sw { position: relative; display: inline-block; width: 26px; height: 12px; border: 1px solid currentColor; }
.sw i { position: absolute; top: 1px; left: 1px; width: 7px; height: 8.2px; background: currentColor; transition: transform var(--t-med) var(--ease), background var(--t-fast); }
.bar__index[aria-expanded="true"] .sw i { transform: translateX(15px); background: var(--terra); }
body:not([data-view="work"]) .bar__work { display: inline-flex; }
body[data-view="manifesto"] .bar__aside { display: none; }
body[data-view="backstage"] .bar {
  --line: rgba(253, 253, 255, .14); --muted: rgba(253, 253, 255, .6); --fg: var(--paper);
  background: color-mix(in srgb, var(--navy) 86%, transparent); color: var(--paper);
}

/* ============ INTRO ============ */
.intro {
  position: fixed; inset: 0; z-index: var(--z-intro);
  background: var(--paper); color: var(--navy); overflow: hidden;
  transition: transform var(--t-reveal) var(--ease-io), visibility 0s linear var(--t-reveal);
}
body:not([data-view="intro"]) .intro { transform: translateY(-100%); visibility: hidden; }
.intro__stage { position: absolute; inset: 0; }
.intro__stage video { width: 100%; height: 100%; object-fit: cover; }

.iframe { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; }
.iframe.is-on { opacity: 1; }
.iframe--paper { background: var(--paper); color: var(--navy); }
.iframe--terra { background: var(--terra); color: var(--paper); }
.iframe--navy  { background: var(--navy);  color: var(--paper); }
.iframe .logo-xl svg { width: min(78vw, 1100px); height: auto; }
.iframe .logo-md svg { width: min(46vw, 620px); height: auto; }
.iframe .mark-xl svg { height: min(64vh, 58vw); width: auto; }
.iframe .sig svg { width: min(36vw, 420px); height: auto; }
.iframe .lg-u { display: none; }
.iframe.is-u .lg-u { display: inline; }
.iframe.is-u .lg-a { display: none; }
.iframe .caption { position: absolute; left: 50%; bottom: 22vh; transform: translateX(-50%); font-size: clamp(1.25rem, 2.4vw, 2rem); font-weight: 500; white-space: nowrap; }
.iframe.is-on .zoom { animation: introZoom var(--t-reveal) var(--ease) both; }
@keyframes introZoom { from { transform: scale(1.06); } to { transform: none; } }

.iframe--crops { grid-template-columns: repeat(3, auto); gap: clamp(8px, 1.4vw, 20px); place-content: center; }
.iframe--crops figure { width: min(18vw, 22vh); aspect-ratio: var(--dot-ratio); overflow: hidden; background: var(--grey); }
.iframe--crops figure:nth-child(even) { aspect-ratio: var(--dot-ratio-rot); align-self: center; }
.iframe--crops img { width: 100%; height: 100%; object-fit: cover; }
.iframe.is-on.iframe--crops figure { animation: cropIn var(--t-med) var(--ease) both; }
.iframe--crops figure:nth-child(2) { animation-delay: .06s !important; }
.iframe--crops figure:nth-child(3) { animation-delay: .12s !important; }
.iframe--crops figure:nth-child(4) { animation-delay: .18s !important; }
.iframe--crops figure:nth-child(5) { animation-delay: .24s !important; }
.iframe--crops figure:nth-child(6) { animation-delay: .30s !important; }
@keyframes cropIn { from { clip-path: inset(50% 50%); } to { clip-path: inset(0); } }

.intro__meta {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
  display: flex; justify-content: space-between; gap: 16px; pointer-events: none;
  color: var(--navy); transition: color var(--t-fast);
}
.intro__enter {
  position: absolute; left: 50%; bottom: calc(var(--gutter) - 10px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 18px; min-height: 44px;
  color: var(--navy); z-index: 2; transition: color var(--t-fast);
}
.intro__enter svg { width: 18px; height: 18px; animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
.intro { cursor: pointer; }
.intro[data-tone="dark"] .intro__meta, .intro[data-tone="dark"] .intro__enter { color: var(--paper); }

/* ============ WORK — MOSAIC ============ */
.view--work { padding: var(--bar-h) 0 0; }
.grid { display: grid; gap: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px)  { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (min-width: 2100px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.tile[hidden] { display: none; }
.tile { animation: tileIn var(--t-reveal) var(--ease) both; animation-delay: calc(var(--i, 0) * 28ms); }
@keyframes tileIn { from { opacity: 0; } to { opacity: 1; } }
.tile__link { position: relative; display: block; }
.tile__link:focus-visible { outline-offset: -4px; }
/* frames with overflow hidden would clip an outer outline: draw it inside */
.film:focus-visible, .strip__item:focus-visible, .reel__nav:focus-visible, .lb__nav:focus-visible { outline-offset: -4px; }
.reel__dots button:focus-visible { outline-offset: -2px; }
.tile__media { position: relative; aspect-ratio: var(--dot-ratio); overflow: hidden; background: var(--grey); }
.tile__media img, .tile__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile__media .cover { transition: transform var(--t-reveal) var(--ease), filter var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease); }
.tile__media .preview { opacity: 0; transition: opacity var(--t-med) var(--ease); }
.tile__media.is-playing .preview { opacity: 1; }
.tile__link:hover .cover, .tile__link:focus-visible .cover { transform: scale(1.03); }

/* hovering one work turns the rest of the mosaic into a faded print */
@media (hover: hover) and (pointer: fine) {
  .grid:has(.tile__link:hover) .tile__link:not(:hover) .tile__media img { filter: grayscale(1); opacity: .6; }
}
/* hovering a menu entry: only its works keep their colour */
.grid[data-preview] .tile:not(.is-match) .tile__media img { filter: grayscale(1); opacity: .6; }

.tile__draft {
  position: absolute; right: 8px; top: 8px; z-index: 2; padding: 4px 6px 3px; font-size: var(--fs-note);
  background: color-mix(in srgb, var(--paper) 88%, transparent); color: var(--muted);
}

/* captions: the cursor note shows them on desktop; on touch they sit on the image as a printed label */
.tile__cap {
  position: absolute; left: 8px; bottom: 8px; z-index: 2; max-width: calc(100% - 16px);
  display: grid; gap: 2px; padding: 6px 8px 5px; background: var(--paper);
}
.tile__title { font-size: var(--fs-label); font-weight: 600; line-height: 1.2; }
.tile__meta { display: none; font-size: var(--fs-note); color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .tile__cap { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; padding: 0; white-space: nowrap; }
}
/* keyboard users get the caption on focus */
.tile__link:focus-visible .tile__cap { clip-path: none; width: auto; height: auto; overflow: visible; padding: 6px 8px 5px; white-space: normal; }
.tile__link:focus-visible .tile__meta { display: block; }

.grid__empty { display: grid; justify-items: center; gap: 18px; padding: 18vh var(--gutter); text-align: center; color: var(--muted); }
.grid__empty[hidden] { display: none; }

/* ============ INDEX (detailed search) ============ */
.index { display: grid; grid-template-rows: 0fr; border-bottom: 1px solid transparent; transition: grid-template-rows var(--t-slow) var(--ease), border-color var(--t-fast); }
.index.is-open { grid-template-rows: 1fr; border-bottom-color: var(--line); }
.index__inner { min-height: 0; overflow: hidden; }
.index__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 22px var(--gutter) 4px; color: var(--muted); }
.index__head em { font-size: 15px; letter-spacing: 0; text-transform: none; }
.index__clear {
  min-height: 32px; font-size: var(--fs-label); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--fg);
  border-bottom: 1px solid var(--line-strong); transition: color var(--t-fast), border-color var(--t-fast);
}
.index__clear:hover { color: var(--terra); border-color: var(--terra); }
.index__clear[hidden] { display: none; }
.index__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(16px, 3vw, 48px); padding: 8px var(--gutter) 28px; }
@media (min-width: 760px)  { .index__list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .index__list { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.itag {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; border-bottom: 1px solid var(--line);
  font-size: clamp(15px, 1.25vw, 18px); font-weight: 500; text-align: left; color: var(--muted);
  transition: color var(--t-fast);
}
.itag i { flex: none; width: 8px; aspect-ratio: var(--dot-ratio); border: 1px solid currentColor; transition: background var(--t-fast), border-color var(--t-fast); }
.itag:hover, .itag[aria-pressed="true"] { color: var(--fg); }
.itag[aria-pressed="true"] i { background: var(--terra); border-color: var(--terra); }
.itag .fn { position: relative; top: -.5em; margin-left: -6px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 13px; color: var(--muted); }
.itag[aria-pressed="true"] .fn { color: var(--terra); }
.itag.is-off { color: rgba(4, 16, 35, .26); cursor: default; }
.itag.is-off span { text-decoration: line-through; text-decoration-thickness: 1px; }

/* view transitions (Chromium): smooth grid re-layout on filter */
::view-transition-group(*) { animation-duration: var(--t-med); animation-timing-function: var(--ease); }
::view-transition-group(pj-media) { animation-duration: var(--t-slow); animation-timing-function: var(--ease-io); }
::view-transition-old(pj-media), ::view-transition-new(pj-media) { width: 100%; height: 100%; object-fit: cover; }

/* ============ PROJECT ============ */
.view--project, .view--backstage {
  position: fixed; inset: var(--bar-h) 0 0 0; z-index: var(--z-view);
  overflow-y: auto; overscroll-behavior: contain;
}
.view--backstage { background: var(--navy); color: var(--paper); --fg: var(--paper); --line: rgba(253,253,255,.14); --line-strong: rgba(253,253,255,.32); --muted: rgba(253,253,255,.6); }
.panel { height: calc(100svh - var(--bar-h)); }

.pj-split { display: grid; grid-template-rows: minmax(0, 1.35fr) auto minmax(0, 1fr); }
.film { position: relative; display: block; width: 100%; height: 100%; padding: 0; overflow: hidden; background: var(--navy); text-align: left; cursor: pointer; }
.film img, .film video { width: 100%; height: 100%; object-fit: cover; }
/* while a loop is still loading, the i-dot breathes in the corner of the frame */
.film__wait { display: none; position: absolute; right: var(--gutter); bottom: 20px; z-index: 3; width: 9px; aspect-ratio: var(--dot-ratio); background: var(--paper); pointer-events: none; animation: wait 1.2s var(--ease-io) infinite alternate; }
.film.is-loading .film__wait { display: block; }
@keyframes wait { from { opacity: .9; } to { opacity: .15; } }

/* ---------- reel: several films in one frame ---------- */
.reel { position: relative; overflow: hidden; background: var(--navy); }
.reel__item { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity var(--t-slow) var(--ease), visibility 0s linear var(--t-slow); }
.reel__item.is-current { z-index: 1; opacity: 1; visibility: visible; transition: opacity var(--t-slow) var(--ease), visibility 0s; }
.reel[data-dir="next"] .reel__item.is-current > img, .reel[data-dir="next"] .reel__item.is-current > video { animation: reelNext var(--t-reveal) var(--ease) both; }
.reel[data-dir="prev"] .reel__item.is-current > img, .reel[data-dir="prev"] .reel__item.is-current > video { animation: reelPrev var(--t-reveal) var(--ease) both; }
@keyframes reelNext { from { transform: translateX(2.5%) scale(1.02); } to { transform: none; } }
@keyframes reelPrev { from { transform: translateX(-2.5%) scale(1.02); } to { transform: none; } }

.reel__nav {
  position: absolute; top: 0; bottom: 0; z-index: 2; width: clamp(64px, 12%, 160px);
  display: flex; align-items: center; justify-content: center; color: var(--paper);
  opacity: 0; transition: opacity var(--t-med) var(--ease);
}
.reel__nav--prev { left: 0; }
.reel__nav--next { right: 0; }
.reel:hover .reel__nav, .reel__nav:focus-visible { opacity: 1; }
@media (hover: none) { .reel__nav { opacity: .85; width: 56px; } }
.reel__nav svg { width: 40px; height: 16px; filter: drop-shadow(0 0 5px rgba(4, 16, 35, .55)); transition: transform var(--t-med) var(--ease); }
.reel__nav--prev:hover svg { transform: translateX(-6px); }
.reel__nav--next:hover svg { transform: translateX(6px); }

/* i-dots: one per film, the current one in terracotta */
.reel__dots { position: absolute; left: 50%; bottom: 10px; z-index: 2; transform: translateX(-50%); display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.reel__dots button { display: grid; place-items: center; width: 26px; height: 32px; }
.reel__dots button::before {
  content: ""; width: 8px; aspect-ratio: var(--dot-ratio); border: 1px solid var(--paper);
  box-shadow: 0 0 4px rgba(4, 16, 35, .45); transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast) var(--ease);
}
.reel__dots button:hover::before { transform: scale(1.25); }
.reel__dots button[aria-current="true"]::before { background: var(--terra); border-color: var(--terra); }

.pj-divider {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  min-height: 64px; padding: 6px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.pj-divider__title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.pj-divider__title h1 { font-size: clamp(17px, 1.6vw, 22px); font-weight: 600; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-divider__title span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.pj-divider__tags { display: flex; justify-content: flex-end; gap: 6px; }
.pj-divider__tags li { border: 1px solid var(--line-strong); padding: 5px 8px 4px; font-size: var(--fs-note); }

.strip { position: relative; overflow: hidden; padding: 12px 0; }
.strip__track { display: flex; gap: 12px; height: 100%; width: max-content; animation: strip var(--strip-dur, 60s) linear infinite; }
.strip:hover .strip__track, .strip:focus-within .strip__track, .strip.is-paused .strip__track { animation-play-state: paused; }
@keyframes strip { to { transform: translateX(-50%); } }
.strip__toggle {
  position: absolute; right: var(--gutter); bottom: 20px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  background: var(--paper); border: 1px solid var(--line-strong);
}
.strip__toggle svg { width: 12px; height: 12px; }

/* ---------- the pull: i-dot → hairline → registration mark ---------- */
.pull { --dot-w: 11px; display: inline-flex; align-items: center; gap: 18px; user-select: none; -webkit-user-select: none; }
.pull__label { font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap; transition: opacity var(--t-med) var(--ease); }
.pull__label em { font-size: 19px; }
.pull__track { position: relative; display: block; width: clamp(140px, 13vw, 210px); height: 44px; touch-action: none; }
.pull--rev .pull__track { transform: scaleX(-1); }
.pull__line, .pull__trail { position: absolute; left: 0; right: 0; top: 50%; height: 1px; pointer-events: none; }
.pull__line { background: var(--line-strong); transition: background var(--t-med) var(--ease); }
.pull__line::before { content: ""; position: absolute; left: 0; top: -4px; width: 1px; height: 9px; background: inherit; }
.pull__trail { background: var(--terra); transform: scaleX(0); transform-origin: left center; transition: transform var(--t-slow) var(--ease); }
.pull__target {
  position: absolute; top: 50%; right: calc(var(--dot-w) / 2 - 10px); width: 20px; height: 20px; margin-top: -10px;
  pointer-events: none; transition: transform var(--t-slow) var(--ease), opacity var(--t-med) var(--ease);
}
.pull__target::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--fg); border-radius: 50%; }
.pull__target::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(var(--fg), var(--fg)) center / 1px 100% no-repeat,
              linear-gradient(var(--fg), var(--fg)) center / 100% 1px no-repeat;
}
.pull__dot {
  position: absolute; top: 0; left: calc((44px - var(--dot-w)) / -2); width: 44px; height: 44px;
  display: grid; place-items: center; cursor: grab; transition: transform var(--t-slow) var(--ease);
}
.pull__dot span { display: block; width: var(--dot-w); aspect-ratio: var(--dot-ratio); background: var(--terra); transition: transform var(--t-med) var(--ease); }
.pull__dot:hover span, .pull__dot:focus-visible span { transform: scale(1.3); }
.pull:hover .pull__line { background: var(--fg); }
.pull.is-drag .pull__dot, .pull.is-drag .pull__trail { transition: none; }
.pull.is-drag .pull__dot { cursor: grabbing; }
.pull.is-drag .pull__label { opacity: .4; }
.pull.is-hint .pull__dot, .pull.is-hint .pull__trail { transition-duration: var(--t-med); }
.pull.is-near .pull__target { transform: rotate(45deg) scale(1.3); }
.pull.is-hit .pull__target { transform: rotate(90deg) scale(.4); opacity: 0; }
.pull.is-hit .pull__dot span { transform: scale(1.5); }
.pull.is-hit .pull__label { opacity: 0; }

/* ---------- about: free scroll, no snap ---------- */
.pj-about {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  padding: clamp(64px, 10vw, 150px) var(--gutter); border-bottom: 1px solid var(--line);
}
@media (min-width: 900px) { .pj-about { grid-template-columns: 1.3fr 1fr; gap: 6vw; align-items: start; } }
.pj-about__lead { font-size: clamp(1.4rem, 3vw, 2.6rem); font-weight: 500; line-height: 1.12; max-width: 22ch; text-wrap: balance; }
.pj-about dl { display: grid; gap: 0; border-top: 1px solid var(--line); }
.pj-about dl div { display: grid; grid-template-columns: var(--col-label) 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pj-about dt { color: var(--muted); }
.pj-about dd { font-size: 15px; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pj-about dl.pj-notes { margin-top: 48px; border-top: 0; }
.pj-about dl.pj-notes div { padding: 8px 0; border-bottom: 0; }
.pj-about dl.pj-notes dd { font-size: var(--fs-label); color: var(--muted); }
.pj-about p.body { margin-top: 20px; max-width: 52ch; color: var(--muted); }

/* ============ CURSOR (desktop) ============ */
/* one element: the i-dot is the top corner of a label box, revealed with clip-path */
.cursor { position: fixed; left: 0; top: 0; z-index: 85; pointer-events: none; opacity: 0; transition: opacity var(--t-fast); will-change: transform; }
.cursor.is-on { opacity: 1; }
.cursor.is-on.is-off { opacity: 0; }
.cursor__box {
  --dw: 7px; --dh: 8.2px; /* i-dot proportions */
  position: absolute; left: 12px; top: 14px;
  display: inline-flex; align-items: center; min-height: 26px; padding: 7px 10px 6px;
  background: var(--terra); color: var(--paper); white-space: nowrap;
  font-family: var(--sans); font-size: var(--fs-note); font-weight: 600; line-height: 1; letter-spacing: .04em; text-transform: uppercase;
  transform-origin: 0 0;
  clip-path: inset(0 calc(100% - var(--dw)) calc(100% - var(--dh)) 0);
  transition: clip-path var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.cursor__text { opacity: 0; transform: translateY(3px); transition: opacity var(--t-fast), transform var(--t-med) var(--ease); }
.cursor.is-open .cursor__box { clip-path: inset(0 0 0 0); }
.cursor.is-open .cursor__text { opacity: 1; transform: none; transition-delay: .12s; }
.cursor.is-link .cursor__box { transform: scale(1.6); }
/* near the right edge the box opens leftwards; the dot stays in the same place */
.cursor.is-flip .cursor__box {
  left: auto; right: -19px; transform-origin: 100% 0;
  clip-path: inset(0 0 calc(100% - var(--dh)) calc(100% - var(--dw)));
}
.cursor.is-flip.is-open .cursor__box { clip-path: inset(0 0 0 0); }

/* ============ BACKSTAGE ============ */
.bs-split { display: grid; grid-template-rows: minmax(0, 1.35fr) auto minmax(0, 1fr); }
.bs-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); min-height: 0; }
.bs-text {
  display: grid; align-content: center; justify-items: start; gap: clamp(16px, 2vw, 28px); min-height: 0;
  padding: var(--gutter); border-right: 1px solid var(--line);
}
.bs-text h1 { font-size: clamp(2.2rem, 4.6vw, 5.4rem); font-weight: 600; line-height: .96; max-width: 12ch; }
.bs-lead { color: var(--muted); max-width: 44ch; }
.bs-film { background: #020a17; }
.bs-film .film__play { left: 16px; }
.bs-divider { grid-template-columns: 1fr auto; }
.bs-divider .pj-divider__title span { display: inline; color: var(--fg); font-size: 15px; font-weight: 500; }
@media (max-width: 759px) { .bs-divider > .label { display: none; } }
.bs-divider em { font-size: 19px; }
.view--backstage .strip__item { background: rgba(253, 253, 255, .06); }
.view--backstage .strip__toggle { background: var(--navy); color: var(--paper); }
@media (max-width: 899px) {
  .view--backstage .bs-split { height: auto; grid-template-rows: auto auto 46svh; }
  .bs-top { grid-template-columns: 1fr; }
  .bs-text { border-right: 0; padding: clamp(40px, 10vw, 72px) var(--gutter); }
  .bs-film { aspect-ratio: 16 / 10; height: auto; }
}

/* ============ CURTAIN (i-dot reveal, project ⇄ backstage) ============ */
.curtain {
  position: fixed; inset: 0; z-index: 90; background: var(--terra);
  clip-path: inset(50% 50% 50% 50%); pointer-events: none; visibility: hidden;
}
.curtain.is-on { visibility: visible; }

/* ============ MANIFESTO ============ */
.view--manifesto { padding-top: var(--bar-h); }

/* privacy & cookies: a plain reading page */
.view--privacy { padding-top: var(--bar-h); }
.pv { border-top: 0; display: grid; gap: clamp(20px, 3vw, 36px); }
.pv > .label, .pv__date { color: var(--muted); }
.pv__title { font-size: clamp(2.6rem, 8vw, 7rem); font-weight: 600; line-height: .95; }
.pv__title em { color: var(--terra); }
.pv__body { max-width: 68ch; display: grid; gap: 14px; padding-top: clamp(24px, 4vw, 48px); border-top: 1px solid var(--line); }
.pv__body h2 { font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 600; margin-top: 18px; }
.pv__body p { color: var(--muted); }
.pv__body strong { color: var(--fg); font-weight: 500; }
.pv a, .form__note a, .mf__foot a { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.form__note { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.frame { border-top: 1px solid var(--line); padding: clamp(28px, 5vw, 72px) var(--gutter); }
.mf__hero { border-top: 0; min-height: calc(82svh - var(--bar-h)); display: grid; align-content: end; gap: clamp(20px, 3vw, 40px); position: relative; }
.mf__hero .label { color: var(--muted); }
.mf__title { font-size: clamp(3.4rem, 13vw, 13rem); font-weight: 600; line-height: .92; }
.mf__title em { color: var(--terra); }
.mf__lead { font-size: clamp(1.3rem, 2.8vw, 2.5rem); font-weight: 500; line-height: 1.12; max-width: 30ch; }

.mf__points { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .mf__points { grid-template-columns: repeat(3, 1fr); } .mf__points li + li { border-left: 1px solid var(--line); } }
.mf__points li { display: grid; gap: 16px; align-content: start; }
.mf__points .label { color: var(--terra); }
.mf__points h2 { font-size: clamp(1.4rem, 2.2vw, 2rem); font-weight: 600; line-height: 1.08; }
.mf__points p { color: var(--muted); max-width: 46ch; }

.mf__photos {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(10px, 1.4vw, 20px); align-items: center;
  padding: clamp(28px, 5vw, 72px) var(--gutter); border-top: 1px solid var(--line);
}
@media (min-width: 900px) { .mf__photos { grid-template-columns: repeat(4, 1fr); } }
.ph {
  position: relative; aspect-ratio: var(--dot-ratio); background-color: var(--grey);
  background-image:
    linear-gradient(to top right, transparent calc(50% - .5px), rgba(4,16,35,.22) 50%, transparent calc(50% + .5px)),
    linear-gradient(to bottom right, transparent calc(50% - .5px), rgba(4,16,35,.22) 50%, transparent calc(50% + .5px));
  display: grid; place-items: end start; padding: 12px; color: var(--muted);
}
.ph--rot { aspect-ratio: var(--dot-ratio-rot); }
.ph .label { background: var(--paper); padding: 4px 7px 3px; font-size: var(--fs-note); }

.mf__cols { display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .mf__cols { grid-template-columns: 1.4fr 1fr; } .mf__cols > div + div { border-left: 1px solid var(--line); } }
.mf__cols .label { color: var(--muted); margin-bottom: 22px; }
.mf__services { columns: 2; column-gap: 24px; font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-weight: 500; line-height: 1.55; }
@media (min-width: 1200px) { .mf__services { columns: 3; } }
.mf__tov { font-size: clamp(1.6rem, 3.4vw, 3rem); font-weight: 600; line-height: 1.05; }

.contact { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 80px); }
@media (min-width: 900px) { .contact { grid-template-columns: 1fr 1fr; } }
.contact .label { color: var(--muted); }
.contact__title { font-size: clamp(2.2rem, 5.6vw, 5rem); font-weight: 600; line-height: .98; margin: 18px 0 34px; }
.contact__title em { color: var(--terra); }
.contact__info { display: grid; border-top: 1px solid var(--line); }
.contact__info div { display: grid; grid-template-columns: var(--col-label) 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.contact__info a { border-bottom: 1px solid var(--line-strong); transition: color var(--t-fast), border-color var(--t-fast); }
.contact__info a:hover { color: var(--terra); border-color: var(--terra); }

.form { align-self: end; }
.field { display: grid; gap: 6px; margin-bottom: 6px; }
.field label { font-size: var(--fs-label); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.field label span { color: var(--terra); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--fg);
  background: transparent; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  padding: 10px 0 12px; min-height: 44px; transition: border-color var(--t-fast);
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--navy); box-shadow: 0 1px 0 0 var(--navy); }
.field__err { color: var(--terra); font-size: var(--fs-label); line-height: 20px; min-height: 20px; } /* space reserved: no jump when a message appears */
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: var(--terra); }
.btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 40px;
  min-height: 52px; padding: 0 20px; background: var(--navy); color: var(--paper);
  font-size: var(--fs-ui); font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  transition: background var(--t-fast);
}
.btn i { width: 10px; aspect-ratio: var(--dot-ratio); background: var(--terra); transition: transform var(--t-fast); }
.btn:hover { background: #0b1d3a; }
.btn:hover i { transform: translateX(4px); }
.btn[disabled] { opacity: .5; cursor: progress; }
.form__done .contact__title { margin-top: 0; }

/* colophon, set like the folio of the project pages */
.mf__foot { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px var(--gutter); border-top: 1px solid var(--line); color: var(--muted); }
.mf__foot em { font-size: 17px; }
.mf__foot span:last-child { font-weight: 600; color: var(--fg); }

/* =====================================================================
   PRINTED-BOOK DETAILS
   ===================================================================== */

/* footnote counts on the filters (Video¹⁸) */
.filter .fn {
  position: relative; top: -.55em; margin-left: -5px;
  font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 13px; line-height: 1;
  letter-spacing: 0; text-transform: none; color: var(--muted); transition: color var(--t-fast);
}
.filter[aria-pressed="true"] .fn { color: var(--terra); }

/* folio: page numbers set like the brand manual ("p. 13") */
.bar__aside .folio-n { text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.bar__aside .folio-n em, .folio em { color: var(--muted); }
.bar__aside .folio-n em { font-size: 18px; margin-right: 2px; }
.folio {
  grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  margin-top: clamp(28px, 4vw, 64px); padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.folio em { font-size: 17px; }
.folio span:last-child { font-size: 15px; font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }

/* crop marks: appear at the corners of an image when it can be opened */
.crop::after {
  --c: var(--paper); --s: 14px;
  content: ""; position: absolute; inset: 12px; z-index: 2; pointer-events: none;
  opacity: 0; transform: scale(1.05); transition: opacity var(--t-med) var(--ease), transform var(--t-slow) var(--ease);
  background:
    linear-gradient(var(--c), var(--c)) left top / var(--s) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left top / 1px var(--s) no-repeat,
    linear-gradient(var(--c), var(--c)) right top / var(--s) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right top / 1px var(--s) no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / var(--s) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) left bottom / 1px var(--s) no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / var(--s) 1px no-repeat,
    linear-gradient(var(--c), var(--c)) right bottom / 1px var(--s) no-repeat;
}
.crop:hover::after, .crop:focus-visible::after,
.tile__link:hover .crop::after, .tile__link:focus-visible .crop::after { opacity: 1; transform: none; }

/* registration marks (manifesto) */
.reg { position: absolute; top: 22px; width: 22px; height: 22px; pointer-events: none; --rc: rgba(4, 16, 35, .38); }
.reg::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--rc); border-radius: 50%; }
.reg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(var(--rc), var(--rc)) center / 1px 100% no-repeat,
              linear-gradient(var(--rc), var(--rc)) center / 100% 1px no-repeat;
}
.reg--tl { left: calc(var(--gutter) - 11px); }
.reg--tr { right: calc(var(--gutter) - 11px); }

/* titles composed line by line */
[data-reveal].is-split .w {
  display: inline-block; overflow: hidden; vertical-align: top;
  padding: 0 .1em .2em 0; margin: 0 -.1em -.2em 0;
}
[data-reveal].is-split .w > span {
  display: inline-block; transform: translateY(115%);
  transition: transform var(--t-reveal) var(--ease); transition-delay: calc(var(--l, 0) * 95ms);
}
[data-reveal].is-in .w > span { transform: none; }

/* ---------- project: clickable top film + stills ---------- */
.film__play {
  position: absolute; left: var(--gutter); bottom: 16px; z-index: 3;
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px 6px; background: var(--paper); color: var(--navy);
}
.film__play svg { width: 9px; height: 9px; }
@media (hover: hover) and (pointer: fine) {
  .film__play { opacity: 0; transition: opacity var(--t-fast) var(--ease); }
  .film:focus-visible .film__play { opacity: 1; }
}
.strip__item { position: relative; height: 100%; flex: none; padding: 0; background: var(--grey); cursor: pointer; }
.strip__item img { height: 100%; width: auto; object-fit: cover; }
.strip.is-held .strip__track { animation-play-state: paused; }

/* =====================================================================
   VIEWER
   ===================================================================== */
.lb {
  position: fixed; inset: 0; z-index: 70; display: grid; grid-template-rows: 64px minmax(0, 1fr);
  --lb-fg: var(--navy);
  background: var(--paper); color: var(--lb-fg);
  opacity: 0; transition: opacity var(--t-med) var(--ease);
}
.lb--dark { --lb-fg: var(--paper); --line: rgba(253, 253, 255, .14); --muted: rgba(253, 253, 255, .6); background: var(--navy); }
.lb--dark .lb__frame iframe { background: #020a17; }
.lb[hidden] { display: none; }
.lb.is-open { opacity: 1; }
body.lb-open { overflow: hidden; }
.lb__top { position: relative; z-index: 3; display: flex; justify-content: space-between; align-items: center; padding: 0 var(--gutter); border-bottom: 1px solid var(--line); }
.lb__count { color: var(--muted); font-variant-numeric: tabular-nums; }
.lb__close { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: var(--fs-ui); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.lb__close i { width: 9px; aspect-ratio: var(--dot-ratio); background: var(--terra); transition: transform var(--t-fast); }
.lb__close:hover i { transform: rotate(90deg); }
.lb__stage { position: relative; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: clamp(16px, 3vw, 40px) clamp(56px, 8vw, 140px) 0; }
.lb__media { position: relative; min-height: 0; }
.lb__media img, .lb__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lb__frame { position: absolute; inset: 0; display: grid; place-items: center; }
.lb__frame iframe { width: min(100%, calc((100svh - 190px) * 16 / 9)); aspect-ratio: 16 / 9; border: 0; background: var(--navy); }
.lb__media.is-in > * { animation: lbIn var(--t-slow) var(--ease) both; }
.lb__media.is-in.from-l > * { animation-name: lbInL; }
@keyframes lbIn  { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes lbInL { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
.lb__cap { padding: 16px 0 22px; text-align: center; font-size: 14px; color: var(--muted); }
.lb__cap em { color: var(--lb-fg); font-size: 16px; }
.lb__nav {
  position: absolute; top: 64px; bottom: 0; z-index: 2; width: clamp(56px, 8vw, 140px);
  display: flex; align-items: center; justify-content: center; color: var(--lb-fg);
}
.lb__nav[hidden] { display: none; }
.lb__nav--prev { left: 0; }
.lb__nav--next { right: 0; }
.lb__nav svg { width: 40px; height: 16px; opacity: .55; transition: transform var(--t-med) var(--ease), opacity var(--t-fast); }
.lb__nav--prev:hover svg { transform: translateX(-6px); opacity: 1; }
.lb__nav--next:hover svg { transform: translateX(6px); opacity: 1; }
@media (max-width: 759px) {
  .lb__stage { padding: 12px 12px 56px; } /* room for the arrows under the caption */
  .lb__cap { padding: 12px 0 8px; }
  .lb__nav { width: 44px; top: auto; bottom: 8px; height: 44px; }
  .lb__nav svg { width: 28px; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 759px) {
  :root { --bar-h: 104px; }
  .bar { grid-template-columns: 1fr auto auto; grid-template-rows: 56px 48px; }
  .bar__logo { border-right: 0; }
  .bar__filters { grid-column: 1; grid-row: 2; border-top: 1px solid var(--line); justify-content: space-between; }
  .bar__index { grid-column: 2 / -1; grid-row: 2; border-top: 1px solid var(--line); padding: 0 14px; font-size: var(--fs-note); gap: 8px; }
  .index__head em { display: none; }
  .filter { flex: 1; justify-content: center; padding: 0 8px; font-size: var(--fs-note); gap: 7px; }
  .bar__aside { grid-row: 1; grid-column: 2; }
  .bar__work { grid-row: 1; grid-column: 3; }
  body:not([data-view="work"]) .bar { grid-template-rows: 56px; height: 57px; }
  body:not([data-view="work"]) .bar__filters { display: none; }
  body:not([data-view="work"]) { --bar-h: 57px; }

  .pj-split { grid-template-rows: minmax(0, 1.2fr) auto minmax(0, 1fr); }
  .pj-divider { grid-template-columns: 1fr auto; }
  .pj-divider__tags { display: none; }
  .pj-divider__title { flex-direction: column; align-items: flex-start; gap: 3px; }
  .pj-divider__title span { font-size: var(--fs-label); }
  .pull { gap: 10px; }
  .pull__track { width: 92px; }
  .pull__label { font-size: 13px; }
  .pull__label em { font-size: 16px; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .strip { overflow-x: auto; }
  .strip__track { animation: none; transform: none; }
  .strip__toggle { display: none; }
  .film__wait { display: none !important; }
}
