/* ─── HERO LENS ───────────────────────────────────────────────
   The WebGL hero: an ink sketch you wipe away to find the painted world
   under it (hero-lens.js draws it; this is only the shell around it).
   Sits on the existing .hero / .hero--scene layout, so the words keep the
   same place and type they have everywhere else.
   ─────────────────────────────────────────────────────────── */
.hero--lens { background: #fff; }

/* The canvas, and the still that stands in for it. Both fill the hero —
   below the nav on desktop, like every other hero layer (see the
   min-width: 901px block in styles.css for why the height is explicit). */
.lens-canvas,
.lens-still {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}
@media (min-width: 901px) {
  .lens-canvas,
  .lens-still {
    top: var(--nav-h);
    height: calc(100% - var(--nav-h));
  }
}
/* Held back until its three images are in, then faded up, so the first
   thing seen is the sketch drawing itself rather than a flash of nothing. */
/* White behind it: the instant a canvas is resized its buffer is blank, and
   this is what shows through rather than black. */
.lens-canvas { opacity: 0; transition: opacity 0.7s ease; background: #fff; }
.hero.lens-ready .lens-canvas { opacity: 1; }

/* No WebGL, a lost context, or reduced motion: the painting, still. */
.lens-still { display: none; object-fit: cover; object-position: 50% 100%; }
.hero.lens-static .lens-still { display: block; }
.hero.lens-static .lens-canvas { display: none; }
/* The canvas fades its own bottom edge into cloud; the still gets the plain
   version of the same thing, so neither ends on a hard line. */
.hero.lens-static::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 20%;
  z-index: 1;
  background: linear-gradient(to top, #fff 12%, rgba(255,255,255,0.7) 45%, rgba(255,255,255,0));
  pointer-events: none;
}

/* The words sit on white paper to begin with and on a pale painted sky once
   it's wiped; a soft halo keeps them clean over either. */
.hero--lens .hero-content .eyebrow,
.hero--lens .hero-content .hero-title,
.hero--lens .hero-content .hero-sub {
  text-shadow: 0 0 14px rgba(255,255,255,0.95), 0 0 34px rgba(255,255,255,0.75), 0 0 70px rgba(255,255,255,0.5);
}
.hero--lens .hero-content .hero-sub { color: rgba(26,26,26,0.72); }

/* What to do, said once and then out of the way: gone on the first real
   wipe, and while the painting is fully open. */
.lens-hint {
  position: absolute;
  left: 50%;
  bottom: clamp(20px, 4.5vh, 40px);
  z-index: 2;
  transform: translateX(-50%);
  margin: 0;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 rgba(26,26,26,0.06), 0 8px 30px rgba(26,26,26,0.08);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(26,26,26,0.62);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.hero.lens-ready .lens-hint { opacity: 1; transition-delay: 2.2s; }
.hero.lens-used .lens-hint,
.hero.lens-open .lens-hint { opacity: 0; transition-delay: 0s; }
.hero.lens-static .lens-hint { display: none; }
.lens-hint .lens-hint-touch { display: none; }
@media (hover: none) {
  .lens-hint .lens-hint-mouse { display: none; }
  .lens-hint .lens-hint-touch { display: inline; }
}

/* Wide screens: off to the left, opposite the scroll prompt, so it isn't
   sitting on the figure standing at the bottom centre of the picture. */
@media (min-width: 901px) and (orientation: landscape) {
  .lens-hint {
    left: clamp(24px, 6vw, 96px);
    bottom: clamp(24px, 6vh, 64px);
    transform: none;
  }
}

/* The scroll prompt shares the bottom edge with the hint on small screens. */
@media (max-width: 900px) {
  .hero--lens .hero-scroll { display: none; }
}
