/* ═══════════════════════════════════════════════════════════
   STACK POKER — main.css
   Brand blue: #2a7aff   ·   Dark: #08080f   ·   Font: Inter
═══════════════════════════════════════════════════════════ */

:root {
  --blue: #2a7aff;
  --dark: #08080f;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  color: #111;
  background: var(--dark);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-weight: 800; }

/* ═══════════════════════════════════════════════════════════
   SCROLL INTRO
═══════════════════════════════════════════════════════════ */
#intro {
  position: fixed;
  inset: 0;
  background: #08080f;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* main site content — revealed only at the instant the intro completes */
#site { visibility: hidden; }

#chip-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(42,122,255,0.18) 0%, transparent 70%);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: glow-pulse 2.5s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1.0; transform: translate(-50%, -50%) scale(1.12); }
}

#chip-scene {
  perspective: 1200px;
  width: 280px;
  height: 280px;
  position: relative;
  will-change: transform;
}

#chip-flipper {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  position: relative;
  will-change: transform;
}

.chip-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 50%;
  overflow: hidden;
}

.chip-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  user-select: none;
  -webkit-user-select: none;
}

.chip-back { transform: rotateY(180deg); }

/* dark overlay that fades in over the scaling chip during the zoom phase */
#zoom-overlay {
  position: fixed;
  inset: 0;
  background: #08080f;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  display: none;
}

#scroll-hint {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.15em;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.3s;
}

/* ═══════════════════════════════════════════════════════════
   NAV
═══════════════════════════════════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 60px;
  background: rgba(8,8,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}
.nav-logo {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.5px;
}
.nav-logo .dot { color: var(--blue); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--dark);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 20px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,255,255,0.12); }
.nav-cta-icon { display: none; }

/* ═══════════════════════════════════════════════════════════
   BUTTONS (shared)
═══════════════════════════════════════════════════════════ */
.cta-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 28px;
  padding: 14px 28px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-primary {
  background: #fff;
  color: var(--dark);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(42,122,255,0.35); }
.btn-secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.4);
  cursor: default;
}
.apple-logo { margin-top: -2px; }

/* final-CTA variants — primary pops bright white against the dark section */
.btn-primary-dark {
  background: #fff;
  color: var(--dark);
}
.btn-secondary-dark {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.35);
}

/* ═══════════════════════════════════════════════════════════
   EYEBROWS + HEADINGS
═══════════════════════════════════════════════════════════ */
.eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}
.eyebrow-blue { color: var(--blue); }

/* ═══════════════════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════════════════ */
.hero {
  background: var(--dark);
  padding: 140px 24px 100px;
  text-align: center;
}
.hero-inner { max-width: 1000px; margin: 0 auto; }

.hero h1 {
  font-size: 80px;
  letter-spacing: -3px;
  line-height: 1.0;
  color: #fff;
}
.hero h1 .blue { color: var(--blue); }

.hero-sub {
  font-size: 18px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  max-width: 480px;
  margin: 24px auto 0;
}

/* Hero phones */
.hero-phones {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  margin-top: 64px;
}
.phone {
  border-radius: 36px;
  border: 2px solid rgba(255,255,255,0.12);
  overflow: hidden;
  background: #0d0d14;
  flex-shrink: 0;
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.phone-centre {
  width: 280px;
  height: 540px;
  position: relative;
  z-index: 2;
  box-shadow: 0 40px 120px rgba(42,122,255,0.2);
}
.phone-side {
  width: 220px;
  height: 430px;
  z-index: 1;
}
.phone-left  { transform: rotate(-4deg); transform-origin: bottom right; }
.phone-right { transform: rotate(4deg);  transform-origin: bottom left; }

/* Carousel wrapper is transparent on desktop (phones stay direct flex items
   of .hero-phones); dots are mobile-only. Both are activated in the @media block. */
#phone-carousel { display: contents; }
#carousel-dots { display: none; }

/* ═══════════════════════════════════════════════════════════
   SECTION SHELLS
═══════════════════════════════════════════════════════════ */
.section-inner { max-width: 1000px; margin: 0 auto; text-align: center; }

.how-works { background: var(--dark); padding: 100px 24px; }
.final-cta { background: var(--dark); padding: 100px 24px; }

.how-works h2,
.final-cta h2 {
  font-size: 48px;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1.05;
}

/* HOW IT WORKS */
.steps {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 56px;
  text-align: left;
}
.step {
  flex: 1;
  max-width: 280px;
  background: #111118;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 32px;
  transition: box-shadow 0.2s ease;
}
.step:hover { box-shadow: 0 0 0 1px rgba(42,122,255,0.15); }
.step-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 12px;
}
.step-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}
.step-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
}

/* STATS STRIP */
.stats-strip { background: var(--dark); padding: 80px 24px; }
.stats-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
}
.stat {
  flex: 1;
  text-align: center;
  background: #111118;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 40px 32px;
}
.stat-num {
  display: block;
  font-size: 72px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -3px;
  line-height: 1.0;
}
.stat-dollar { font-size: 40px; }
.stat-unit {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}
.stat-desc {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  margin-top: 8px;
}

/* dark-strip pills */
.pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.pill {
  border-radius: 100px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
}

/* DARK STRIP */
.dark-strip {
  background: #0d0d16;
  padding: 100px 24px;
}
.dark-quote {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  color: #fff;
}
.dark-quote .blue { color: var(--blue); }
.pills-dark { margin-top: 36px; }
.pill-dark {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.pill-dark:hover {
  background: rgba(42,122,255,0.1);
  border-color: rgba(42,122,255,0.3);
}

/* FINAL CTA */
.final-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.55);
  margin-top: 16px;
}
.footer-line {
  font-size: 13px;
  color: rgba(255,255,255,0.2);
  margin-top: 60px;
}

/* ═══════════════════════════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
═══════════════════════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.stagger .reveal:nth-child(1) { transition-delay: 0s; }
.stagger .reveal:nth-child(2) { transition-delay: 0.1s; }
.stagger .reveal:nth-child(3) { transition-delay: 0.2s; }

.stats-stagger .reveal:nth-child(1) { transition-delay: 0s; }
.stats-stagger .reveal:nth-child(2) { transition-delay: 0.15s; }
.stats-stagger .reveal:nth-child(3) { transition-delay: 0.3s; }

/* ═══════════════════════════════════════════════════════════
   MOBILE
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  nav { padding: 0 20px; }

  .hero { padding: 110px 20px 72px; }
  .hero h1 { font-size: 52px; letter-spacing: -2px; }
  .hero-sub { font-size: 16px; }

  /* hero phones become a swipeable carousel */
  .hero-phones { flex-direction: column; align-items: center; gap: 0; margin-top: 48px; }

  #phone-carousel {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 16px;
    padding: 0 24px;
    width: 100%;
  }
  #phone-carousel::-webkit-scrollbar { display: none; }

  #phone-carousel .phone {
    scroll-snap-align: center;
    flex-shrink: 0;
    width: 75vw;
    max-width: 260px;
    height: auto;
    aspect-ratio: 280 / 540;
    transform: none;           /* all phones flat — no rotation */
  }

  #carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
  }
  .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    transition: background 0.2s, transform 0.2s;
  }
  .dot.active {
    background: #2a7aff;
    transform: scale(1.3);
  }

  .how-works, .final-cta, .dark-strip { padding: 72px 20px; }
  .stats-strip { padding: 64px 20px; }
  .how-works h2, .final-cta h2 { font-size: 34px; letter-spacing: -1px; }

  .steps { flex-direction: column; align-items: center; gap: 40px; text-align: center; }
  .step { max-width: 320px; }

  .stats-inner { flex-direction: column; gap: 16px; }

  .dark-quote { font-size: 28px; letter-spacing: -1px; }

  /* intro chip scales down on mobile */
  #chip-scene { width: 200px; height: 200px; }
}

@media (max-width: 420px) {
  .nav-cta { padding: 9px 12px; }
  .nav-cta-text { display: none; }
  .nav-cta-icon { display: block; }
}
