/* ---------- Video production: feature frame + shot list ---------- */
.film { background: var(--ink-950); }

.feature {
  position: relative;
  display: block;
  aspect-ratio: 2.39 / 1;
  overflow: hidden;
  border-radius: 4px;
  text-decoration: none;
  isolation: isolate;
}
.feature__media { position: absolute; inset: 0; }
.feature__media img,
.feature__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}
/* The loop fades in over the poster once it actually plays */
.feature__video { opacity: 0; transition: opacity 0.8s ease; }
.feature__video.is-playing { opacity: 1; }
.feature::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(1 11 14 / 0) 40%, rgb(1 11 14 / 0.85));
}
.feature__meta {
  position: absolute;
  left: clamp(1rem, 3vw, 2.5rem);
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(1rem, 3vw, 2.25rem);
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
}
.feature__title { display: block; margin-top: 0.5rem; font-size: var(--text-xl); }
.feature__play {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(3.5rem, 7vw, 6rem);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgb(239 232 221 / 0.5);
  background: rgb(1 11 14 / 0.35);
  backdrop-filter: blur(6px);
  transition: transform var(--duration-normal) var(--ease-out-expo), background var(--duration-normal) ease;
}
.feature__play svg { width: 30%; translate: 8% 0; }
.feature:hover .feature__play { transform: scale(1.08); background: var(--brass); border-color: var(--brass); color: var(--ink-950); }
.feature__tc {
  position: absolute;
  top: clamp(1rem, 2.5vw, 1.75rem);
  left: clamp(1rem, 3vw, 2.5rem);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
}

.shotlist { margin-top: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line); }
.shot__row {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr) 10rem 5rem 1.5rem;
  gap: 1rem;
  align-items: center;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  position: relative;
}
.shot__row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgb(201 162 95 / 0.1), transparent 70%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-normal) var(--ease-out-expo);
}
.shot__row:hover::before, .shot__row:focus-visible::before { transform: scaleX(1); }
.shot__idx, .shot__type, .shot__ratio {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.shot__title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1rem + 1.3vw, 2.15rem);
  line-height: 1.1;
  transition: transform var(--duration-normal) var(--ease-out-expo), color var(--duration-fast) ease;
}
.shot__row:hover .shot__title { transform: translateX(0.6rem); color: var(--brass-hot); }
.shot__arrow { justify-self: end; transition: transform var(--duration-normal) var(--ease-out-expo); }
.shot__row:hover .shot__arrow { transform: translate(3px, -3px); }
.shot__thumb { display: none; }

/* Floating poster that trails the cursor (desktop only) */
.preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  width: 22rem;
  aspect-ratio: 16 / 10;
  pointer-events: none;
  overflow: hidden;
  border-radius: 4px;
  opacity: 0;
  transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(var(--ps, 0.85));
  transition: opacity 0.25s ease;
  box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.8);
}
.preview.is-visible { opacity: 1; }
.preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.preview img.is-active {
  opacity: 1;
  animation: ken-burns 7s ease-out both;
}
.preview__video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.preview__video.is-active { opacity: 1; }
/* Stills drift slowly so rows without a clip still feel like footage */
@keyframes ken-burns {
  from { transform: scale(1.14) translate(2%, 1.5%); }
  to { transform: scale(1) translate(0, 0); }
}
.shot__thumb { position: relative; }
.shot__thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.film__more { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; margin-top: 2.5rem; }
.film__more p { color: var(--muted); max-width: 40rem; }
.film__more p a { color: var(--paper); text-underline-offset: 3px; }

@media (max-width: 860px) {
  .shot__row { grid-template-columns: 5.5rem minmax(0, 1fr) 1.25rem; gap: 0.25rem 1rem; }
  .shot__thumb { display: block; grid-row: span 2; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 3px; }
  .shot__thumb img { width: 100%; height: 100%; object-fit: cover; }
  .shot__idx, .shot__ratio { display: none; }
  .shot__type { grid-column: 2; grid-row: 2; }
  .shot__title { grid-column: 2; grid-row: 1; }
  .shot__arrow { grid-column: 3; grid-row: 1 / span 2; }
  .preview { display: none; }
  .feature { aspect-ratio: 4 / 3; }
}

/* ---------- Why + process timeline ---------- */
.why { background: var(--ink-900); }
.why__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: start;
}
.why__big { position: sticky; top: 7rem; }
.why__number {
  margin-top: 1.75rem;
  font-family: var(--font-display);
  font-size: clamp(8rem, 4rem + 16vw, 20rem);
  line-height: 0.8;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, var(--paper) 30%, var(--sand-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.why__number sup { font-size: 0.4em; vertical-align: top; color: var(--brass); -webkit-text-fill-color: var(--brass); }
.why__caption { margin-top: 1.5rem; max-width: 22rem; color: var(--muted); }

.reasons { counter-reset: reason; }
.reason {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.reason:last-child { border-bottom: 1px solid var(--line); }
.reason__num { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.18em; color: var(--brass); padding-top: 0.5rem; }
.reason h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-xl); line-height: 1.1; }
.reason p { margin-top: 0.75rem; color: var(--muted); }

.timeline { margin-top: clamp(4rem, 9vw, 8rem); }
.timeline__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.5rem; }
.timeline__head h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-xl); }
.timeline__tc { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.14em; color: var(--paper); font-variant-numeric: tabular-nums; }
.timeline__body {
  position: relative;
  padding: 2rem 0 0.5rem 3.5rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--ink-950);
  overflow: hidden;
}
.timeline__ruler {
  position: absolute;
  top: 0;
  left: 3.5rem;
  right: 0;
  height: 1.5rem;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 12.5%);
}
.track {
  position: relative;
  height: 2.75rem;
  margin-bottom: 0.4rem;
}
.track__name {
  position: absolute;
  left: -3.5rem;
  width: 3.5rem;
  top: 0;
  bottom: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  border-right: 1px solid var(--line);
}
.clip {
  position: absolute;
  top: 0.2rem;
  bottom: 0.2rem;
  left: var(--start);
  width: var(--len);
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  border-radius: 3px;
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-950);
  background: var(--clip, var(--sand-300));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
  transform-origin: left;
}
.clip--v1 { --clip: var(--sand-300); }
.clip--v2 { --clip: var(--brass); }
.clip--a1 {
  --clip: var(--petrol-600);
  color: var(--paper);
  background:
    repeating-linear-gradient(90deg, rgb(143 227 138 / 0.35) 0 2px, transparent 2px 5px) right center / calc(100% - 12.5rem) 46% no-repeat,
    var(--petrol-600);
}
.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 3.5rem;
  width: 0;
  transform: translateX(var(--ph, 0px));
  z-index: 2;
}
.playhead::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: var(--rec);
  box-shadow: 0 0 10px var(--rec);
}
.playhead::after {
  content: "";
  position: absolute;
  top: 0;
  left: -6px;
  border: 6px solid transparent;
  border-top: 9px solid var(--rec);
}
.timeline__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.timeline__steps li { font-size: var(--text-sm); color: var(--muted); }
.timeline__steps strong { display: block; color: var(--paper); font-weight: 600; margin-bottom: 0.25rem; }

/* Narrow screens: tracks get a fixed working width and pan with the playhead (js/scroll.js) */
@media (max-width: 760px) {
  .timeline__body { --track-w: 46rem; }
  .timeline__ruler { right: auto; width: var(--track-w); transform: translateX(calc(-1 * var(--pan, 0px))); }
  .track { width: var(--track-w); transform: translateX(calc(-1 * var(--pan, 0px))); }
  .track__name {
    z-index: 1;
    background: var(--ink-950);
    transform: translateX(var(--pan, 0px));
  }
}

@media (max-width: 900px) {
  .why__grid { grid-template-columns: 1fr; }
  .why__big { position: static; }
  .timeline__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clip { font-size: 0.6875rem; padding: 0 0.4rem; }
}
