/* Zavvy apex landing — scroll narrative (en-AU) */
:root {
  --p: #ff4d5a;
  --p-dark: #e63e4b;
  --p-glow: #ff4d5a33;
  --bg: #e8edf3;
  --bg-soft: #f2f5f9;
  --card: #f8fafc;
  --text: #02102b;
  --muted: #4a5568;
  --border: #c5ced8;
  --trap: #ea580c;
  --up: #16a34a;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 64px;
  --stage-pad: clamp(20px, 4vw, 48px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--stage-pad);
}

/* —— Header —— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  background: #f2f5f9e8;
  backdrop-filter: blur(16px);
  transition:
    height 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out),
    background 0.35s var(--ease-out);
}

.site-header.is-compact {
  --header-h: 52px;
  border-color: var(--border);
  background: #f2f5f9f2;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--p);
  letter-spacing: -0.02em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-actions a:not(.btn) {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}

.nav-actions a:not(.btn):hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  background: var(--p);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 12px 32px #ff4d5a33;
  transition: transform 0.2s var(--ease-out), background 0.2s;
}

.btn:hover {
  background: var(--p-dark);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}

/* —— Hero —— */
.hero {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 2rem) var(--stage-pad) 4rem;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  left: 50%;
  top: 10%;
  width: min(90vw, 720px);
  height: 360px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--p-glow), transparent 70%);
  pointer-events: none;
  animation: heroPulse 8s ease-in-out infinite;
}

@keyframes heroPulse {
  0%,
  100% {
    opacity: 0.7;
    transform: translateX(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateX(-50%) scale(1.08);
  }
}

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

.eyebrow {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--card);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 auto 1.1rem;
  max-width: 14ch;
}

.hero-lead {
  max-width: 36rem;
  margin: 0 auto 2rem;
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  line-height: 1.65;
  color: var(--muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.scroll-hint {
  margin-top: 3.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scroll-hint span {
  display: inline-block;
  animation: bob 2s ease-in-out infinite;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* —— Sticky narrative —— */
.narrative {
  position: relative;
}

.narrative-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.chapter-stack {
  padding-bottom: 15vh;
}

.chapter {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0;
  opacity: 0.35;
  transform: translateY(24px);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}

.chapter.is-active {
  opacity: 1;
  transform: translateY(0);
}

.chapter-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--p);
  margin-bottom: 0.75rem;
}

.chapter h2 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  max-width: 16ch;
}

.chapter p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 34rem;
  margin: 0 0 1.25rem;
}

.chapter-note {
  font-size: 0.85rem;
  color: var(--muted);
  border-left: 3px solid var(--border);
  padding-left: 0.85rem;
  margin-top: 1rem;
}

/* Gauge demo (chapter 3) */
.gauge-demo {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.gauge-ring {
  --progress: 0;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(var(--up) calc(var(--progress) * 1turn), #e2e8f0 0);
  display: grid;
  place-items: center;
  position: relative;
}

.gauge-ring::after {
  content: '';
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--card);
  position: absolute;
}

.gauge-ring strong {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
}

.gauge-copy small {
  display: block;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.gauge-copy b {
  font-size: 1.5rem;
}

/* Price intelligence chapters — light only (no landing dark mode) */
.chapter--insights {
  margin-top: 0.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.chapter--insights.chapter--trap-accent {
  background: linear-gradient(180deg, #fbe8e4 0%, var(--bg) 88%);
}

.chapter--insights.chapter--up-accent {
  background: linear-gradient(180deg, #e2f0e6 0%, var(--bg) 88%);
}

.insight-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.insight-pill {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.insight-pill--trap {
  background: #ea580c14;
  color: #c2410c;
  border-color: #ea580c33;
}

.insight-pill--up {
  background: #16a34a14;
  color: #15803d;
  border-color: #16a34a33;
}

/* Device sticky */
.device-pin {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  height: calc(100vh - var(--header-h) - 3rem);
  display: flex;
  align-items: center;
  justify-content: center;
}

.device-bezel {
  width: min(100%, 300px);
  margin-inline: auto;
  border-radius: 44px;
  padding: 12px;
  box-sizing: border-box;
  background: linear-gradient(145deg, #1a1a1a, #3d3d3d);
  box-shadow:
    0 40px 80px #00000040,
    0 0 0 1px #ffffff14 inset;
}

/* Match export size (1170×2404) so screenshots are not letterboxed/cropped in the frame */
.device-screen {
  width: 100%;
  aspect-ratio: 1170 / 2404;
  height: auto;
  border-radius: 34px;
  overflow: hidden;
  background: #f2f5f9;
  position: relative;
}

.shot {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.55s var(--ease-out),
    transform 0.55s var(--ease-out);
  pointer-events: none;
}

.shot.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.device-screen .shot-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: fill;
  object-position: top center;
}

.shot-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  background: repeating-linear-gradient(
    -45deg,
    #1e293b,
    #1e293b 8px,
    #0f172a 8px,
    #0f172a 16px
  );
  border: 2px dashed #ff4d5a88;
}

.shot-placeholder code {
  font-size: 0.62rem;
  line-height: 1.45;
  color: #e2e8f0;
  background: #00000066;
  padding: 0.5rem;
  border-radius: 8px;
  display: block;
  margin-top: 0.75rem;
  text-align: left;
  white-space: pre-wrap;
}

.shot-tag {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--p);
  margin-bottom: 0.35rem;
}

/* Mobile device between chapters */
.device-mobile {
  display: none;
  margin: 2rem auto;
  width: min(100%, 280px);
}

.device-mobile .device-bezel {
  width: 100%;
}

/* —— Closing —— */
.closing {
  padding: 6rem var(--stage-pad) 5rem;
  text-align: center;
}

.closing-box {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 2rem;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ff4d5a18, var(--card));
}

.closing h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 2rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 2.5rem var(--stage-pad);
  font-size: 0.75rem;
  color: var(--muted);
}

.foot-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.foot-links a {
  text-decoration: none;
}

.foot-links a:hover {
  color: var(--text);
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .narrative-grid {
    grid-template-columns: 1fr;
  }

  .device-pin {
    display: none;
  }

  .device-mobile {
    display: block;
  }

  /* Real cart screenshot replaces decorative gauge on narrow viewports */
  .chapter[data-shot="cart-gauge"] .gauge-demo {
    display: none;
  }

  .device-mobile .device-bezel {
    padding: 8px;
    border-radius: 34px;
  }

  .device-mobile .device-screen {
    border-radius: 28px;
  }

  .chapter {
    min-height: auto;
    padding: 3rem 0;
    opacity: 1;
    transform: none;
  }

  .chapter-stack {
    padding-bottom: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chapter {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .shot {
    transition: none;
  }

  .scroll-hint span {
    animation: none;
  }
}