/*
  MUM Story Film - homepage scroll film
  Three movements: HELD / CALLED / MOUNTED. Dark to dawn, one direction.
  Tokens per DESIGN.md: Ink #0B0B0C, Bone #F4F1EC, Pewter #2A2A2D, Steel #9A9A9D,
  Resilient Teal #2D9B9E, Resilient Crimson #C8332A, Bronze #B8702C.
  Engine: GSAP + ScrollTrigger + Lenis (loaded by index.html). Logic in film.js.
*/

.film { position: relative; background: #0B0B0C; }

.film-beat {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #0B0B0C;
}
.film-beat[data-vh="100"] { height: 100vh; }
.film-beat[data-vh="120"] { height: 120vh; }
.film-beat[data-vh="130"] { height: 130vh; }
.film-beat[data-vh="140"] { height: 140vh; }
.film-beat[data-vh="200"] { height: 200vh; }
.film-beat[data-vh="220"] { height: 220vh; }
.film-beat[data-vh="240"] { height: 240vh; }

.film-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* Movement temperature: one-direction arc, restrained tints over the footage */
.film-beat[data-movement="I"] .film-tint { background: linear-gradient(180deg, rgba(11,11,12,0.42), rgba(45,155,158,0.10)); }
.film-beat[data-movement="II"] .film-tint { background: linear-gradient(180deg, rgba(11,11,12,0.38), rgba(154,154,157,0.08)); }
.film-beat[data-movement="III"] .film-tint { background: linear-gradient(180deg, rgba(11,11,12,0.30), rgba(184,112,44,0.12)); }
.film-tint {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

/* Pinned 100vh stage inside each tall video beat (the beat is the scroll track) */
.film-pin {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: #0B0B0C;
}

/* Letterbox bars: present through I + II, retreat in III (film.js drives --lbox) */
.film { --lbox: 0px; }
.film-pin::before,
.film-pin::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: var(--lbox);
  background: #0B0B0C;
  z-index: 6;
  pointer-events: none;
  transition: height 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.film-pin::before { top: 0; }
.film-pin::after { bottom: 0; }

/* Overlay copy */
.film-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(24px, 6vw, 96px);
  color: #F4F1EC;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  will-change: opacity, transform;
}
.film-overlay > * { pointer-events: auto; }

.film-eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.66);
  margin: 0 0 28px;
}

.film-headline {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(44px, 7vw, 118px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0 0 0.45em;
  max-width: 16ch;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}
.film-headline em { font-style: italic; }

.film-hero-headline {
  font-size: clamp(38px, 5.6vw, 92px);
  max-width: 20ch;
}

.film-body {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.55;
  font-weight: 400;
  margin: 0;
  max-width: 44ch;
  color: rgba(244, 241, 236, 0.92);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.film-attrib {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.72);
  margin: 0 0 20px;
}

.film-rehook {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(20px, 2vw, 30px);
  color: rgba(244, 241, 236, 0.85);
  margin: 40px 0 0;
  max-width: 34ch;
}

/* Hero actions */
.film-actions { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.film-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: #F4F1EC;
  border: 1px solid rgba(244, 241, 236, 0.3);
  border-radius: 0;
  transition: background 360ms cubic-bezier(0.22, 1, 0.36, 1), border-color 360ms cubic-bezier(0.22, 1, 0.36, 1);
}
.film-btn--red { background: #C8332A; border-color: #C8332A; }
.film-btn--red:hover { background: #A62A22; border-color: #A62A22; }
.film-btn--ghost:hover { background: rgba(244, 241, 236, 0.08); border-color: #F4F1EC; }

/* First beat: overlay visible at load (LCP + no-scroll users), engine skips its tween */
.film-beat[data-first] .film-overlay { opacity: 1; visibility: visible; transform: none; }

/* Scroll-to-enter cue (locked house move) */
.film-cue {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.55);
  margin: 48px 0 0;
  animation: film-cue-pulse 2.6s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
@keyframes film-cue-pulse {
  0%, 100% { opacity: 0.45; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) { .film-cue { animation: none; } }

/* Scrub captions: staged lower-third lines driven by scroll progress */
.film-caps {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}
.film-cap {
  position: absolute;
  left: clamp(24px, 6vw, 96px);
  bottom: clamp(72px, 14vh, 160px);
  max-width: 46ch;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: clamp(18px, 1.6vw, 24px);
  line-height: 1.5;
  color: #F4F1EC;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  will-change: opacity, transform;
}
.film-cap .film-cap-mark {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.6);
  margin-bottom: 10px;
}

/* Story chapters: pinned photo essays on ink */
.film-story {
  background: #0B0B0C;
}
.film-story .film-story-pin {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(320px, 5fr) 7fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
  padding: clamp(24px, 6vw, 96px);
}
.film-story-copy { color: #F4F1EC; max-width: 44ch; position: relative; z-index: 3; }
.film-story-copy .film-headline { font-size: clamp(36px, 4.6vw, 76px); }

.film-story-grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  background-image: radial-gradient(rgba(244, 241, 236, 0.045) 1px, transparent 1px);
  background-size: 3px 3px;
}

.film-photos {
  position: relative;
  z-index: 2;
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}
.film-photo {
  position: relative;
  flex: 1 1 0;
  max-width: 340px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(48px);
  will-change: opacity, transform;
}
.film-photo:nth-child(2) { margin-top: clamp(24px, 6vh, 72px); }
.film-photo:nth-child(3) { margin-top: clamp(-72px, -6vh, -24px); }
.film-photo img {
  display: block;
  width: 100%;
  height: 46vh;
  object-fit: cover;
  object-position: center 30%;
  filter: grayscale(18%) contrast(1.04);
  border: 1px solid rgba(244, 241, 236, 0.14);
}
.film-photo figcaption {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #9A9A9D;
  margin-top: 12px;
}

/* Truett chapter: reverent, monochrome, two frames only */
.film-story--truett .film-photo img { filter: grayscale(100%) contrast(1.02); height: 54vh; object-position: center 20%; }
.film-story--truett .film-photo { max-width: 420px; }

/* Final beat stages */
.film-final-stack { position: absolute; inset: 0; z-index: 4; }
.film-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(24px, 6vw, 96px);
  color: #F4F1EC;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  will-change: opacity, transform;
  pointer-events: none;
}
.film-stage > * { pointer-events: auto; }
.film-signoff {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(56px, 9vw, 144px);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin: 0 0 16px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}
.film-fineprint {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.55);
  margin: 0;
}

/* Movement rail: fixed act indicator, roman numerals (house move) */
.film-rail {
  position: fixed;
  right: clamp(16px, 2.4vw, 36px);
  top: 50%;
  transform: translateY(-50%);
  text-align: right;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(calc(-50% + 8px));
  transition: opacity 600ms cubic-bezier(0.22, 1, 0.36, 1), transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.film-rail.is-active { opacity: 1; transform: translateY(-50%); }
.film-rail span {
  color: rgba(244, 241, 236, 0.34);
  transition: color 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.film-rail span.is-current { color: #F4F1EC; }
.film-rail span.is-current i { color: #2D9B9E; font-style: normal; }
.film-rail span i { font-style: normal; margin-right: 8px; }

/* Atmosphere plates (Higgsfield environment art, desktop only): the beat's own
   background shows in the tail zones between pinned stages and behind the story
   chapters, so chapter cuts dip into weather instead of flat ink. */
@media (min-width: 901px) {
  .film-beat[data-movement="I"] {
    background: linear-gradient(rgba(11, 11, 12, 0.6), rgba(11, 11, 12, 0.8)),
      url("plates/plate-i-stadium.jpg") center / cover no-repeat #0B0B0C;
  }
  .film-beat[data-movement="II"] {
    background: linear-gradient(rgba(11, 11, 12, 0.72), rgba(11, 11, 12, 0.86)),
      url("plates/plate-ii-witness.jpg") center / cover no-repeat #0B0B0C;
  }
  .film-beat[data-movement="III"] {
    background: linear-gradient(rgba(11, 11, 12, 0.62), rgba(11, 11, 12, 0.82)),
      url("plates/plate-iii-dawn.jpg") center / cover no-repeat #0B0B0C;
  }
}

/* Mobile + reduced motion: static story, posters + copy stacked, no pin, no scrub */
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .film-beat { height: auto !important; min-height: 0; }
  .film-pin { height: auto; overflow: visible; }
  .film-video { position: relative; height: auto; aspect-ratio: 16 / 9; }
  .film-overlay {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: linear-gradient(180deg, rgba(11, 11, 12, 0) 0%, rgba(11, 11, 12, 0.9) 40%, #0B0B0C 100%);
    padding: 28px 20px 40px;
  }
  .film-caps { position: relative; inset: auto; padding: 8px 20px 32px; }
  .film-cap {
    position: relative;
    left: auto;
    bottom: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 20px;
  }
  .film-story .film-story-pin {
    height: auto;
    grid-template-columns: 1fr;
    padding: 40px 20px;
  }
  .film-photos { flex-direction: column; align-items: stretch; margin-top: 28px; }
  .film-photo { opacity: 1; visibility: visible; transform: none; max-width: 100%; margin-top: 0 !important; }
  .film-photo img { height: auto; max-height: none; }
  .film-stage { position: relative; opacity: 1; visibility: visible; transform: none; padding: 32px 20px; }
  .film-stage + .film-stage { margin-top: 24px; }
  .film-rail { display: none; }
  .film-beat::before, .film-beat::after { display: none; }
}

/* ============ The Fork: two roads, one story ============ */
.film-fork .film-pin { background: transparent; display: flex; align-items: center; }
.film-fork-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1160px;
  padding: clamp(24px, 6vw, 96px);
  color: #F4F1EC;
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  will-change: opacity, transform;
}
.film-fork-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 28px);
  margin-top: 40px;
  max-width: 980px;
}
.film-choice {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  padding: 30px 28px 34px;
  background: rgba(11, 11, 12, 0.55);
  border: 1px solid rgba(244, 241, 236, 0.18);
  border-radius: 0;
  color: #F4F1EC;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: border-color 360ms cubic-bezier(0.22, 1, 0.36, 1), transform 360ms cubic-bezier(0.22, 1, 0.36, 1), background 360ms cubic-bezier(0.22, 1, 0.36, 1), opacity 360ms cubic-bezier(0.22, 1, 0.36, 1);
}
.film-choice:hover, .film-choice:focus-visible { border-color: #2D9B9E; transform: translateY(-4px); background: rgba(11, 11, 12, 0.78); }
.film-choice-tag {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #2D9B9E;
}
.film-choice-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(30px, 3vw, 46px);
  line-height: 1;
  letter-spacing: -0.01em;
}
.film-choice-sub {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(244, 241, 236, 0.75);
}
.film-fork-skip {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: clamp(17px, 1.6vw, 22px);
  color: rgba(244, 241, 236, 0.6);
  margin: 36px 0 0;
}
html[data-path="creative"] .film-choice[data-choose="creative"],
html[data-path="business"] .film-choice[data-choose="business"] { border-color: #2D9B9E; background: rgba(11, 11, 12, 0.8); }
html[data-path="creative"] .film-choice[data-choose="business"],
html[data-path="business"] .film-choice[data-choose="creative"] { opacity: 0.45; }
.film-choice[aria-pressed="true"] .film-choice-tag::after { content: " / riding"; color: rgba(244, 241, 236, 0.6); }

/* Path visibility: neutral until a road is chosen */
.for-creative, .for-business { display: none; }
html[data-path="creative"] .for-creative { display: inline; }
html[data-path="business"] .for-business { display: inline; }
html[data-path] .for-neutral { display: none; }
html:not([data-path="creative"]):not([data-path="business"]) .film-pathline { display: none; }

/* Path chip: shows the chosen road, click to switch */
.film-path-chip {
  position: fixed;
  left: clamp(16px, 2.4vw, 36px);
  bottom: clamp(20px, 4vh, 44px);
  z-index: 41;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #F4F1EC;
  background: rgba(11, 11, 12, 0.72);
  border: 1px solid rgba(244, 241, 236, 0.25);
  padding: 10px 14px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.film-path-chip:hover { border-color: #2D9B9E; }
.film-path-chip [data-path-chip-label] { color: #2D9B9E; }

/* Services grid: chosen road leads, other road steps back */
html[data-path="creative"] .home-services__grid a[data-road="business"],
html[data-path="business"] .home-services__grid a[data-road="creative"] { opacity: 0.5; }
html[data-path="creative"] .home-services__grid a[data-road="creative"],
html[data-path="business"] .home-services__grid a[data-road="business"] { order: -1; }
html[data-path="creative"] .home-services__grid a[data-road="creative"] > span::after,
html[data-path="business"] .home-services__grid a[data-road="business"] > span::after { content: " / your road"; color: #2D9B9E; }

@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .film-fork-inner { opacity: 1; visibility: visible; transform: none; padding: 40px 20px; }
  .film-fork-choices { grid-template-columns: 1fr; }
  .film-fork .film-pin { display: block; }
}

/* Deck: proof-rail anchor line (conversion research fold, claims already on-site) */
.film-rail-caption {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #9A9A9D;
  text-align: center;
  margin: 0 0 18px;
}

/* Ambient loops (Higgsfield DoP): living weather behind the fork + story chapters */
.film-ambient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.5) saturate(0.9);
}
.film-story--truett .film-ambient { filter: brightness(0.45) grayscale(1); }
@media (max-width: 900px), (prefers-reduced-motion: reduce) {
  .film-ambient { display: none; }
}

/* Price as a decision point (conversion research: state it plainly at the close) */
.film-price-line {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.62);
  margin: 22px 0 0;
  max-width: 56ch;
}
.home-cta .film-price-line { margin: 14px auto 0; text-align: center; }
