/* The product film on the home page (review S3, 2026-10-26): one drive,
   start to finish, on real iPhone, iPad, iPhone Duo and CarPlay screens. Markup in
   src/home/film.html, behaviour in src/scripts/film.js.

   Without film.js (or below 900px) each chapter shows its own screens above
   its text: a plain sequence that needs no motion. With it, on a wide
   screen, the screens move into one stage pinned beside the chapters and
   change as each chapter crosses the middle of the viewport. Nothing
   intercepts the scroll. */
.ld-film{padding:96px 0 128px;background:var(--background);color:var(--foreground);font-family:Inter,-apple-system,"SF Pro Display","Helvetica Neue",Arial,sans-serif}
.ld-film-in{max-width:80rem;margin:0 auto;padding:0 1.5rem}
.ld-film-head{max-width:40rem;margin:0 0 56px}
.ld-film h2{font-weight:700;line-height:1;font-size:clamp(1.8rem,3.6vw,2.7rem);letter-spacing:-0.03em;margin:0 0 24px;text-wrap:balance}
.ld-film-lede{color:var(--muted-foreground);letter-spacing:-0.01em;line-height:1.625;margin:0;max-width:34rem}
.ld-film-chapters{list-style:none;margin:0;padding:0;display:grid;gap:72px}
.ld-film-ch{display:grid;gap:28px}
.ld-film-text h3{font-size:clamp(1.3rem,2.2vw,1.7rem);font-weight:700;letter-spacing:-0.02em;line-height:1.15;margin:0 0 12px;text-wrap:balance}
.ld-film-text p:last-child{color:var(--muted-foreground);letter-spacing:-0.01em;line-height:1.65;margin:0;max-width:30rem}

/* The screens come framed (scripts/frame-film.sh): iPhone, iPad and the
   iPhone Duo in Apple's own bezels, CarPlay in a screen frame with its own
   shadow, all on transparency. A device casts its shadow by its outline. */
.ld-film{--ld-device-shadow:drop-shadow(0 16px 24px rgba(0,0,0,.2))}
.ld-film-phone,.ld-film-tablet,.ld-film-duo,.ld-film-cover{display:block;height:auto;filter:var(--ld-device-shadow)}
.ld-film-car{display:block;height:auto}

/* ONE COMPOSITION PER CHAPTER, AT EVERY WIDTH (James, 2026-10-30: where the
   screens overlap on the desktop "it's gorgeous, but on mobile, they
   separate and show consecutively"; keep "their exact overlap, and scale /
   position to each other in narrower views"). Each chapter's screens are
   placed once, here, in container units of the box that holds them: the
   stage beside the chapters on a wide screen, or the chapter's own figure on
   a phone or without scripts. Both boxes are the stage's
   shape, 686 x 600, which is its size at the page's full width, so a phone
   shows the desktop's arrangement exactly, scaled down, and so does a
   narrower desktop window. 1cqw is 6.86px at full width: every figure below
   is the desktop's pixel value divided by that. */
.ld-film-stage,.ld-film-shots{container-type:inline-size}
.ld-film-shots{position:relative;margin:0;width:100%;max-width:686px;aspect-ratio:686/600}
.ld-film-frame .ld-film-phone,.ld-film-shots .ld-film-phone{position:absolute;top:0;right:0;width:39.65cqw}
/* The iPad standing where the phone does, a little wider and as tall. */
.ld-film-frame .ld-film-tablet,.ld-film-shots .ld-film-tablet{position:absolute;top:0;right:0;width:61.22cqw}
/* The Duo unfolded, wide, alone on the stage. */
.ld-film-frame .ld-film-duo,.ld-film-shots .ld-film-duo{position:absolute;top:8.16cqw;right:0;width:96.21cqw}
/* The Duo closed, standing in front of CarPlay's corner. */
.ld-film-frame .ld-film-cover,.ld-film-shots .ld-film-cover{position:absolute;right:2.33cqw;bottom:0;width:36.44cqw;z-index:1}
/* CarPlay large and in front, overlapping the phone only at its edge. The
   framed unit's own shadow pads it, so it stands a little lower and no wider
   than the bare screen did. */
.ld-film-frame .ld-film-car,.ld-film-shots .ld-film-car{position:absolute;left:0;bottom:1.17cqw;width:69.97cqw;z-index:1}
/* The web planner where CarPlay stands in the later chapters, a little
   narrower: the window is taller than CarPlay's screen, so at CarPlay's
   width it covered the start of the phone's destination card. */
.ld-film-frame .ld-film-web,.ld-film-shots .ld-film-web{position:absolute;left:0;bottom:2.92cqw;width:64.14cqw;z-index:1}
/* No two drive chapters stand alike (James, 2026-10-28: "All but one are
   effectively CarPlay left, phone right. Similar sizes, just looks the same").
   Chapter 3 keeps CarPlay in front at the left, the phone behind it. */
/* CarPlay large across the top, the closed Duo standing in front of it. */
.ld-film-frame.is-car-top .ld-film-car,.ld-film-shots.is-car-top .ld-film-car{top:3.5cqw;bottom:auto;left:0;width:81.63cqw;z-index:0}
/* The Duo unfolded upright, alone in the middle of the stage. */
.ld-film-frame.is-duo-upright .ld-film-duo,.ld-film-shots.is-duo-upright .ld-film-duo{top:0;left:50%;right:auto;width:62.68cqw;margin-left:-31.34cqw}
/* CarPlay alone, large and centred. */
.ld-film-frame.is-car-only .ld-film-car,.ld-film-shots.is-car-only .ld-film-car{left:0;right:0;top:10.5cqw;bottom:auto;width:100cqw}
/* The closed Duo alone, upright in the middle. */
.ld-film-frame.is-cover-only .ld-film-cover,.ld-film-shots.is-cover-only .ld-film-cover{left:50%;right:auto;top:8.16cqw;bottom:auto;width:49.56cqw;margin-left:-24.78cqw}
/* The phone at the left, CarPlay to its right and higher up. */
.ld-film-frame.is-phone-left .ld-film-phone,.ld-film-shots.is-phone-left .ld-film-phone{left:3.5cqw;right:auto}
.ld-film-frame.is-phone-left .ld-film-car,.ld-film-shots.is-phone-left .ld-film-car{left:auto;right:0;top:17.49cqw;bottom:auto;width:66cqw}

/* The web planner in a plain browser window: a bar with the planner's own
   address over the capture. The window takes the site's theme like the
   screen inside it does, and scales with the screens around it. */
.ld-film{--ld-web-bar:#e9e9ec;--ld-web-dot:#c6c6cc;--ld-web-url:#fff;--ld-web-url-ink:#6b6b73;--ld-web-edge:#0000001a}
[data-theme="dark"] .ld-film{--ld-web-bar:#1c1c20;--ld-web-dot:#3b3b41;--ld-web-url:#0f0f12;--ld-web-url-ink:#a1a1aa;--ld-web-edge:#ffffff1a}
.ld-film-web{display:block;border-radius:1.75cqw;overflow:hidden;background:var(--ld-web-bar);border:1px solid var(--ld-web-edge);box-shadow:0 14px 34px rgba(0,0,0,.2)}
.ld-film-web-bar{display:flex;align-items:center;gap:.87cqw;height:4.08cqw;padding:0 1.46cqw}
.ld-film-web-bar i{flex:none;width:1.31cqw;height:1.31cqw;border-radius:50%;background:var(--ld-web-dot)}
.ld-film-web-bar b{margin:0 auto;padding:.29cqw 2.04cqw;border-radius:.87cqw;background:var(--ld-web-url);color:var(--ld-web-url-ink);font-size:1.53cqw;font-weight:500;letter-spacing:0;line-height:1.5}
.ld-film-web-shot{display:block;width:100%;height:auto}

/* Each screen in the site's own theme, not the system's: the page stamps
   html[data-theme] before paint. */
[data-theme="light"] .ld-film .ld-dark,
[data-theme="dark"] .ld-film .ld-light{display:none}

.ld-film-stage{display:none}
@media (min-width:900px){
  .ld-film.is-live .ld-film-body{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,7fr);gap:56px;align-items:start}
  .ld-film.is-live .ld-film-chapters{gap:0}
  .ld-film.is-live .ld-film-ch{min-height:72vh;align-content:center}
  /* Out of sight, not display:none: the stage is a visual copy, hidden from
     assistive technology, so each chapter's own figures are what a screen
     reader reads. With display:none none of the 13 descriptions reached one
     on a wide screen (review WP-5, 2026-11-01). */
  .ld-film.is-live .ld-film-shots{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  /* The stage's shape, 686 x 600 at full width, so its units are the figures'. */
  .ld-film.is-live .ld-film-stage{display:block;position:sticky;top:max(96px,calc(50vh - 300px));aspect-ratio:686/600}
  /* film.js crossfades the frames as you scroll, so nothing here animates:
     a transition would trail the scroll it follows. */
  .ld-film-frame{position:absolute;inset:0;opacity:0;transform:translateY(10px);will-change:opacity,transform}
  .ld-film-frame.is-on{opacity:1;transform:none}
}
@media (prefers-reduced-motion:reduce){
  .ld-film-frame{transition:none;transform:none}
}
