/* ─── MOBILE PHASE 1 — COMPRESSION ────────────────────────────
   Target: 390px viewport  ·  25–40% scroll depth reduction
   Rules:
     • Animate only transform + opacity
     • prefers-reduced-motion disables all transitions
     • No layout thrashing — reads before writes in JS
     • Desktop layout UNTOUCHED (all rules ≤ 620px)
──────────────────────────────────────────────────────────────── */

/* ═══════════════════════════════════════════════════════════════
   REDUCED MOTION — must be first, broadest override
══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal-item         { opacity: 1 !important; transform: none !important; }
  .step-counter        { display: none !important; }
  .cp-wwh-scroll-mask  { display: none !important; }
}


/* ═══════════════════════════════════════════════════════════════
   HERO — fit within ~1.2 viewport heights on mobile
══════════════════════════════════════════════════════════════ */
@media (max-width: 620px) {
  .hero { min-height: 0; }

  .hero-inner {
    padding: 36px 20px 48px;
    gap: 0;
  }

  .hero-left h1 {
    font-size: clamp(30px, 8.5vw, 42px);
    margin-bottom: 0;
  }

  .hero-gold-rule { margin: 12px 0 14px; }

  .hero-sub {
    font-size: 16px;
    margin-bottom: 16px;
    max-width: 100%;
  }

  .hero-cta {
    padding: 13px 26px;
    font-size: 16px;
    margin-bottom: 8px;
  }

  .hero-phone-cta {
    font-size: 13.5px;
    margin-bottom: 14px;
  }

  .hero-trust-bar {
    font-size: 12px;
    gap: 2px 5px;
    margin-bottom: 0;
  }

  /* Separators add visual noise when wrapped — hide them on mobile */
  .hero-trust-sep { display: none; }

  /* "Powered by Elavon, a U.S. Bank company" is too long to wrap cleanly */
  .hero-trust-bar span:nth-child(5) { display: none; }

  /* Redundant value prop below trust bar */
  .hero-value-frame { display: none; }
}


/* ═══════════════════════════════════════════════════════════════
   WHO WE HELP — horizontal snap scroll on mobile
══════════════════════════════════════════════════════════════ */
@media (max-width: 620px) {
  .cp-wwh {
    padding: 40px 0;
  }

  .cp-wwh-header {
    padding: 0 20px;
    margin-bottom: 24px;
  }

  .cp-wwh-panel {
    border-left: none;
    border-right: none;
    border-radius: 0;
  }

  .cp-wwh-panel-bar { padding: 10px 20px; }

  /* Horizontal snap scroll track */
  .cp-wwh-grid {
    display: flex !important;
    grid-template-columns: unset !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 16px 20px 20px;
    gap: 12px;
    /* Right-edge fade hints at more content */
    -webkit-mask-image: linear-gradient(to right, black 75%, transparent 100%);
    mask-image: linear-gradient(to right, black 75%, transparent 100%);
    transition: -webkit-mask-image 0.3s ease, mask-image 0.3s ease;
  }
  .cp-wwh-grid::-webkit-scrollbar { display: none; }

  /* Remove mask after first scroll (via JS adding .cp-wwh-scrolled) */
  .cp-wwh-grid.cp-wwh-scrolled {
    -webkit-mask-image: none;
    mask-image: none;
  }

  /* Card: compact — icon-like seq + title + 1 sentence only */
  .cp-wwh-card {
    scroll-snap-align: start;
    min-width: 76vw;
    max-width: 290px;
    flex-shrink: 0;
    padding: 20px 18px 18px;
    border-right: none !important;
    border-bottom: none !important;
    border: 1px solid rgba(244, 230, 211, 0.09);
    border-radius: 4px;
    margin: 0;
  }

  /* Show only the header (seq + type) and pain point (1 sentence) */
  .cp-wwh-rule   { display: none; }
  .cp-wwh-detail { display: none; }

  .cp-wwh-problem { margin-bottom: 0; flex: unset; }

  .cp-wwh-panel-footer {
    padding: 12px 20px;
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ═══════════════════════════════════════════════════════════════
   HOW IT WORKS — compact vertical timeline
══════════════════════════════════════════════════════════════ */
@media (max-width: 620px) {
  .how-it-works { padding: 40px 20px; }

  .how-inner { gap: 24px; }

  /* Reduce text block — remove decorative padding */
  .how-text .section-sub    { margin-bottom: 0; }
  .section-urgency          { margin-top: 8px; }
  .steps-cta                { display: none; } /* duplicate of steps-bottom-cta */

  /* ── Vertical timeline ── */
  .steps-row {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    position: relative;
  }

  /* Connecting vertical line through num centers */
  .steps-row::after {
    content: '';
    position: absolute;
    /* left = center of .step-num (52px wide, sitting at col 0) */
    left: 25px;
    top: 26px;
    bottom: 26px;
    width: 1px;
    background: linear-gradient(
      to bottom,
      rgba(199, 146, 58, 0.55),
      rgba(199, 146, 58, 0.10)
    );
    pointer-events: none;
  }

  /* Two-column item: [52px num] [text] */
  .step-item {
    display: grid !important;
    grid-template-columns: 52px 1fr;
    grid-template-rows: auto auto;
    align-items: start;
    text-align: left;
    padding: 0 0 24px;
    gap: 0 16px;
    position: relative;
  }
  .step-item:last-child { padding-bottom: 0; }

  .step-num {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
    margin-bottom: 0;
    /* sit above the connecting line */
    position: relative;
    z-index: 1;
    background: var(--bg-3);
  }

  .step-title {
    grid-column: 2;
    grid-row: 1;
    padding-top: 14px;
    font-size: 16px;
    margin-bottom: 5px;
  }

  .step-desc {
    grid-column: 2;
    grid-row: 2;
    font-size: 14px;
    line-height: 1.6;
  }

  /* Bottom CTA — keep just one */
  .steps-bottom-cta {
    margin-top: 20px;
    padding-top: 20px;
    align-items: flex-start;
  }
  .steps-bottom-cta-btn { font-size: 15px; padding: 12px 24px; }
}

/* ── Progressive reveal for step items (class added by JS) ── */
.reveal-item {
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity  0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-item:nth-child(2) { transition-delay: 70ms; }
.reveal-item:nth-child(3) { transition-delay: 140ms; }

.reveal-item.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Sticky step counter (shown via JS) ── */
.step-counter {
  display: none;
  position: fixed;
  bottom: 22px;
  right: 16px;
  background: var(--charcoal);
  color: var(--text-on-dark);
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 20px;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity   0.3s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.step-counter.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ═══════════════════════════════════════════════════════════════
   PRICING — compact on mobile (tab panel already correct)
══════════════════════════════════════════════════════════════ */
@media (max-width: 620px) {
  .cp-pricing { padding: 40px 0; }

  .cp-section-header {
    padding: 0 20px;
    margin-bottom: 20px;
  }

  .cp-rate-bar {
    border-radius: 0;
    padding: 12px 20px;
    gap: 10px;
  }

  .cp-setup-pills { padding: 0 4px; min-height: 44px; }
  .cp-setup-pill  { min-height: 44px; padding: 12px 14px; }

  .cp-setup-panel {
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .cp-pricing-footnote {
    padding: 10px 20px;
    font-size: 12px;
    text-align: left;
  }
}


/* ═══════════════════════════════════════════════════════════════
   FAQ — show only top 4, "see all" link visible
══════════════════════════════════════════════════════════════ */

/* Hidden everywhere by default; shown only on mobile */
.cp-faq-see-all { display: none; }

@media (max-width: 620px) {
  .cp-faq {
    padding: 40px 20px;
  }

  .cp-faq-header { margin-bottom: 20px; }

  /* Questions 5–8 hidden on homepage mobile */
  .cp-faq-extra { display: none; }

  /* "See all questions →" link */
  .cp-faq-see-all {
    display: block;
    margin-top: 22px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.1px;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .cp-faq-see-all:hover { color: var(--gold-lt); }
}


/* ═══════════════════════════════════════════════════════════════
   ABOUT — 2 sentences on mobile, "Our story →" link
══════════════════════════════════════════════════════════════ */

/* Story link: hidden on desktop */
.cp-about-story-link { display: none; }

@media (max-width: 620px) {
  .cp-about { padding: 36px 20px; }

  /* Hide paragraphs 2 and 3 */
  .cp-about-body-extra { display: none; }

  .cp-about-cta {
    margin-top: 20px;
    padding: 13px 24px;
    font-size: 15px;
  }

  /* "Our story →" link */
  .cp-about-story-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.18s;
  }
  .cp-about-story-link:hover { color: var(--gold-lt); }
}


/* ═══════════════════════════════════════════════════════════════
   GENERAL SECTION COMPRESSION — remove padding bloat on mobile
══════════════════════════════════════════════════════════════ */
@media (max-width: 620px) {
  /* Savings proof */
  .cp-savings-proof { padding: 40px 20px; }
  .cp-savings-proof-header { margin-bottom: 20px; }
  .cp-proof-grid { gap: 12px; margin-bottom: 0; }

  /* Audit */
  .cp-audit { padding: 40px 20px; }
  .cp-audit-header { margin-bottom: 20px; }

  /* Features */
  .features { padding: 40px 20px; }
  .features-inner { gap: 28px; }

  /* Markets */
  .cp-markets { padding: 32px 20px; }
  .cp-markets-header { margin-bottom: 20px; }
  .cp-location-pill { padding: 14px 18px; }
  .cp-location-name { font-size: 17px; }
}
