/* Scroll film: a full-bleed, scroll-scrubbed story behind the process copy.
   Without JavaScript the original light process section remains unchanged. */
.film-canvas {
  display: none;
}
.home-page .process.film-ready {
  --film-ink: #f7f5ef;
  --film-soft: #f7f5efb3;
  --film-line: #f7f5ef2e;
  position: relative;
  padding: 0;
  background: var(--bg);
  color: var(--film-ink);
}
.home-page .process.film-ready[data-film-mode='scroll'] {
  height: 400vh;
}
.film-ready .film-stage {
  position: relative;
  overflow: hidden;
  min-height: max(680px, 100vh);
}
.film-ready[data-film-mode='scroll'] .film-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 0;
}
.film-ready .film-canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.film-ready .film-overlay {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: 112px;
  padding-bottom: clamp(28px, 5vh, 56px);
  pointer-events: none;
}
.film-ready .film-overlay > * {
  pointer-events: auto;
}
.film-ready .section-marker {
  border-top-color: var(--film-line);
  color: #f7f5ef99;
}
.home-page .film-ready .section-heading {
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  max-width: min(460px, 38vw);
  margin: clamp(24px, 5vh, 52px) 0 clamp(20px, 4vh, 44px);
}
.film-ready .section-heading h2 {
  color: var(--film-ink);
  font-size: clamp(32px, 3.4vw, 50px);
}
.home-page .film-ready .section-heading > p {
  color: #dce5dbcc;
  margin: 0;
}
.home-page .film-ready .process-steps {
  grid-template-columns: 1fr;
  gap: 0;
  max-width: min(420px, 36vw);
  margin-top: auto;
}
.home-page .film-ready .process-steps article {
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: baseline;
  padding-top: 16px;
  border-top: 1px solid var(--film-line);
  opacity: 0.42;
  transform: none;
  transition: opacity 0.5s var(--ease-out);
}
.home-page .film-ready .process-steps article:before {
  content: '';
  position: absolute;
  inset: -1px 0 auto;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease-out);
}
.home-page .film-ready .step-top {
  display: contents;
}
.home-page .film-ready .step-top:before,
.home-page .film-ready .step-top .icon {
  display: none;
}
.home-page .film-ready .step-top > span {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.home-page .film-ready .process-steps h3 {
  margin: 0 0 14px;
  color: var(--film-ink);
  font-size: 19px;
}
.home-page .film-ready .process-steps :is(p, .text-link) {
  grid-column: 2;
  justify-self: start;
}
.home-page .film-ready .process-steps p,
.home-page .film-ready .process-steps .text-link {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.6s var(--ease-out),
    opacity 0.4s,
    margin 0.6s var(--ease-out);
}
.home-page .film-ready .process-steps p {
  color: var(--film-soft);
  max-width: none;
}
.home-page .film-ready .process-steps .text-link {
  color: var(--film-ink);
}
.home-page .film-ready[data-scroll-film] .process-steps article:focus-within,
.home-page .film-ready[data-film-step='1'] .process-steps article:nth-child(1),
.home-page .film-ready[data-film-step='2'] .process-steps article:nth-child(2),
.home-page .film-ready[data-film-step='3'] .process-steps article:nth-child(3),
.home-page .film-ready[data-film-mode='static'] .process-steps article {
  opacity: 1;
}
.home-page .film-ready .process-steps article:focus-within:before,
.home-page .film-ready[data-film-step='1'] article:nth-child(1):before,
.home-page .film-ready[data-film-step='2'] article:nth-child(2):before,
.home-page .film-ready[data-film-step='3'] article:nth-child(3):before,
.home-page .film-ready[data-film-mode='static'] .process-steps article:before {
  transform: scaleX(1);
}
.home-page .film-ready .process-steps article:focus-within :is(p, .text-link),
.home-page .film-ready[data-film-step='1'] article:nth-child(1) :is(p, .text-link),
.home-page .film-ready[data-film-step='2'] article:nth-child(2) :is(p, .text-link),
.home-page .film-ready[data-film-step='3'] article:nth-child(3) :is(p, .text-link),
.home-page .film-ready[data-film-mode='static'] .process-steps :is(p, .text-link) {
  max-height: 140px;
  opacity: 1;
}
.home-page .film-ready .process-steps article:focus-within p,
.home-page .film-ready[data-film-step='1'] article:nth-child(1) p,
.home-page .film-ready[data-film-step='2'] article:nth-child(2) p,
.home-page .film-ready[data-film-step='3'] article:nth-child(3) p,
.home-page .film-ready[data-film-mode='static'] .process-steps p {
  margin: 0 0 12px;
}
.home-page .film-ready .process-steps article:focus-within .text-link,
.home-page .film-ready[data-film-step='1'] article:nth-child(1) .text-link,
.home-page .film-ready[data-film-step='2'] article:nth-child(2) .text-link,
.home-page .film-ready[data-film-step='3'] article:nth-child(3) .text-link,
.home-page .film-ready[data-film-mode='static'] .process-steps .text-link {
  margin: 0 0 18px;
}
.film-progress {
  display: none;
}
.film-ready[data-film-mode='scroll'] .film-progress {
  display: block;
  max-width: min(420px, 36vw);
  height: 2px;
  margin-top: 6px;
  background: var(--film-line);
}
.film-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transform: scaleX(var(--film-progress, 0));
  transform-origin: left;
}

@media (max-width: 799px) {
  .home-page .process.film-ready[data-film-mode='scroll'] {
    height: 360vh;
  }
  .film-ready .film-overlay {
    padding-top: 100px;
    padding-bottom: 20px;
  }
  .home-page .film-ready .section-heading {
    max-width: none;
    margin: 18px 0 0;
  }
  .film-ready .section-heading h2 {
    font-size: clamp(26px, 7.4vw, 34px);
  }
  .home-page .film-ready .section-heading > p {
    display: none;
  }
  .film-ready .section-marker > span:last-child {
    display: none;
  }
  .home-page .film-ready[data-film-mode='scroll'] .process-steps {
    display: grid;
    max-width: none;
    padding: 4px 20px 0;
    border: 1px solid var(--film-line);
    border-radius: var(--radius-lg);
    background: #121412e6;
    backdrop-filter: blur(10px);
  }
  .film-ready[data-film-mode='scroll'] .process-steps article {
    grid-area: 1 / 1;
  }
  .home-page .film-ready[data-film-mode='scroll'] .process-steps article {
    opacity: 0;
    pointer-events: none;
  }
  .home-page .film-ready[data-film-step='1'] .process-steps article:nth-child(1),
  .home-page .film-ready[data-film-step='2'] .process-steps article:nth-child(2),
  .home-page .film-ready[data-film-step='3'] .process-steps article:nth-child(3) {
    pointer-events: auto;
  }
  /* Stacked steps keep their full copy so the card height stays constant. */
  .home-page .film-ready[data-film-mode='scroll'] .process-steps :is(p, .text-link) {
    max-height: 140px;
    opacity: 1;
  }
  .home-page .film-ready[data-film-mode='scroll'] .process-steps p {
    margin: 0 0 12px;
  }
  .home-page .film-ready[data-film-mode='scroll'] .process-steps .text-link {
    margin: 0 0 18px;
  }
  .home-page .film-ready[data-film-mode='scroll'] .process-steps article {
    border-top: 0;
  }
  .home-page .film-ready[data-film-mode='scroll'] .process-steps article:before {
    display: none;
  }
  .home-page .film-ready[data-film-mode='static'] .process-steps {
    max-width: none;
    margin-top: min(52vh, 420px);
  }
  .film-ready[data-film-mode='scroll'] .film-progress {
    max-width: none;
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .film-ready .process-steps article,
  .home-page .film-ready .process-steps :is(p, .text-link),
  .home-page .film-ready .process-steps article:before {
    transition: none;
  }
}
