/* ============================================================
   responsive.css — Smootix Landing
   Mobile-first media queries

   Breakpoints:
     ≤1100px  — narrow desktop / iPad landscape
     ≤900px   — iPad (all generations, portrait)
     ≤768px   — large phones / old iPads
     ≤480px   — typical phones (iPhone 6 → iPhone 17)
     ≤360px   — small phones (iPhone 5s / SE 1st gen, 320px viewport)
   ============================================================ */

/* ─── Hamburger button (hidden on wide screens) ──────────── */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 10px;
  transition: background var(--transition);
  flex-shrink: 0;
}

.nav__burger:hover  { background: var(--color-bg-alt); }
.nav__burger:focus  { outline: 2px solid var(--color-primary); outline-offset: 2px; }

.nav__burger-line {
  width: 22px;
  height: 2px;
  background: var(--color-brown);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease, background var(--transition);
  transform-origin: center;
  display: block;
}

/* Burger → X */
.nav.is-open .nav__burger-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav__burger-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav.is-open .nav__burger-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── ≤1100px  Narrow desktop / iPad landscape ───────────── */
@media (max-width: 1100px) {

  .container { max-width: 960px; }

  .hero-title { font-size: 46px; }

  .hero-mockup { width: 248px; }

  .hero__inner { gap: 48px; }

  .grid-2 { gap: 48px; }

  .cta-title { font-size: 36px; }

  .sec-title { font-size: 30px; }
}

/* ─── ≤900px  iPad (all gen, portrait) ──────────────────── */
@media (max-width: 900px) {

  /* Nav becomes hamburger */
  .nav__burger { display: flex; }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 0.5px solid var(--color-border);
    padding: 8px 0 16px;
    box-shadow: 0 10px 28px rgba(71, 60, 51, 0.1);
    z-index: 99;
  }

  .nav.is-open .nav__links { display: flex; }

  .nav__link {
    padding: 14px 28px;
    font-size: 15px;
    border-bottom: 0.5px solid var(--color-border-light);
    color: var(--color-brown);
  }

  .nav__link:last-of-type { border-bottom: none; }

  .nav__cta {
    margin: 12px 28px 0;
    border-radius: var(--radius-btn);
    text-align: center;
    padding: 12px 24px;
    font-size: 14px;
    display: block;
  }

  /* Hero */
  .hero { padding: 64px 0 56px; min-height: auto; }

  .hero__inner {
    flex-direction: column;
    gap: 44px;
    align-items: flex-start;
  }

  .hero__content { max-width: 100%; }

  .hero-title { font-size: 42px; }

  .hero-sub { font-size: 15px; max-width: 100%; }

  /* Hero mockup becomes full-width row */
  .hero-mockup {
    width: 100%;
    max-width: 440px;
    /* disable float animation on touch — saves battery */
    animation: none;
  }

  .hero-stats { grid-template-columns: 1fr 1fr; }

  /* Stats bar */
  .stats-bar { padding: 40px 0; }

  .stats-bar__inner { gap: 20px 32px; flex-wrap: wrap; }

  .stat-divider { display: none; }

  .stat-item__value { font-size: 26px; }

  /* Sections */
  .section { padding: 72px 0; }

  .section__header { margin-bottom: 40px; }

  /* Grids → 1 column */
  .grid-3 { grid-template-columns: 1fr; }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Steps → vertical list */
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .step-item {
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 20px;
  }

  /* Remove horizontal connectors */
  .step-item::before,
  .step-item::after { display: none; }

  .step-num { margin: 0; flex-shrink: 0; }

  /* Featured pricing card floats to top */
  .price-card--featured { order: -1; }

  /* CTA */
  .cta-section { padding: 80px 0; }
  .cta-title { font-size: 32px; }

  /* Footer */
  .footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
  }

  .footer-links { flex-wrap: wrap; justify-content: center; }
}

/* ─── ≤768px  Large phones / old iPad Mini ───────────────── */
@media (max-width: 768px) {

  .container { padding: 0 22px; }

  .hero { padding: 56px 0 48px; }

  .hero-title { font-size: 38px; }

  .hero-tag { animation: none; } /* stop pulse on slow devices */

  .sec-title { font-size: 28px; }

  .cta-title { font-size: 28px; }

  .inline-screen { padding: 16px; }

  /* Pricing: 2-up on this size */
  .grid-3.pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Reviews: still 1 column, already set */
}

/* ─── ≤480px  Standard phones (iPhone 6 → current) ──────── */
@media (max-width: 480px) {

  .container { padding: 0 16px; }

  /* Hero */
  .hero { padding: 48px 0 40px; }

  .hero-title { font-size: 32px; letter-spacing: -0.035em; }

  .hero-sub { font-size: 14px; line-height: 1.65; }

  .hero-btns {
    flex-direction: column;
    gap: 10px;
  }

  .hero-btns .btn {
    width: 100%;
    justify-content: center;
  }

  /* Stats bar → 2×2 grid */
  .stats-bar__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
    justify-items: center;
  }

  /* Sections */
  .section { padding: 56px 0; }

  .section__header { margin-bottom: 32px; }

  .sec-title { font-size: 26px; }

  .sec-label { font-size: 10.5px; }

  /* Pricing → 1 column again */
  .grid-3.pricing-grid {
    grid-template-columns: 1fr;
  }

  /* CTA */
  .cta-section { padding: 64px 0; }

  .cta-title { font-size: 26px; }

  .cta-sub { font-size: 13.5px; }

  .cta-btns {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .cta-btns .btn,
  .cta-btns .btn-ghost-dark {
    width: 100%;
    max-width: 320px;
    justify-content: center;
    text-align: center;
    display: flex;
  }

  /* Steps */
  .step-num { width: 38px; height: 38px; font-size: 16px; }

  /* Problem / review cards */
  .problem-card,
  .review-card { padding: 20px; }

  /* Feature rows */
  .feat-icon { width: 40px; height: 40px; font-size: 18px; }

  /* Price cards */
  .price-card { padding: 24px 20px; }

  .price-amount { font-size: 32px; }

  /* FAQ */
  .faq-q { font-size: 14px; }
}

/* ─── ≤360px  Small phones (iPhone 5s / SE 1st gen) ─────── */
@media (max-width: 360px) {

  .container { padding: 0 14px; }

  .logo { font-size: 17px; }

  .nav__burger { width: 36px; height: 36px; }

  .nav__link { padding: 13px 20px; font-size: 14px; }
  .nav__cta  { margin: 10px 20px 0; font-size: 13px; }

  /* Hero */
  .hero { padding: 40px 0 36px; }

  .hero-title { font-size: 28px; }

  .hero-tag { font-size: 11px; padding: 5px 13px; }

  .hero-sub { font-size: 13.5px; }

  /* Hero mockup inner layout */
  .hs-val { font-size: 17px; }

  /* Titles */
  .sec-title  { font-size: 23px; }
  .cta-title  { font-size: 22px; }

  /* Sections */
  .section { padding: 48px 0; }

  /* Pricing */
  .price-amount { font-size: 28px; }
  .price-card { padding: 20px 16px; }

  /* Steps */
  .step-item { gap: 14px; }
  .step-num { width: 34px; height: 34px; font-size: 14px; }

  /* CTA btns */
  .cta-btns .btn,
  .cta-btns .btn-ghost-dark { font-size: 13.5px; padding: 11px 22px; }
}

/* ─── Reduced motion (accessibility) ────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-animate],
  [data-animate-group] > *,
  [data-animate-left],
  [data-animate-right] {
    opacity: 1 !important;
    transform: none !important;
  }
}
