/* ==========================================================================
   /host-store — the page a sales rep opens by QR code in front of a store
   owner. Two full-screen scenes, one below the other: the poster wall, then
   one screen earning money. Scroll-snap moves between them; js/host-store.js
   advances to the second when the first clip ends.

   Built phone-first: the clips are portrait. On a wide screen the clip sits
   sharp on the right over a blurred copy of its own first frame, rather than
   being stretched across the window.
   ========================================================================== */

:root {
  --hs-ink: var(--ink, #0B0F1A);
  --hs-lemon: var(--lemon, #B6F23A);
  --hs-lemon-hover: var(--lemon-hover, #A9E22F);
  --hs-blue: var(--vypa-blue, #0042FF);
  --hs-white: #FFFFFF;
  --hs-safe-top: env(safe-area-inset-top, 0px);
  --hs-safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body { margin: 0; height: 100%; }

body.hs {
  background: var(--hs-ink);
  color: var(--hs-white);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;            /* the scenes container scrolls, not the page */
}

/* ---------- Scenes ---------- */
.hs-scenes {
  height: 100vh;
  height: 100svh;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.hs-scenes::-webkit-scrollbar { display: none; }

.hs-scene {
  position: relative;
  height: 100vh;
  height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: var(--hs-ink) var(--poster) center / cover no-repeat;
}

.hs-media { position: absolute; inset: 0; }

.hs-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Legibility without hiding the clip: on a phone the words sit at the foot
   of the screen and the shade rises from the bottom only, so the top half
   of the video stays clear. A thin shade at the top keeps the logo and
   arrows readable. */
.hs-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgb(11 15 26 / .92) 0%, rgb(11 15 26 / .7) 26%, rgb(11 15 26 / .25) 46%, rgb(11 15 26 / 0) 60%),
    linear-gradient(to bottom, rgb(11 15 26 / .5) 0%, rgb(11 15 26 / 0) 13%);
  pointer-events: none;
}

/* ---------- Words ---------- */
.hs-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  box-sizing: border-box;
  /* --hs-banner: the first-visit cookie banner's height while it shows
     (set by js/host-store.js), so the words sit just above it. */
  padding: 0 20px calc(max(28px, var(--hs-banner, 0px)) + var(--hs-safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.hs-h {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(2.2rem, 10.5vw, 6.6rem);
  font-weight: 900;
  line-height: .94;
  letter-spacing: -.035em;
  text-wrap: balance;
  text-shadow: 0 2px 24px rgb(0 0 0 / .35);
}

.hs-h em {
  font-style: normal;
  color: var(--hs-lemon);
}

[data-scene="1"] .hs-h { max-width: 12ch; }
/* Slide 3 carries the most words, so its headline is lighter and smaller
   and lets more of the clip show. */
[data-scene="2"] .hs-h {
  max-width: 14ch;
  font-size: clamp(1.9rem, 8.4vw, 4.6rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.025em;
}
[data-scene="2"] .hs-sub { font-size: clamp(.88rem, 3.4vw, 1.05rem); font-weight: 500; }
[data-scene="2"] .hs-chips { gap: 6px; }
[data-scene="2"] .hs-chips li { padding: 5px 11px; font-size: clamp(.78rem, 3.1vw, .92rem); font-weight: 600; }

/* A page that wants every slide light (body.hs--light, e.g. /advertise-now). */
.hs--light .hs-h {
  max-width: 15ch;
  font-size: clamp(1.9rem, 8.4vw, 4.6rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.025em;
}
.hs--light .hs-sub { font-size: clamp(.88rem, 3.4vw, 1.05rem); font-weight: 500; }

.hs-sub {
  margin: -4px 0 0;
  max-width: 34ch;
  font-size: clamp(.95rem, 3.8vw, 1.15rem);
  font-weight: 600;
  line-height: 1.4;
  color: rgb(255 255 255 / .86);
}

/* Scene 3's four quick reasons. */
.hs-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 30rem;
}
.hs-chips li {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid rgb(182 242 58 / .7);
  background: rgb(11 15 26 / .45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--hs-white);
  font-size: clamp(.85rem, 3.5vw, 1rem);
  font-weight: 700;
}
.hs-chips li::before {
  content: "\2713";
  margin-right: 7px;
  color: var(--hs-lemon);
}

/* The one action. Lemon, big, and it breathes. */
.hs-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 320px);
  min-height: 62px;
  padding: 0 34px;
  box-sizing: border-box;
  border-radius: 999px;
  background: var(--hs-lemon);
  color: var(--hs-ink);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.01em;
  text-decoration: none;
  box-shadow: 0 10px 30px rgb(182 242 58 / .28);
  transition: background-color .2s ease, transform .2s ease;
}
.hs-cta:hover { background: var(--hs-lemon-hover); transform: translateY(-1px); }

.hs-scene.is-on .hs-cta { animation: hs-breathe 2.4s ease-out 1.2s infinite; }
@keyframes hs-breathe {
  0%   { box-shadow: 0 0 0 0 rgb(182 242 58 / .7); }
  60%  { box-shadow: 0 0 0 16px rgb(182 242 58 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(182 242 58 / 0); }
}

.hs-more {
  color: rgb(255 255 255 / .82);
  font-size: .95rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hs-more:hover { color: var(--hs-white); }

.hs-next {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px 0 22px;
  border: 1.5px solid rgb(255 255 255 / .55);
  border-radius: 999px;
  background: rgb(11 15 26 / .35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--hs-white);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.hs-next svg { animation: hs-nudge 1.6s ease-in-out infinite; }
@keyframes hs-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.hs-cta:focus-visible, .hs-next:focus-visible, .hs-more:focus-visible, .hs-logo:focus-visible {
  outline: 3px solid var(--hs-white);
  outline-offset: 3px;
}

/* Entrance: words rise in when their scene arrives. Visible at rest. */
.hs-scene .hs-copy > * { transition: opacity .6s ease, transform .6s ease; }
.hs-scene:not(.is-on) .hs-copy > * { opacity: 0; transform: translateY(18px); }
.hs-scene.is-on .hs-copy > :nth-child(2) { transition-delay: .12s; }
.hs-scene.is-on .hs-copy > :nth-child(3) { transition-delay: .24s; }
.hs-scene.is-on .hs-copy > :nth-child(4) { transition-delay: .36s; }
.hs-scene.is-on .hs-copy > :nth-child(5) { transition-delay: .48s; }
/* Until the script runs (or if it never does), everything shows. */
html:not(.hs-js) .hs-scene .hs-copy > * { opacity: 1; transform: none; }

/* ---------- Breadcrumb (stamped by tools/sync-breadcrumbs.js) ----------
   Small and quiet over the clip; the current page in lemon. */
.hs .crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .01em;
  text-shadow: 0 1px 8px rgb(0 0 0 / .5);
}
.hs .crumbs li + li::before {
  content: "›";
  margin: 0 7px;
  color: rgb(255 255 255 / .55);
}
.hs .crumbs a {
  color: rgb(255 255 255 / .82);
  text-decoration: none;
}
.hs .crumbs a:hover { color: var(--hs-white); text-decoration: underline; text-underline-offset: 3px; }
.hs .crumbs [aria-current] span { color: var(--hs-lemon); }

/* ---------- Logo and progress ---------- */
.hs-logo {
  position: fixed;
  z-index: 5;
  top: calc(22px + var(--hs-safe-top));
  left: 22px;
  display: block;
  line-height: 0;
}
.hs-logo img { width: 104px; height: auto; }

.hs-progress {
  position: fixed;
  z-index: 5;
  top: calc(12px + var(--hs-safe-top));
  left: 22px;
  right: 22px;
  display: flex;
  gap: 6px;
}
.hs-progress__bar {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgb(255 255 255 / .3);
  overflow: hidden;
}
.hs-progress__bar i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--hs-white);
}
.hs-progress__bar.is-done i { width: 100%; }

/* ---------- Slide arrows: top right on a phone, opposite the logo ---------- */
.hs-nav {
  position: fixed;
  z-index: 6;
  top: calc(24px + var(--hs-safe-top));
  right: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgb(11 15 26 / .55);
  border: 1px solid rgb(255 255 255 / .22);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.hs-nav__btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--hs-white);
  color: var(--hs-ink);
  cursor: pointer;
  transition: background-color .2s ease, opacity .2s ease, transform .15s ease;
}
.hs-nav__btn:hover:not(:disabled) { background: var(--hs-lemon); }
.hs-nav__btn:active:not(:disabled) { transform: scale(.94); }
.hs-nav__btn:disabled { opacity: .3; cursor: default; }
.hs-nav__btn:focus-visible { outline: 3px solid var(--hs-lemon); outline-offset: 2px; }
.hs-nav__count {
  min-width: 52px;
  text-align: center;
  font-size: .9rem;
  font-weight: 700;
  color: rgb(255 255 255 / .8);
  font-variant-numeric: tabular-nums;
}
.hs-nav__count b { color: var(--hs-white); }

/* ---------- Wide screens: sharp portrait clip on the right ---------- */
@media (min-aspect-ratio: 1/1) and (min-width: 900px) {
  .hs-scene { align-items: center; }
  .hs-scene::before {
    /* the blurred first frame fills the window behind the clip */
    content: "";
    position: absolute;
    inset: -40px;
    background: var(--poster) center / cover no-repeat;
    filter: blur(28px) brightness(.45) saturate(1.1);
  }
  .hs-media {
    left: auto;
    right: 6vw;
    top: 7vh;
    bottom: 7vh;
    aspect-ratio: 9 / 16;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgb(0 0 0 / .55);
    z-index: 1;
  }
  .hs-scene::after {
    background: linear-gradient(to right, rgb(11 15 26 / .55) 0%, rgb(11 15 26 / 0) 60%);
  }
  .hs-copy {
    max-width: 56vw;
    padding: 0 0 0 7vw;
  }
  .hs-h { font-size: clamp(3.6rem, 6.4vw, 7rem); }
}

@media (min-aspect-ratio: 1/1) and (min-width: 900px) {
  /* upright in the gap right of the clip, clear of the words and the cookie banner */
  .hs-nav {
    right: max(14px, calc(3vw - 28px));
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
  }
  .hs-nav__btn { width: 46px; height: 46px; }
  .hs-nav__count { min-width: 0; padding: 4px 0; }
}

/* ---------- Landscape clips (.hs-scene--wide, e.g. /signage-now) ----------
   On a phone a wide clip fills the screen like every other slide (zoomed in,
   same shade under the words); --focus keeps its subject (the VYPA screens)
   in view as the sides are cropped. On a wide screen it sits as a 16:9 frame
   on the right. */
.hs-scene--wide .hs-video { object-position: var(--focus, 50%) 50%; }
@media (min-aspect-ratio: 1/1) and (min-width: 900px) {
  .hs-scene--wide .hs-media {
    left: auto;
    right: 5vw;
    top: 50%;
    bottom: auto;
    width: min(50vw, 960px);
    aspect-ratio: 16 / 9;
    transform: translateY(-50%);
  }
  .hs-scene--wide .hs-copy { max-width: 40vw; }
  .hs-scene--wide .hs-h { font-size: clamp(2.2rem, 3.3vw, 3.6rem); }
}

@media (prefers-reduced-motion: reduce) {
  .hs-scenes { scroll-behavior: auto; }
  .hs-scene .hs-copy > *, .hs-cta, .hs-next svg { transition: none; animation: none !important; }
  .hs-scene:not(.is-on) .hs-copy > * { opacity: 1; transform: none; }
}
