/* Section 1, the hero (ADR 0239, HOMEPAGE-PLAN.md): the sample shop's day as one full-screen film
   (scenes/film/film.mjs), which hero.mjs plays once. Its ground is always light, and the header floats
   over it. At the close the film raises the mark on the horizon (--hz, --mark, in pixels) and this
   headline fades in under it. Without the film, and with motion off, this is the page: the light ground,
   the mark on its horizon, the headline. */
.marketing:has(> .over-film) {
  position: relative;
}

.site-nav.over-film {
  position: absolute;
  inset: 0 0 auto;
  border-bottom-color: transparent;
  background: transparent;
  box-shadow: none;
  clip-path: none;
  transition: color .6s ease;
}

.hero {
  --hz: 44svh;
  --mark: clamp(96px, 12vw, 140px);
  position: relative;
  min-height: 100svh;
  padding-top: calc(var(--hz) + var(--mark) * 12 / 32 + var(--space-7));
  padding-bottom: var(--space-9);
  overflow: hidden;
  text-align: center;
}

/* The film fills the first screen; past it, the section's own ground carries the film's colour. */
.hero canvas {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: 100svh;
  display: block;
}

/* The still end frame: the horizon and the mark standing on it (its horizon is 21 of its 32 units down). */
.hero::before {
  content: "";
  position: absolute;
  inset: var(--hz) 0 auto;
  border-top: 1px solid var(--line);
}

.hero-mark {
  position: absolute;
  top: calc(var(--hz) - var(--mark) * 21 / 32);
  left: calc(50% - var(--mark) / 2);
  width: var(--mark);
  height: var(--mark);
}

.hero[data-film=ready]::before,
.hero[data-film=ready] .hero-mark {
  display: none;
}

.hero-end {
  position: relative;
  transition: opacity .9s ease, translate .9s ease;
}

/* While the day plays, the headline waits for the evening. */
.hero[data-film=ready]:not([data-ended]) .hero-end {
  opacity: 0;
  translate: 0 12px;
  pointer-events: none;
}

.hero-end h1 {
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.02;
}

.hero-end .hero-actions {
  justify-content: center;
  margin-top: var(--space-6);
}

.hero-sample {
  position: absolute;
  bottom: var(--space-5);
  color: var(--muted);
  font-size: var(--text-xs);
}

.hero-sample {
  left: max(24px, calc(50% - 620px));
  max-width: calc(100% - 180px);
  text-align: left;
}

