/* ==========================================================================
   DNF — Dario Ferez · Redesign
   One family (Rinter), black frame, B&W photography, colour only from the work,
   chroma-key green as the single marker. The rule under the name is the
   timeline: it reappears as the header scrub bar, the portfolio track and
   the cuts between sections.
   ========================================================================== */

@font-face {
  font-family: "Rinter";
  src: url("../fonts/Rinter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* Colour — neutral (chroma 0) to sit with the B&W photography */
  --c-bg: #050505;
  --c-bg-2: #0b0b0b;
  --c-bg-3: #141414;
  --c-ink: #f2f2f2;
  --c-ink-2: #b4b4b4;          /* 10.4:1 on --c-bg */
  --c-ink-3: #8f8f8f;          /*  6.6:1 on --c-bg */
  --c-line: rgb(255 255 255 / 0.14);
  --c-line-2: rgb(255 255 255 / 0.34);
  --c-key: #00ff00;            /* chroma-key green from the original cards */
  --c-key-dim: rgb(0 255 0 / 0.32);
  --c-error: #ff7a6b;

  /* Type */
  --f: "Rinter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --t-label: 0.8125rem;
  --t-small: 0.9375rem;
  --t-body: clamp(1.0625rem, 0.99rem + 0.3vw, 1.25rem);
  --t-lead: clamp(1.625rem, 1.05rem + 2.25vw, 3.25rem);
  --t-h3: clamp(2rem, 1.25rem + 2.6vw, 4rem);
  --t-h2: clamp(3.25rem, 1.4rem + 7.4vw, 9rem);
  --t-quote: clamp(2rem, 0.9rem + 4.2vw, 6rem);

  /* Space */
  --gutter: clamp(16px, 4vw, 64px);
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2.5rem;
  --s-5: clamp(3rem, 2rem + 4vw, 6rem);
  --s-6: clamp(5rem, 3rem + 9vw, 12rem);
  --hdr-h: 64px;

  /* Motion — exponential outs for reveals, a hard in-out for cuts */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-cut: cubic-bezier(0.77, 0, 0.18, 1);
  --ease-ui: cubic-bezier(0.25, 1, 0.5, 1);
  --d-fast: 180ms;
  --d-ui: 420ms;
  --d-slow: 900ms;

  /* Layers */
  --z-content: 1;
  --z-hdr: 40;
  --z-menu: 60;
  --z-cursor: 70;
  --z-skip: 80;
}

/* ---------- Base ------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--hdr-h);
  background: var(--c-bg);
}
/* JS handles smooth anchor scrolling; a global smooth behaviour would make
   ScrollTrigger's measuring jumps animate and corrupt every refresh. */
html:not(.js) {
  scroll-behavior: smooth;
}

html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-stopped {
  overflow: clip;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f);
  font-size: var(--t-body);
  line-height: 1.62;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg,
video,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

/* author display rules (e.g. iframe { display: block }) must not resurrect [hidden] */
[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-weight: 400;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

::selection {
  background: var(--c-key);
  color: #000;
}

:focus-visible {
  outline: 2px solid var(--c-key);
  outline-offset: 4px;
}
/* sections focused programmatically after an anchor jump aren't controls */
[tabindex="-1"]:focus {
  outline: none;
}

.wrap {
  width: 100%;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: var(--z-skip);
  padding: 10px 16px;
  background: var(--c-key);
  color: #000;
  transform: translateY(-160%);
  transition: transform var(--d-ui) var(--ease-out);
}
.skip:focus-visible {
  transform: none;
  outline-color: #fff;
}

.display {
  font-size: var(--t-h2);
  line-height: 0.92;
  letter-spacing: -0.03em;
}

/* the brand marker — a solid chroma-key square */
.key {
  display: inline-block;
  flex: none;
  width: 0.62em;
  height: 0.62em;
  background: var(--c-key);
}

/* Timecode digits get fixed slots so a running counter never jitters */
.tc {
  display: inline-flex;
  font-size: var(--t-label);
  letter-spacing: 0.02em;
  color: var(--c-ink-2);
  white-space: nowrap;
}
.tc i {
  display: inline-block;
  width: 0.66em;
  text-align: center;
  font-style: normal;
}
.tc b {
  font-weight: 400;
  color: var(--c-ink-3);
  padding-inline: 0.04em;
}

/* Arrow glyphs (Rinter has none) */
.arw {
  width: 0.9em;
  height: 0.9em;
  flex: none;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: square;
}

/* Underline link — draws in from the left, leaves to the right */
.ulink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding-block: 0.2em;
}
.ulink::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--d-ui) var(--ease-ui);
}
.ulink:hover::after,
.ulink:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}
.ulink .arw {
  transition: transform var(--d-ui) var(--ease-ui);
}
.ulink:hover .arw--ne {
  transform: translate(2px, -2px);
}

/* ---------- Header ----------------------------------------------------- */

.hdr {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-hdr);
  transition: transform 520ms var(--ease-ui), background-color 400ms linear;
}
.hdr::before {
  /* legibility over the hero photo, fades out once the bar turns solid */
  content: "";
  position: absolute;
  inset: 0 0 -40px;
  background: linear-gradient(rgb(0 0 0 / 0.55), transparent);
  pointer-events: none;
  transition: opacity 400ms linear;
}
.hdr.is-solid {
  background: rgb(5 5 5 / 0.94);
}
.hdr.is-solid::before {
  opacity: 0;
}
.hdr.is-hidden {
  transform: translateY(-100%);
}

.hdr__bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--hdr-h);
  padding-inline: var(--gutter);
}

.hdr__brand {
  justify-self: start;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  line-height: 1;
  padding: 8px 0;
}

.hdr__nav {
  position: relative;
}
.hdr__list {
  display: flex;
  gap: clamp(1.25rem, 2.6vw, 2.75rem);
}
.hdr__link {
  position: relative;
  display: block;
  padding: 10px 0;
  font-size: var(--t-small);
  color: var(--c-ink-2);
  transition: color var(--d-fast) linear;
}
.hdr__link:hover,
.hdr__link[aria-current] {
  color: var(--c-ink);
}
.hdr__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--d-ui) var(--ease-ui);
}
.hdr__link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.hdr__marker {
  position: absolute;
  top: 50%;
  left: 0;
  width: 7px;
  height: 7px;
  margin-top: -3.5px;
  background: var(--c-key);
  opacity: 0;
  transform: translateX(var(--mx, 0));
  transition: transform 560ms var(--ease-out), opacity 300ms linear;
  pointer-events: none;
}
.hdr__marker.is-on {
  opacity: 1;
}

.hdr__aside {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hdr__menu {
  display: none;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding-inline: 4px;
  font-size: var(--t-small);
}
.hdr__menu-icon {
  position: relative;
  width: 22px;
  height: 10px;
}
.hdr__menu-icon i {
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--d-ui) var(--ease-ui);
}
.hdr__menu-icon i:first-child {
  top: 0;
}
.hdr__menu-icon i:last-child {
  bottom: 0;
  right: 6px;
}
.hdr__menu:hover .hdr__menu-icon i:last-child {
  transform: translateX(6px);
}

/* the scrub bar: the original 1px border, now a timeline with a playhead */
.hdr__track {
  position: relative;
  height: 1px;
  margin-inline: var(--gutter);
  background: var(--c-line);
}
.hdr__progress {
  position: absolute;
  inset: 0;
  background: var(--c-ink);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}
.hdr__head {
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  background: var(--c-key);
  transform: translateX(var(--px, 0));
}

@media (max-width: 899px) {
  .hdr__bar {
    grid-template-columns: 1fr auto;
  }
  .hdr__nav,
  .hdr__aside .tc {
    display: none;
  }
  .hdr__menu {
    display: inline-flex;
  }
  html:not(.js) .hdr__menu {
    display: none;
  }
  html:not(.js) .hdr__nav {
    display: block;
  }
  html:not(.js) .hdr__list {
    gap: 1rem;
  }
}

/* ---------- Mobile menu (native <dialog>) ------------------------------ */

.menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--c-bg);
  color: var(--c-ink);
  overflow: hidden;
}
.menu::backdrop {
  background: transparent;
}
.menu[open] {
  display: flex;
  flex-direction: column;
}
.menu__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--hdr-h);
  padding-inline: var(--gutter);
  border-bottom: 1px solid var(--c-line);
  margin-inline: 0;
}
.menu__close {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: var(--t-small);
}
.menu__close-icon {
  position: relative;
  width: 18px;
  height: 18px;
}
.menu__close-icon::before,
.menu__close-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transform: rotate(45deg);
}
.menu__close-icon::after {
  transform: rotate(-45deg);
}
.menu__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--s-4) var(--gutter);
}
.menu__list li {
  border-bottom: 1px solid var(--c-line);
}
.menu__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.12em;
  font-size: clamp(2.75rem, 13vw, 5.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.menu__link .key {
  width: 0.2em;
  height: 0.2em;
  opacity: 0;
  transition: opacity 200ms linear;
}
.menu__link[aria-current] .key,
.menu__link:hover .key {
  opacity: 1;
}
.menu__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  padding: var(--s-3) var(--gutter) max(var(--s-3), env(safe-area-inset-bottom));
  font-size: var(--t-small);
  color: var(--c-ink-2);
}

/* ---------- Hero ------------------------------------------------------- */

.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: clip;
  container-type: inline-size;
}

.hero__frame {
  position: absolute;
  inset: 0;
  background: #000;
}
.hero__pic,
.hero__img {
  width: 100%;
  height: 100%;
}
.hero__img {
  object-fit: cover;
  object-position: 50% 62%;
  transform-origin: 62% 50%;
}
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgb(0 0 0 / 0.78) 0%, rgb(0 0 0 / 0.25) 34%, transparent 58%),
    linear-gradient(to right, rgb(0 0 0 / 0.35), transparent 45%);
}
.hero__veil {
  /* darkens as the hero scrolls away */
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

.hero__content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(2.5rem, 7svh, 6rem);
  padding-inline: var(--gutter);
}

.hero__title {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: clamp(1rem, 1.6vw, 1.75rem);
  row-gap: clamp(0.75rem, 1.6vw, 1.5rem);
}

.hero__name {
  grid-column: 1 / -1;
  justify-self: start;
  display: block;
  font-size: clamp(3.5rem, 10.2cqi, 12.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  padding-inline-end: 0.12em; /* room for the tear to push right */
  white-space: nowrap;
}

.hero__rule {
  position: relative;
  display: block;
  height: 2px;
}
.hero__line {
  position: absolute;
  inset: 0;
  background: var(--c-ink);
  transform-origin: left;
}
.hero__key {
  position: absolute;
  top: 50%;
  right: 0;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  background: var(--c-key);
}

.hero__role {
  display: block;
  font-size: clamp(1rem, 0.86rem + 0.55vw, 1.4rem);
  line-height: 1.3;
  white-space: nowrap;
}

.hero__cue {
  position: absolute;
  right: var(--gutter);
  top: calc(var(--hdr-h) + clamp(1.5rem, 5svh, 3rem));
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--t-label);
  color: var(--c-ink-2);
}
.hero__cue-line {
  position: relative;
  width: 1px;
  height: 44px;
  background: var(--c-line-2);
  overflow: clip;
}
.hero__cue-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--c-ink);
  transform: translateY(-100%);
  animation: cue 2.4s var(--ease-cut) infinite;
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  45% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

@media (max-aspect-ratio: 4/5) {
  .hero__img {
    object-position: 50% 50%;
  }
  .hero__content {
    bottom: clamp(3rem, 12svh, 7rem);
  }
  .hero__title {
    grid-template-columns: 1fr;
  }
  .hero__name {
    font-size: min(18.3cqi, 9rem);
  }
  .hero__role {
    white-space: normal;
  }
  .hero__cue {
    top: auto;
    bottom: clamp(1rem, 3svh, 2rem);
  }
  .hero__cue span:first-child {
    display: none;
  }
}

/* ---------- About ------------------------------------------------------ */

.about {
  position: relative;
  padding-top: var(--s-6);
  padding-bottom: var(--s-5);
}

.about__head {
  display: grid;
  gap: clamp(2rem, 4vw, 4rem);
}
.about__lead {
  max-width: 22em;
  font-size: var(--t-lead);
  line-height: 1.16;
  letter-spacing: -0.015em;
}

.about__body {
  display: grid;
  gap: var(--s-5);
  margin-top: var(--s-5);
}

.about__portrait {
  position: relative;
}
.grade {
  position: relative;
  aspect-ratio: 864 / 1184;
  overflow: clip;
  background: var(--c-bg-3);
}
.grade img {
  position: absolute;
  inset: -6% 0;
  width: 100%;
  height: 112%;
  object-fit: cover;
}
.grade__edge {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--c-key);
  opacity: 0;
}
.about__cap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.85rem;
  font-size: var(--t-label);
  color: var(--c-ink-2);
}
.about__cap .key {
  width: 8px;
  height: 8px;
}
.about__cap span {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.about__text {
  display: grid;
  gap: 1.35em;
  max-width: 34em;
  color: var(--c-ink-2);
}
.about__text p:last-of-type {
  color: var(--c-ink);
}

.slate {
  margin-top: var(--s-3);
  border-top: 1px solid var(--c-line-2);
  font-size: var(--t-small);
}
.slate > div {
  position: relative;
  display: grid;
  grid-template-columns: minmax(6.5rem, 30%) 1fr;
  gap: 1rem;
  padding-block: 0.9rem;
}
.slate > div::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--c-line);
  transform: scaleX(var(--sx, 1));
  transform-origin: left;
}
.slate dt {
  color: var(--c-ink-3);
}
.slate dd {
  color: var(--c-ink);
}

.quote {
  position: relative;
  margin-top: var(--s-6);
  padding-block: var(--s-4) var(--s-5);
}
.quote p {
  max-width: 17em;
  font-size: var(--t-quote);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-indent: -0.42em;
}
.quote .w {
  display: inline-block;
  text-indent: 0; /* text-indent inherits into each split word box */
}
.quote figcaption {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: var(--s-4);
  font-size: var(--t-small);
  color: var(--c-ink-2);
}
.quote figcaption .key {
  width: 9px;
  height: 9px;
}

@media (min-width: 960px) {
  /* title left, statement right on the title's baseline, above the portrait */
  .about__head {
    grid-template-columns: repeat(12, 1fr);
    align-items: end;
  }
  .about__title {
    grid-column: 1 / 7;
  }
  .about__lead {
    grid-column: 8 / -1;
    max-width: 16em;
    font-size: clamp(1.5rem, 0.8rem + 1.35vw, 2.5rem);
    padding-bottom: 0.35em;
  }
  .about__body {
    grid-template-columns: repeat(12, 1fr);
    align-items: start;
    margin-top: var(--s-5);
  }
  .about__portrait {
    grid-column: 8 / -1;
    grid-row: 1;
    position: sticky;
    top: calc(var(--hdr-h) + 6svh);
  }
  .about__text {
    grid-column: 2 / 7;
    grid-row: 1;
    padding-top: 14svh;
  }
  .quote p {
    margin-left: 8.333%;
  }
  .quote figcaption {
    margin-left: 8.333%;
  }
}

/* ---------- Work (portfolio timeline) --------------------------------- */

.work {
  position: relative;
  padding-top: var(--s-6);
  background: var(--c-bg);
}
.work__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}
.work__intro {
  max-width: 19em;
  color: var(--c-ink-2);
}
.work__intro strong {
  font-weight: 400;
  color: var(--c-ink);
}

.work__viewport {
  position: relative;
  padding-block: var(--s-5) var(--s-6);
}
.work__track {
  display: grid;
  gap: var(--s-5);
  padding-inline: var(--gutter);
}

.clip {
  position: relative;
}
.clip__ruler {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.6rem;
  font-size: var(--t-label);
  color: var(--c-ink-3);
}
.clip__ruler .tc {
  color: var(--c-ink-2);
}
.clip__ticks {
  flex: 1;
  height: 9px;
  align-self: flex-end;
  margin-bottom: 0.35rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='9'%3E%3Cpath d='M0.5 0V9M16.5 5V9M32.5 5V9M48.5 5V9M64.5 5V9' stroke='%23ffffff' stroke-opacity='.28'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: left bottom;
}

.clip__link {
  position: relative;
  display: grid;
  overflow: clip;
  border: 1px solid var(--c-line);
  border-radius: 4px;
  background: var(--c-bg-2);
  isolation: isolate;
  transition: border-color var(--d-ui) linear;
}
.clip__link:hover,
.clip__link:focus-visible {
  border-color: var(--c-line-2);
}
.clip__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: clip;
}
.clip__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1.6s var(--ease-out);
}
.clip__link:hover .clip__bg img {
  transform: scale(1.1);
}

.clip__copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--s-4);
  padding: clamp(1.25rem, 3.2vw, 3.25rem);
}
.clip__title {
  font-size: var(--t-h3);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  transition: color 600ms linear;
}
.clip__facts {
  display: grid;
  gap: clamp(0.6rem, 1.4vw, 1.25rem);
  font-size: var(--t-small);
  color: var(--c-ink-2);
}
.clip__facts li {
  display: flex;
  align-items: center;
  gap: 0.9em;
}
.clip__facts .key {
  width: clamp(10px, 1.05vw, 16px);
  height: clamp(10px, 1.05vw, 16px);
  transition: background-color 500ms linear;
}
.clip__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-size: var(--t-small);
  color: var(--c-ink);
}
.clip__cta .arw {
  transition: transform var(--d-ui) var(--ease-ui);
}
.clip__link:hover .clip__cta .arw {
  transform: translateX(5px);
}

.clip__reel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.1vw, 18px);
  padding: 0 clamp(1.25rem, 3.2vw, 3.25rem) clamp(1.25rem, 3.2vw, 3.25rem);
}
.clip__frame {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 9 / 16;
  overflow: clip;
  border-radius: 3px;
  background: var(--c-bg-3);
  transform: translateY(var(--dy, 0));
}
.clip__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.7);
  transition: filter 900ms var(--ease-out), transform 1.4s var(--ease-out);
}
.clip__frame:nth-child(1) { --dy: -5%; }
.clip__frame:nth-child(2) { --dy: 5%; flex-grow: 1.3; }
.clip__frame:nth-child(3) { --dy: -1%; }

.clip__reel--wide {
  flex-direction: column;
  align-items: stretch;
}
.clip__reel--wide .clip__frame {
  flex: none;
  width: 100%;
  aspect-ratio: 16 / 9;
}

/* "live" = the clip under the playhead: it grades to colour */
.clip.is-live .clip__frame img,
.clip__link:hover .clip__frame img,
.clip__link:focus-visible .clip__frame img {
  filter: none;
}
.clip:not(.is-live) .clip__facts .key {
  background: var(--c-key-dim);
}
.clip__link:hover .clip__facts .key {
  background: var(--c-key);
}

@media (min-width: 720px) {
  .clip__link {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    min-height: min(68svh, 44vw);
  }
  .clip__reel {
    padding: clamp(1.25rem, 3.2vw, 3.25rem);
    padding-left: 0;
  }
  .clip__reel--wide {
    justify-content: center;
  }
  .clip__reel--wide .clip__frame {
    width: 86%;
  }
  .clip__reel--wide .clip__frame:nth-child(2) {
    align-self: flex-end;
    margin-top: -12%;
  }
}

/* Horizontal timeline (JS adds .is-horizontal on large screens with motion) */
.work.is-horizontal .work__viewport {
  height: 100svh;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: clip;
}
.work.is-horizontal .work__track {
  display: flex;
  gap: clamp(2rem, 4vw, 4.5rem);
  width: max-content;
  padding-inline: var(--gutter);
  will-change: transform;
}
.work.is-horizontal .clip {
  flex: none;
  width: min(1240px, 74vw, calc((100svh - var(--hdr-h) - 9rem) * 1.6));
}
.work.is-horizontal .clip__link {
  aspect-ratio: 16 / 10;
  min-height: 0;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.playhead {
  display: none;
}
.work.is-horizontal .playhead {
  position: absolute;
  top: 20%;
  left: 50%;
  display: block;
  width: 1px;
  height: 60%;
  background: var(--c-key);
  pointer-events: none;
  z-index: 2;
}
.work.is-horizontal .playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: -5px;
  width: 11px;
  height: 11px;
  background: var(--c-key);
}
.work__status {
  display: none;
}
.work.is-horizontal .work__status {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(1rem, 4svh, 2.5rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--t-label);
  color: var(--c-ink-3);
}
.work__bar {
  position: relative;
  flex: 1;
  height: 1px;
  margin-inline: 1.5rem;
  background: var(--c-line);
}
.work__bar span {
  position: absolute;
  inset: 0;
  background: var(--c-ink);
  transform-origin: left;
  transform: scaleX(var(--wp, 0));
}

/* ---------- Contact ---------------------------------------------------- */

.contact {
  position: relative;
  padding-block: var(--s-6);
  border-top: 1px solid var(--c-line);
}
.contact__grid {
  display: grid;
  gap: var(--s-5);
}
.contact__lead {
  max-width: 17em;
  margin-top: var(--s-4);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.875rem);
  line-height: 1.24;
  color: var(--c-ink-2);
}
.contact__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin-top: var(--s-4);
  font-size: var(--t-small);
}

.form {
  display: grid;
  gap: clamp(1.75rem, 3vw, 2.5rem);
  align-content: start;
  max-width: 40rem;
}
.field {
  position: relative;
  padding-top: 1.35rem;
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 0.55rem 0 0.7rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--c-line-2);
  border-radius: 0;
  outline: none;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
  line-height: 1.35;
  caret-color: var(--c-key);
}
.field textarea {
  min-height: 7.5rem;
  resize: vertical;
}
.field label {
  position: absolute;
  left: 0;
  top: 1.95rem;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
  line-height: 1.35;
  color: var(--c-ink-3);
  transform-origin: left top;
  pointer-events: none;
  transition: transform var(--d-ui) var(--ease-ui), color var(--d-fast) linear;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label,
.field textarea:focus + label,
.field textarea:not(:placeholder-shown) + label {
  transform: translateY(-1.65rem) scale(0.62);
  color: var(--c-ink-2);
}
.field__line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--c-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 600ms var(--ease-out);
}
.field__line::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 7px;
  height: 7px;
  background: var(--c-key);
  opacity: 0;
  transition: opacity 200ms linear 250ms;
}
.field:focus-within .field__line {
  transform: scaleX(1);
}
.field:focus-within .field__line::after {
  opacity: 1;
}
.field__err {
  display: none;
  margin-top: 0.45rem;
  font-size: var(--t-label);
  color: var(--c-error);
}
.field:has(:user-invalid) .field__err {
  display: block;
}
.field:has(:user-invalid) input,
.field:has(:user-invalid) textarea {
  border-bottom-color: var(--c-error);
}
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--c-ink);
  transition: background-color 9999s;
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 0.5rem;
}
.form__status {
  font-size: var(--t-small);
  color: var(--c-ink-2);
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.85em;
  min-height: 56px;
  padding: 0 1.6em;
  border-radius: 2px;
  background: var(--c-ink);
  color: #000;
  font-size: var(--t-small);
  overflow: clip;
  isolation: isolate;
  transition: color var(--d-fast) linear;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--c-key);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 520ms var(--ease-cut);
}
.btn:hover::before,
.btn:focus-visible::before {
  transform: scaleX(1);
  transform-origin: left;
}
.btn .arw {
  transition: transform var(--d-ui) var(--ease-ui);
}
.btn:hover .arw {
  transform: translateX(5px);
}
.btn:active {
  filter: brightness(0.9);
}
.btn[disabled] {
  cursor: progress;
}
.btn.is-sent {
  background: var(--c-key);
}
.btn.is-sent::before {
  transform: scaleX(1);
}
.btn__inner {
  display: inline-flex;
  align-items: center;
  gap: 0.85em;
  will-change: transform;
}

@media (min-width: 960px) {
  .contact__grid {
    grid-template-columns: repeat(12, 1fr);
  }
  .contact__intro {
    grid-column: 1 / 7;
  }
  .form {
    grid-column: 8 / -1;
    padding-top: 1.25rem;
  }
}

/* ---------- Footer ----------------------------------------------------- */

.ftr {
  position: relative;
  padding-top: var(--s-5);
  border-top: 1px solid var(--c-line);
  overflow: clip;
}
.ftr__top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  font-size: var(--t-small);
}
.ftr__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
}
.ftr__markwrap {
  container-type: inline-size;
  margin-top: var(--s-5);
  padding-inline: var(--gutter);
}
.ftr__mark {
  display: block;
  font-size: calc(100cqi / 5.05);
  line-height: 0.86;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--c-ink);
  user-select: none;
}
.ftr__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: var(--s-3) max(var(--s-3), env(safe-area-inset-bottom));
  margin-top: var(--s-3);
  border-top: 1px solid var(--c-line);
  font-size: var(--t-label);
  color: var(--c-ink-3);
}
.ftr__base a {
  color: var(--c-ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ftr__base a:hover {
  color: var(--c-ink);
}

/* ---------- Cursor label (fine pointers only) -------------------------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-cursor);
  display: none;
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block;
  }
}
.cursor__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 8px 10px;
  background: var(--c-key);
  color: #000;
  font-size: var(--t-label);
  white-space: nowrap;
  transform: translate(14px, 14px) scale(0.4);
  opacity: 0;
  transition: transform 340ms var(--ease-out), opacity 200ms linear;
}
.cursor__pill::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #000;
}
.cursor.is-on .cursor__pill {
  transform: translate(14px, 14px) scale(1);
  opacity: 1;
}

/* ---------- Inner pages: header block --------------------------------- */

.phead {
  padding-top: calc(var(--hdr-h) + var(--s-5));
  padding-bottom: var(--s-5);
  display: grid;
  gap: var(--s-4);
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--t-small);
  color: var(--c-ink-3);
}
.crumbs a {
  color: var(--c-ink-2);
}
.crumbs a:hover {
  color: var(--c-ink);
}
.phead__title {
  font-size: clamp(3rem, 1.3rem + 7vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.phead__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s-3) var(--s-5);
}
.phead__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  font-size: var(--t-small);
  color: var(--c-ink-2);
}
.phead__facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
}
.phead__facts .key {
  width: 12px;
  height: 12px;
}
.phead__hint {
  max-width: 28em;
  font-size: var(--t-small);
  color: var(--c-ink-3);
}

/* ---------- Reel grid (vertical videos) ------------------------------- */

.reel {
  padding-bottom: var(--s-6);
}
.reel__grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 1), minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 24px);
  align-items: start;
}
@media (min-width: 560px) {
  .reel__grid { --cols: 2; }
}
@media (min-width: 900px) {
  .reel__grid { --cols: 3; }
}
@media (min-width: 1200px) {
  .reel__grid { --cols: 4; }
}

.tile {
  position: relative;
}
.tile__media {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: clip;
  border-radius: 4px;
  background: var(--c-bg-3);
}
.tile__poster,
.tile__media iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.tile__media iframe {
  pointer-events: none; /* wheel/touch scroll the page, not the player */
}
.tile__media iframe:fullscreen {
  pointer-events: auto;
}
.tile__poster {
  object-fit: cover;
  z-index: 1;
  transition: opacity 600ms linear;
}
.tile.is-playing .tile__poster {
  opacity: 0;
}
.tile__cap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 0.7rem;
  font-size: var(--t-label);
  color: var(--c-ink-3);
}
.tile__cap .tile__n {
  color: var(--c-ink-2);
}
.tile__cap .tile__live {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.tile__cap .key {
  width: 7px;
  height: 7px;
  background: var(--c-line-2);
  transition: background-color 300ms linear;
}
.tile.is-playing .tile__cap .key {
  background: var(--c-key);
}
.tile.is-unmuted .tile__media {
  outline: 1px solid var(--c-key);
  outline-offset: 3px;
}

.tile__controls {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.tile__group {
  display: flex;
  gap: 6px;
}
.ctl {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 3px;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  pointer-events: auto;
  transition: background-color var(--d-fast) linear, color var(--d-fast) linear, transform 200ms var(--ease-out);
}
.ctl:hover {
  background: rgb(0 0 0 / 0.82);
}
.ctl:active {
  transform: scale(0.92);
}
.ctl[aria-pressed="true"] {
  background: var(--c-key);
  color: #000;
}
.ctl svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.ctl .i-pause,
.ctl.is-playing .i-play,
.ctl .i-sound,
.ctl[aria-pressed="true"] .i-muted {
  display: none;
}
.ctl.is-playing .i-pause,
.ctl[aria-pressed="true"] .i-sound {
  display: block;
}
.ctl .fill {
  fill: currentColor;
  stroke: none;
}

/* ---------- YouTube list ---------------------------------------------- */

.yt {
  display: grid;
  gap: var(--s-6);
  padding-bottom: var(--s-6);
}
.yt__item {
  display: grid;
  gap: var(--s-3);
}
.yt__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: clip;
  border-radius: 4px;
  background: var(--c-bg-3);
}
.yt__media iframe,
.yt__play,
.yt__play img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.yt__play img {
  object-fit: cover;
  filter: grayscale(1) brightness(0.8);
  transform: scale(1.01);
  transition: filter 900ms var(--ease-out), transform 1.4s var(--ease-out);
}
.yt__play:hover img,
.yt__play:focus-visible img,
.yt__item.is-live .yt__play img {
  filter: none;
}
.yt__play:hover img {
  transform: scale(1.04);
}
.yt__badge {
  position: absolute;
  left: clamp(12px, 2vw, 24px);
  bottom: clamp(12px, 2vw, 24px);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.1rem 0.7rem 0.9rem;
  background: var(--c-ink);
  color: #000;
  font-size: var(--t-small);
  transition: background-color var(--d-fast) linear;
}
.yt__badge svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}
.yt__play:hover .yt__badge {
  background: var(--c-key);
}
.yt__continue {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 0.78);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms linear;
}
.yt__media.finished .yt__continue {
  opacity: 1;
  pointer-events: auto;
}
.yt__continue span {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.9rem 1.4rem;
  background: var(--c-ink);
  color: #000;
}
.yt__meta {
  display: grid;
  gap: 1rem;
}
.yt__tc {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--t-label);
  color: var(--c-ink-3);
}
.yt__title {
  max-width: 24em;
  font-size: clamp(1.375rem, 1rem + 1.4vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
}

@media (min-width: 960px) {
  .yt__item {
    grid-template-columns: repeat(12, 1fr);
    align-items: end;
    column-gap: clamp(1.5rem, 3vw, 3rem);
  }
  .yt__media {
    grid-column: 1 / 9;
  }
  .yt__meta {
    grid-column: 9 / -1;
    padding-bottom: 0.5rem;
  }
  .yt__item:nth-child(even) .yt__media {
    grid-column: 5 / -1;
    grid-row: 1;
  }
  .yt__item:nth-child(even) .yt__meta {
    grid-column: 1 / 5;
    grid-row: 1;
  }
}

/* ---------- Next category --------------------------------------------- */

.next {
  border-top: 1px solid var(--c-line);
}
.next__link {
  display: grid;
  gap: 0.75rem;
  padding-block: var(--s-5);
}
.next__label {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--t-small);
  color: var(--c-ink-3);
}
.next__label .key {
  width: 8px;
  height: 8px;
}
.next__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: clamp(2.5rem, 1rem + 6vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.next__title .arw {
  width: 0.6em;
  height: 0.6em;
  stroke-width: 1;
  transition: transform 600ms var(--ease-out);
}
.next__link:hover .next__title .arw {
  transform: translateX(0.15em);
}
.next__fill {
  display: inline-block;
  background: linear-gradient(var(--c-ink), var(--c-ink)) left bottom / 0% 1px no-repeat;
  transition: background-size 700ms var(--ease-out);
}
.next__link:hover .next__fill {
  background-size: 100% 1px;
}

/* ---------- Motion pre-states ------------------------------------------
   Only applied while JS-driven motion is confirmed (html.motion, set inline
   in <head> and removed by a fail-safe if the animation code never runs).
   Without it every element renders in its final, visible state.          */

.motion .hero__frame {
  clip-path: inset(47% 0 47% 0);
}
.motion .hero__name,
.motion .hero__role,
.motion .hero__cue {
  opacity: 0;
}
.motion .hero__line {
  transform: scaleX(0);
}
.motion .hero__key {
  opacity: 0;
}
.motion .hdr {
  opacity: 0;
}

/* ---------- Page transitions (cross-document View Transitions) -------- */

@view-transition {
  navigation: auto;
}
::view-transition-old(root) {
  animation: vt-out 520ms var(--ease-cut) both;
}
::view-transition-new(root) {
  animation: vt-in 760ms var(--ease-cut) both;
}
::view-transition-group(*) {
  animation-duration: 760ms;
  animation-timing-function: var(--ease-cut);
}
@keyframes vt-out {
  to {
    opacity: 0.25;
    transform: translateY(-3vh);
  }
}
@keyframes vt-in {
  from {
    clip-path: inset(100% 0 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* ---------- Reduced motion -------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  .hero__cue-line::after {
    transform: none;
  }
}
