/* ==========================================================================
   Elise Ketilsson Dobbe — "Available Dark"
   Layout: an unlit room. A full-bleed reel with a title card, then
   staggered widescreen frames on near-black; colour is withheld until
   a frame is lit (hover / focus / centre of a phone screen).
   ========================================================================== */

@font-face { font-family: "Italiana"; src: url("../assets/fonts/Italiana-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../assets/fonts/InstrumentSans-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../assets/fonts/InstrumentSans-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../assets/fonts/InstrumentSans-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("../assets/fonts/DMMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  color-scheme: dark;

  /* colour */
  --black: #0b0a09;     /* unlit stage */
  --ink: #151412;       /* ground of an empty frame */
  --line: #2b2824;      /* hairlines */
  --paper: #ede8df;     /* warm white, tungsten on paper */
  --dim: #a8a297;       /* secondary text */
  --faint: #857f75;     /* labels */
  --amber: #e9a25a;     /* the one pilot light: 3200 K */

  /* type */
  --title: "Italiana", "Didot", "Bodoni 72", "Times New Roman", serif;
  --body: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* rhythm */
  --g: clamp(16px, 4vw, 56px);
  --gl: max(var(--g), env(safe-area-inset-left, 0px));
  --gr: max(var(--g), env(safe-area-inset-right, 0px));
  --section: clamp(80px, 9vw, 140px);
  --dimmer: cubic-bezier(.55, 0, .25, 1);   /* slow start, like a fader near zero */
  --fade: 900ms;
}

*, *::before, *::after { box-sizing: border-box; }
/* anything marked hidden is really gone (the project view sets display:flex, which would otherwise win) */
[hidden] { display: none !important; }
html { background: var(--black); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.is-locked, html.is-locked body { overflow: hidden; }
body {
  margin: 0;
  background: var(--black);
  color: var(--paper);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* safe-area band above the fixed bar on phones */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--black); }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--amber); outline-offset: 4px; }
::selection { background: var(--paper); color: var(--black); }

.wrap { width: 100%; max-width: 1360px; margin-inline: auto; padding-left: var(--gl); padding-right: var(--gr); }
.mono { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.label { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.display { margin: 0; font-family: var(--title); font-weight: 400; font-size: clamp(34px, 4.4vw, 64px); line-height: 1.02; letter-spacing: .03em; text-wrap: balance; }
.skip { position: absolute; left: var(--gl); top: -60px; z-index: 100; padding: 10px 14px; background: var(--paper); color: var(--black); font-family: var(--mono); font-size: 12px; }
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 10px); }

.ctl { color: var(--dim); padding: 6px 0; transition: color .3s; }
.ctl:hover { color: var(--paper); }

/* ---------- bar ---------------------------------------------------------- */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .5s var(--dimmer);
}
.bar::before { content: ""; position: absolute; inset: 0 0 -40px; background: linear-gradient(var(--black), rgba(11, 10, 9, 0)); opacity: .55; pointer-events: none; transition: opacity .5s; }
.bar.is-solid { background: var(--black); }
.bar.is-solid::before { opacity: 1; top: 100%; height: 40px; }
.bar__inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 64px; max-width: 1360px; margin-inline: auto; padding-left: var(--gl); padding-right: var(--gr); }
.bar__name { font-family: var(--title); font-size: 15px; letter-spacing: .28em; text-transform: uppercase; opacity: 0; transform: translateY(-4px); transition: opacity .6s, transform .6s var(--dimmer); white-space: nowrap; }
.bar.is-solid .bar__name { opacity: 1; transform: none; }
.bar__nav { display: flex; gap: clamp(16px, 2.6vw, 40px); margin-left: auto; }
.bar__nav a { position: relative; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); transition: color .3s; }
.bar__nav a:hover, .bar__nav a[aria-current="true"] { color: var(--paper); }
.bar__nav a[aria-current="true"]::before { content: ""; position: absolute; left: -10px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--amber); }

/* ---------- hero --------------------------------------------------------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; background: var(--black); isolation: isolate; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.8s var(--dimmer); }
.hero__video.is-on { opacity: 1; }
.hero__shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(11, 10, 9, .18), rgba(11, 10, 9, .62) 100%),
    linear-gradient(to bottom, rgba(11, 10, 9, .45), rgba(11, 10, 9, 0) 22%, rgba(11, 10, 9, 0) 62%, var(--black) 100%);
}
.hero__dim { position: absolute; inset: 0; background: var(--black); opacity: calc(var(--p, 0) * .94); }
.hero__title {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding-left: var(--gl); padding-right: var(--gr);
  opacity: calc(1 - var(--p, 0) * 1.5);
  transform: translateY(calc(var(--p, 0) * -7vh));
}
.name { margin: 0; font-family: var(--title); font-weight: 400; text-transform: uppercase; line-height: 1.12; font-size: clamp(21px, 4.8vw, 76px); }
.name__line { display: block; letter-spacing: .3em; margin-right: -.3em; /* optically re-centre tracked caps */ }
.roles { margin: 1.5em 0 0; font-family: var(--title); font-size: clamp(14px, 1.55vw, 22px); letter-spacing: .26em; margin-right: -.26em; color: var(--paper); }
.roles span { color: var(--amber); }
.intro { margin: 1.1em 0 0; max-width: 34ch; text-wrap: balance; font-size: clamp(13px, 1.05vw, 15px); color: var(--dim); letter-spacing: .02em; }

.hero__foot {
  position: absolute; inset: auto 0 0; z-index: 3;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end;
  padding: 0 var(--gr) calc(26px + env(safe-area-inset-bottom, 0px)) var(--gl);
  opacity: calc(1 - var(--p, 0) * 2);
}
.hero__tc { color: var(--faint); }
.hero__tc span { color: var(--dim); }
.hero__controls { grid-column: 3; justify-self: end; display: flex; gap: 20px; }
.hero__cue { grid-column: 2; grid-row: 1; display: block; width: 24px; height: 56px; position: relative; }
.hero__cue span { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: rgba(237, 232, 223, .22); overflow: hidden; }
.hero__cue span::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--paper); animation: cue 2.6s var(--dimmer) infinite; }
@keyframes cue { to { top: 100%; } }

/* title-card entrance: tracking settles in, like opening credits */
.js .name__line, .js .roles, .js .intro { animation: titlein 1.8s var(--dimmer) both; }
.js .name__line:nth-child(2) { animation-delay: .25s; }
.js .roles { animation-delay: .7s; }
.js .intro { animation-delay: 1s; }
@keyframes titlein { from { opacity: 0; letter-spacing: .5em; filter: blur(6px); } }
.js .intro { animation-name: fadein; }
@keyframes fadein { from { opacity: 0; } }

/* ---------- work --------------------------------------------------------- */
.work { padding-block: var(--section) 0; }
.work__head { display: grid; gap: 22px; margin-bottom: clamp(40px, 5vw, 72px); }
.slash { color: var(--faint); }
.filters { display: flex; flex-wrap: wrap; gap: 6px clamp(18px, 2.4vw, 36px); margin-top: 12px; }
.filter { position: relative; display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); transition: color .3s; }
.filter:hover { color: var(--paper); }
.filter sup { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; color: var(--faint); }
.filter[aria-pressed="true"] { color: var(--paper); }
.filter[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--paper); }
.filter[aria-pressed="true"]::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); align-self: center; margin-right: 2px; }

/* an even grid: three across, with pairs at the top when needed so every row is full */
.grid {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px); row-gap: clamp(44px, 4.5vw, 72px);
  transition: opacity .6s var(--dimmer);
}
.grid.is-out { opacity: 0; transition-duration: .32s; }
.card--third { grid-column: span 2; --ar: 16 / 9; }
.card--half { grid-column: span 3; --ar: 16 / 9; }
.card--full { grid-column: 1 / -1; --ar: 21 / 9; }

.card { display: grid; gap: 14px; align-content: start; min-width: 0; }
.frame { position: relative; margin: 0; overflow: hidden; background: var(--ink); aspect-ratio: var(--ar, 16 / 9); max-width: 100%; }
.frame img { width: 100%; height: 100%; object-fit: cover; }

/* the dimmer: grey and low at rest, colour fades up when lit */
.card .frame img, .js-lit img {
  filter: grayscale(1) brightness(.74) contrast(1.06);
  transform: scale(1.001);
  transition: filter var(--fade) var(--dimmer), transform 2.4s var(--dimmer);
}
.card:hover .frame img, .card:focus-visible .frame img, .card.is-lit .frame img,
.js-lit:hover img, .js-lit.is-lit img, a:focus-visible .js-lit img {
  filter: grayscale(0) brightness(1) contrast(1);
  transform: scale(1.025);
}

.card__meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 20px; align-items: baseline; }
.card__title { margin: 0; font-family: var(--title); font-weight: 400; font-size: clamp(19px, 1.5vw, 25px); line-height: 1.15; letter-spacing: .05em; color: var(--dim); transition: color var(--fade) var(--dimmer); }
.card__sub { font-size: .62em; letter-spacing: .08em; color: var(--faint); }
.card__role { margin: 0; grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--paper); text-align: right; }
.card__info { margin: 0; grid-column: 1 / -1; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
/* festival line: sits on the frame like a laurel on a poster */
.honour {
  position: absolute; left: 16px; bottom: 14px; z-index: 1;
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--paper);
  text-shadow: 0 1px 12px rgba(11, 10, 9, .9);
}
.honour::before, .honour::after { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .7; }
.honour--inline { position: static; margin: 0; text-shadow: none; }
.viewer__about { margin: 0; max-width: 52ch; font-size: 17px; color: var(--paper); }
.card__status { color: var(--dim); }
.card__status::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-right: 7px; border: 1px solid var(--dim); border-radius: 50%; vertical-align: 1px; }
.card__status::after { content: "·"; margin: 0 .55em; color: var(--faint); }
.pilot { width: 5px; height: 5px; flex: none; border-radius: 50%; background: var(--amber); opacity: 0; transition: opacity var(--fade) var(--dimmer); }
.card:hover .card__title, .card:focus-visible .card__title, .card.is-lit .card__title { color: var(--paper); }
.card:hover .pilot, .card:focus-visible .pilot, .card.is-lit .pilot { opacity: 1; }
.card:focus-visible { outline: none; }
.card:focus-visible .frame { outline: 1px solid var(--amber); outline-offset: 6px; }

/* an empty frame is a title card */
.titlecard {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 24px; text-align: center;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, rgba(237, 232, 223, .05), transparent 70%), var(--ink);
}
.titlecard::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(237, 232, 223, .16), rgba(233, 162, 90, .04) 35%, transparent 62%);
  opacity: 0; transition: opacity var(--fade) var(--dimmer);
}
.titlecard__t { position: relative; font-family: var(--title); font-size: clamp(18px, 2.2vw, 34px); letter-spacing: .32em; margin-right: -.32em; text-transform: uppercase; color: var(--dim); transition: color var(--fade) var(--dimmer); }
.titlecard__s { position: relative; font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.card:hover .titlecard::before, .card.is-lit .titlecard::before, .card:focus-visible .titlecard::before { opacity: 1; }
.card:hover .titlecard__t, .card.is-lit .titlecard__t, .card:focus-visible .titlecard__t { color: var(--paper); }

/* videography: a quieter row under the films */
.subgrid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px clamp(16px, 2.4vw, 40px); padding-top: 40px; border-top: 1px solid var(--line); }
.subgrid__label { grid-column: 1 / -1; display: flex; gap: 14px; align-items: baseline; }
.subgrid__label span { color: var(--faint); letter-spacing: .08em; text-transform: none; font-family: var(--body); font-size: 13px; }
.card--small { --ar: 16 / 9; gap: 12px; }
.card--small .card__title { font-size: clamp(18px, 1.5vw, 22px); }

.noscript { color: var(--dim); }

/* ---------- gaffer band ------------------------------------------------- */
.light { margin-top: var(--section); padding-block: var(--section); border-top: 1px solid var(--line); }
.light__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(40px, 6vw, 96px) clamp(16px, 2.4vw, 40px); align-items: center; }
.light__text { grid-column: 1 / span 5; display: grid; gap: 22px; align-content: center; }
.light__lede { margin: 0; max-width: 38ch; font-size: 17px; color: var(--dim); }
.light__main { grid-column: 6 / span 7; --ar: 3 / 2; }
.credits { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--line); }
.credits li { border-bottom: 1px solid var(--line); }
.credits a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 13px 0; transition: color .3s; }
.credits__t { font-family: var(--title); font-size: 21px; letter-spacing: .04em; color: var(--dim); transition: color .4s; }
.credits__t small { font-family: var(--body); font-size: 13px; letter-spacing: 0; color: var(--faint); margin-left: 10px; }
.credits__r { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.credits a:hover .credits__t { color: var(--paper); }
.more { justify-self: start; margin-top: 10px; display: inline-flex; gap: 10px; align-items: center; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--paper); padding: 6px 0; border-bottom: 1px solid var(--faint); transition: border-color .3s; }
.more::after { content: "→"; font-family: var(--mono); }
.more:hover { border-color: var(--paper); }
.light__strip { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 40px); }
.light__strip a { display: grid; gap: 12px; }
.light__strip .frame { --ar: 16 / 9; }
.light__strip figcaption, .light__strip .cap { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }

/* ---------- about ------------------------------------------------------- */
.about { padding-block: var(--section); border-top: 1px solid var(--line); }
.about__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px clamp(16px, 2.4vw, 40px); }
.about__grid > .label { grid-column: 1 / span 2; }
.about__portrait { grid-column: 3 / span 4; --ar: 4 / 5; align-self: start; }
.about__text { grid-column: 3 / span 6; display: grid; gap: 1.1em; min-width: 0; }
.about__portrait:not([hidden]) ~ .about__text { grid-column: 8 / span 5; align-self: center; }
.about__photos { grid-column: 3 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 40px); }
.about__photos .frame { --ar: 3 / 2; }
.about__photos .frame[style] { aspect-ratio: var(--ar); }
.about__text p { margin: 0; max-width: 60ch; color: var(--dim); font-size: 17px; }
.about__text .about__lede { font-family: var(--title); font-size: clamp(24px, 2.5vw, 36px); line-height: 1.3; letter-spacing: .02em; color: var(--paper); max-width: 26ch; text-wrap: balance; }
.facts { grid-column: 10 / span 3; margin: 0; display: grid; gap: 18px; align-content: start; }
.about__portrait:not([hidden]) ~ .facts { grid-column: 3 / -1; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.facts div { display: grid; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.facts dd { margin: 0; font-size: 14px; color: var(--paper); }

/* ---------- contact ----------------------------------------------------- */
.contact { padding-block: var(--section) clamp(80px, 10vw, 140px); border-top: 1px solid var(--line); }
.contact__title { margin: 22px 0 clamp(40px, 5vw, 72px); font-family: var(--title); font-weight: 400; font-size: clamp(48px, 7.5vw, 112px); line-height: .95; letter-spacing: .02em; text-wrap: balance; }
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: minmax(96px, 200px) minmax(0, 1fr) auto; gap: 16px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); }
.row__k { color: var(--faint); }
.row__v { font-family: var(--title); font-size: clamp(20px, 2.6vw, 36px); letter-spacing: .03em; overflow-wrap: anywhere; user-select: all; }
a.row__v { transition: color .3s; }
a.row__v:hover { color: var(--amber); }
.row__a { color: var(--faint); justify-self: end; }

.foot { border-top: 1px solid var(--line); }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-block: 28px calc(28px + env(safe-area-inset-bottom, 0px)); color: var(--faint); }
.foot__links { display: flex; gap: 24px; }
.foot a:hover { color: var(--paper); }

/* ---------- project view ------------------------------------------------ */
.viewer { position: fixed; inset: 0; z-index: 80; background: var(--black); display: flex; flex-direction: column; opacity: 0; transition: opacity .45s var(--dimmer); }
.viewer.is-open { opacity: 1; }
.viewer__bar {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) var(--gr) 14px var(--gl);
  border-bottom: 1px solid var(--line);
}
.viewer__bar > .ctl { justify-self: start; }
.viewer__pos { color: var(--faint); justify-self: center; }
.viewer__nav { justify-self: end; display: flex; gap: 22px; }
.viewer__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.viewer__body { max-width: 1200px; padding-block: clamp(40px, 5vw, 80px) calc(80px + env(safe-area-inset-bottom, 0px)); display: grid; gap: clamp(32px, 4vw, 56px); }
.viewer__head { display: grid; gap: 16px; max-width: 980px; }
.viewer__title { margin: 0; font-family: var(--title); font-weight: 400; font-size: clamp(40px, 6vw, 96px); line-height: 1; letter-spacing: .04em; text-wrap: balance; }
.viewer__title small { display: block; margin-top: .35em; font-size: .3em; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.viewer__by { margin: 0; font-size: 17px; color: var(--dim); }
.viewer__credit { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 6px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.viewer__credit div { display: grid; gap: 4px; }
.viewer__credit dt { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.viewer__credit dd { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.viewer__credit dd .pilot { opacity: 1; }
.viewer__ext { justify-self: start; }

.player { position: relative; aspect-ratio: 16 / 9; max-width: 100%; background: var(--ink); overflow: hidden; }
.player__poster, .player__poster img, .player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player video { background: var(--black); object-fit: contain; }
.player__poster img { object-fit: cover; filter: brightness(.62); transition: filter var(--fade) var(--dimmer); }
.player__play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--paper); }
.player__icon { width: 76px; height: 76px; border: 1px solid rgba(237, 232, 223, .7); border-radius: 50%; position: relative; transition: border-color .4s, transform .6s var(--dimmer); }
.player__icon::after { content: ""; position: absolute; left: 31px; top: 25px; border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent var(--paper); }
.player__label { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.player__rt { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; color: var(--dim); }
.player:hover .player__poster img { filter: brightness(.85); }
.player:hover .player__icon { border-color: var(--amber); transform: scale(1.04); }
.player__note { margin: 12px 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--faint); }
.player__note a { color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.player__note a:hover { color: var(--paper); }

.lead { --ar: 16 / 9; }
.lead img { filter: none; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(12px, 2vw, 32px); }
.gallery figure { margin: 0; background: var(--ink); }
.gallery figure:nth-child(3n+1) { grid-column: 1 / -1; }
.gallery img { width: 100%; height: auto; }
.viewer__next { display: grid; gap: 10px; padding-top: 28px; border-top: 1px solid var(--line); }
.viewer__next a { justify-self: start; font-family: var(--title); font-size: clamp(30px, 4.4vw, 64px); letter-spacing: .04em; color: var(--dim); transition: color .4s; }
.viewer__next a:hover { color: var(--paper); }

/* ---------- legal pages ------------------------------------------------- */
.legal { padding-block: calc(64px + env(safe-area-inset-top, 0px) + clamp(56px, 8vw, 120px)) var(--section); }
.legal h1 { margin: 16px 0 clamp(32px, 5vw, 64px); font-family: var(--title); font-weight: 400; font-size: clamp(40px, 6.4vw, 96px); line-height: 1; letter-spacing: .03em; overflow-wrap: anywhere; }
.legal h2 { margin: 40px 0 10px; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.legal p { margin: 0 0 1em; max-width: 68ch; color: var(--dim); }
.legal a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.legal .todo { color: var(--amber); }
.legal__date { margin-top: 48px !important; }

/* ---------- small screens ---------------------------------------------- */
@media (max-width: 899px) {
  /* phones and small tablets keep one column, with every other frame stepped in */
  .grid { grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: 64px; }
  .card--main:nth-child(n) { grid-column: 1 / -1; --ar: 3 / 2; margin-top: 0; }
  .card--main:nth-child(5n+2), .card--main:nth-child(5n+4) { grid-column: 2 / -1; }
  .card--main .card__title { font-size: clamp(22px, 2.1vw, 32px); }
  .subgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .light__text, .light__main { grid-column: 1 / -1; }
  .about__grid > .label, .about__text, .facts, .about__photos,
  .about__portrait:not([hidden]) ~ .about__text,
  .about__portrait:not([hidden]) ~ .facts { grid-column: 1 / -1; }
  .about__portrait { grid-column: 1 / span 8; }
  .facts, .about__portrait:not([hidden]) ~ .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .bar__name { display: none; }
  .bar__nav { gap: 18px; margin-inline: auto; }
  .card--main:nth-child(n) { grid-column: 1 / -1; }
  .light__strip { grid-template-columns: 1fr 1fr; }
  .light__strip a:nth-child(3) { display: none; }
  .row { grid-template-columns: 1fr auto; gap: 6px 16px; }
  .row__k { grid-column: 1 / -1; }
  .viewer__nav button:first-child { display: none; }
  .gallery { grid-template-columns: 1fr; }
  .hero__tc { display: none; }
  .hero__foot { grid-template-columns: 1fr auto 1fr; }
}

/* ---------- reduced motion ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; }
}
