/* Homepage hero — mobile: phone first, copy below (scroll together). Desktop: original side-by-side grid. */

:root {
  --hero-landing-header-offset: calc(76px + var(--install-banner-height, 0px));
  --hero-phone-mobile-height: 500px;
  --hero-mobile-layout-max: 960px;
}

.hero-landing__cue {
  display: none;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 16px 4px;
  border: none;
  background: transparent;
  color: var(--brand-charcoal);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* JS + [hidden] — same hide behaviour on Safari iOS, Android, and desktop */
.hero-landing__cue[hidden],
.hero-landing__cue[data-cue-visible="false"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  animation: none !important;
}

.hero-landing__cue:focus-visible {
  outline: 2px solid var(--brand-maroon);
  outline-offset: 4px;
  border-radius: 8px;
}

.hero-landing__cue-icon {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(128, 0, 0, 0.35);
  position: relative;
}

.hero-landing__cue-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 7px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-right: 2px solid var(--brand-maroon);
  border-bottom: 2px solid var(--brand-maroon);
  transform: rotate(-135deg);
}

@keyframes hero-landing-cue-bob {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.85;
  }
  50% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* ── Mobile: phone first, text below, natural scroll (no scroll-snap — fights iOS rubber-band) ── */
@media (max-width: 960px) {
  body.page-home .hero {
    min-height: 0;
    padding: 0;
    justify-content: flex-start;
  }

  body.page-home .hero__grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 0;
    padding-bottom: 48px;
  }

  body.page-home .hero-visual--landing {
    order: -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    min-height: calc(100svh - var(--hero-landing-header-offset));
    min-height: calc(100vh - var(--hero-landing-header-offset));
    padding: max(8px, env(safe-area-inset-top, 0px)) 0 20px;
    touch-action: pan-y;
  }

  /* Decorative phone mockup — don't trap touch scroll on the first screen */
  body.page-home .hero-visual--landing .android-phone {
    pointer-events: none;
  }

  .hero-landing__cue {
    display: flex !important;
    visibility: visible;
    pointer-events: auto;
  }

  body.page-home .hero-visual__phone-mount {
    width: min(88vw, 320px);
    margin-inline: auto;
    flex-shrink: 0;
  }

  body.page-home .hero-visual--landing .android-phone__screen,
  body.page-home .hero-visual--landing .android-phone__viewport {
    min-height: var(--hero-phone-mobile-height);
    height: var(--hero-phone-mobile-height);
  }

  body.page-home .hero__intro {
    order: 0;
    padding-top: 8px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

@media (max-width: 960px) and (prefers-reduced-motion: no-preference) {
  .hero-landing__cue:not([hidden]) {
    animation: hero-landing-cue-bob 2.4s ease-in-out infinite;
  }
}

/* ── Desktop: side-by-side hero — never show the mobile swipe cue ── */
@media (min-width: 961px) {
  body.page-home .hero-visual--landing {
    display: grid;
    gap: 14px;
    justify-items: center;
  }

  body.page-home .hero-landing__cue,
  .hero-landing__cue {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
    animation: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-landing__cue {
    animation: none !important;
  }
}
