/* ---------- Shared section chrome ---------- */
.section { position: relative; padding-block: var(--space-section); }
.section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 2rem var(--gutter);
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 6rem);
}
.section__title { font-size: var(--text-3xl); margin-top: 1.25rem; }
.section__intro { color: var(--muted); max-width: 36rem; justify-self: end; }
@media (max-width: 860px) {
  .section__head { grid-template-columns: 1fr; }
  .section__intro { justify-self: start; }
}

/* ---------- Statement (after the lens dive) ---------- */
.statement {
  background: var(--ink-950);
  padding-block: clamp(6rem, 14vw, 13rem) var(--space-section);
}
.statement__text {
  max-width: 64rem;
  margin-top: 2.5rem;
  font-size: var(--text-2xl);
  line-height: 1.08;
}
.statement__text .word { transition: opacity 0.2s linear; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(4rem, 8vw, 7rem);
  border-top: 1px solid var(--line);
}
.fact {
  padding: 1.75rem 1.5rem 0 0;
  border-right: 1px solid var(--line);
}
.fact + .fact { padding-left: 1.5rem; }
.fact:last-child { border-right: 0; }
.fact__value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  line-height: 1;
}
.fact__value sup { font-size: 0.45em; color: var(--brass); vertical-align: top; }
.fact__label { margin-top: 0.75rem; color: var(--muted); font-size: var(--text-sm); max-width: 18rem; }
@media (max-width: 700px) {
  .facts { grid-template-columns: 1fr; }
  .fact, .fact + .fact { padding: 1.5rem 0; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Clients marquee ---------- */
.clients {
  border-block: 1px solid var(--line);
  background: var(--ink-900);
  overflow: hidden;
}
.clients__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-block: 1.5rem;
}
.clients__label { flex: none; padding-left: var(--gutter); }
.clients__track {
  display: flex;
  flex: none;
  align-items: center;
  gap: clamp(3rem, 6vw, 5.5rem);
  padding-right: clamp(3rem, 6vw, 5.5rem);
  animation: marquee 42s linear infinite;
}
.clients__viewport {
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.clients__viewport:focus-within .clients__track { animation-play-state: paused; }
@media (hover: hover) {
  .clients__viewport:hover .clients__track { animation-play-state: paused; }
}
@keyframes marquee { to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) {
  .clients__viewport { overflow-x: auto; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
  .clients__viewport::-webkit-scrollbar { display: none; }
  .clients__track { animation: none; }
  .clients__track[aria-hidden="true"] { display: none; }
}
.clients__track li {
  display: flex;
  align-items: center;
  height: 64px;
}
/* --h is set per logo for optical balance (wide wordmarks get less height) */
.clients__track img {
  height: var(--h, 44px);
  width: auto;
  max-width: none;
  opacity: 0.66;
  transition: opacity var(--duration-normal) ease, transform var(--duration-normal) var(--ease-out-expo);
}
.clients__track a { display: block; border-radius: 4px; }
.clients__track li:hover img,
.clients__track a:focus-visible img { opacity: 1; transform: translateY(-2px); }
@media (max-width: 700px) {
  .clients__label { display: none; }
  .clients__track img { height: calc(var(--h, 44px) * 0.78); }
  .clients__track { gap: 2.5rem; padding-right: 2.5rem; animation-duration: 26s; }
  .clients__inner { padding-block: 1.1rem; }
}

/* ---------- Services with sticky visual ---------- */
.services { background: linear-gradient(180deg, var(--ink-950), var(--ink-900) 30%, var(--ink-900)); }
.services__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--gutter);
}
.services__visual {
  position: sticky;
  top: 6rem;
  height: calc(100svh - 8rem);
  max-height: 52rem;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink-850);
}
.services__visual figure {
  position: absolute;
  inset: 0;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1s var(--ease-out-expo);
}
.services__visual figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  transition: transform 1.6s var(--ease-out-expo);
}
.services__visual figure.is-active { clip-path: inset(0 0 0 0); }
.services__visual figure.is-active img { transform: scale(1); }
.services__visual figcaption {
  position: absolute;
  left: 1.25rem;
  bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.75rem;
  background: rgb(1 11 14 / 0.6);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.service {
  min-height: 78svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 3rem;
  border-top: 1px solid var(--line);
}
.service:first-child { border-top: 0; padding-top: 0; min-height: 60svh; justify-content: flex-start; }
.service__num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  color: var(--brass);
  text-transform: uppercase;
}
.service__title { margin: 1rem 0 1.5rem; font-size: var(--text-2xl); }
.service__claim { font-size: var(--text-lg); color: var(--paper); margin-bottom: 1rem; }
.service p:not(.service__claim) { color: var(--muted); max-width: 34rem; }
.service p + p { margin-top: 0.85rem; }
.service__tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.75rem; }
.service__tags li {
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: var(--text-sm);
  color: var(--sand-300);
}
.service__media { display: none; }

@media (max-width: 900px) {
  .services__grid { grid-template-columns: 1fr; }
  .services__visual { display: none; }
  .service, .service:first-child { min-height: 0; padding-block: 3rem; border-top: 1px solid var(--line); }
  .service__media {
    display: block;
    aspect-ratio: 4 / 3;
    margin-bottom: 1.75rem;
    overflow: hidden;
    border-radius: 4px;
  }
  .service__media img { width: 100%; height: 100%; object-fit: cover; }
}

/* ---------- Portfolio filmstrip ---------- */
.reel { background: var(--ink-900); padding-bottom: 0; }
.reel__pin { position: relative; padding-block: 2rem clamp(4rem, 8vw, 7rem); overflow: hidden; }
.strip {
  --sprocket: rgb(239 232 221 / 0.85);
  display: flex;
  width: max-content;
  gap: 0;
  padding: 3.4rem 0;
  background: #070707;
  position: relative;
  will-change: transform;
}
.strip::before,
.strip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 12px;
  background: repeating-linear-gradient(90deg, transparent 0 12px, var(--sprocket) 12px 26px, transparent 26px 38px);
}
.strip::before { top: 0.5rem; }
.strip::after { bottom: 0.5rem; }

.frame {
  position: relative;
  flex: none;
  margin: 0 0.6rem;
  height: clamp(18rem, 58svh, 40rem);
}
.frame:first-child { margin-left: var(--gutter); }
.frame:last-child { margin-right: var(--gutter); }
.frame__img {
  --g: 1; /* grade progress: 0 = flat S-Log plate, 1 = finished look (set by js/grade.js) */
  position: relative;
  height: 100%;
  overflow: hidden;
  background: var(--ink-850);
}
.frame__img img {
  height: 100%;
  width: auto;
  transition: transform 1.2s var(--ease-out-expo);
}
.frame:hover .frame__img img { transform: scale(1.04); }

/* Colour-grading wipe: the graded image is revealed over the LOG plate, like a split view in Resolve */
.frame__log {
  position: absolute;
  inset: 0;
  width: 100% !important;
  object-fit: cover;
}
.frame__graded {
  position: relative;
  clip-path: inset(0 calc((1 - var(--g)) * 100%) 0 0);
}
.frame__wipe {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform: translateX(calc(var(--g) * 100%));
  opacity: calc((1 - var(--g)) * 30);
}
.frame__wipe::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: var(--paper);
  box-shadow: 0 0 14px rgb(239 232 221 / 0.6);
}
.frame__wipe::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -9px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: rgb(1 11 14 / 0.55);
}
.frame__lut {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  padding: 0.3rem 0.55rem;
  border-radius: 3px;
  background: rgb(1 11 14 / 0.62);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.frame__lut b {
  grid-area: 1 / 1;
  font-weight: 400;
  transition: opacity var(--duration-normal) ease;
}
.frame__lut b:first-child { color: var(--sand-300); }
.frame__lut b:last-child { color: var(--brass-hot); opacity: 0; justify-self: end; }
.frame__img.is-graded .frame__lut b:first-child { opacity: 0; }
.frame__img.is-graded .frame__lut b:last-child { opacity: 1; }
.no-js .frame__lut, .no-js .frame__wipe { display: none; }
.frame__edge {
  position: absolute;
  left: 0;
  top: -1.75rem;
  display: flex;
  gap: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  color: var(--film-edge);
  opacity: 0.85;
  white-space: nowrap;
}
.frame__caption {
  position: absolute;
  left: 0;
  bottom: -1.75rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand-300);
  white-space: nowrap;
}

.reel__progress {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  color: var(--muted);
}
.reel__bar { flex: 1; height: 1px; background: var(--line-strong); position: relative; }
.reel__bar i {
  position: absolute;
  inset: 0;
  background: var(--brass);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

/* Without pinning (touch / reduced motion) the strip scrolls natively */
.reel--native .reel__pin { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.reel--native .reel__pin::-webkit-scrollbar { display: none; }
.reel--native .frame { scroll-snap-align: center; }
.reel--native .reel__progress { display: none; }
.reel--native .reel__pin.is-drifting { scroll-snap-type: none; }
/* Loop copies only exist for the mobile auto-drift */
@media (min-width: 861px) { .frame--clone { display: none; } }
@media (max-width: 700px) { .frame { height: 52svh; max-height: 26rem; } }

/* ---------- About (SEO copy under the statement) ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1.5rem var(--gutter);
  margin-top: clamp(4rem, 8vw, 7rem);
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
}
.about__title { font-size: var(--text-xl); line-height: 1.1; max-width: 22rem; }
.about__text p { color: var(--muted); max-width: 40rem; }
.about__text p + p { margin-top: 1rem; }
.about__text strong { color: var(--paper); font-weight: 600; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

.service p a { color: var(--paper); text-underline-offset: 3px; }
.service .service__more { margin-top: 1.5rem; }
.service__more a { font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--brass); padding-bottom: 2px; }
.service p a:hover { color: var(--brass-hot); }
