/*
 * Sipmate landing page — motion and layout on top of styles.css.
 * Only index.html loads this file. Every effect here has a static, fully
 * readable fallback: content never depends on JS or on scroll-driven CSS to
 * be visible, only to be *animated*. See docs/site.md for the full rundown.
 *
 * Animation budget: only transform, opacity, clip-path, filter and
 * background-color are animated (no layout properties). `prefers-reduced-
 * motion: reduce` is handled globally in styles.css for time-based
 * animations/transitions; every scroll-linked (`animation-timeline`) effect
 * in this file is additionally wrapped in
 * `@media (prefers-reduced-motion: no-preference)` because a scroll timeline
 * has no "duration" for that global rule to collapse.
 */

/* ---------------------------------------------------------------------- */
/* Sticky header — hero variant                                           */
/* ---------------------------------------------------------------------- */

.site-header--hero {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom-color: transparent;
  color: var(--ink);
}

.site-header--hero .brand,
.site-header--hero .brand-word {
  color: var(--ink);
}

/* The orange icon tile all but disappears on the orange hero without this —
   a thin cream ring plus a soft shadow keeps it legible. Kept even after
   scrolling; it still reads fine on a solid header. */
.site-header--hero .brand-mark {
  box-shadow:
    0 0 0 2px rgb(255 247 240 / 90%),
    0 4px 14px rgb(0 0 0 / 28%);
}

.site-header--hero .get-app-pill {
  background: var(--ink);
  color: var(--cream);
}

.site-header--hero .get-app-pill:hover {
  background: #000;
}

.site-header--hero.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border);
}

.site-header--hero.is-scrolled .brand,
.site-header--hero.is-scrolled .brand-word {
  color: var(--text);
}

.site-header--hero.is-scrolled .get-app-pill {
  background: var(--spritz);
  color: var(--ink);
}

.site-header--hero,
.site-header--hero .brand,
.site-header--hero .brand-word,
.site-header--hero .get-app-pill {
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

/* Scroll-driven enhancement: when supported, the header solidifies exactly
   in step with scroll instead of at a fixed JS-measured threshold. landing.js
   skips its own scroll listener when this is supported. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .site-header--hero {
      animation: header-solidify linear both;
      animation-timeline: scroll(root);
      animation-range: 0 320px;
    }

    /* Same timeline, bound again on the two descendants that also need to
       swap colour — an animation only affects the element it's declared on,
       so the header bar solidifying doesn't by itself recolour its children. */
    .site-header--hero .brand,
    .site-header--hero .brand-word {
      animation: header-solidify-text linear both;
      animation-timeline: scroll(root);
      animation-range: 0 320px;
    }

    .site-header--hero .get-app-pill {
      animation: header-solidify-pill linear both;
      animation-timeline: scroll(root);
      animation-range: 0 320px;
    }
  }
}

@keyframes header-solidify {
  from {
    background-color: transparent;
    border-bottom-color: transparent;
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
  }
  to {
    background-color: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom-color: var(--border);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

@keyframes header-solidify-text {
  from {
    color: var(--ink);
  }
  to {
    color: var(--text);
  }
}

@keyframes header-solidify-pill {
  from {
    background-color: var(--ink);
    color: var(--cream);
  }
  to {
    background-color: var(--spritz);
    color: var(--ink);
  }
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease;
}

.btn-ink {
  background: var(--ink);
  color: var(--cream);
}

.btn-ink:hover {
  background: #000;
  color: var(--cream);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--ink);
  color: var(--ink);
}

.btn-outline:hover {
  background: rgb(22 17 26 / 10%);
  color: var(--ink);
}

.btn:active {
  transform: scale(0.97);
}

.btn-small {
  padding: 9px 18px;
  font-size: 13px;
}

/* ---------------------------------------------------------------------- */
/* 1. Hero                                                                 */
/* ---------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  /* Fallback/safety net: shows through if the backdrop image fails to load,
     and is the only background at all with images blocked. */
  background: var(--spritz-gradient);
  overflow: clip;
  /* The text-protection colour `.hero-scrim` paints solid behind the copy —
     see that rule for the contrast numbers. A touch deeper in dark mode. */
  --hero-scrim-solid: color-mix(in srgb, var(--spritz) 90%, var(--ink) 10%);
}

@media (prefers-color-scheme: dark) {
  .hero {
    --hero-scrim-solid: color-mix(in srgb, var(--spritz) 84%, var(--ink) 16%);
  }
}

/* ---------------------------------------------------------------------- */
/* Hero backdrop — procedural "bar at night" bokeh scene                  */
/* ---------------------------------------------------------------------- */
/* scripts/render-hero-backdrop.mjs renders three self-hosted images (no AI
   model available in this environment, no third-party asset, no licensing
   question): an opaque far scene per breakpoint (backlit back-bar bottles,
   warm bokeh, a glossy counter edge) and a small alpha "near" bokeh layer
   for parallax. Stacked bottom to top: photo -> Spritz tint (blended, so
   the hero still *is* the orange brand moment, its highlights just glow
   through the photo now) -> a scrim that keeps the text column close to
   the plain gradient for contrast -> near bokeh -> the existing bubble
   canvas -> content. */
.hero-scene {
  position: absolute;
  /* A small overhang beyond the hero's own edges: `.hero-scene` picks up a
     few px of pointer-driven `transform` (landing.js, fine pointers only),
     and without this the moved edge would bare a sliver of `.hero`'s own
     plain-gradient background instead of the scene. `.hero`'s own
     `overflow: clip` still hides the rest of the overhang. */
  inset: -16px;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-backdrop,
.hero-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-backdrop img {
  object-fit: cover;
  /* Slightly below centre: keeps the glossy counter band in frame instead
     of the image's own headroom above the back-bar. */
  object-position: center 40%;
}

/* The brand gradient, blended over the photo rather than replacing it:
   `soft-light` at partial opacity lets the photo's bright bits (bottle
   glow, bokeh, the counter's specular line) read as warm amber/orange
   while leaving its dark areas dark — "a warm orange-tinted bar scene
   where the lights glow through", not a literal unfiltered photo. */
.hero-tint {
  position: absolute;
  inset: 0;
  background: var(--spritz-gradient);
  opacity: 0.6;
  mix-blend-mode: soft-light;
}

/* Legibility (non-negotiable, see docs/site.md for the measured numbers):
   an *opaque* solid colour behind the text column, so contrast there never
   depends on the scene/tint underneath at all — measured against the real
   rendered text boxes at five viewport widths (360-2560px) rather than
   guessed. It is a touch deeper than pure Spritz (10% ink mixed in): pure
   Spritz measured 2.94:1 for cream-on-orange, just under the 3:1 large-text
   floor; this mix comfortably clears both that and the 4.5:1 body-text
   floor for ink-on-orange (see docs/site.md for the numbers). Below 900px
   the copy column runs full width above the stacked phone (`.hero-inner`'s
   grid becomes one column there), so the fade direction flips from
   horizontal (protect the text *column*) to vertical (protect the text
   *block*, fade out before the phone below it) instead of trying to reuse
   one gradient shape for two different layouts. */
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--hero-scrim-solid) 0%,
    var(--hero-scrim-solid) 58%,
    transparent 82%
  );
}

@media (min-width: 900px) {
  .hero-scrim {
    /* Stops cover the widest measured headline line/lede paragraph with
       margin across 900-2560px (peak ~60.5% around a 1000px viewport,
       where the display font hasn't shrunk as much as the column has). */
    background: linear-gradient(
      100deg,
      var(--hero-scrim-solid) 0%,
      var(--hero-scrim-solid) 64%,
      transparent 86%
    );
  }
}

/* With JS, the stops follow the copy block itself (landing.js measures it):
   solid orange to just past the buttons, then the bar scene behind the
   phone. The percentages above stay as the no-JS fallback. */
.hero.has-copy-metrics .hero-scrim {
  background: linear-gradient(
    180deg,
    var(--hero-scrim-solid) 0,
    var(--hero-scrim-solid) calc(var(--copy-bottom) + 16px),
    transparent calc(var(--copy-bottom) + 120px)
  );
}

@media (min-width: 900px) {
  .hero.has-copy-metrics .hero-scrim {
    background: linear-gradient(
      90deg,
      var(--hero-scrim-solid) 0,
      var(--hero-scrim-solid) calc(var(--copy-right) + 24px),
      transparent calc(var(--copy-right) + 260px)
    );
  }
}

/* Foreground bokeh — a few large, very soft discs with alpha, drifting a
   little faster than the backdrop on scroll (parallax) and breathing
   gently at rest. */
.hero-bokeh-near {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8;
  animation: hero-bokeh-breathe 10s ease-in-out infinite;
}

@keyframes hero-bokeh-breathe {
  0%,
  100% {
    opacity: 0.65;
    scale: 1;
  }
  50% {
    opacity: 0.92;
    scale: 1.04;
  }
}

/* Scroll parallax: the far backdrop drifts a little, the near bokeh drifts
   more (and opposite) — depth, not just a static photo. `translate` is used
   instead of `transform` so it never fights the breathing `scale` above or
   the pointer-driven `transform` on `.hero-scene` (landing.js, fine
   pointers only) — three independent properties on nested elements. Static
   image, no drift under reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .hero-backdrop img {
      animation: hero-backdrop-parallax linear both;
      animation-timeline: --hero-view;
      animation-range: cover 0% cover 100%;
    }

    .hero-bokeh-near {
      animation:
        hero-bokeh-parallax linear both,
        hero-bokeh-breathe 10s ease-in-out infinite;
      animation-timeline: --hero-view, auto;
      animation-range: cover 0% cover 100%;
    }
  }
}

@keyframes hero-backdrop-parallax {
  to {
    translate: 0 3%;
  }
}

@keyframes hero-bokeh-parallax {
  to {
    translate: 0 -9%;
  }
}

/* Deeper night in dark mode: a touch less tint (the backdrop's own dark
   tones need less help) — `--hero-scrim-solid` above already goes a shade
   deeper for the protected text zone. */
@media (prefers-color-scheme: dark) {
  .hero-tint {
    opacity: 0.46;
  }
}

/* Generative layer: carbonation bubbles rising behind the hero copy, drawn
   and animated by landing.js (canvas, aria-hidden, no content of its own).
   Sits above the backdrop scene but below `.hero-inner`. Skipped entirely by
   JS under reduced motion, so an empty transparent canvas is the fallback —
   the gradient alone still carries the hero. */
.hero-bubbles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  padding: 116px 24px 56px;
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  align-items: center;
  gap: 32px;
}

.hero-copy {
  max-width: 900px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
  /* Tuned so the widest grouping ("Someone to clink") stays on one line up
     to very wide viewports — see docs/site.md for the exact numbers. */
  font-size: clamp(2.75rem, 5.5vw + 1.2rem, 7.25rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

/* Each word gets its own tight clip box, independent of which visual line
   it lands on — a forced <br> (see `.brk`) decides the grouping, so a word
   that unexpectedly wraps at a narrow width is still fully visible, never
   clipped away like a shared per-line box would. */
.hero-title .word-wrap {
  display: inline-block;
  overflow: clip;
  vertical-align: bottom;
  padding-bottom: 0.08em;
}

.hero-title .word {
  display: inline-block;
  transform: translateY(115%);
  animation: word-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 80ms + 20ms);
}

.hero-title .word--accent {
  color: var(--cream);
}

/* Line-break control: always break after "clink" and after "with,"; only
   break after "Someone" on narrow viewports (see the media query below). */
.hero-title .brk {
  display: none;
}
.hero-title .brk-clink,
.hero-title .brk-with {
  display: block;
}

@keyframes word-in {
  to {
    transform: translateY(0);
  }
}

.hero-lede {
  font-size: clamp(17px, 1.1vw + 14px, 20px);
  color: var(--ink);
  max-width: 46ch;
  margin: 0 0 24px;
  opacity: 0;
  transform: translateY(14px);
  animation: fade-up 0.7s ease 0.56s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  opacity: 0;
  transform: translateY(14px);
  animation: fade-up 0.7s ease 0.68s both;
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  opacity: 0;
  transform: translateY(28px) scale(0.97);
  animation: fade-up-scale 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
  /* Depth for the cursor-tilt landing.js applies to `.phone-frame` (a
     pointer:fine, motion-allowed enhancement only — see landing.js). */
  perspective: 900px;
}

@keyframes fade-up-scale {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 108px 20px 48px;
    gap: 56px;
  }

  .hero-copy {
    max-width: none;
  }

  /* Four lines instead of three: "Someone" gets its own line too, so no
     grouping has to shrink below a comfortable reading size. */
  .hero-title .brk-someone {
    display: block;
  }

  .hero-visual {
    order: 2;
    min-height: 380px;
  }

  .hero-visual .phone-mock {
    width: min(250px, 64vw);
  }
}

/* Phone mockup — shared by the hero and the "how it works" story. */

.phone-mock {
  /* Big enough to read the real screen, capped by the viewport height so the
     hero phone never runs past the fold on a short laptop screen. */
  width: min(300px, 34vh);
  animation: idle-float 6s ease-in-out infinite;
}

.phone-mock--static {
  width: 200px;
  animation: none;
}

@keyframes idle-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

.phone-frame {
  position: relative;
  width: 100%;
  background: #0b0a0f;
  border-radius: 38px;
  padding: 10px;
  box-shadow:
    0 40px 70px -30px rgb(0 0 0 / 55%),
    0 0 0 1px rgb(255 255 255 / 8%) inset;
  /* landing.js sets a rotateX/rotateY here on pointer move over `.hero-
     visual` (pointer: fine + motion allowed only); the transition just
     smooths it out. Idle float lives on the parent `.phone-mock` instead,
     so the two transforms compose without fighting over one element. */
  transition: transform 0.2s ease-out;
}

.phone-screen {
  position: relative;
  width: 100%;
  /* The screen, not the frame, carries the capture's ratio (1320x2868 minus
     the 150px status-bar crop, scaled), so the image fills it with no crop;
     the frame's padding adds the bezel around it. */
  aspect-ratio: 600 / 1235;
  border-radius: 30px;
  overflow: hidden;
  background: var(--surface);
}

.phone-screen picture {
  position: absolute;
  inset: 0;
}

.screen-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sticker {
  position: absolute;
  font-size: 30px;
  filter: drop-shadow(0 6px 12px rgb(0 0 0 / 25%));
  animation: sticker-bob 5s ease-in-out infinite;
}

.sticker-1 {
  top: 4%;
  left: -4%;
  animation-delay: 0.1s;
}
.sticker-2 {
  top: 20%;
  right: -8%;
  animation-delay: 0.7s;
}
.sticker-3 {
  bottom: 24%;
  left: -10%;
  animation-delay: 1.3s;
}
.sticker-4 {
  bottom: 6%;
  right: -4%;
  animation-delay: 0.4s;
}
.sticker-5 {
  top: 52%;
  left: -13%;
  animation-delay: 1.7s;
}

@keyframes sticker-bob {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-14px) rotate(4deg);
  }
}

@media (max-width: 480px) {
  .sticker-3,
  .sticker-5 {
    display: none;
  }
  .sticker-1 {
    left: 0;
  }
  .sticker-2,
  .sticker-4 {
    right: 0;
  }
}

/* Gentle scroll parallax on the stickers — pure bonus, no fallback needed:
   without support the idle bob above still gives them life. */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .hero {
      view-timeline-name: --hero-view;
      view-timeline-axis: block;
    }

    .sticker[data-depth='1'] {
      animation:
        sticker-parallax-1 linear both,
        sticker-bob 5s ease-in-out infinite;
      animation-timeline: --hero-view, auto;
      animation-range: cover 0% cover 100%;
    }
    .sticker[data-depth='2'] {
      animation:
        sticker-parallax-2 linear both,
        sticker-bob 5s ease-in-out infinite;
      animation-timeline: --hero-view, auto;
      animation-range: cover 0% cover 100%;
    }
    .sticker[data-depth='3'] {
      animation:
        sticker-parallax-3 linear both,
        sticker-bob 5s ease-in-out infinite;
      animation-timeline: --hero-view, auto;
      animation-range: cover 0% cover 100%;
    }

    @keyframes sticker-parallax-1 {
      to {
        transform: translateY(40px);
      }
    }
    @keyframes sticker-parallax-2 {
      to {
        transform: translateY(-30px);
      }
    }
    @keyframes sticker-parallax-3 {
      to {
        transform: translateY(70px);
      }
    }
  }
}

/* ---------------------------------------------------------------------- */
/* 2. Tonight strip — a live-feeling row of illustrative plan chips         */
/* ---------------------------------------------------------------------- */

.tonight-strip {
  background: var(--surface);
  padding: 40px 0 48px;
  overflow: hidden;
}

.tonight-strip-eyebrow {
  margin: 0 0 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.chip-row {
  display: flex;
  width: max-content;
  animation: marquee-left 46s linear infinite;
}

.chip-track {
  display: inline-flex;
  flex: none;
  gap: 12px;
  padding-right: 12px;
}

.plan-chip {
  display: inline-flex;
  align-items: center;
  flex: none;
  white-space: nowrap;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Every third chip picks up a lilac tint — social-moment colour, used
   sparingly, previewing the match glow later on the page. */
.plan-chip:nth-child(3n) {
  background: color-mix(in srgb, var(--lilac) 14%, var(--raised));
  border-color: color-mix(in srgb, var(--lilac) 30%, var(--border));
}

/* ---------------------------------------------------------------------- */
/* 3. Marquee                                                              */
/* ---------------------------------------------------------------------- */

.marquee {
  background: var(--ink);
  color: var(--cream);
  overflow: hidden;
  padding: 32px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.marquee-row {
  display: flex;
  width: max-content;
  /* landing.js raises this animation's playbackRate on scroll (a scroll-
     velocity feel, easing back to 1 at rest); the plain 32s loop is the
     complete fallback with no JS. Never change the duration from script: a
     running animation jumps when its duration changes. */
  animation: marquee-left 32s linear infinite;
}

.marquee-row--right {
  animation-name: marquee-right;
}

.marquee-track {
  display: inline-flex;
  flex: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 6vw, 62px);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

@keyframes marquee-left {
  to {
    transform: translateX(-50%);
  }
}

@keyframes marquee-right {
  from {
    transform: translateX(-50%);
  }
}

/* ---------------------------------------------------------------------- */
/* 4. How it works — full-viewport pinned scrollytelling, four steps       */
/* ---------------------------------------------------------------------- */

/* The whole section is four stacked 100svh "chapters"; `.how-visual`
   pins in place (via `position: sticky`) while `.how-steps` scrolls past
   it. `data-active-step` (set by landing.js from the same observer that
   already drove the old crossfade) eases the section's own background
   through the brand's four "moments" — cream/neutral to plan, a spritz
   tint to cheer, lilac to the match, ink for the chat that closes it out.
   Default (no JS) stays on the plain neutral surface throughout: a
   completionist static page, just without the colour story. */
.how {
  position: relative;
  background: var(--surface);
  transition: background-color 0.8s ease;
  overflow: clip;
}

.how[data-active-step='2'] {
  background: color-mix(in srgb, var(--spritz) 20%, var(--surface));
}

.how[data-active-step='3'] {
  background: color-mix(in srgb, var(--lilac) 24%, var(--surface));
}

.how[data-active-step='4'] {
  background: var(--ink);
}

.how[data-active-step='4'] .how-heading,
.how[data-active-step='4'] .how-step > .how-step-title,
.how[data-active-step='4'] .how-step > p {
  color: var(--cream);
}

.how[data-active-step='4'] .how-step > p {
  color: rgb(246 244 250 / 78%);
}

/* Progress rail — four dots, fixed to the viewport edge while the section
   is in view (landing.js toggles `.is-visible`; default hidden, purely
   decorative wayfinding, never the only way to tell which step is active). */
.how-rail {
  position: fixed;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.how-rail.is-visible {
  opacity: 1;
}

.how-rail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}

.how-rail-dot.is-active {
  background: var(--spritz);
  transform: scale(1.5);
}

.how-grid {
  display: grid;
  grid-template-columns: minmax(320px, 44%) 1fr;
  gap: 48px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}

.how-visual {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Clears the fixed site header, which overlays the top of this sticky
     box regardless of scroll position. */
  padding-top: 72px;
}

/* The giant background numeral — one per step, stacked and crossfaded the
   same way the phone screens are. Outline-only where supported, like the
   old inline step numbers this replaces. */
.how-bignum {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(150px, 26vw, 340px);
  line-height: 1;
  color: var(--text);
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.how-bignum.is-active {
  opacity: 0.1;
}

@supports (-webkit-text-stroke: 1px black) {
  .how-bignum {
    color: transparent;
    -webkit-text-stroke: 2px var(--text);
  }

  .how-bignum.is-active {
    opacity: 0.28;
  }
}

.how[data-active-step='4'] .how-bignum {
  -webkit-text-stroke-color: var(--cream);
  color: var(--cream);
}

.how-phone-wrap {
  position: relative;
  z-index: 1;
}

/* Sized by the height it has to fit in, not the width: the screen is
   600:1235 (height ≈ 2.06 × width), so on a 900 px-tall laptop 46vh of width
   made a phone taller than the space under the header, and centring pushed
   its top underneath it. 140px = the header clearance plus breathing room. */
.how-phone {
  width: min(380px, calc((100svh - 140px) * 0.48));
}

.how-heading {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 8px;
}

.how-steps {
  padding: 64px 0;
}

.how-step {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 0;
}

/* The heading sits right above step 1 in the same viewport on first load —
   centring step 1's text the same way later steps are (deep in a tall
   block, heading long scrolled off) reads as a big dead gap. Anchor it
   near the top instead. */
.how-step:first-of-type {
  justify-content: flex-start;
  padding-top: 0;
}

.step-number {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--spritz);
  opacity: 0.5;
  margin: 0 0 6px;
}

.how[data-active-step='4'] .step-number {
  color: var(--lilac);
  opacity: 0.85;
}

.how-step-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 1.05;
  margin: 0 0 14px;
}

/* Word-by-word reveal, gated behind `html.js-motion` exactly like the
   values-grid cards: the default (no JS) state has no transform at all,
   so every word is simply in place, never hidden. `--i` is set per word by
   landing.js for the stagger. */
.how-step-title .word-wrap {
  display: inline-block;
  overflow: clip;
  vertical-align: bottom;
  padding-bottom: 0.05em;
}

html.js-motion .how-step-title .word {
  display: inline-block;
  transform: translateY(115%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 55ms);
}

html.js-motion .how-step.is-in .how-step-title .word {
  transform: translateY(0);
}

.how-step > p {
  color: var(--muted);
  font-size: 20px;
  max-width: 38ch;
  margin: 0;
}

/* `.how-step-phone` is the mobile-only per-step phone (declared later, next
   to `.how-step-phone`'s own rules) — hidden above 900px, where the pinned
   `.how-visual` sidebar carries the video instead. */
.how-step-phone {
  display: none;
}

@media (max-width: 899px) {
  .how-grid {
    display: block;
    padding: 0 20px;
  }

  /* The pinned sidebar only works beside a second column of scrolling
     text; stacked above it (single column) it would sit "stuck" over
     content scrolling underneath instead of making room for it —
     `position: sticky` reserves no space beyond its own box. Each step
     gets its own static-position `.how-step-phone` below instead. */
  .how-visual {
    display: none;
  }

  .how-step-phone {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }

  .how-step-phone .phone-mock {
    width: min(220px, 56vw);
  }

  .how-steps {
    padding: 8px 0 32px;
  }

  .how-step {
    min-height: 0;
    padding: 28px 0;
  }

  .how-step:first-of-type {
    padding-top: 0;
  }

  .how-rail {
    display: none;
  }
}

/* Story screens inside the phone ------------------------------------- */

.phone-screen--story {
  position: relative;
}

.story-step {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.story-step.is-active {
  opacity: 1;
}

/* Per-step "supporting motion in the empty space" — small decorative
   layers that live beside `.phone-mock` (not inside `.phone-screen`, which
   clips to its own bounds) so they can drift in the room around the phone.
   Crossfaded with their story step by landing.js toggling `.is-active`
   here directly (there is no ancestor relationship to key off any more).
   All purely decorative (no `aria-hidden` needed beyond the section's own),
   transform/opacity only, frozen by the global reduced-motion rule. */
.story-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.story-fx.is-active {
  opacity: 1;
}

.fx-chip {
  position: absolute;
  white-space: nowrap;
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  animation: fx-drift 6s ease-in-out infinite;
}

.fx-chip:nth-child(1) {
  top: 8%;
  left: -32%;
}

.fx-chip:nth-child(2) {
  top: 46%;
  right: -38%;
  animation-delay: 1.2s;
}

.fx-chip:nth-child(3) {
  bottom: 12%;
  left: -28%;
  animation-delay: 2.1s;
}

@keyframes fx-drift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.fx-tag {
  position: absolute;
  background: rgb(11 10 15 / 55%);
  color: var(--cream);
  border: 1px solid rgb(255 255 255 / 25%);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
  animation: fx-drift 5s ease-in-out infinite;
}

.fx-tag--1 {
  top: 14%;
  right: -20%;
}

.fx-tag--2 {
  top: 50%;
  left: -24%;
  animation-delay: 0.8s;
}

.fx-tag--3 {
  bottom: 16%;
  right: -16%;
  animation-delay: 1.6s;
}

.story-fx--glow {
  background: radial-gradient(
    circle at 50% 45%,
    color-mix(in srgb, var(--lilac) 55%, transparent) 0%,
    transparent 65%
  );
  animation: fx-pulse 3.2s ease-in-out infinite;
}

@keyframes fx-pulse {
  0%,
  100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

.fx-bubble {
  position: absolute;
  width: 34px;
  height: 22px;
  border-radius: 12px;
  background: var(--lilac);
  opacity: 0;
  animation: fx-pop 2.4s ease-in-out infinite;
}

.fx-bubble--1 {
  top: 18%;
  left: -14%;
}

.fx-bubble--2 {
  top: 46%;
  right: -18%;
  width: 44px;
  background: var(--spritz);
  animation-delay: 0.6s;
}

.fx-bubble--3 {
  bottom: 20%;
  left: -10%;
  width: 26px;
  height: 18px;
  animation-delay: 1.2s;
}

@keyframes fx-pop {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.6);
  }
  30%,
  70% {
    opacity: 0.9;
    transform: scale(1);
  }
}

/* ---------------------------------------------------------------------- */
/* 6. Big statement — kinetic: the first word cycles, a marquee drifts     */
/* ---------------------------------------------------------------------- */

.statement {
  position: relative;
  padding: 140px 24px;
  text-align: center;
  overflow: clip;
  /* Photo: three zero-proof drinks on a dark bar top (generated, D-053),
     under a night scrim so the cream headline keeps its contrast. */
  background:
    linear-gradient(rgb(22 17 26 / 0.72), rgb(22 17 26 / 0.86)),
    url('media/bg-zero-proof.webp') center 60% / cover no-repeat,
    var(--night, #16111a);
}

/* A second, much bigger and much fainter copy of the marquee trick,
   drifting behind the headline so the section never reads as a plain
   block of dead space. Pure CSS, no JS required. */
.statement-marquee {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.statement-marquee-track {
  display: inline-block;
  width: max-content;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(32px, 7vw, 80px);
  white-space: nowrap;
  color: var(--text);
  animation: marquee-left 38s linear infinite;
}

html.js-motion .statement.is-in .statement-marquee-track {
  color: var(--cream);
}

.statement-title,
.statement-sub {
  position: relative;
  z-index: 1;
}

.statement-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 5vw + 1rem, 5.6rem);
  color: var(--text);
  margin: 0 0 16px;
  transform: scale(0.88);
}

/* The first word (say "Zero-proof") cycles through a short list of drinks —
   landing.js swaps the text every couple of seconds while the section is on
   screen; reduced motion and no-JS visitors just see the plain static word
   the markup already has. */
.statement-cycle {
  display: inline-block;
  color: var(--spritz);
  transition: opacity 0.25s ease;
}

.statement-cycle.is-swapping {
  opacity: 0;
}

html.js-motion .statement.is-in .statement-cycle {
  color: var(--cream);
}

.statement-sub {
  color: var(--muted);
  font-size: 19px;
  margin: 0;
}

html.js-motion .statement,
html.js-motion .statement-title,
html.js-motion .statement-sub {
  transition:
    background-color 0.7s ease,
    color 0.7s ease,
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js-motion .statement.is-in {
  background-color: var(--ink);
}

html.js-motion .statement.is-in .statement-title {
  transform: scale(1);
  color: var(--cream);
}

html.js-motion .statement.is-in .statement-sub {
  color: rgb(246 244 250 / 72%);
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .statement {
      view-timeline-name: --statement-view;
      view-timeline-axis: block;
    }

    html.js-motion .statement-title {
      animation: statement-grow linear both;
      animation-timeline: --statement-view;
      animation-range: entry 0% cover 45%;
    }

    @keyframes statement-grow {
      from {
        transform: scale(0.8);
      }
      to {
        transform: scale(1);
      }
    }
  }
}

/* ---------------------------------------------------------------------- */
/* 7. Filmstrip — vertical scroll drives a pinned horizontal gallery       */
/* ---------------------------------------------------------------------- */

/* Default (no JS, or reduced motion): a plain static, centred, wrapping
   row — nothing pinned, nothing to scroll sideways for. landing.js adds
   `.is-pinned` only when it can actually drive the horizontal translate,
   which is the only thing that needs the extra scroll height below. */
.filmstrip {
  padding: 72px 0 88px;
}

.filmstrip.is-pinned {
  height: 340vh;
  padding: 0;
}

.filmstrip-sticky {
  position: relative;
  text-align: center;
}

.filmstrip.is-pinned .filmstrip-sticky {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.filmstrip-caption {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 3.2vw, 32px);
  margin: 0 0 36px;
  color: var(--text);
}

.filmstrip-viewport {
  max-width: 1240px;
  margin: 0 auto;
  width: 100%;
  overflow: hidden;
}

.filmstrip-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
  padding: 0 8px;
}

.filmstrip.is-pinned .filmstrip-track {
  flex-wrap: nowrap;
  justify-content: flex-start;
  width: max-content;
  margin: 0 auto;
  will-change: transform;
}

.filmstrip-item {
  flex: none;
  width: 190px;
  margin: 0;
}

.filmstrip-item figcaption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
  max-width: 22ch;
  margin-inline: auto;
}

/* `.phone-mock--static` carries its own fixed width (reused from the "how
   it works" mockups) — override it so the phone actually fills whatever
   width `.filmstrip-item` sets instead of forcing its own overflow. */
.filmstrip-item .phone-mock {
  width: 100%;
}

.filmstrip-item .phone-frame {
  box-shadow:
    0 24px 46px -22px rgb(0 0 0 / 45%),
    0 0 0 1px rgb(255 255 255 / 8%) inset;
}

@media (max-width: 620px) {
  .filmstrip-item {
    width: 128px;
  }
}

/* ---------------------------------------------------------------------- */
/* 8. Values                                                               */
/* ---------------------------------------------------------------------- */

.values {
  padding: 96px 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.values h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 34px);
  text-align: center;
  margin: 0 0 40px;
}

/* Flex + justify-content: center instead of a grid: with 5 cards a grid's
   last row leaves a lone orphan pinned to the left. A wrapping flex row
   centres whatever's left on the final line at every width. */
.values-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.value-card {
  flex: 1 1 220px;
  max-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 26px 22px;
}

.value-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 12px;
}

.value-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0 0 6px;
}

.value-card p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

html.js-motion .value-card {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  transition-delay: calc(var(--i, 0) * 80ms);
}

html.js-motion .value-card.is-in {
  opacity: 1;
  transform: none;
}

/* ---------------------------------------------------------------------- */
/* 9. Safety band                                                          */
/* ---------------------------------------------------------------------- */

/* Glasses clinking over a bar table (generated photo, D-053) under a dark
   scrim: the line is about meeting at the bar, so the bar is behind it. */
.safety-band {
  background:
    linear-gradient(rgb(22 17 26 / 0.66), rgb(22 17 26 / 0.8)),
    url('media/bg-cheers.webp') center 35% / cover no-repeat,
    #16111a;
  padding: 88px 24px;
  text-align: center;
}

.safety-band .safety-line {
  color: #fff7f0;
}

.safety-band .safety-link {
  color: #ffb08a;
}

.safety-line {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 4vw, 32px);
  margin: 0 0 12px;
  color: var(--text);
}

.safety-link {
  color: var(--link);
  font-weight: 600;
  text-decoration: none;
}

.safety-link:hover,
.safety-link:focus-visible {
  text-decoration: underline;
}

/* ---------------------------------------------------------------------- */
/* 10. Final CTA                                                           */
/* ---------------------------------------------------------------------- */

.get {
  position: relative;
  background: var(--spritz-gradient);
  color: var(--ink);
  padding: 112px 24px 90px;
  text-align: center;
  overflow: clip;
  --hero-scrim-solid: color-mix(in srgb, var(--spritz) 90%, var(--ink) 10%);
}

@media (prefers-color-scheme: dark) {
  .get {
    --hero-scrim-solid: color-mix(in srgb, var(--spritz) 84%, var(--ink) 16%);
  }
}

/* Bookend: the same rendered backdrop as the hero (same URL, so an already-
   cached request, not an extra one), very faint, so the page opens and
   closes on the same "bar" idea. A centred radial scrim (this content is
   centred, not column-anchored like the hero) keeps the badges/headline on
   the same safe solid colour regardless — see `.hero-scrim` for the
   contrast numbers this reuses. */
.get::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('media/bg-rooftop.webp');
  background-size: cover;
  background-position: center 55%;
  opacity: 0.55;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.get::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    ellipse 70% 65% at 50% 42%,
    var(--hero-scrim-solid) 0%,
    var(--hero-scrim-solid) 48%,
    transparent 78%
  );
  pointer-events: none;
}

.get-inner {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.get-mark {
  width: 92px;
  height: 92px;
  margin-bottom: 20px;
}

.get-mark svg {
  width: 100%;
  height: 100%;
}

.get-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw + 1.4rem, 4.6rem);
  margin: 0 0 12px;
  color: var(--ink);
}

.get-sub {
  font-size: 18px;
  margin: 0 0 34px;
  color: var(--ink);
  opacity: 0.85;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.store-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 172px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 14px;
  padding: 11px 20px;
  text-decoration: none;
  cursor: default;
}

.store-badge-label {
  font-weight: 700;
  font-size: 16px;
}

.store-badge-note {
  font-size: 12px;
  opacity: 0.7;
}

/* A live store gets the official badge artwork (site/src/media/badges, unchanged
   files from Apple and Google, in the page's language). Their rules: same height
   side by side, no restyling, at least 40px tall on screen. */
.store-badge-img {
  display: block;
  border-radius: 8px;
  transition: transform 0.15s ease;
}

.store-badge-img img {
  display: block;
  height: 48px;
  width: auto;
}

.store-badge-img:active {
  transform: scale(0.97);
}

.store-badge-img:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.wrap--footer {
  padding-top: 48px;
}

/* /get (D-075): the same closing section, alone on the page. Only seen
   without JavaScript, or for the instant before get.js moves on. */
.get--page {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.get-home {
  margin: 28px 0 0;
  font-weight: 700;
}

.get-home a {
  color: var(--ink);
}

.get-legal {
  margin: 28px auto 0;
  max-width: 34em;
  font-size: 12px;
  opacity: 0.7;
}
