/* A supermarket conveyor follows scroll, clearing space for the final heading. */
.grocery-hero {
  --hero-top: 89px;
  --stage-height: max(440px, calc(100svh - var(--hero-top)));
  --scroll-travel: clamp(1000px, 180svh, 2000px);
  position: relative;
  background: #fff;
}
.grocery-stage {
  position: relative;
  isolation: isolate;
  height: var(--stage-height);
  overflow: clip;
  background: #fff;
}
.grocery-hero.is-scrubbing { height: calc(var(--stage-height) + var(--scroll-travel)); }
.is-scrubbing .grocery-stage { position: sticky; top: var(--hero-top); }
.grocery-stage > .prepaid-label {
  position: absolute;
  z-index: 3;
  top: clamp(22px, 4svh, 42px);
  left: 0;
  width: 100%;
  pointer-events: none;
  font-size: 12px;
  letter-spacing: .18em;
  text-shadow: 0 0 8px #fff, 0 0 16px #fff;
}
.grocery-scene,
.grocery-poster,
.grocery-poster img,
.grocery-film,
.grocery-reveal { position: absolute; inset: 0; width: 100%; height: 100%; }
.grocery-scene { pointer-events: none; }
.grocery-poster img,
.grocery-film { object-fit: cover; object-position: center; }
.grocery-film { opacity: 0; }
.grocery-hero.has-film .grocery-film { opacity: 1; }
.grocery-hero.has-film .grocery-poster { visibility: hidden; }
.grocery-scene::after {
  content: '';
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(#fff 0%, #ffffff00 18%, #ffffff00 82%, #fffffff0 100%);
}
.grocery-reveal {
  z-index: 1;
  background: linear-gradient(#fff 0%, #fffffff0 25%, #ffffff00 62%);
}
.is-scrubbing .grocery-reveal { background: #fff; opacity: 0; }
.grocery-headline {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-bottom: 2svh;
  opacity: 1;
}
.is-scrubbing .grocery-headline { opacity: 0; }
.grocery-hero:not(.is-scrubbing) .grocery-headline {
  justify-content: flex-start;
  padding-top: clamp(88px, 13svh, 180px);
}
.grocery-headline span {
  display: block;
  white-space: nowrap;
  font-size: clamp(48px, 9.3vw, 174px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.075em;
  -webkit-text-stroke: 3px #fff;
  paint-order: stroke fill;
}
.grocery-word-back { color: var(--navy); }
.grocery-word-front { color: var(--blue); }
.grocery-stage > .prepaid-hero-footer {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: calc(100% - 96px);
  max-width: 1240px;
}
.grocery-scroll-cue {
  display: none;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  font-size: 11px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fffffff0;
}
.is-scrubbing .grocery-scroll-cue { display: inline-flex; }
.grocery-scroll-cue > span { color: var(--blue); font-size: 20px; }
.grocery-stage .prepaid-hero-footer p,
.grocery-stage .prepaid-hero-link { text-shadow: 0 1px 8px #fff, 0 0 16px #fff; }
@media (min-width: 651px) and (max-width: 900px) {
  .grocery-hero { --hero-top: 77px; }
  .grocery-stage > .prepaid-hero-footer { width: calc(100% - 64px); }
}
@media (max-width: 650px) {
  .grocery-hero { --hero-top: 73px; --scroll-travel: 150svh; }
  .grocery-headline span { font-size: clamp(28px, 9.3vw, 60px); -webkit-text-stroke-width: 2px; }
  .grocery-stage > .prepaid-label { top: 25px; font-size: 10px; }
  .grocery-stage > .prepaid-hero-footer {
    width: calc(100% - 40px);
    bottom: 14px;
    gap: 0;
  }
  .grocery-stage .prepaid-hero-footer p { font-size: 10px; }
  .grocery-scroll-cue { position: absolute; bottom: 75px; font-size: 10px; }
}
@media (max-height: 540px) {
  .grocery-hero { --stage-height: calc(100svh - var(--hero-top)); --scroll-travel: 1000px; }
  .grocery-headline span { font-size: min(9.3vw, 21svh); }
  .grocery-stage > .prepaid-label { top: 12px; font-size: 10px; }
  .grocery-stage > .prepaid-hero-footer { bottom: 5px; }
  .grocery-scroll-cue { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .grocery-hero.is-scrubbing { height: auto; }
  .is-scrubbing .grocery-stage { position: relative; top: auto; }
  .grocery-hero.has-film .grocery-poster { visibility: visible; }
  .grocery-film, .grocery-scroll-cue { display: none !important; }
  .grocery-headline { opacity: 1 !important; transform: none !important; }
}
@media print {
  .grocery-hero, .grocery-hero.is-scrubbing { height: auto; }
  .grocery-stage, .is-scrubbing .grocery-stage { position: static; height: auto; padding: 24px; }
  .grocery-scene, .grocery-stage > .prepaid-label, .grocery-stage > .prepaid-hero-footer { display: none; }
  .grocery-hero #product-title {
    position: static; width: auto; height: auto; clip: auto;
    white-space: normal; font-size: 44px; text-align: center;
  }
}
