/* Ana Lario — components. Film first, furniture last. */

/* ---------- Homepage reel ---------- */
.reel {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  background: #000;
  container-type: size;
}
.reel-slides { position: absolute; inset: 0; }
.reel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}
/* The incoming film fades in on top of the outgoing one, which stays fully
   visible underneath until it is removed — no dip to black between films. */
.reel-slide[data-leaving] { opacity: 1; z-index: 1; transition: none; }
.reel-slide[data-current] { opacity: 1; z-index: 2; }
.reel-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.reel-embed {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100cqw, calc(var(--r, 1.7778) * 100cqh));
  height: max(100cqh, calc(100cqw / var(--r, 1.7778)));
  max-width: none;
  transform: translate(-50%, -50%);
  border: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .8s var(--ease);
}
.reel-slide[data-live] .reel-embed { opacity: 1; }
.reel-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .8s var(--ease);
  pointer-events: none;
}
.reel-slide[data-live] .reel-video { opacity: 1; }
.reel-slide[data-fit="contain"] .reel-video { object-fit: contain; }
/* A film whose shape is far from the screen's sits whole on black. */
.reel-slide[data-fit="contain"] .reel-still { object-fit: contain; }
.reel-slide[data-fit="contain"] .reel-embed {
  width: min(100cqw, calc(var(--r, 1.7778) * 100cqh));
  height: min(100cqh, calc(100cqw / var(--r, 1.7778)));
}
/* Before hydration both first-film credits are rendered; orientation picks one. */
.reel-credit--portrait { display: none; }
@media (orientation: portrait) {
  .reel-credit--portrait { display: grid; }
  .reel-credit--landscape { display: none; }
}

.reel-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: var(--gutter);
  padding-bottom: clamp(20px, 3vw, 36px);
  background:
    linear-gradient(to top, rgba(0, 0, 0, .58), rgba(0, 0, 0, 0) 42%),
    linear-gradient(to bottom, rgba(0, 0, 0, .32), rgba(0, 0, 0, 0) 18%);
  pointer-events: none;
}
.reel-overlay > * { pointer-events: auto; }
.reel-wordmark {
  display: block;
  font-size: clamp(64px, 12.4vw, 210px);
  letter-spacing: -0.055em;
  line-height: .8;
  margin-left: -0.05em;
  white-space: nowrap;
}
.reel-role {
  display: block;
  margin-top: clamp(12px, 1.4vw, 22px);
  font-size: clamp(16px, 1.35vw, 20px);
  letter-spacing: 0;
}
.reel-now {
  display: grid;
  justify-items: end;
  gap: 14px;
  text-align: right;
  max-width: 34ch;
  flex-shrink: 0;
}
.reel-credit {
  display: grid;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.25;
}
.reel-client { color: var(--fg); }
.reel-title { color: rgba(243, 241, 236, .78); }
.reel-credit:hover .reel-title, .reel-credit:focus-visible .reel-title { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.reel-controls { display: flex; align-items: center; gap: 14px; }
.reel-index { display: flex; gap: 2px; }
.reel-index button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 24px;
}
.reel-tick {
  position: relative;
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(243, 241, 236, .32);
  overflow: hidden;
}
.reel-tick::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg);
  transform: scaleX(0);
  transform-origin: left;
}
.reel-index [aria-current] .reel-tick::after { transform: scaleX(1); }
.reel-tick[data-running]::after { animation: tick linear forwards; }
@keyframes tick { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.reel-pause { font-size: 13px; min-width: 40px; min-height: 24px; text-align: right; }
.reel-pause:hover { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 760px) {
  .reel-overlay {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 22px;
    background:
      linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, .25) 38%, rgba(0, 0, 0, 0) 60%),
      linear-gradient(to bottom, rgba(0, 0, 0, .35), rgba(0, 0, 0, 0) 14%);
  }
  .reel-wordmark { font-size: clamp(60px, 19vw, 120px); }
  .reel-now { justify-items: start; text-align: left; max-width: none; }
  .reel-controls { width: 100%; justify-content: space-between; }
  .reel-index { margin-left: -3px; }
}

/* ---------- Film frames ---------- */
.frame, .stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-2);
  container-type: size;
}
.still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Sized to the film's own shape (--r, read from the player): it covers a
   grid tile, and sits whole on the black film-page stage. */
.frame-embed {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100cqw, calc(var(--r, 1.7778) * 100cqh));
  height: max(100cqh, calc(100cqw / var(--r, 1.7778)));
  max-width: none;
  transform: translate(-50%, -50%);
  border: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
}
.stage .frame-embed {
  width: min(100cqw, calc(var(--r, 1.7778) * 100cqh));
  height: min(100cqh, calc(100cqw / var(--r, 1.7778)));
}
.frame[data-live] .frame-embed, .stage[data-live] .frame-embed { opacity: 1; }

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}
.tile-link { display: block; position: relative; }
.tile-link .still { transition: transform 1.4s var(--ease); }
.tile-caption { display: block; font-size: 15px; line-height: 1.3; }
.tile-client { display: block; }
.tile-title { display: block; color: var(--fg-2); }

@media (hover: hover) and (pointer: fine) {
  .tile-caption {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: 48px 14px 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, .66), rgba(0, 0, 0, 0));
    opacity: 0;
    transition: opacity .3s var(--ease);
    pointer-events: none;
  }
  .tile-title { color: rgba(243, 241, 236, .82); }
  .tile-link:hover .tile-caption, .tile-link:focus-visible .tile-caption { opacity: 1; }
  .tile-link:hover .still { transform: scale(1.015); }
}
@media (hover: none), (pointer: coarse) {
  .tile-caption { padding: 8px 0 10px; font-size: 14px; }
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* An odd number of films leads with one full-width tile. */
  .grid > .tile:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
}

/* ---------- Page scaffolding ---------- */
.section { padding-top: clamp(56px, 7vw, 112px); }
.section--tight { padding-top: 0; }
.reel + .section { padding-top: var(--gap); }
.page-head { padding-block: clamp(20px, 3.5vw, 52px) clamp(20px, 2.6vw, 36px); }
.page-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  flex-wrap: wrap;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips a {
  font-size: 14px;
  line-height: 1;
  padding: 8px 13px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--fg-2);
  transition: color .2s, border-color .2s;
}
.chips a:hover { color: var(--fg); border-color: var(--fg-2); }
.chips a[aria-current] { background: var(--fg); border-color: var(--fg); color: var(--bg); }

/* Homepage introduction */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px var(--gutter);
}
.intro-line {
  font-size: clamp(24px, 2.7vw, 40px);
  line-height: 1.16;
  letter-spacing: -0.022em;
  max-width: 32ch;
}
.intro-links { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: flex-end; font-size: 16px; }
.intro-links .text-link { text-decoration-color: var(--fg-2); }
@media (max-width: 760px) {
  .intro { grid-template-columns: 1fr; }
  .intro-links { justify-content: flex-start; }
}

/* ---------- Archive list ---------- */
.archive { border-top: 1px solid var(--line); }
.archive a {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr) 4em;
  gap: 4px var(--gutter);
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  transition: background .2s;
}
.archive-client, .archive-year { color: var(--fg-2); }
.archive-year { text-align: right; }
.archive a:hover .archive-title { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.archive a:hover .archive-client, .archive a:hover .archive-year { color: var(--fg); }
@media (max-width: 640px) {
  .archive a { grid-template-columns: minmax(0, 1fr) auto; }
  .archive-client { grid-row: 2; font-size: 14px; }
  .archive-year { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
}

/* ---------- Film page ---------- */
/* Sized to the film's own shape (--r), centred on black, and short enough
   that the credit line stays above the fold. */
.stage {
  aspect-ratio: var(--r, 1.7778);
  width: min(100%, calc((100svh - var(--header) - 88px) * var(--r, 1.7778)));
  min-width: min(100%, calc(380px * var(--r, 1.7778)));
  margin-inline: auto;
  background: #000;
}
.stage-missing { position: absolute; inset: 0; display: grid; place-items: center; color: var(--fg-2); }
.stage-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  padding: clamp(12px, 1.8vw, 26px);
  background: linear-gradient(to top, rgba(0, 0, 0, .38), rgba(0, 0, 0, 0) 32%);
}
.stage-play-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 17px 11px 14px;
  border-radius: 999px;
  background: rgba(11, 11, 10, .62);
  box-shadow: inset 0 0 0 1px rgba(243, 241, 236, .22);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 15px;
  line-height: 1;
  transition: background .2s, color .2s;
}
.stage-play:hover .stage-play-label, .stage-play:focus-visible .stage-play-label { background: var(--fg); color: var(--bg); }
.stage-play:focus-visible { outline-offset: -4px; }
.play-glyph {
  width: 0;
  height: 0;
  border-left: 9px solid currentColor;
  border-top: 5.5px solid transparent;
  border-bottom: 5.5px solid transparent;
}
.stage .frame-embed--player { width: 100%; height: 100%; opacity: 1; pointer-events: auto; z-index: 3; }

.credit {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 24px;
}
.credit-name { font-size: var(--t-credit); line-height: 1.2; letter-spacing: -0.015em; }
.credit-name a:hover .credit-title { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.credit-client { color: var(--fg-2); margin-right: .42em; }
.credit-meta { color: var(--fg-2); font-size: 15px; }

.film-body {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 18px var(--gutter);
  padding-top: clamp(16px, 1.8vw, 24px);
}
.film-body .credit { grid-column: 1 / -1; }
.film-description { font-size: 17px; line-height: 1.5; max-width: 60ch; }
.film-credits { display: grid; gap: 6px; font-size: 15px; align-content: start; }
.film-credits div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; }
.film-credits dt { color: var(--fg-2); }
@media (max-width: 760px) {
  .stage { min-width: 0; width: min(100%, calc(72svh * var(--r, 1.7778))); }
  .stage-play-label { padding: 9px 14px 9px 12px; font-size: 14px; }
  .film-body { grid-template-columns: 1fr; }
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
  margin-top: clamp(56px, 7vw, 112px);
}
.pager-link {
  display: grid;
  align-content: start;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.pager-link--next { text-align: right; }
.pager-dir { color: var(--fg-2); font-size: 14px; }
.pager-name { font-size: var(--t-credit); line-height: 1.2; letter-spacing: -0.015em; }
.pager-link:hover .credit-title { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
@media (max-width: 640px) {
  .pager-name { font-size: 17px; }
  .pager-name .credit-client { display: block; margin: 0; }
}

/* ---------- Landing pages ---------- */
/* One lead film at its own shape, or two side by side at equal height:
   each takes width in proportion to its aspect ratio. */
.lead-pair {
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
  padding-inline: var(--gutter);
}
.lead-pair .lead-film { flex: var(--r, 1.7778) 1 0; min-width: 0; }
.lead-pair .stage { width: 100%; min-width: 0; }
.lead-credit { padding-top: clamp(12px, 1.4vw, 20px); }
.lead-pair--also { margin-top: clamp(40px, 5vw, 72px); }
.lead-pair .credit-name { font-size: clamp(17px, 1.4vw, 22px); }
@media (max-width: 760px) {
  .lead-pair { flex-direction: column; gap: 40px; }
  .lead-pair .lead-film { width: 100%; flex: none; }
  .lead-pair .stage { width: min(100%, calc(72svh * var(--r, 1.7778))); margin-inline: auto; }
}

/* The copy: an editorial column (~65ch) beside a quiet title, not a blog. */
.landing-copy {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 24px var(--gutter);
  padding-top: clamp(72px, 9vw, 144px);
}
.landing-head .page-title { position: sticky; top: 24px; font-size: clamp(34px, 3.8vw, 56px); line-height: 1; }
.landing-body { max-width: 65ch; font-size: 17px; line-height: 1.6; }
.landing-body .standfirst { max-width: none; font-size: clamp(21px, 1.8vw, 26px); line-height: 1.35; margin-bottom: clamp(24px, 3vw, 40px); }
.copy-section { margin-top: clamp(40px, 4.5vw, 64px); }
.copy-heading { font-size: clamp(22px, 1.9vw, 28px); line-height: 1.2; letter-spacing: -0.015em; margin-bottom: .7em; }
.copy-section p + p { margin-top: 1em; }
.copy-list { display: grid; gap: 14px; }
.copy-list--ol { counter-reset: step; }
.copy-list--ol li { counter-increment: step; display: grid; grid-template-columns: 2em 1fr; }
.copy-list--ol li::before { content: counter(step, decimal-leading-zero); color: var(--fg-2); font-size: 14px; padding-top: .25em; }
.copy-list--ul li { padding-left: 1.4em; position: relative; }
.copy-list--ul li::before { content: ""; position: absolute; left: 0; top: .78em; width: .7em; height: 1px; background: var(--fg-2); }
.lead-in { display: block; }

.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-size: 18px;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--fg-2); flex-shrink: 0; }
.faq details[open] summary::after { content: "–"; }
.faq summary:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.faq details p { padding-bottom: 18px; max-width: 60ch; }
.closing { margin-top: clamp(40px, 4.5vw, 64px); font-size: 17px; }

.landing-links ul { display: flex; flex-wrap: wrap; gap: 10px 32px; border-top: 1px solid var(--line); padding-top: 18px; }
.landing-links a { font-size: 17px; }
.landing-links a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (max-width: 900px) {
  .landing-copy { grid-template-columns: 1fr; }
  .landing-head .page-title { position: static; }
}

.section-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.section-more { font-size: 15px; margin-bottom: 16px; }
.film-description p + p { margin-top: 1em; }

/* ---------- About ---------- */
.about { padding-top: clamp(20px, 3.5vw, 52px); display: grid; gap: 32px var(--gutter); }
.about-bio {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px var(--gutter);
}
.about-bio .page-title { grid-row: span 2; }
.about-bio .standfirst { max-width: 30ch; font-size: clamp(22px, 2.3vw, 34px); line-height: 1.18; letter-spacing: -0.02em; }
.prose { max-width: 60ch; font-size: 17px; }
.prose p + p { margin-top: 1em; }
.about--portrait { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.about--portrait .about-bio { grid-template-columns: 1fr; }
.about-portrait img { width: 100%; height: auto; }
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px var(--gutter);
  padding-top: clamp(72px, 9vw, 136px);
}
.fact-list { font-size: 15px; }
.fact-list li { padding: 2px 0; }
.fact-list + .section-label { margin-top: 32px; }
.fact-list a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--fg-2); }
.fact-list a:hover { text-decoration-color: var(--fg); }
@media (max-width: 900px) {
  .about-bio, .about--portrait { grid-template-columns: 1fr; }
  .about-bio .page-title { grid-row: auto; }
  .facts { grid-template-columns: 1fr 1fr; }
}

/* ---------- Contact ---------- */
.contact { padding-top: clamp(20px, 3.5vw, 52px); padding-bottom: clamp(64px, 10vw, 160px); }
.contact-intro .standfirst { margin-top: 20px; max-width: 26ch; }
.contact-facts { display: grid; gap: 10px; margin-top: 40px; font-size: 16px; }
.contact-facts div { display: grid; grid-template-columns: 11em 1fr; gap: 12px; }
.contact-facts dt { color: var(--fg-2); }
.contact-facts a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--fg-2); }
/* The email is the call to action, so it is set at display size. */
.contact-facts .contact-email { grid-template-columns: 1fr; margin-bottom: 28px; }
.contact-facts .contact-email dt { font-size: 16px; }
.contact-facts .contact-email a { font-size: clamp(28px, 4.6vw, 64px); line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .contact-facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Showreel dialog ---------- */
.reel-dialog {
  width: min(94vw, 1500px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
}
.reel-dialog::backdrop { background: rgba(0, 0, 0, .92); }
.reel-dialog-inner { display: grid; gap: 8px; }
.reel-dialog-close { justify-self: end; padding: 8px 0; font-size: 15px; }
.reel-dialog-close:hover { text-decoration: underline; text-underline-offset: 4px; }
.reel-dialog video { width: 100%; aspect-ratio: 16 / 9; background: #000; max-height: 84vh; }

@media (max-width: 640px) {
  .page-head--row { display: block; }
  .chips {
    flex-wrap: nowrap;
    margin: 16px calc(-1 * var(--gutter)) 0;
    padding-inline: var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chips a { flex-shrink: 0; font-size: 13px; padding: 7px 12px; }
}

/* Links inside running copy must read as links without relying on colour alone. */
.landing-body .text-link, .faq .text-link { text-decoration-color: var(--fg-2); }
.landing-body .text-link:hover, .faq .text-link:hover { text-decoration-color: var(--fg); }

/* ---------- Motion (all of it switched off under reduced motion, in base.css) ---------- */

/* Lazy stills fade in once decoded. */
.still { transition: opacity .6s var(--ease); }
.still[data-pending] { opacity: 0; }

/* Hover loops: a short cut from the film, cover-cropped to the tile. */
.frame-loop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .35s var(--ease);
  pointer-events: none;
}
.frame[data-live] .frame-loop { opacity: 1; }

/* The reel: a long, soft crossfade with a slow settle, like a dissolve. */
.reel-slide { transition: opacity 2.2s cubic-bezier(.45, 0, .2, 1); }
.reel-slide .reel-still, .reel-slide .reel-embed, .reel-slide .reel-video { scale: 1.05; transition: scale 9s cubic-bezier(.2, .6, .2, 1), opacity .8s var(--ease); }
.reel-slide[data-current] .reel-still, .reel-slide[data-current] .reel-embed, .reel-slide[data-current] .reel-video,
.reel-slide[data-leaving] .reel-still, .reel-slide[data-leaving] .reel-embed, .reel-slide[data-leaving] .reel-video { scale: 1; }

/* A "Play" cursor over anything that plays, on devices with a pointer. */
@media (hover: hover) and (pointer: fine) {
  .tile-link, .stage-play, .frames-open {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Ccircle cx='36' cy='36' r='34' fill='%23f3f1ec' fill-opacity='.94'/%3E%3Cpath d='M30 25.5 48 36 30 46.5Z' fill='%230b0b0a'/%3E%3C/svg%3E") 36 36, pointer;
  }
  .frames-open {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='30' fill='%23f3f1ec' fill-opacity='.94'/%3E%3Cpath d='M32 22v20M22 32h20' stroke='%230b0b0a' stroke-width='2'/%3E%3C/svg%3E") 32 32, zoom-in;
  }
}

/* Page transitions (View Transitions API, via React <ViewTransition>). */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
::view-transition-group(*) { animation-duration: .42s; animation-timing-function: cubic-bezier(.2, .7, .2, 1); }
::view-transition-old(*):only-child { animation: vt-out .22s ease-out both; }
::view-transition-new(*):only-child { animation: vt-in .38s cubic-bezier(.2, .7, .2, 1) .06s both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .reel-slide .reel-still, .reel-slide .reel-embed, .reel-slide .reel-video { scale: 1; transition: none; }
}

/* ---------- Player chrome ---------- */
.player {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #000;
  outline: none;
}
.player-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; max-width: none; }
.player-hit { position: absolute; inset: 0 0 64px; background: transparent; }
.player-bar {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 36px clamp(12px, 1.6vw, 22px) clamp(10px, 1.2vw, 16px);
  background: linear-gradient(to top, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0));
  transition: opacity .35s var(--ease);
}
.player[data-idle] .player-bar { opacity: 0; }
.player[data-idle] { cursor: none; }
.player:focus-within .player-bar { opacity: 1; }
.player-button {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 36px;
  color: var(--fg);
  font-size: 14px;
}
.player-text { padding: 0 4px; }
.player-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.player-time { font-size: 13px; font-variant-numeric: tabular-nums; color: rgba(243, 241, 236, .85); min-width: 3.2ch; }
.icon-play { width: 0; height: 0; border-left: 12px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.icon-pause { width: 12px; height: 14px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.player-scrub {
  flex: 1;
  min-width: 60px;
  height: 24px;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.player-scrub::-webkit-slider-runnable-track {
  height: 2px;
  background: linear-gradient(to right, var(--fg) var(--progress, 0%), rgba(243, 241, 236, .3) var(--progress, 0%));
}
.player-scrub::-moz-range-track { height: 2px; background: rgba(243, 241, 236, .3); }
.player-scrub::-moz-range-progress { height: 2px; background: var(--fg); }
.player-scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -5px; border-radius: 50%; background: var(--fg); border: 0; }
.player-scrub::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--fg); border: 0; }
.player-scrub:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.player:fullscreen { width: 100vw; height: 100vh; }
@media (max-width: 640px) {
  .player-bar { gap: 8px; padding-top: 28px; }
  .player-time:last-of-type { display: none; }
}

/* ---------- Frame grabs + lightbox ---------- */
.frames-section { grid-column: 1 / -1; margin-block: 6px 10px; }
.frames { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: var(--gap); }
.frames--tall { max-width: min(100%, calc(var(--cols, 4) * 220px)); }
.frames-open { position: relative; display: block; width: 100%; overflow: hidden; background: var(--bg-2); }
.frames-open .still { transition: opacity .6s var(--ease), transform .8s var(--ease); }
.frames-open:hover .still { transform: scale(1.03); }
@media (max-width: 760px) {
  .frames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .frames--tall { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.lightbox {
  width: min(96vw, 1800px);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
}
.lightbox::backdrop { background: rgba(5, 5, 5, .94); }
.lightbox-figure { display: grid; gap: 10px; justify-items: center; }
.lightbox-figure img { width: auto; max-width: 100%; max-height: 82vh; height: auto; object-fit: contain; }
.lightbox-figure figcaption { display: flex; gap: 24px; justify-content: space-between; width: 100%; font-size: 14px; color: var(--fg-2); }
.lightbox-controls { display: flex; justify-content: center; gap: 28px; padding-top: 10px; font-size: 15px; }
.lightbox-controls button { min-height: 40px; padding: 0 6px; }
.lightbox-controls button:hover { text-decoration: underline; text-underline-offset: 4px; }
.lightbox[open] { animation: lightbox-in .3s var(--ease); }
@keyframes lightbox-in { from { opacity: 0; } }

/* ---------- About: at a glance ---------- */
.glance { padding-top: clamp(56px, 7vw, 104px); }
.glance dl { border-top: 1px solid var(--line); max-width: 1100px; }
.glance dl > div { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 4px var(--gutter); padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.glance dt { color: var(--fg-2); }
.glance a { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--fg-2); }
@media (max-width: 640px) { .glance dl > div { grid-template-columns: 1fr; } }
