/* ============================================================
   Bartek Maślak — Photography
   Minimal archival dossier. Paper base, cinematic imagery.
   ============================================================ */

:root {
  --paper:      #f1efeb;
  --paper-2:    #e9e6e1;
  --ink:        #14130f;
  --ink-70:     rgba(20, 19, 15, 0.66);
  --ink-45:     rgba(20, 19, 15, 0.45);
  --ink-25:     rgba(20, 19, 15, 0.22);
  --rule:       rgba(20, 19, 15, 0.16);
  --rule-soft:  rgba(20, 19, 15, 0.09);

  --display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gut:  clamp(18px, 4.2vw, 56px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.72;
  font-weight: 350;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--ink); color: var(--paper); }

/* ---------- primitives ---------- */

.wrap { width: 100%; padding-inline: var(--gut); margin-inline: auto; max-width: 1680px; }

.label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

.disp {
  font-family: var(--display);
  font-weight: 600;
  font-stretch: 100%;
  text-transform: uppercase;
  letter-spacing: -0.012em;
  line-height: 1.0;   /* Polish diacritics need the headroom */
}

.link-u {
  position: relative;
  display: inline-block;
  padding-bottom: 1px;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.45s var(--ease);
}
.link-u:hover { background-size: 0% 1px; background-position: 100% 100%; }

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}
.site-head__in {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
}
.brand {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}
.brand span { color: var(--ink-45); font-weight: 350; }

.nav { display: flex; gap: clamp(14px, 2.4vw, 34px); align-items: baseline; }
.nav a {
  font-size: 10px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--ink-45);
  transition: color 0.3s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* ---------- hero ---------- */

.hero { padding-block: clamp(56px, 13vh, 150px) clamp(34px, 6vh, 74px); }
.hero__meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 18px;
}
.hero h1 {
  margin: 0;
  font-size: clamp(50px, 12.2vw, 190px);
  line-height: 0.86;
  letter-spacing: -0.028em;
}
.hero__sub {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  padding-top: clamp(26px, 5vh, 54px);
}
@media (min-width: 860px) {
  .hero__sub { grid-template-columns: 1fr minmax(300px, 460px); align-items: end; }
}
.hero__stmt {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(19px, 2.2vw, 28px);
  line-height: 1.22;
  letter-spacing: -0.014em;
  max-width: 22ch;
}
.hero__note { margin: 0; color: var(--ink-70); max-width: 46ch; font-size: 12.5px; }

/* ---------- index of works ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding-block: 20px 12px;
}

.index { border-top: 1px solid var(--rule); }

.idx-row {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 0 18px;
  align-items: start;
  padding-block: 20px;
  border-bottom: 1px solid var(--rule-soft);
  position: relative;
  transition: background-color 0.4s var(--ease);
}
.idx-row:hover { background: color-mix(in srgb, var(--paper-2) 70%, transparent); }

.idx-row__no { font-size: 10px; letter-spacing: 0.14em; color: var(--ink-45); padding-top: 7px; }

.idx-row__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 5.2vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-transform: uppercase; letter-spacing: -0.015em;
}
.idx-row__title em { font-style: normal; color: var(--ink-25); }

.idx-row__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  padding-top: 10px;
}

.idx-row__thumb {
  margin-top: 16px;
  width: 100%;
  max-width: 260px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: var(--paper-2);
}
.idx-row__thumb img { width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 900px) {
  .idx-row {
    grid-template-columns: 60px minmax(0, 1fr) minmax(0, 320px);
    align-items: center;
    gap: 0 32px;
    padding-block: 26px;
  }
  .idx-row__facts { padding-top: 12px; }
  .idx-row__thumb { display: none; }
  .idx-row__no { padding-top: 0; }
}

/* floating hover preview (desktop only) */
.peek {
  position: fixed;
  top: 0; left: 0;
  width: 250px;
  aspect-ratio: 2 / 3;
  pointer-events: none;
  z-index: 90;
  opacity: 0;
  transform: translate3d(-50%, -50%, 0) scale(0.94);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
  overflow: hidden;
  box-shadow: 0 24px 60px -22px rgba(20, 19, 15, 0.45);
  will-change: transform, opacity;
}
.peek img { width: 100%; height: 100%; object-fit: cover; }
.peek.is-on { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }
@media (max-width: 899px), (prefers-reduced-motion: reduce) { .peek { display: none; } }

/* ---------- selected strip ---------- */

.strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding-block: clamp(46px, 9vh, 110px) 0;
}
@media (min-width: 760px) { .strip { grid-template-columns: repeat(4, 1fr); gap: 10px; } }
.strip figure { margin: 0; overflow: hidden; background: var(--paper-2); aspect-ratio: 2 / 3; }
.strip img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.1s var(--ease), filter 0.7s var(--ease);
  filter: saturate(0.96);
}
.strip figure:hover img { transform: scale(1.035); filter: saturate(1.05); }

/* ---------- project page ---------- */

.proj-head { padding-block: clamp(40px, 9vh, 104px) clamp(24px, 4vh, 48px); }
.proj-head h1 {
  margin: 0;
  font-size: clamp(40px, 9vw, 132px);
  line-height: 0.9;
  letter-spacing: -0.026em;
}
.proj-head__top { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 16px; }

.dossier {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 26px;
  padding-block: clamp(28px, 5vh, 54px);
  border-top: 1px solid var(--rule);
  margin-top: clamp(28px, 5vh, 54px);
}
@media (min-width: 780px) { .dossier { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1120px) { .dossier { grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.6fr); gap: 22px 40px; } }
.dossier dt { margin-bottom: 5px; }
.dossier dd { margin: 0; font-size: 12.5px; line-height: 1.6; }
.dossier__note dd { color: var(--ink-70); max-width: 62ch; }

/* image sequence */

.seq { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(10px, 2vw, 26px); padding-block: clamp(30px, 6vh, 70px) 0; }
.seq figure { margin: 0; grid-column: 1 / -1; }
.seq figure img {
  width: 100%;
  /* height:auto is load-bearing — the width/height attributes are there for
     layout stability, and without this the picture renders stretched */
  height: auto;
  background: var(--paper-2);
  cursor: zoom-in;
}
.seq figcaption { padding-top: 8px; }

@media (min-width: 860px) {
  .seq figure.lead       { grid-column: 3 / 11; }
  .seq figure.lead-wide  { grid-column: 1 / -1; }
  .seq figure.pair-l     { grid-column: 2 / 7; }
  .seq figure.pair-r     { grid-column: 7 / 12; align-self: end; }
  .seq figure.solo-left  { grid-column: 1 / 7; }
  .seq figure.solo-right { grid-column: 7 / 13; }
}

/* prev / next */
.pager {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  padding-block: clamp(56px, 11vh, 130px) 0;
  border-top: 1px solid var(--rule);
  margin-top: clamp(56px, 11vh, 130px);
}
@media (min-width: 720px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager__side { padding-top: 26px; }
.pager__side.is-next { text-align: right; }
.pager__ttl {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  display: block;
  margin-top: 8px;
  text-transform: uppercase; letter-spacing: -0.012em; font-weight: 600;
}

/* ---------- work grid ---------- */

.grid-work { display: grid; grid-template-columns: 1fr; gap: clamp(30px, 5vw, 56px); padding-block: clamp(28px, 5vh, 56px) 0; }
@media (min-width: 700px) { .grid-work { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .grid-work { grid-template-columns: repeat(3, 1fr); } }
.card figure { margin: 0 0 14px; overflow: hidden; background: var(--paper-2); aspect-ratio: 2 / 3; }
.card figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover figure img { transform: scale(1.04); }
.card h2 { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.05; letter-spacing: -0.018em; margin: 0 0 6px; }
.card__facts { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- profile ---------- */

.prose { max-width: 60ch; }
.prose p { margin: 0 0 1.15em; color: var(--ink-70); font-size: 13px; }
.prose p.lead {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(20px, 2.4vw, 29px);
  line-height: 1.24;
  letter-spacing: -0.016em;
  color: var(--ink);
  max-width: 24ch;
  margin-bottom: 1em;
}

.cols { display: grid; grid-template-columns: 1fr; gap: clamp(30px, 5vw, 70px); padding-block: clamp(28px, 5vh, 56px); }
@media (min-width: 900px) { .cols { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }

.deflist { display: grid; grid-template-columns: 1fr; gap: 0; }
.deflist > div {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  padding-block: 12px;
  border-bottom: 1px solid var(--rule-soft);
}
.deflist > div:first-child { border-top: 1px solid var(--rule); }
.deflist dd { margin: 0; font-size: 12.5px; }

.clients { margin: 0; padding: 0; }
.clients li { list-style: none; padding-block: 3px; }

/* ---------- contact / footer ---------- */

.contact { padding-block: clamp(70px, 15vh, 170px) clamp(40px, 7vh, 90px); border-top: 1px solid var(--rule); margin-top: clamp(60px, 12vh, 140px); }
.contact h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(34px, 6.6vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  text-transform: uppercase; letter-spacing: -0.02em;
}
.contact__grid { display: grid; grid-template-columns: 1fr; gap: 26px; padding-top: clamp(28px, 5vh, 56px); }
@media (min-width: 760px) { .contact__grid { grid-template-columns: repeat(3, 1fr); } }
.contact__grid a { font-size: 13px; }

.site-foot { padding-block: 20px 30px; border-top: 1px solid var(--rule-soft); }
.site-foot__in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- lightbox ---------- */

.lb {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(14, 13, 10, 0.96);
  display: grid; place-items: center;
  padding: clamp(14px, 4vw, 54px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.lb.is-open { opacity: 1; visibility: visible; }
.lb img { max-width: 100%; max-height: 84vh; width: auto; object-fit: contain; cursor: zoom-out; }
.lb__bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px clamp(14px, 4vw, 54px) 20px;
  color: rgba(241, 239, 235, 0.6);
}
.lb__btn {
  background: none; border: 0; cursor: pointer; padding: 8px 10px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.19em; text-transform: uppercase;
  color: rgba(241, 239, 235, 0.6); transition: color 0.25s var(--ease);
}
.lb__btn:hover { color: #f1efeb; }
.lb__nav { display: flex; gap: 4px; }

/* ---------- reveal ---------- */

[data-rev] { opacity: 0; transform: translate3d(0, 16px, 0); }
.is-rev { opacity: 1; transform: none; transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  [data-rev] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- misc ---------- */

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper); padding: 10px 16px; z-index: 999;
}
.skip:focus { left: 12px; top: 12px; }

:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }

/* ---------- filmstrip home ---------- */

body.is-film { overflow: hidden; height: 100%; }
html:has(body.is-film) { overflow: hidden; height: 100%; }

.film-page {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--paper);
}

.film-bar {
  flex: 0 0 auto;
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: 18px var(--gut);
  z-index: 5;
}
.film-bar--top { padding-top: clamp(16px, 3vh, 28px); }
.film-bar--bottom { padding-bottom: clamp(16px, 3vh, 28px); }
.film-bar .brand {
  font-family: var(--serif); font-size: clamp(17px, 1.5vw, 22px);
  letter-spacing: -0.01em; line-height: 1;
}
.film-bar .nav { display: flex; gap: clamp(14px, 2vw, 30px); }
.film-bar .nav a {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.19em;
  text-transform: uppercase; color: var(--ink-70);
  transition: color 0.3s var(--ease);
}
.film-bar .nav a:hover, .film-bar .nav a[aria-current] { color: var(--ink); }
.film-bar__mid { color: var(--ink-45); }
.film-bar--bottom .label { color: var(--ink-45); }
.film-bar--bottom a { color: var(--ink-45); transition: color 0.3s var(--ease); }
.film-bar--bottom a:hover { color: var(--ink); }
@media (max-width: 700px) {
  .film-bar__mid { display: none; }
  .film-bar { padding-inline: var(--gut); }
}

.film-stage {
  flex: 1 1 auto;
  position: relative;
  min-height: 0;
  display: flex; align-items: center;
}

.film {
  display: flex; align-items: center;
  width: 100%;
  overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  cursor: grab;
  outline: none;
}
.film::-webkit-scrollbar { display: none; }
.film.is-drag { cursor: grabbing; }
.film__pad { flex: 0 0 50%; }

.frame {
  position: relative;
  flex: 0 0 auto;
  display: block;
  padding-inline: clamp(9px, 1.1vw, 20px);
  padding-bottom: clamp(24px, 3.4vh, 36px);
  -webkit-user-drag: none; user-select: none;
}

/* caption sits just under the picture, tiny */
.frame__cap {
  position: absolute;
  bottom: 2px; left: clamp(9px, 1.1vw, 20px);
  display: flex; align-items: baseline; gap: 9px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(0, 3px, 0);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.frame__cap .label { font-size: 9px; letter-spacing: 0.17em; }
.frame__no { color: var(--ink-25); }
.frame__ttl { color: var(--ink); }
.frame__meta { color: var(--ink-45); }
.frame.is-on .frame__cap { opacity: 1; transform: none; transition-delay: 0.16s; }
.frame:hover .frame__cap { opacity: 1; transform: none; }
.frame:hover:not(.is-on) .frame__ttl { color: var(--ink-70); }
.frame:hover:not(.is-on) .frame__meta { display: none; }
@media (max-width: 700px) {
  .frame__cap { gap: 7px; }
  .frame__meta { display: none; }
}
/* Nothing is ever cropped or squashed: width follows the picture's own ratio,
   and every height is also capped by the width the viewport can spare
   (Xvw / --ar), so a wide frame runs out of height before it runs off screen. */
.frame img {
  display: block;
  width: auto;
  height: min(clamp(120px, 21vh, 210px), calc(30vw / var(--ar, 0.667)));
  filter: grayscale(0.24);
  opacity: 0.5;
  transition:
    height 0.48s var(--ease),
    opacity 0.4s var(--ease),
    filter 0.4s var(--ease);
  backface-visibility: hidden;
}

/* mid-flick: snap the sizes instead of tweening 25 of them at once,
   then let the last one settle normally once the strip slows down */
.film.is-fast .frame img { transition: opacity 0.2s var(--ease), filter 0.2s var(--ease); }
.film.is-fast .frame__cap { transition-duration: 0.15s; }
.frame.is-on img {
  /* as tall as the stage allows, but never wider than the screen */
  height: min(84vh, calc(100vh - 172px), calc(80vw / var(--ar, 0.667)));
  opacity: 1;
  filter: none;
}
.frame.is-near img { opacity: 0.72; }
.frame:hover img { opacity: 0.85; }
.frame.is-on:hover img { opacity: 1; }

@media (max-width: 700px) {
  .frame img { height: min(110px, calc(40vw / var(--ar, 0.667))); }
  .frame.is-on img { height: min(62vh, calc(100vh - 170px), calc(88vw / var(--ar, 0.667))); }
}
@media (prefers-reduced-motion: reduce) {
  .frame img { transition: none; }
  .film { scroll-behavior: auto; }
}

/* ---------- entrance: photos drop in ---------- */

@keyframes frame-drop {
  0% {
    opacity: 0;
    transform: translate3d(0, -26vh, 0) rotate(var(--tilt, 0deg)) scale(0.94);
  }
  62% {
    opacity: 1;
    transform: translate3d(0, 1.4%, 0) rotate(calc(var(--tilt, 0deg) * 0.18)) scale(1.008);
  }
  81% {
    transform: translate3d(0, -0.5%, 0) rotate(calc(var(--tilt, 0deg) * -0.05)) scale(0.998);
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

/* held blank until the first pictures have actually decoded */
html.js body.is-film .frame { opacity: 0; }
body.is-film.is-ready .frame {
  animation: frame-drop 1.05s cubic-bezier(0.16, 0.9, 0.28, 1) both;
  animation-delay: calc(60ms + var(--i, 0) * 52ms);
}

/* chrome settles in first, quietly */
@keyframes bar-in {
  from { opacity: 0; transform: translate3d(0, -6px, 0); }
  to   { opacity: 1; transform: none; }
}
body.is-film.is-ready .film-bar--top { animation: bar-in 0.8s var(--ease) both; }
body.is-film.is-ready .film-bar--bottom {
  animation: bar-in 0.8s var(--ease) both;
  animation-delay: 0.5s;
}

@media (prefers-reduced-motion: reduce) {
  html.js body.is-film .frame,
  html.js body.is-film.is-ready .frame,
  html.js body.is-film .film-bar--top,
  html.js body.is-film .film-bar--bottom { animation: none; opacity: 1; transform: none; }
}

/* ---------- campaign reveal ---------- */

.reveal {
  position: fixed; inset: 0; z-index: 90;
  display: none;
  background: var(--paper);
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.reveal.is-mounted { display: block; }

/* the sheet slides up as one surface, then the frames rise inside it */
.reveal__sheet {
  min-height: 100%;
  opacity: 0;
  transform: translate3d(0, 3.5vh, 0);
  transition: opacity 0.42s var(--ease), transform 0.52s var(--ease);
}
.reveal.is-open .reveal__sheet { opacity: 1; transform: none; }

.reveal__bar {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: baseline; justify-content: space-between; gap: 18px;
  padding: clamp(16px, 3vh, 26px) var(--gut);
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.reveal.is-scrolled .reveal__bar { border-bottom-color: var(--rule); }
.reveal__bar-l { display: flex; align-items: baseline; gap: clamp(10px, 1.6vw, 22px); min-width: 0; }
.reveal__ttl {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(12px, 1.05vw, 15px); letter-spacing: 0.02em; line-height: 1;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.reveal__bar .label { color: var(--ink-45); white-space: nowrap; }
.reveal__close {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.19em;
  text-transform: uppercase; color: var(--ink-45);
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  transition: color 0.3s var(--ease);
}
.reveal__close:hover { color: var(--ink); }

.reveal__head { padding: clamp(26px, 7vh, 74px) var(--gut) clamp(20px, 4vh, 40px); }
.reveal__dossier {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 26px; margin: 0;
  padding-top: clamp(16px, 3vh, 30px);
  border-top: 1px solid var(--rule);
}
.reveal__dossier dt { margin: 0; }
.reveal__dossier dd { margin: 6px 0 0; }
.reveal__note { grid-column: 1 / -1; max-width: 62ch; }

.reveal__grid {
  columns: 3;
  column-gap: clamp(10px, 1.4vw, 22px);
  padding: 0 var(--gut) clamp(40px, 9vh, 110px);
}
.reveal__grid figure {
  break-inside: avoid;
  margin: 0 0 clamp(10px, 1.4vw, 22px);
  position: relative;
}
.reveal__grid img {
  display: block; width: 100%; height: auto;
  background: var(--rule);
}
.reveal__grid figcaption {
  position: absolute; left: 0; bottom: -16px;
  color: var(--ink-25); font-size: 9px; letter-spacing: 0.17em;
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.reveal__grid figure:hover figcaption { opacity: 1; }

.reveal__foot {
  padding: 0 var(--gut) clamp(40px, 9vh, 100px);
  display: flex; flex-wrap: wrap; gap: 18px 34px; align-items: baseline;
}

@media (max-width: 1000px) { .reveal__grid { columns: 2; } }
@media (max-width: 640px) {
  .reveal__grid { columns: 1; }
  .reveal__dossier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reveal__bar .label { display: none; }
}

/* frames rise to the surface, staggered */
@keyframes reveal-rise {
  from { opacity: 0; transform: translate3d(0, 34px, 0) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
html.js .reveal__grid figure { opacity: 0; }
.reveal.is-open .reveal__grid figure {
  animation: reveal-rise 0.72s cubic-bezier(0.2, 0.75, 0.25, 1) both;
  animation-delay: calc(120ms + var(--i, 0) * 46ms);
}
html.js .reveal__head, html.js .reveal__foot { opacity: 0; }
.reveal.is-open .reveal__head,
.reveal.is-open .reveal__foot {
  animation: reveal-rise 0.6s var(--ease) both;
}
.reveal.is-open .reveal__foot { animation-delay: 0.2s; }

/* the strip settles back while the sheet is up */
body.is-revealing .film-page { transition: opacity 0.4s var(--ease); opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal__sheet,
  html.js .reveal.is-open .reveal__sheet { transition: none; opacity: 1; transform: none; }
  html.js .reveal__grid figure,
  html.js .reveal.is-open .reveal__grid figure,
  html.js .reveal__head,
  html.js .reveal.is-open .reveal__head,
  html.js .reveal__foot,
  html.js .reveal.is-open .reveal__foot { animation: none; opacity: 1; transform: none; }
  body.is-revealing .film-page { transition: none; }
}
