/* Scroll-world film hero (home page only). The vendored engine (assets/film/scrub-engine.js) is
   unmodified; everything here is an unlayered override, so it beats the engine's @layer sw defaults. */

/* The film is a lit world: it stays on the light tokens even in dark mode, so the site's buttons
   and text inside it keep their light-scheme contrast. */
.film-world {
  --ground: #FFF4E3; --ink: #2B1B33; --ink-2: #6E5A73; --surface: #FFFFFF;
  --selected: #EDE6FF; --primary: #7B3DFF; --on-primary: #FFFFFF;
  --sw-bg: var(--ground); --sw-ink: var(--ink); --sw-ink-soft: var(--ink-2);
  --sw-accent: var(--primary);
  --sw-font-display: var(--font); --sw-font-body: var(--font);
  position: relative;
  /* Clips the engine's position:fixed layers to this box: the film only paints while its track
     is on screen, and the sections below scroll in over the held last frame. */
  clip-path: inset(0);
  background: var(--ground);
  color: var(--ink);
  color-scheme: light;
}

/* Engine chrome the site header already covers. */
.film-world .sw-topbar,
.film-world .sw-scrollbar,
.film-world .sw-particles,
.film-world .sw-copy__num { display: none; }

/* Captions in the site's voice: Nunito 900 display, plum ink. */
.film-world .sw-copy { width: min(44vw, 540px); }
/* The engine centres captions with translateY(-50%) but its parallax overwrites that transform,
   leaving the caption's top at mid-screen; a long (pt/es) caption then runs off the bottom.
   Anchor captions to the bottom so they grow upward instead. */
@media (min-width: 861px) {
  .film-world .sw-copy { top: auto; bottom: clamp(40px, 9vh, 96px); }
}
.film-world .sw-copy__title {
  font-weight: 900; letter-spacing: -0.025em; line-height: 1.02; text-wrap: balance;
  font-size: clamp(2.4rem, 4.4vw, 4rem); text-shadow: none; margin-top: 0;
}
.film-world h1.sw-copy__title { font-size: clamp(2.9rem, 5.6vw, 5.5rem); line-height: 0.98; }
.film-world .sw-copy__body {
  margin-top: 1.25rem; font-size: clamp(1.0625rem, 1.3vw, 1.25rem); line-height: 1.5; max-width: 34ch;
  color: var(--ink); text-shadow: none; text-wrap: pretty;
}
.film-world .sw-copy__tags li {
  font-size: 0.875rem; font-weight: 700; color: var(--ink);
  background: var(--surface); border: 1px solid rgba(43, 27, 51, 0.14);
  box-shadow: 0 1px 2px rgba(43, 27, 51, 0.06), 0 6px 16px -6px rgba(43, 27, 51, 0.18);
}
/* Stronger scrim than the engine default: body copy sits on busy scenery. */
.film-world .sw-copylayer::before {
  width: min(62vw, 860px);
  background: linear-gradient(90deg, var(--sw-bg) 0%, color-mix(in srgb, var(--sw-bg) 90%, transparent) 38%,
    color-mix(in srgb, var(--sw-bg) 55%, transparent) 66%, transparent 100%);
}

/* The last caption carries the site's real store buttons (the #get target). */
.film-world .film-cta { margin-top: 1.75rem; pointer-events: auto; }
.film-world .film-cta .fine { margin-top: 0.875rem; color: var(--ink-2); font-size: 0.9375rem; }

/* Scene dots: in-film navigation, labels restyled to the site's pills. */
.film-world .sw-route__label { font-weight: 700; color: var(--ink); background: var(--surface); }
.film-world .sw-route__dot { width: 24px; height: 24px; }
.film-world .sw-route__dot:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 50%; }

.film-world .sw-hint { font-weight: 700; letter-spacing: 0.04em; text-transform: none; font-size: 0.9375rem; color: var(--ink); }

/* Keyboard users can step over ~10 screens of scroll. */
.film { position: relative; }
.film-skip {
  position: absolute; z-index: 200; left: 1rem; top: 1rem;
  background: var(--primary); color: var(--on-primary); padding: 0.75rem 1rem; border-radius: 12px;
  font-weight: 800; text-decoration: none;
}
.film-skip:not(:focus) { opacity: 0; pointer-events: none; }
.film-get { position: absolute; left: 0; top: 0; width: 1px; height: 1px; }

/* Final frame held under the stage (above the engine's sky) while the next section scrolls in
   over the film; see film.js. */
.film-world .film-hold { position: fixed; inset: 0; z-index: 5; width: 100%; height: 100%; object-fit: cover; object-position: center 42%; pointer-events: none; }
.film-world .film-hold[hidden] { display: none; }
.film ~ section { position: relative; z-index: 1; }
.film ~ section:not(.band) { background-color: var(--ground); }

@media (max-width: 860px) {
  .film-world .film-hold { object-position: center 44%; }
  .film-world .sw-copy { width: auto; }
  .film-world .sw-copylayer::before {
    width: 100%; height: 66%;
    background: linear-gradient(0deg, var(--sw-bg) 22%, color-mix(in srgb, var(--sw-bg) 82%, transparent) 52%, transparent 100%);
  }
  .film-world .sw-copy__title { font-size: clamp(2rem, 8.4vw, 2.75rem); }
  .film-world h1.sw-copy__title { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .film-world .sw-copy__body { max-width: none; font-size: 1.0625rem; }
  .film-world .sw-copy__tags { margin-top: 1rem; }
  .film-world .film-cta { margin-top: 1.25rem; }
  .film-world .film-cta .btn { flex: 1 1 auto; }
  /* Touch users scroll without being told, and the dots collide with full-width captions. */
  .film-world .sw-hint, .film-world .sw-route { display: none; }
}

/* No-JS (or engine failed to load) fallback: a plain hero on the first frame. */
.film-static { position: relative; min-height: 80vh; display: grid; align-items: end; padding: 2rem var(--gutter); color-scheme: light; }
.film-static img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-static > div {
  position: relative; max-width: 36rem; padding: 1.5rem; border-radius: var(--radius-m);
  background: #FFF4E3; color: #2B1B33;
}
.film-static h1 { font-weight: 900; font-size: clamp(2.4rem, 6vw, 4.5rem); line-height: 0.98; letter-spacing: -0.03em; text-wrap: balance; }
.film-static .lead { margin-top: 1rem; font-size: 1.125rem; line-height: 1.5; }
.film-static .store-btns { margin-top: 1.5rem; }
.film-static .fine { margin-top: 0.875rem; font-size: 0.9375rem; color: #6E5A73; }
