/* Public marketing site */
.public-hero { background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%); }

.safe-area-pb {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* Fix mobile viewport height issues */
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

body > footer {
  flex-shrink: 0;
}

/* Hero slider styles */
[x-cloak] { display: none !important; }

/* Keep dots, progress pill, and pause/play on one optical centerline */
.slider-controls > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  box-sizing: border-box;
  line-height: 0;
}

/* LP hero — animated phone demo */
@keyframes lp-phone-float {
  0%, 100% {
    transform: rotateY(-18deg) rotateX(6deg) translateY(0);
  }
  50% {
    transform: rotateY(-18deg) rotateX(6deg) translateY(-10px);
  }
}

@keyframes lp-bar-grow {
  from { transform: scaleY(0.15); opacity: 0.4; }
  to { transform: scaleY(1); opacity: 1; }
}

@keyframes lp-progress-fill {
  0% { transform: scaleX(0); }
  100% { transform: scaleX(1); }
}

.lp-hero-demo__tilt {
  perspective: 1400px;
  perspective-origin: 50% 40%;
}

.lp-hero-demo__device {
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateX(6deg);
  animation: lp-phone-float 5s ease-in-out infinite;
  will-change: transform;
}

.lp-hero-demo__bar {
  transform-origin: bottom center;
  animation: lp-bar-grow 0.7s ease-out both;
  animation-delay: calc(0.1s + var(--i, 0) * 0.1s);
}

.lp-hero-demo__progress {
  width: var(--lp-progress-to, 68%);
  transform-origin: left center;
  animation: lp-progress-fill 1.2s ease-out both;
  animation-delay: var(--lp-progress-delay, 0s);
}

/* LP phone mock — scaled copy of app bottom nav */
.lp-phone-nav {
  --lp-nav-h: 46px;
  --lp-nav-fab: 34px;
  --lp-nav-fab-halo: 2.5px;
  --lp-nav-corner-r: 14px;
  --lp-nav-muted: #64748b;
  --lp-nav-accent: #6366f1;
  --lp-nav-accent-soft: #eef2ff;
  --lp-nav-text: #0f172a;
  --lp-nav-glass: rgba(255, 255, 255, 0.88);
  --lp-nav-border: #e2e8f0;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 15;
  height: var(--lp-nav-h);
  pointer-events: none;
}

.lp-phone-nav__bg {
  position: absolute;
  inset: 0;
  background: var(--lp-nav-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--lp-nav-border);
  border-top-left-radius: var(--lp-nav-corner-r);
  border-top-right-radius: var(--lp-nav-corner-r);
}

.lp-phone-nav__cta {
  position: absolute;
  left: 50%;
  top: 0;
  z-index: 4;
  transform: translateX(-50%);
}

.lp-phone-nav__fab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  top: calc(-0.5 * var(--lp-nav-fab));
  width: var(--lp-nav-fab);
  height: var(--lp-nav-fab);
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  color: #fff;
  box-shadow:
    0 0 0 var(--lp-nav-fab-halo) var(--lp-nav-glass),
    0 4px 12px rgba(99, 102, 241, 0.4);
}

.lp-phone-nav__fab-icon {
  display: block;
  width: 1rem;
  height: 1rem;
  margin-top: 0.5px;
}

.lp-phone-nav__shell {
  position: relative;
  z-index: 2;
  height: var(--lp-nav-h);
  padding: 0 0.85rem;
}

.lp-phone-nav__inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
  height: 100%;
  padding-bottom: 0.35rem;
}

.lp-phone-nav__spacer {
  pointer-events: none;
}

.lp-phone-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  gap: 0.1rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.15rem 0.1rem;
  color: var(--lp-nav-muted);
}

.lp-phone-nav__item.is-active {
  color: var(--lp-nav-accent);
}

.lp-phone-nav__item.is-active .lp-phone-nav__icon {
  background: var(--lp-nav-accent-soft);
  color: var(--lp-nav-accent);
}

.lp-phone-nav__icon {
  width: 0.95rem;
  height: 0.95rem;
  padding: 0.18rem;
  box-sizing: content-box;
  border-radius: 0.35rem;
}

.lp-phone-nav__label {
  font-size: 0.5rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

.lp-phone-nav__item.is-active .lp-phone-nav__label {
  font-weight: 600;
  color: var(--lp-nav-text);
}

/* LP phone — ad-style dashboard donut + sparkline */
.lp-phone-donut {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: conic-gradient(
    #6366f1 0% 32%,
    #ec4899 32% 50%,
    #f97316 50% 65%,
    #eab308 65% 77%,
    #94a3b8 77% 100%
  );
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.lp-phone-donut__hole {
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.05;
}

.lp-phone-spark {
  width: 52px;
  height: 28px;
  flex-shrink: 0;
}

@keyframes lp-add-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.35); transform: scale(1); }
  50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); transform: scale(1.015); }
}

@keyframes lp-receipt-shutter {
  0% { opacity: 0.55; }
  25% { opacity: 0; }
  100% { opacity: 0; }
}

@keyframes lp-add-bar {
  from { width: 12%; }
  to { width: 78%; }
}

.lp-phone-add-card--pulse {
  animation: lp-add-pulse 1.4s ease-in-out infinite;
}

.lp-phone-receipt__paper {
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 9px,
      rgba(148, 163, 184, 0.08) 9px,
      rgba(148, 163, 184, 0.08) 10px
    ),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.lp-phone-receipt__shutter {
  background: rgba(255, 255, 255, 0.75);
  animation: lp-receipt-shutter 1.1s ease-out both;
}

.lp-phone-add-bar {
  animation: lp-add-bar 1.6s ease-out both;
}

.lp-phone-nav__fab.is-active {
  box-shadow:
    0 0 0 2.5px rgba(255, 255, 255, 0.88),
    0 0 0 4.5px rgba(99, 102, 241, 0.35),
    0 4px 12px rgba(99, 102, 241, 0.45);
  transform: scale(1.05);
}

@media (max-width: 639px) {
  .lp-hero-demo__device {
    transform: rotateY(-8deg) rotateX(3deg);
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-hero-demo__device {
    animation: none;
    transform: rotateY(-12deg) rotateX(4deg);
  }

  .lp-hero-demo__bar,
  .lp-hero-demo__progress {
    animation: none;
  }

  .lp-hero-demo__bar {
    transform: none;
    opacity: 1;
  }

  .lp-hero-demo__progress {
    width: var(--lp-progress-to, 68%);
    transform: none;
  }

  .lp-phone-add-card--pulse,
  .lp-phone-receipt__shutter,
  .lp-phone-add-bar {
    animation: none;
  }

  .lp-phone-add-bar {
    width: 78%;
  }
}

/* LP final CTA — full-bleed → rounded inset on scroll (clip-path = no layout growth) */
.lp-final-cta {
  --lp-final-p: 0;
  --lp-final-inset-max: 1.25rem;
  --lp-final-radius: calc(var(--lp-final-p) * 2rem);
  --lp-final-inset: calc(var(--lp-final-p) * var(--lp-final-inset-max));
  --lp-final-bottom-clip: calc(var(--lp-final-p) * 0.5rem);
  background: #fff;
}

.lp-final-cta__shell {
  border-radius: var(--lp-final-radius);
  clip-path: inset(
    0
    var(--lp-final-inset)
    var(--lp-final-bottom-clip)
    var(--lp-final-inset)
    round var(--lp-final-radius)
  );
  -webkit-clip-path: inset(
    0
    var(--lp-final-inset)
    var(--lp-final-bottom-clip)
    var(--lp-final-inset)
    round var(--lp-final-radius)
  );
  /* Soft edge glow without extending document scroll height */
  box-shadow: none;
}

/* Constant padding sized for the fully-inset clip — text never reflows or clips */
.lp-final-cta__content {
  --lp-final-pad-base: 1.5rem;
  padding-left: calc(var(--lp-final-pad-base) + var(--lp-final-inset-max));
  padding-right: calc(var(--lp-final-pad-base) + var(--lp-final-inset-max));
}

@media (min-width: 768px) {
  .lp-final-cta {
    --lp-final-inset-max: 1.75rem;
    --lp-final-radius: calc(var(--lp-final-p) * 2.75rem);
    --lp-final-bottom-clip: calc(var(--lp-final-p) * 0.75rem);
  }

  .lp-final-cta__content {
    --lp-final-pad-base: 2rem;
  }
}

@media (min-width: 1024px) {
  .lp-final-cta {
    --lp-final-inset-max: 2.25rem;
    --lp-final-radius: calc(var(--lp-final-p) * 3.25rem);
  }

  .lp-final-cta__content {
    --lp-final-pad-base: 2.25rem;
  }
}

/* LP is long — don't stretch the viewport under the footer on mobile */
body[data-ga-section="marketing-lp"],
body[data-ga-section="marketing-partners-lp"] {
  min-height: 0;
}

body[data-ga-section="marketing-lp"] > main,
body[data-ga-section="marketing-partners-lp"] > main {
  flex: 0 0 auto;
}

/* Promo banner — mobile marquee + fixed CTA */
@media (max-width: 639px) {
  .promo-banner__marquee-track.is-marquee {
    display: inline-flex;
    align-items: center;
    width: max-content;
    will-change: transform;
  }

  .promo-banner__marquee-group {
    flex: 0 0 auto;
    padding-right: 2rem;
  }
}

@media (min-width: 640px) {
  .promo-banner__marquee-wrap {
    flex: none;
  }

  .promo-banner__marquee-track {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: auto;
  }

  .promo-banner__marquee-group {
    display: contents;
  }
}

@media (prefers-reduced-motion: reduce) {
  .promo-banner__marquee-track.is-marquee {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lp-final-cta {
    --lp-final-p: 1;
  }
}
