/* ==========================================================================
   RepRecap — Responsive Breakpoints
   Mobile-first override layer.
   Base / desktop styles live in sections.css and components.css.

   Breakpoints
   ─────────────────────────────────────────────────────────────────────────
   Tablet          max-width: 1024px
   Small tablet    max-width: 768px
   Mobile          max-width: 576px
   Very small      max-width: 400px
   ========================================================================== */


/* ==========================================================================
   NAVIGATION
   ========================================================================== */

/* ── Show hamburger + mobile drawer on small tablets and below ── */
@media (max-width: 768px) {

  .nav__inner {
    padding: 0 var(--space-md);
  }

  /* Hide horizontal links and secondary action button */
  .nav__links {
    display: none;
  }

  .nav__actions .btn--primary {
    display: none;
  }

  /* Reveal hamburger button */
  .nav__hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-xs);
    transition: background var(--duration-short) var(--ease-default);
  }

  .nav__hamburger:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  /* Mobile drawer — fullscreen slide-in panel */
  .nav__mobile {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 100vw);
    background: var(--surface-container);
    border-left: 1px solid rgba(38, 38, 38, 0.5);
    z-index: 200;
    display: flex;
    flex-direction: column;
    padding: calc(var(--nav-height) + 24px) 32px 40px;
    gap: 0;
    overflow-y: auto;
    transform: translateX(100%);
  }

  .nav__mobile-link {
    display: block;
    padding: 14px 0;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--on-surface-variant);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: color var(--duration-short) var(--ease-default);
    letter-spacing: var(--ls-snug);
  }

  .nav__mobile-link:hover,
  .nav__mobile-link:focus-visible {
    color: var(--on-surface);
  }

  .nav__mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
  }

  /* Backdrop overlay */
  .nav__overlay {
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }
}

/* ── Ensure desktop elements stay visible above the breakpoint ── */
@media (min-width: 769px) {
  .nav__hamburger {
    display: none !important;
  }

  .nav__mobile {
    display: none !important;
  }

  .nav__overlay {
    display: none !important;
  }
}


/* ==========================================================================
   HERO
   ========================================================================== */

/* ── Tablet: two-column but tighter ── */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

/* ── Small tablet / large mobile: single column ── */
@media (max-width: 768px) {
  .hero {
    padding-top: calc(var(--nav-height) + 32px);
    padding-bottom: 64px;
    min-height: auto;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
    align-items: center;
  }

  .hero__content {
    max-width: 100%;
  }

  .hero__subtitle {
    max-width: 100%;
    margin-inline: auto;
  }

  .hero__cta {
    justify-content: center;
  }

  .hero__social-proof {
    justify-content: center;
  }

  /* Phone mockup moves above the headline on mobile */
  .hero__visual {
    order: -1;
  }

  .hero__title {
    font-size: clamp(2.25rem, 10vw, 3rem);
  }
}

/* ── Mobile: stack CTA buttons and social proof vertically ── */
@media (max-width: 576px) {
  .hero__cta {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero__cta .btn {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .hero__social-proof {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .proof-divider {
    width: 40px;
    height: 1px;
  }
}


/* ==========================================================================
   TRUST BAR
   ========================================================================== */

@media (max-width: 768px) {
  .trust-bar .container {
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
  }

  .trust-bar__logos {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .trust-bar__label {
    flex-shrink: 0;
  }
}

@media (max-width: 576px) {
  .trust-bar__logos {
    gap: 16px;
  }
}


/* ==========================================================================
   FEATURES GRID
   ========================================================================== */

/* ── Tablet: 2-column grid ── */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Mobile: single column ── */
@media (max-width: 576px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    padding: var(--space-lg);
  }
}


/* ==========================================================================
   HOW IT WORKS
   ========================================================================== */

@media (max-width: 768px) {
  .steps {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .step {
    width: 100%;
    max-width: 400px;
    text-align: center;
  }

  /* Vertical connector between steps */
  .step__connector {
    width: 2px;
    height: 32px;
    background: linear-gradient(
      to bottom,
      rgba(0, 122, 255, 0.3),
      rgba(0, 122, 255, 0.1)
    );
    align-self: center;
    margin: 0;
    flex-shrink: 0;
  }
}

@media (max-width: 576px) {
  .step__number {
    margin-inline: auto;
  }

  .step__title {
    font-size: 1rem;
  }
}


/* ==========================================================================
   SHOWCASE
   ========================================================================== */

/* ── Tablet: collapse to single column, text below phone ── */
@media (max-width: 1024px) {
  .showcase__inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .showcase__phone {
    order: -1;
    display: flex;
    justify-content: center;
  }

  .showcase__list {
    align-items: center;
  }

  .showcase__list li {
    justify-content: center;
  }

  /* Reuse section-header alignment */
  .showcase .section-header {
    text-align: center;
  }
}

/* ── Mobile: hide floating callout bubbles to reduce clutter ── */
@media (max-width: 768px) {
  .callout--1,
  .callout--2 {
    display: none;
  }
}

@media (max-width: 576px) {
  .showcase__inner {
    gap: 32px;
  }
}


/* ==========================================================================
   DIFFERENTIATORS
   ========================================================================== */

/* ── Tablet: 2-column with middle card spanning full row ── */
@media (max-width: 1024px) {
  .diff-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .diff-card:nth-child(2) {
    grid-column: 1 / -1;
    max-width: 480px;
    margin-inline: auto;
    width: 100%;
  }
}

/* ── Mobile: single column, reset middle-card overrides ── */
@media (max-width: 576px) {
  .diff-grid {
    grid-template-columns: 1fr;
  }

  .diff-card:nth-child(2) {
    grid-column: auto;
    max-width: none;
    margin-inline: 0;
  }
}


/* ==========================================================================
   PRICING
   ========================================================================== */

/* ── Tablet and below: stack cards, feature card first ── */
@media (max-width: 1024px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  /* Remove the "lifted" transform on the featured card when stacked */
  .pricing-card--featured {
    transform: none;
    order: -1;
  }

  .pricing-card--featured:hover {
    transform: translateY(-4px);
  }
}

@media (max-width: 576px) {
  .pricing-grid {
    max-width: 100%;
  }

  .pricing-card {
    padding: var(--space-lg);
  }
}


/* ==========================================================================
   FAQ
   ========================================================================== */

@media (max-width: 768px) {
  .faq__inner {
    max-width: 100%;
  }

  .faq-question {
    font-size: 0.9375rem;
    padding: 18px 20px;
  }

  .faq-answer {
    padding: 0 20px 16px;
  }
}

@media (max-width: 576px) {
  .faq-question {
    font-size: 0.875rem;
    padding: 16px;
    line-height: var(--lh-snug);
  }

  .faq-answer {
    padding: 0 16px 16px;
    font-size: var(--text-sm);
  }
}


/* ==========================================================================
   FINAL CTA
   ========================================================================== */

@media (max-width: 768px) {
  .cta-final__inner {
    text-align: center;
    padding: 64px var(--space-lg);
  }
}

@media (max-width: 576px) {
  .cta-final__badges {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}


/* ==========================================================================
   FOOTER
   ========================================================================== */

/* ── Tablet: 2-column, brand row spans full width ── */
@media (max-width: 1024px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer__brand {
    grid-column: 1 / -1;
  }
}

/* ── Small tablet: tighter padding and bottom bar stacks ── */
@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    padding-block: 40px 32px;
    gap: 32px;
  }

  .footer__bottom .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
}

/* ── Mobile: true single column ── */
@media (max-width: 576px) {
  .footer__inner {
    grid-template-columns: 1fr;
  }

  .footer__brand {
    grid-column: auto;
  }

  .footer__col-title {
    margin-bottom: var(--space-sm);
  }
}


/* ==========================================================================
   GENERAL SECTION PADDING
   ========================================================================== */

@media (max-width: 768px) {
  .section {
    padding-block: 80px;
  }

  .section--sm {
    padding-block: 56px;
  }

  .section--lg {
    padding-block: 96px;
  }

  .section-header {
    margin-bottom: 48px;
  }
}

@media (max-width: 576px) {
  .section {
    padding-block: 64px;
  }

  .section--sm {
    padding-block: 48px;
  }

  .section--lg {
    padding-block: 80px;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-title {
    font-size: clamp(1.625rem, 8vw, 2.25rem);
  }

  .section-subtitle {
    font-size: var(--text-body);
  }

  /* Reduce container side gutters slightly on very small screens */
  .container {
    padding-inline: var(--space-md);
  }
}


/* ==========================================================================
   PHONE MOCKUP — Sizes on mobile
   ========================================================================== */

@media (max-width: 576px) {
  .phone-mockup--hero .phone-mockup__frame {
    width: 220px;
    height: 460px;
  }

  .phone-mockup--large .phone-mockup__frame {
    width: 240px;
    height: 500px;
  }

  /* Scale down notch proportionally */
  .phone-mockup--hero .phone-mockup__notch,
  .phone-mockup--large .phone-mockup__notch {
    width: 80px;
    height: 24px;
  }

  /* Tighten glow radius */
  .phone-mockup--hero .phone-mockup__glow,
  .phone-mockup--large .phone-mockup__glow {
    width: 140px;
    height: 56px;
  }
}


/* ==========================================================================
   VERY SMALL SCREENS  (max-width: 400px)
   ========================================================================== */

@media (max-width: 400px) {
  /* Single-column buttons go truly full-width */
  .hero__cta .btn {
    max-width: 100%;
  }

  /* Prevent typography from going too large */
  .hero__title {
    font-size: clamp(2rem, 12vw, 2.5rem);
  }

  .section-title {
    font-size: clamp(1.5rem, 9vw, 2rem);
  }

  /* Reduce section padding a touch more */
  .section {
    padding-block: 56px;
  }

  /* Pricing card: reduce internal spacing */
  .pricing-card {
    padding: var(--space-md);
  }

  /* Feature card: reduce internal spacing */
  .feature-card {
    padding: var(--space-md);
  }

  /* Store badges fit side by side still */
  .store-badge img {
    height: 44px;
  }

  /* Footer columns tighten */
  .footer__inner {
    gap: 24px;
  }
}


/* ==========================================================================
   TYPOGRAPHY SCALE — Fluid overrides at breakpoints
   ========================================================================== */

/* Allow hero to shrink gracefully between 768–1024 */
@media (max-width: 1024px) {
  .hero__title {
    font-size: clamp(2.5rem, 7vw, 3.5rem);
  }
}

/* Section eyebrow — slightly smaller on mobile */
@media (max-width: 576px) {
  .section-eyebrow {
    font-size: 0.6875rem;
    letter-spacing: 0.4px;
  }
}


/* ==========================================================================
   COMPONENT OVERRIDES AT BREAKPOINTS
   ========================================================================== */

/* ── Pill and badge — reduce padding on mobile ── */
@media (max-width: 576px) {
  .pill {
    padding: 5px 12px;
    font-size: 0.6875rem;
  }

  .badge {
    padding: 2px 8px;
    font-size: 0.625rem;
  }
}

/* ── Buttons — slightly shorter padding on mobile ── */
@media (max-width: 576px) {
  .btn--primary,
  .btn--secondary {
    padding: 13px 24px;
  }

  .btn--sm {
    padding: 9px 18px;
    font-size: 0.8125rem;
  }
}


/* ==========================================================================
   ACCESSIBILITY — Touch targets on mobile
   ========================================================================== */

@media (max-width: 768px) {
  /* Ensure all interactive elements meet 44px minimum touch target */
  .btn {
    min-height: 44px;
  }

  .nav__mobile-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .faq-question {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .store-badge {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
