:root {
  --bg: #070907;
  --ink: #f7f2e9;
  --soft: rgba(247, 242, 233, 0.76);
  --muted: rgba(247, 242, 233, 0.52);
  --line: rgba(247, 242, 233, 0.16);
  --gold: #d9aa70;
  --moss: #a8b277;
  --clay: #cc8151;
  --blue: #89aeb8;
  --progress: 0;
  --scene-progress: 0;
  --pano-x: 0%;
  --pano-y: 0%;
  --pano-scale: 1.04;
  --pano-roll: 0deg;
  --backdrop-drift-x: 0vw;
  --backdrop-drift-y: 0vh;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-draw: cubic-bezier(0.33, 1, 0.68, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "Gill Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
}

img {
  display: block;
  width: 100%;
}

.explainer,
.film {
  min-height: 100svh;
}

.film::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 76% 28%, rgba(217, 170, 112, 0.13), transparent 28%),
    radial-gradient(circle at 18% 72%, rgba(137, 174, 184, 0.1), transparent 34%),
    linear-gradient(90deg, rgba(7, 9, 7, 0.1), rgba(247, 242, 233, 0.025), rgba(7, 9, 7, 0.18));
}

.film {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
  background:
    linear-gradient(112deg, rgba(7, 9, 7, 1) 0%, rgba(13, 17, 14, 0.96) 34%, rgba(21, 19, 15, 0.86) 67%, rgba(7, 9, 7, 1) 100%),
    linear-gradient(180deg, rgba(137, 174, 184, 0.08), rgba(204, 129, 81, 0.08) 54%, rgba(7, 9, 7, 0.94)),
    #070907;
}

.film-backdrop,
.backdrop-image,
.backdrop-grain {
  position: absolute;
  inset: 0;
}

.film-backdrop {
  z-index: -2;
  overflow: hidden;
}

.backdrop-image {
  left: 0;
  right: auto;
  width: 118vw;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0.62;
  object-position: center center;
  transform: translate3d(var(--backdrop-drift-x), var(--backdrop-drift-y), 0) scale(1.03);
  filter: saturate(1.08) contrast(1.14) brightness(0.5);
  transition: opacity 300ms var(--ease-soft), filter 300ms var(--ease-soft);
}

.film-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 9, 7, 0.98) 0%, rgba(7, 9, 7, 0.82) 30%, rgba(7, 9, 7, 0.24) 62%, rgba(7, 9, 7, 0.72) 100%),
    linear-gradient(180deg, rgba(7, 9, 7, 0.64) 0%, rgba(7, 9, 7, 0.14) 42%, rgba(7, 9, 7, 0.96) 100%);
}

.backdrop-grain {
  opacity: 0.13;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 78%, transparent);
}

.film-header,
.story-copy,
.stage,
.bottom-controls,
.end-cta,
.time-rail {
  position: absolute;
  z-index: 10;
}

.film-header {
  top: 24px;
  left: max(22px, 5vw);
  right: max(22px, 5vw);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
}

.brand-lockup img {
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: invert(1) brightness(1.24);
}

.film-controls {
  display: flex;
  flex: 0 1 auto;
  gap: 8px;
  min-width: 0;
}

.control-button {
  display: inline-grid;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(247, 242, 233, 0.18);
  border-radius: 999px;
  padding: 0;
  background: rgba(247, 242, 233, 0.07);
  color: var(--soft);
  cursor: pointer;
  backdrop-filter: blur(18px);
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.control-button:hover {
  border-color: rgba(247, 242, 233, 0.44);
  background: rgba(247, 242, 233, 0.12);
  color: var(--ink);
  transform: translateY(-1px);
}

.control-icon {
  display: block;
  width: 15px;
  height: 15px;
  position: relative;
}

.control-icon--pause::before,
.control-icon--pause::after {
  content: "";
  position: absolute;
  top: 1px;
  bottom: 1px;
  width: 4px;
  border-radius: 1px;
  background: currentColor;
}

.control-icon--pause::before {
  left: 2px;
}

.control-icon--pause::after {
  right: 2px;
}

.control-icon--play {
  display: none;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
  margin-left: 2px;
}

.control-button.is-paused .control-icon--pause {
  display: none;
}

.control-button.is-paused .control-icon--play {
  display: block;
}

.control-icon--restart {
  width: 17px;
  height: 17px;
}

.control-icon--restart svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.control-icon--sound {
  width: 18px;
  height: 18px;
}

.sound-icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sound-icon--off,
.control-button--sound.is-muted .sound-icon--on,
.control-button--sound.is-unavailable .sound-icon--on {
  display: none;
}

.control-button--sound.is-muted .sound-icon--off,
.control-button--sound.is-unavailable .sound-icon--off {
  display: block;
}

.control-button--sound.is-unavailable {
  display: none;
}

.story-copy {
  left: max(22px, 5vw);
  top: 48%;
  width: min(34vw, 520px);
  transform: translateY(-48%);
  text-shadow: 0 3px 28px rgba(0, 0, 0, 0.5);
  will-change: transform, opacity, filter;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.story-copy h1 {
  margin: 0;
  max-width: 9.6ch;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.25rem, 5.55vw, 6.45rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0;
}

.story-copy p:last-child {
  max-width: 52ch;
  margin: 23px 0 0;
  color: var(--soft);
  font-size: clamp(1rem, 1.1vw, 1.13rem);
  line-height: 1.58;
}

.stage {
  top: 44%;
  right: max(54px, 6vw);
  width: min(52vw, 870px);
  height: min(72vh, 730px);
  transform: translateY(-49%);
  perspective: 1600px;
  transform-style: preserve-3d;
  transition: top 980ms var(--ease-soft);
}

.stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.stage::before {
  left: 10%;
  top: 16%;
  width: 74%;
  height: 58%;
  background:
    radial-gradient(ellipse at 28% 38%, rgba(217, 170, 112, 0.2), transparent 44%),
    radial-gradient(ellipse at 78% 58%, rgba(137, 174, 184, 0.14), transparent 48%),
    linear-gradient(105deg, transparent 6%, rgba(247, 242, 233, 0.09) 42%, transparent 72%);
  filter: blur(7px);
  opacity: 0.18;
  mask: linear-gradient(90deg, transparent 0%, #000 22%, #000 76%, transparent 100%);
  transform: translate3d(calc(var(--backdrop-drift-x) * 0.18), calc(var(--backdrop-drift-y) * 0.12), 35px) scale(calc(0.96 + (var(--scene-progress) * 0.035)));
  transform-origin: left center;
  transition: opacity 240ms var(--ease-soft);
}

.product-frame,
.pano-frame,
.quote-card,
.ai-panel,
.section-stack,
.thumbnail-strip {
  position: absolute;
  margin: 0;
  will-change: transform, opacity, filter;
  z-index: 1;
}

.product-frame,
.pano-frame,
.quote-card,
.section-stack,
.thumbnail-strip {
  transition:
    opacity 520ms var(--ease-soft),
    filter 520ms var(--ease-soft),
    transform 760ms var(--ease-soft),
    left 760ms var(--ease-soft),
    right 760ms var(--ease-soft),
    top 760ms var(--ease-soft),
    bottom 760ms var(--ease-soft),
    width 760ms var(--ease-soft),
    height 760ms var(--ease-soft);
}

.product-frame,
.pano-frame,
.quote-card,
.ai-panel,
.section-stack,
.thumbnail-strip img {
  border: 1px solid rgba(247, 242, 233, 0.16);
  background: rgba(5, 6, 4, 0.84);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42), 0 1px 0 rgba(247, 242, 233, 0.08) inset;
  backdrop-filter: blur(16px);
}

.product-frame,
.pano-frame {
  overflow: hidden;
  border-radius: 14px;
}

.product-frame img {
  height: 100%;
  object-fit: contain;
  background: #050604;
  transition: transform 760ms var(--ease-soft), border-radius 520ms var(--ease-soft);
}

.product-frame figcaption,
.pano-frame figcaption {
  position: absolute;
  z-index: 2;
  left: 15px;
  right: 15px;
  bottom: 13px;
  color: rgba(247, 242, 233, 0.78);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.product-frame--primary {
  right: 0;
  top: 0;
  width: 62%;
  height: 45%;
  transform: translate3d(0, 0, 120px) rotateY(-3.5deg);
  animation: primaryIn 560ms var(--ease-out) both;
}

.product-frame--secondary {
  left: 0;
  bottom: 2%;
  width: 40%;
  height: 24%;
  opacity: 0.94;
  transform: translate3d(0, 0, 54px) rotateY(6deg);
  animation: secondaryIn 620ms var(--ease-out) both;
}

.film.is-open .stage::before,
.film.is-open .section-stack,
.film.is-open .thumbnail-strip {
  opacity: 0;
  pointer-events: none;
}

.film.is-open .product-frame {
  border-color: rgba(247, 242, 233, 0.15);
  border-radius: 24px;
  background: #050604;
  box-shadow: 0 30px 82px rgba(0, 0, 0, 0.42), 0 1px 0 rgba(247, 242, 233, 0.08) inset;
  backdrop-filter: blur(10px);
}

.film.is-open .product-frame img {
  border-radius: 24px;
  background: #050604;
}

.film.is-open .product-frame--secondary img {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  object-fit: contain;
  transform: none;
}

.film.is-open .product-frame--primary img {
  clip-path: inset(1.4% 1.4% round 20px);
}

.film.is-open .product-frame figcaption {
  display: none;
}

.film.is-open .product-frame--primary {
  right: 6.5%;
  top: 4.5%;
  width: min(34%, 410px);
  height: 48%;
  border-radius: 24px;
}

.film.is-open .product-frame--secondary {
  left: auto;
  right: 41.5%;
  bottom: 28.5%;
  width: min(34%, 410px);
  height: 48%;
  opacity: 1;
  transform: translate3d(0, 0, 94px) rotateY(4deg);
}

.film.is-open .product-frame--primary img,
.film.is-open .product-frame--secondary img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  border-radius: 24px;
}

.film.is-open .product-frame--secondary img[src*="Glo"] {
  clip-path: inset(0 2.6% round 24px);
  transform: none;
}

.film.is-open .product-frame--primary img[src*="iLumina"],
.film.is-open .product-frame--primary img[src*="iLumina"] {
  clip-path: inset(0 round 24px);
}

.film.is-open .quote-card {
  left: -4%;
  top: -9%;
  width: min(230px, 21vw);
  padding: 16px 18px;
}

.film.is-open .pano-frame {
  right: 0;
  bottom: 1%;
  width: 52%;
  height: 25%;
}

.film.is-open .stage {
  top: 49%;
}

.film.is-creation .stage {
  top: 42.5%;
}

.film:not(.is-open) .pano-frame {
  right: 4%;
  bottom: 0;
  width: 50%;
  height: 28%;
}

.film:not(.is-open) .product-frame--primary {
  top: 0;
}

.film:not(.is-open) .product-frame--secondary {
  left: 0;
  bottom: 0;
}

[data-scene-key="psalm"] .product-frame--secondary,
[data-scene-key="david"] .product-frame--secondary,
[data-scene-key="nativity"] .product-frame--secondary,
[data-scene-key="sower"] .product-frame--secondary {
  bottom: 0;
}

[data-scene-key="psalm"] .product-frame--secondary {
  width: 40%;
  height: 24%;
}

[data-scene-key="exodus"] .pano-frame,
[data-scene-key="nativity"] .pano-frame,
[data-scene-key="new"] .pano-frame {
  bottom: 0;
}

[data-scene-key="psalm"] .product-frame--secondary img,
[data-scene-key="david"] .product-frame--secondary img,
[data-scene-key="exodus"] .product-frame--secondary img,
[data-scene-key="prophets"] .product-frame--secondary img,
[data-scene-key="nativity"] .product-frame--secondary img,
[data-scene-key="sermon"] .product-frame--secondary img,
[data-scene-key="sower"] .product-frame--secondary img,
[data-scene-key="gospel"] .product-frame--secondary img {
  object-fit: cover;
}

.pano-frame {
  right: 4%;
  bottom: 2%;
  width: 56%;
  height: 29%;
  transform: translate3d(0, 0, 170px) rotateY(-4deg);
  animation: panoIn 640ms var(--ease-out) both;
}

.pano-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(7, 9, 7, 0.5), transparent 18%, transparent 82%, rgba(7, 9, 7, 0.46)),
    linear-gradient(180deg, transparent 38%, rgba(7, 9, 7, 0.86));
  pointer-events: none;
}

.pano-frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: 104%;
  min-width: 158%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  transform: translate3d(calc(-50% + var(--pano-x)), calc(-50% + var(--pano-y)), 0) scale(var(--pano-scale)) rotate(var(--pano-roll));
  filter: saturate(1.16) contrast(1.15) brightness(0.96);
  transition: filter 280ms var(--ease-soft), transform 120ms linear;
}

.pano-frame img[src*="Crucifixion"] {
  height: 106%;
  min-width: 178%;
  top: 51%;
}

.backdrop-image[src*="Crucifixion"] {
  object-position: 58% 40%;
}

.pano-frame img[src*="Last%20Supper"],
.pano-frame img[src*="Last Supper"] {
  height: 107%;
  min-width: 172%;
  top: 51%;
}

.backdrop-image[src*="Last%20Supper"],
.backdrop-image[src*="Last Supper"] {
  object-position: 52% 42%;
}

.pano-frame img[src*="Transfiguration"],
.pano-frame img[src*="Pentecost"],
.pano-frame img[src*="Roman%20Census"],
.pano-frame img[src*="Roman Census"] {
  height: 106%;
  min-width: 174%;
  top: 51%;
}

.backdrop-image[src*="Transfiguration"],
.backdrop-image[src*="Pentecost"],
.backdrop-image[src*="Roman%20Census"],
.backdrop-image[src*="Roman Census"] {
  object-position: 50% 38%;
}

.quote-card {
  left: -2%;
  top: 5%;
  width: min(270px, 28vw);
  border-radius: 14px;
  padding: 18px;
  animation: quoteIn 520ms var(--ease-out) both;
}

.quote-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quote-card strong {
  display: block;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2vw, 2rem);
  font-weight: 400;
  line-height: 1.22;
}

.ai-panel {
  right: 3%;
  bottom: 6%;
  width: min(380px, 38vw);
  border-radius: 14px;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(34px, 28px, 180px) scale(0.96);
  transition: opacity 260ms var(--ease-soft), transform 260ms var(--ease-soft);
}

.film.is-ai .ai-panel {
  opacity: 1;
  right: 1%;
  bottom: 14%;
  width: min(340px, 32vw);
  transform: translate3d(0, 0, 210px) scale(1);
}

.film.is-ai .pano-frame {
  right: 4%;
  bottom: -3%;
  width: 24%;
  height: 15%;
  opacity: 0.04;
  transform: translate3d(0, 0, 40px) rotateY(1.5deg) scale(0.96);
}

.film.is-ai .product-frame--secondary {
  left: 2%;
  bottom: 2%;
  width: 33%;
  height: 18%;
  opacity: 0.72;
}

.ai-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ai-panel__head i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--moss);
  box-shadow: 0 0 0 6px rgba(168, 178, 119, 0.14);
  animation: assistantPulse 1800ms ease-in-out infinite;
}

.ai-message {
  margin-top: 10px;
  border-radius: 12px;
  padding: 12px 13px;
  color: var(--soft);
  font-size: 0.84rem;
  line-height: 1.48;
}

.ai-message--user {
  margin-left: 28px;
  background: rgba(247, 242, 233, 0.08);
}

.ai-message--guide {
  margin-right: 26px;
  background: rgba(217, 170, 112, 0.12);
  color: rgba(247, 242, 233, 0.86);
}

.ai-message--guide::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin-left: 4px;
  vertical-align: -0.18em;
  background: rgba(217, 170, 112, 0.94);
  box-shadow: 0 0 12px rgba(217, 170, 112, 0.3);
  animation: caretBlink 880ms steps(1, end) infinite;
}

.film.is-ai .ai-message--user {
  animation: messageIn 420ms var(--ease-soft) 80ms both;
}

.film.is-ai .ai-message--guide {
  animation: messageIn 520ms var(--ease-soft) 220ms both;
}

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.ai-actions span {
  border: 1px solid rgba(247, 242, 233, 0.13);
  border-radius: 999px;
  padding: 7px 9px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-stack {
  left: 1%;
  top: 42%;
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  animation: stackIn 560ms var(--ease-out) both;
}

.section-stack::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 18px;
  bottom: 18px;
  width: 1px;
  background: linear-gradient(180deg, rgba(217, 170, 112, 0), rgba(217, 170, 112, 0.7), rgba(137, 174, 184, 0.5), rgba(217, 170, 112, 0));
  opacity: 0.62;
  transform: scaleY(calc(0.2 + (var(--progress) * 0.8)));
  transform-origin: top center;
}

.section-stack span {
  position: relative;
  min-width: 132px;
  border-radius: 12px;
  padding: 9px 12px 9px 21px;
  background: rgba(247, 242, 233, 0.065);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 220ms var(--ease-soft), color 220ms var(--ease-soft), transform 220ms var(--ease-soft);
}

.section-stack span::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(247, 242, 233, 0.28);
  transform: translateY(-50%);
}

.section-stack span.is-active {
  background: rgba(217, 170, 112, 0.2);
  color: var(--gold);
  transform: translateX(4px);
}

.section-stack span.is-active::before {
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(217, 170, 112, 0.13), 0 0 18px rgba(217, 170, 112, 0.24);
}

.thumbnail-strip {
  right: 0;
  top: 1%;
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(5, 6, 4, 0.58);
  animation: thumbsIn 580ms var(--ease-out) both;
}

.thumbnail-strip img {
  width: 108px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
}

.bottom-controls {
  left: max(22px, 5vw);
  bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.runtime {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.runtime [data-clock] {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.film.is-home-embed .film-header {
  display: none;
}

.film.is-home-embed.is-remote .bottom-controls {
  display: none;
}

.end-cta {
  right: max(22px, 5vw);
  bottom: 44px;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 170, 112, 0.64);
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(217, 170, 112, 0.16);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 10px, 0);
  transition: opacity 260ms var(--ease-soft), transform 260ms var(--ease-soft), background 180ms ease, border-color 180ms ease;
}

.film.is-final .end-cta {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

.end-cta:hover {
  background: rgba(217, 170, 112, 0.28);
  border-color: rgba(217, 170, 112, 0.82);
}

.time-rail {
  left: max(22px, 5vw);
  right: max(22px, 5vw);
  bottom: 20px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(247, 242, 233, 0.14);
}

.time-rail span {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--blue));
  box-shadow: 0 0 22px rgba(217, 170, 112, 0.22);
  transform: scaleX(var(--progress));
  transform-origin: left center;
}

.time-rail span::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -5px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 0 0 7px rgba(217, 170, 112, 0.12), 0 0 20px rgba(137, 174, 184, 0.32);
  transform: translateY(-50%);
}

.time-rail::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(247, 242, 233, 0.6), transparent);
  transform: translateX(-120%);
  animation: railSweep 2600ms ease-in-out infinite;
}

.film.is-changing .story-copy {
  animation: copyIn 960ms var(--ease-soft) both;
}

.film.is-changing .product-frame--primary {
  animation-name: primaryIn;
  animation-duration: 1040ms;
  animation-timing-function: var(--ease-soft);
}

.film.is-changing .product-frame--secondary {
  animation-name: secondaryIn;
  animation-duration: 1080ms;
  animation-timing-function: var(--ease-soft);
}

.film.is-changing .pano-frame {
  animation-name: panoIn;
  animation-duration: 1120ms;
  animation-timing-function: var(--ease-soft);
}

.film.is-changing .quote-card {
  animation-name: quoteIn;
  animation-duration: 960ms;
  animation-timing-function: var(--ease-soft);
}

[data-motion="1"] .product-frame--primary {
  transform: translate3d(0, 0, 120px) rotateY(2deg);
}

[data-motion="2"] .product-frame--secondary {
  left: 2%;
  right: auto;
  transform: translate3d(0, 0, 54px) rotateY(-3deg);
}

[data-motion="2"] .pano-frame {
  left: auto;
  right: 5%;
  transform: translate3d(0, 0, 170px) rotateY(2.5deg);
}

[data-motion="3"] .quote-card {
  top: 7%;
  bottom: auto;
}

@keyframes primaryIn {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: translate3d(34px, 12px, 94px) rotateY(-4deg) rotateX(1deg) scale(0.985);
  }
}

@keyframes secondaryIn {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: translate3d(-26px, 18px, 44px) rotateY(4deg) rotateX(-1deg) scale(0.985);
  }
}

@keyframes panoIn {
  from {
    opacity: 0;
    filter: blur(5px);
    transform: translate3d(28px, 24px, 120px) rotateY(-4deg) rotateX(1deg) scale(0.985);
  }
}

@keyframes quoteIn {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translate3d(-18px, -10px, 0) scale(0.985);
  }
}

@keyframes stackIn {
  from {
    opacity: 0;
    transform: translate3d(-24px, 0, 0);
  }
}

@keyframes thumbsIn {
  from {
    opacity: 0;
    transform: translate3d(0, -20px, 0);
  }
}

@keyframes copyIn {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translate3d(-28px, -48%, 0);
  }
}

@keyframes assistantPulse {
  0%,
  100% {
    box-shadow: 0 0 0 5px rgba(168, 178, 119, 0.12), 0 0 0 rgba(168, 178, 119, 0);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(168, 178, 119, 0.08), 0 0 18px rgba(168, 178, 119, 0.34);
  }
}

@keyframes caretBlink {
  0%,
  48% {
    opacity: 1;
  }
  49%,
  100% {
    opacity: 0;
  }
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
}

@keyframes railSweep {
  0% {
    transform: translateX(-120%);
  }
  48%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes copyInMobile {
  from {
    opacity: 0;
    filter: blur(8px);
    transform: translate3d(-18px, 0, 0);
  }
}

@media (max-width: 980px) {
  html,
  body {
    overflow: auto;
    overflow-x: hidden;
  }

  .film {
    min-height: 100svh;
    padding: 94px 20px 100px;
  }

  .film-header {
    top: 18px;
    left: 20px;
    right: 20px;
  }

  .story-copy,
  .stage {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: calc(100vw - 40px);
    max-width: 100%;
    transform: none;
  }

  .story-copy h1 {
    max-width: 8.9ch;
    font-size: clamp(2.7rem, 10.4vw, 4.5rem);
    line-height: 0.94;
  }

  .story-copy p:last-child {
    max-width: min(36ch, 100%);
    font-size: 1rem;
    overflow-wrap: break-word;
  }

  .stage {
    height: 64vh;
    min-height: 580px;
    margin-top: 34px;
  }

  .film.is-changing .story-copy {
    animation-name: copyInMobile;
  }

  .bottom-controls {
    left: 20px;
    bottom: 28px;
  }
}

@media (max-width: 620px) {
  .film-header {
    right: auto;
    width: min(350px, calc(100vw - 40px));
    gap: 10px;
  }

  .brand-lockup {
    min-width: 64px;
  }

  .brand-lockup img {
    width: 58px;
    height: 58px;
  }

  .film-controls {
    gap: 6px;
    justify-content: flex-end;
  }

  .control-button {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
  }

  .story-copy h1 {
    max-width: 8.5ch;
    font-size: clamp(2.25rem, 10.2vw, 3.1rem);
    line-height: 0.96;
  }

  .story-copy,
  .stage {
    width: min(350px, calc(100vw - 40px));
  }

  .story-copy p:last-child {
    max-width: min(31ch, 100%);
  }

  .stage {
    height: 560px;
    min-height: 560px;
  }

  .product-frame--primary {
    left: 6%;
    right: auto;
    top: 22%;
    width: 88%;
    height: 31%;
  }

  .product-frame--secondary {
    left: 0;
    bottom: 25%;
    width: 61%;
    height: 22%;
  }

  .pano-frame {
    right: 0;
    bottom: 4%;
    width: 78%;
    height: 22%;
  }

  .pano-frame img {
    left: 50%;
    width: auto;
    height: 106%;
    min-width: 174%;
    transform: translate3d(calc(-50% + var(--pano-x)), calc(-50% + var(--pano-y)), 0);
  }

  .ai-panel {
    left: 0;
    right: auto;
    bottom: 11%;
    width: min(82vw, 320px);
    padding: 14px;
  }

  .film.is-ai .product-frame--secondary,
  .film.is-ai .pano-frame {
    opacity: 0.12;
  }

  .quote-card {
    left: 0;
    top: 0;
    width: 100%;
    min-width: 0;
    padding: 15px;
  }

  .quote-card strong {
    font-size: 1rem;
    line-height: 1.18;
  }

  .section-stack {
    display: none;
  }

  .thumbnail-strip {
    display: none;
  }

  .bottom-controls,
  .end-cta,
  .time-rail {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 20;
    width: min(350px, calc(100vw - 40px));
    margin-left: 0;
    margin-right: 0;
  }

  .bottom-controls {
    display: flex;
    margin-top: 18px;
    gap: 10px;
  }

  .runtime {
    font-size: 0.66rem;
  }

  .end-cta {
    width: auto;
    min-height: 40px;
    margin-top: 14px;
    font-size: 0.72rem;
  }

  .time-rail {
    margin-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* Human-safe framing: avoid casual head/body crops in scene artwork. */
.product-frame img,
.thumbnail-strip img {
  object-fit: contain;
  object-position: center center;
  background: #050604;
}

[data-scene-key] .product-frame--secondary img {
  object-fit: contain;
}

[data-scene-key="david"] .product-frame--secondary img,
[data-scene-key="nativity"] .product-frame--secondary img,
[data-scene-key="sermon"] .product-frame--secondary img,
[data-scene-key="sower"] .product-frame--secondary img,
[data-scene-key="gospel"] .product-frame--secondary img {
  object-position: center center;
}
