/* ==========================================================================
   Refresh layer for the public photography site.
   Loaded after each page's own stylesheet: shared header, labels, lists,
   footer, page transitions and the handwritten signature.
   ========================================================================== */

:root {
  --nb-ink: #0f0f0f;
  --nb-paper: #f2eee7;
  --nb-mute: rgba(242, 238, 231, 0.56);
  --nb-faint: rgba(242, 238, 231, 0.32);
  --nb-line: rgba(242, 238, 231, 0.14);
  --nb-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --nb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --nb-ease-io: cubic-bezier(0.7, 0, 0.3, 1);
  --nb-signature: url("/images/brand/signature.png");
  /* Brandbook 2026: field black, warm white, mud grey, stone grey, signal orange (signal only, never a background). */
  --nb-mud: #5f5a52;
  --nb-stone: #b8b2a8;
  --nb-signal: #ff4f20;
}

::selection { background: var(--nb-paper); color: var(--nb-ink); }
:focus-visible { outline: 2px solid var(--nb-signal); outline-offset: 3px; }

/* ---------------------------------------------------------------- Labels */
.nb-label,
.works-kicker, .works-list-label, .works-item__index,
.films-kicker, .films-list-label, .films-item__index {
  font-family: var(--nb-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nb-mute);
}

/* ---------------------------------------------------------------- Header */
.site-header:not(.site-header--static) {
  position: fixed;
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.62) 0%, rgba(15, 15, 15, 0) 100%);
  transition: background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
}
body.is-scrolled .site-header:not(.site-header--static) {
  background: rgba(15, 15, 15, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--nb-line);
}
.header-inner { transition: padding 0.35s var(--nb-ease); }
body.is-scrolled .site-header:not(.site-header--static) .header-inner { padding-top: 18px; padding-bottom: 16px; }

.site-nav a {
  font-family: var(--nb-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: rgba(242, 238, 231, 0.72);
  transition: color 0.25s ease;
}
.site-nav a:hover, .site-nav a.is-active { color: var(--nb-paper); }

/* ---------------------------------------------------------------- Works / Films index lists */
.works-item, .films-item {
  align-items: baseline;
  border-top: 1px solid var(--nb-line);
  padding: 14px 0 12px;
}
.works-item:last-child, .films-item:last-child { border-bottom: 1px solid var(--nb-line); }
.works-item__title, .films-item__title {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-size: clamp(1.9rem, 3.6vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: rgba(242, 238, 231, 0.5);
  transition: color 0.3s ease, transform 0.45s var(--nb-ease), opacity 0.34s ease !important;
}
.works-item.is-active .works-item__title, .films-item.is-active .films-item__title,
.works-item:hover .works-item__title, .films-item:hover .films-item__title {
  color: var(--nb-paper);
  transform: translateX(10px);
}
.works-item__index, .films-item__index { transform: none; }
.works-item.is-active .works-item__index, .films-item.is-active .films-item__index { color: var(--nb-paper); }
.works-title, .films-title { font-weight: 400; letter-spacing: -0.04em; }
@media (max-width: 768px) {
  .works-item__title, .films-item__title { font-size: clamp(1.6rem, 7.4vw, 2.4rem); }
  .works-item.is-active .works-item__title, .films-item.is-active .films-item__title { transform: none; }
}

/* ---------------------------------------------------------------- Footer */
.site-footer.nb-footer {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: clamp(56px, 7vw, 96px) 0 calc(28px + env(safe-area-inset-bottom));
  background: var(--nb-ink);
  border-top: 1px solid var(--nb-line);
  color: var(--nb-mute);
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.6;
}
.nb-footer__inner, .nb-footer__base {
  width: min(calc(100% - 48px), 1660px);
  margin: 0 auto;
}
.nb-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
  align-items: start;
}
.nb-footer__sign { display: inline-block; opacity: 0.92; transition: opacity 0.25s ease; }
.nb-footer__sign:hover { opacity: 1; }
.nb-footer__sign img { width: min(240px, 60vw); height: auto; }
.nb-footer__claim { margin-top: 18px; max-width: 30ch; color: var(--nb-faint); font-weight: 300; }
.nb-footer__col { display: grid; gap: 6px; justify-items: start; }
.nb-footer__col .nb-label { margin-bottom: 8px; color: var(--nb-faint); }
.nb-footer a { color: var(--nb-paper); text-decoration: none; }
.nb-footer__col a { position: relative; }
.nb-footer__col a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--nb-ease);
}
.nb-footer__col a:hover::after { transform: scaleX(1); }
.nb-footer__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  margin-top: clamp(48px, 6vw, 80px); padding-top: 22px; border-top: 1px solid var(--nb-line);
  font-family: var(--nb-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--nb-faint);
}
.nb-footer__base p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.nb-footer__base a, .nb-footer__base button { color: var(--nb-mute); }
.nb-footer__base a:hover, .nb-footer__base button:hover { color: var(--nb-paper); }
.nb-footer .footer-legal-links { display: flex; justify-content: flex-end; gap: 6px 20px; }
.nb-footer .footer-legal-links button {
  font: inherit; letter-spacing: inherit; text-transform: inherit; background: none; border: 0; padding: 0; cursor: pointer;
}
.nb-footer .footer-admin-link { display: inline-flex; color: var(--nb-faint); }
.nb-footer .footer-admin-link svg { width: 13px; height: 13px; }
@media (max-width: 900px) {
  .nb-footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nb-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .nb-footer__inner { grid-template-columns: 1fr; gap: 30px; }
  .nb-footer__base { flex-direction: column; }
}

/* ---------------------------------------------------------------- Page transitions */
/* Entry: a dark curtain with the signature lifts off the new page (pure CSS, no flash). */
body.nb-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 150;
  pointer-events: none;
  background: var(--nb-signature) center / min(260px, 56vw) auto no-repeat, var(--nb-ink);
  animation: nb-curtain-out 0.85s var(--nb-ease-io) 0.12s forwards;
}
@keyframes nb-curtain-out { to { transform: translateY(-100%); } }

/* Exit: added by common.js when an internal link is followed; the signature writes itself in. */
.nb-curtain {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: var(--nb-ink);
  transform: translateY(100%);
  transition: transform 0.6s var(--nb-ease-io);
}
.nb-curtain.is-in { transform: none; }
.nb-curtain__sign {
  width: min(260px, 56vw);
  aspect-ratio: 556 / 134;
  background: var(--nb-signature) left center / 100% auto no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.55s cubic-bezier(0.45, 0, 0.2, 1) 0.28s;
}
.nb-curtain.is-in .nb-curtain__sign { clip-path: inset(0 0 0 0); }

/* The old mobile-only curtain is replaced by the one above. */
.page-curtain { display: none !important; }

/* ---------------------------------------------------------------- Words that fill in on scroll */
[data-nb-words] .nb-word { opacity: 0.18; transition: opacity 0.45s ease; }
[data-nb-words] .nb-word.is-on, [data-nb-words].is-lit .nb-word { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  body.nb-page::before, .nb-curtain { display: none; }
  [data-nb-words] .nb-word { opacity: 1; }
}

.nb-footer .footer-content { width: 100%; text-align: left; font-size: inherit; line-height: inherit; color: inherit; }

/* ---------------------------------------------------------------- One gutter for every page */
:root { --nb-gutter: clamp(20px, 3.2vw, 52px); --nb-max: 1680px; }
.header-inner {
  width: min(calc(100% - 2 * var(--nb-gutter)), var(--nb-max));
  padding-left: 0;
  padding-right: 0;
}
.nb-footer__inner, .nb-footer__base, .nb-hero-caption,
.works-list-wrap, .films-list-wrap,
.about-hero__content, .about-story, .about-gallery, .about-quote, .about-manifesto {
  width: min(calc(100% - 2 * var(--nb-gutter)), var(--nb-max));
}

/* ---------------------------------------------------------------- About */
.about-kicker, .about-section-label, .about-block__title {
  font-family: var(--nb-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--nb-mute);
}
.about-title { font-weight: 300; letter-spacing: -0.045em; line-height: 0.98; }
.about-title strong, .about-emphasis { font-weight: 500; }
.about-emphasis-soft { font-weight: 400; }
.about-section-title { font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.about-lead, .about-story__summary { font-weight: 300; }
.about-story { padding-top: clamp(80px, 10vw, 140px); }
.about-quote__text { letter-spacing: -0.03em; line-height: 1.12; }
.about-quote__text strong, .about-quote__text .about-emphasis-soft { font-weight: 400; display: inline; font-size: 1em; }

/* ---------------------------------------------------------------- Gallery */
.gallery-section { width: min(calc(100% - 2 * var(--nb-gutter)), var(--nb-max)); }
.gallery-main { padding-top: clamp(120px, 14vw, 180px); }
.nb-page-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 4vw, 56px); }
.nb-page-head__title {
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 7.4rem);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.05em;
  color: var(--nb-paper);
}
.works-title, .films-title { font-weight: 300; letter-spacing: -0.05em; }
.about-story__summary[data-nb-words] { font-size: clamp(1.15rem, 1.6vw, 1.45rem); line-height: 1.55; max-width: 34ch; }

/* ---------------------------------------------------------------- Project & film pages */
.project-hero__content, .project-gallery-section,
.film-project-hero__content, .film-project-content {
  width: min(calc(100% - 2 * var(--nb-gutter)), var(--nb-max));
}
.project-back, .project-kicker, .project-stage__title,
.film-project-back, .film-project-kicker, .film-project-crew__label, .film-project-meta,
.film-project-videos__kicker, .film-project-videos__count {
  font-family: var(--nb-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
}
.project-back::before, .film-project-back::before { content: "←"; margin-right: 10px; letter-spacing: 0; }
.project-title, .film-project-title { font-weight: 300; letter-spacing: -0.05em; line-height: 0.96; }
.project-stage__title { color: var(--nb-paper); }

/* ---------------------------------------------------------------- Legal & 404 */
.legal-title, .error-title { font-weight: 300; letter-spacing: -0.045em; }
.legal-section h2 { font-weight: 400; letter-spacing: -0.03em; }

/* ---------------------------------------------------------------- Mobile menu */
.mobile-nav .mobile-nav__link {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  letter-spacing: -0.03em;
  text-transform: lowercase;
}
.mobile-nav .mobile-nav__link::first-letter { text-transform: uppercase; }
@media (max-width: 520px) {
  .nb-footer .footer-legal-links { justify-content: flex-start; }
}

/* ---------------------------------------------------------------- Signal orange: markers only */
.site-nav a.is-active::after, .site-header--static .site-nav a.is-active::after { background: var(--nb-signal); }
.works-item.is-active .works-item__index, .films-item.is-active .films-item__index { color: var(--nb-signal); }
.mobile-nav .mobile-nav__link.is-active { color: var(--nb-signal); }
.nb-signal { color: var(--nb-signal); }

/* ---------------------------------------------------------------- Film pages */
/* The header sits over the cover instead of pushing it (and the title) below the fold. */
.film-project-page .site-header--static { position: absolute; top: 0; left: 0; right: 0; }
.film-project-hero { min-height: min(var(--nb-viewport-height, 100vh), 940px); }
.film-project-hero__overlay {
  background:
    linear-gradient(180deg, rgba(15, 15, 15, 0.35) 0%, rgba(15, 15, 15, 0) 30%, rgba(15, 15, 15, 0.2) 55%, #0f0f0f 100%),
    linear-gradient(90deg, rgba(15, 15, 15, 0.6) 0%, rgba(15, 15, 15, 0) 60%);
}
.film-project-hero__content { padding-bottom: clamp(48px, 8vh, 96px); }
.film-project-kicker { margin-top: 26px; color: var(--nb-mute); }
.film-project-kicker span { color: var(--nb-paper); }
.film-project-title { max-width: 15ch; margin-top: 12px; font-size: clamp(2.6rem, 6.4vw, 6.6rem); color: var(--nb-paper); }
.fp-hero-meta { margin-top: 18px; font-family: var(--nb-mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--nb-mute); }
.fp-hero-meta:empty { display: none; }

.film-project-content { gap: clamp(64px, 10vh, 120px); padding: clamp(40px, 6vh, 72px) 0 clamp(80px, 12vh, 140px); }
.fp-label { margin: 0 0 18px; }
.film-project-player__wrap { border-radius: 0; box-shadow: none; }



}
@media (max-width: 760px) {
  .film-project-title { font-size: clamp(2.3rem, 11vw, 3.6rem); }
}

/* Film pages: moving cover, play button, full-screen theater, story lead. */
.fp-hero-video { position: absolute; inset: 0; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.fp-hero-video.is-live { opacity: 1; }
.fp-hero-video iframe {
  position: absolute; top: 50%; left: 50%; width: max(100%, 177.78vh); height: max(100%, 56.25vw);
  border: 0; transform: translate(-50%, -50%) scale(1.15);
}
.film-project-title .fp-w { display: inline-block; opacity: 0; transform: translateY(0.4em); transition: opacity 0.7s ease, transform 0.9s var(--nb-ease); }
.film-project-page.is-ready .film-project-title .fp-w { opacity: 1; transform: none; }

.fp-play {
  display: inline-flex; align-items: center; gap: 16px; margin-top: 30px; padding: 0; border: 0; background: none;
  color: var(--nb-paper); cursor: pointer;
}
.fp-play__disc {
  position: relative; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%;
  background: var(--nb-signal); color: var(--nb-ink); transition: transform 0.45s var(--nb-ease);
}
.fp-play__disc::after { content: ""; position: absolute; inset: -8px; border: 1px solid rgba(255, 79, 32, 0.5); border-radius: 50%; animation: fp-pulse 2.4s ease-out infinite; }
.fp-play__disc svg { width: 26px; height: 26px; margin-left: 4px; }
.fp-play__label { font-family: var(--nb-mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; }
.fp-play:hover .fp-play__disc { transform: scale(1.08); }
@keyframes fp-pulse { 0% { transform: scale(0.9); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }

.fp-theater {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: clamp(16px, 4vw, 64px);
  background: rgba(15, 15, 15, 0.97); opacity: 0; transition: opacity 0.35s ease;
}
.fp-theater[hidden] { display: none; }
.fp-theater.is-open { opacity: 1; }
.fp-theater__frame { width: min(100%, calc((100vh - 140px) * 16 / 9)); aspect-ratio: 16 / 9; transform: scale(0.96); transition: transform 0.5s var(--nb-ease); }
.fp-theater.is-open .fp-theater__frame { transform: none; }
.fp-theater__frame iframe { width: 100%; height: 100%; border: 0; }
.fp-theater__close {
  position: absolute; top: 22px; right: var(--nb-gutter); display: inline-flex; gap: 8px; align-items: center; padding: 0; border: 0; background: none;
  font-family: var(--nb-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(242, 238, 231, 0.75); cursor: pointer;
}
.fp-theater__close span { font-size: 1.2rem; letter-spacing: 0; }
.fp-theater__close:hover { color: var(--nb-signal); }

}
@media (prefers-reduced-motion: reduce) {
  .fp-play__disc::after { animation: none; }
  .film-project-title .fp-w { opacity: 1; transform: none; }
}

/* Film pages: the story told over stills from the film, then credits and the next film. */
.fp-letterbox { position: absolute; left: 0; right: 0; z-index: 2; height: calc(var(--fp-scroll, 0) * 13vh); background: #0f0f0f; pointer-events: none; }
.fp-letterbox--top { top: 0; }
.fp-letterbox--bottom { bottom: 0; }
.film-project-hero__media, .fp-hero-video { translate: 0 calc(var(--fp-scroll, 0) * 18%); }
.film-project-hero__content { translate: 0 calc(var(--fp-scroll, 0) * -80px); opacity: calc(1 - var(--fp-scroll, 0) * 1.6); }

.fp-scenes { position: relative; }
.fp-scenes__media { position: sticky; top: 0; height: var(--nb-viewport-height, 100vh); overflow: hidden; }
.fp-scenes__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, #0f0f0f 0%, rgba(15, 15, 15, 0.35) 22%, rgba(15, 15, 15, 0.35) 78%, #0f0f0f 100%),
    linear-gradient(90deg, rgba(15, 15, 15, 0.82) 0%, rgba(15, 15, 15, 0.25) 70%);
}
.fp-frame {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.1); transition: opacity 1.1s ease, transform 7s linear;
}
.fp-frame.is-active { opacity: 1; transform: scale(1); }
.fp-scenes__tc {
  position: absolute; right: var(--nb-gutter); bottom: clamp(28px, 6vh, 56px); z-index: 1; margin: 0;
  font-family: var(--nb-mono); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(242, 238, 231, 0.6);
}
.fp-scenes__tc span:first-child { color: var(--nb-signal); }
.fp-scenes__text { position: relative; z-index: 1; width: min(calc(100% - 2 * var(--nb-gutter)), var(--nb-max)); margin: calc(-1 * var(--nb-viewport-height, 100vh)) auto 0; padding: 22vh 0 18vh; }
.fp-scenes__text .film-project-meta { margin: 0; color: var(--nb-mute); }
.fp-scenes__text .film-project-meta:empty { display: none; }
.fp-scene { display: flex; align-items: center; min-height: 82vh; }
.fp-scene p { max-width: 30ch; margin: 0; font-size: clamp(1.35rem, 2.3vw, 2.2rem); font-weight: 300; line-height: 1.3; letter-spacing: -0.02em; color: var(--nb-paper); }
.fp-scene--lead p { max-width: 20ch; font-size: clamp(2rem, 4.4vw, 4.2rem); line-height: 1.06; letter-spacing: -0.04em; }
.film-project-description { max-width: 46ch; margin-top: 24px; font-size: clamp(1.1rem, 1.5vw, 1.4rem); line-height: 1.6; font-weight: 300; color: rgba(242, 238, 231, 0.86); }
.film-project-description[hidden] { display: none; }

.fp-credits { width: min(calc(100% - 2 * var(--nb-gutter)), var(--nb-max)); margin: 0 auto; padding: clamp(40px, 8vh, 96px) 0 clamp(80px, 14vh, 160px); text-align: center; }
.fp-credits .fp-label { margin-bottom: clamp(40px, 8vh, 80px); }
.fp-credits .film-project-crew__list { display: grid; gap: clamp(26px, 4.5vh, 44px); }
.fp-credits .film-project-crew__item, .fp-credits__sign { opacity: 0; transform: translateY(24px); transition: opacity 0.9s ease, transform 1s var(--nb-ease); }
.fp-credits .film-project-crew__item.is-in, .fp-credits__sign.is-in { opacity: 1; transform: none; }
.fp-credits .film-project-crew__item { display: block; padding: 0; border: 0; }
.film-project-crew__role { margin: 0 0 8px; font-family: var(--nb-mono); font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--nb-faint); }
.film-project-crew__name { margin: 0; font-size: clamp(1.5rem, 3vw, 2.8rem); font-weight: 300; line-height: 1.1; letter-spacing: -0.035em; color: var(--nb-paper); }
.fp-credits__sign { display: block; width: clamp(180px, 20vw, 280px); height: auto; margin: clamp(64px, 12vh, 120px) auto 0; }

.fp-next {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: end; align-items: end; gap: 14px 32px;
  min-height: min(78vh, 760px); padding: 0 var(--nb-gutter) clamp(48px, 9vh, 96px); overflow: hidden;
  color: var(--nb-paper); text-decoration: none;
}
.fp-next[hidden] { display: none; }
.fp-next__bg { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0.45; transform: scale(1.04); transition: opacity 0.6s ease, transform 1.2s var(--nb-ease); }
.fp-next::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, #0f0f0f 0%, rgba(15, 15, 15, 0) 40%, rgba(15, 15, 15, 0.75) 100%); }
.fp-next > :not(.fp-next__bg) { position: relative; z-index: 2; }
.fp-next .nb-label { grid-column: 1 / -1; }
.fp-next__title { font-size: clamp(2.4rem, 7vw, 7.4rem); font-weight: 300; line-height: 0.98; letter-spacing: -0.05em; transition: transform 0.5s var(--nb-ease); }
.fp-next__arrow { font-size: clamp(2rem, 5vw, 5rem); font-weight: 300; line-height: 1; color: var(--nb-signal); transition: transform 0.5s var(--nb-ease); }
.fp-next:hover .fp-next__bg { opacity: 0.8; transform: none; }
.fp-next:hover .fp-next__title { transform: translateX(12px); }
.fp-next:hover .fp-next__arrow { transform: translateX(10px); }

@media (max-width: 760px) {
  .fp-scenes__text { padding: 16vh 0 12vh; }
  .fp-scene { min-height: 72vh; }
  .fp-next { min-height: 62vh; }
  .fp-next__title { font-size: clamp(2rem, 10vw, 3rem); }
}
@media (prefers-reduced-motion: reduce) {
  .fp-frame { transition: opacity 0.4s ease; transform: none; }
  .fp-credits .film-project-crew__item, .fp-credits__sign { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- Shared-element page transitions */
/* Same-site navigations cross-fade; links marked data-vt also carry their title and image over. */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.45s; }
::view-transition-group(nb-title), ::view-transition-group(nb-media) { animation-duration: 0.85s; animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1); }
::view-transition-old(nb-title), ::view-transition-new(nb-title) { width: auto; height: 100%; object-fit: none; object-position: left top; }
::view-transition-old(nb-media), ::view-transition-new(nb-media) { width: 100%; height: 100%; object-fit: cover; }
/* Arriving through a morph: no curtain, and the cover and title are already in place. */
.nb-morph body.nb-page::before { display: none; }
/* Films list <-> film page with a self-hosted clip: the same footage carries on, no curtain */
.nb-handoff body.nb-page::before { display: none; }
.nb-handoff:not(.nb-handoff-done) .film-project-hero__media { opacity: 0; transition: none; }
.nb-handoff .fp-hero-video { transition: none; }
.fp-hero-video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nb-morph .film-project-hero__media, .nb-morph .project-hero__media { opacity: 1; transform: none; transition: none; }
.nb-morph .film-project-title .fp-w { opacity: 1; transform: none; transition: none; }

/* ---------------------------------------------------------------- Field-note details */

.nb-progress {
  position: fixed; top: 0; left: 0; z-index: 160; width: 100%; height: 2px; pointer-events: none;
  background: var(--nb-signal); transform: scaleX(0); transform-origin: left center;
}

.nb-cursor {
  position: fixed; top: 0; left: 0; z-index: 9998; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  pointer-events: none; background: var(--nb-paper); mix-blend-mode: difference;
  opacity: 0; transition: opacity 0.25s ease, width 0.35s var(--nb-ease), height 0.35s var(--nb-ease), margin 0.35s var(--nb-ease);
}
.nb-cursor.is-on { opacity: 1; }
.nb-cursor.is-link { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.nb-cursor.is-down { width: 6px; height: 6px; margin: -3px 0 0 -3px; }
/* The gallery's "View" cursor takes over on photos. */
.gl-cursor-active .nb-cursor { opacity: 0; }

/* Touch screens get no YouTube preview on film covers: the still drifts slowly instead. */
@media (hover: none), (pointer: coarse) {
  .film-project-page.is-ready .film-project-hero__media { animation: fp-cover-drift 18s ease-in-out infinite alternate; }
}
@keyframes fp-cover-drift { from { scale: 1; } to { scale: 1.12; } }
@media (prefers-reduced-motion: reduce) { .film-project-page.is-ready .film-project-hero__media { animation: none; } }
