/* Balance On Hand marketing site — responsive rules
 * Mobile-first: base styles in styles.css target small screens.
 * Breakpoints:
 *   sm  >= 600px
 *   md  >= 768px
 *   lg  >= 1024px
 */

/* ---------- Mobile menu (default = closed, slides into view when open)
 * Shown up to 1099px so the 7-item desktop nav doesn't wrap on tablets
 * and small laptops. Above 1100px, the inline nav has room to render flat.
 */
@media (max-width: 1099px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px 20px;
    gap: 4px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease, transform 150ms ease;
  }

  .nav[data-open="true"] {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .nav-list a {
    display: block;
    padding: 12px 10px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }

  .nav-cta {
    margin: 8px 0 0;
    width: 100%;
    text-align: center;
  }

  body.menu-open {
    overflow: hidden;
  }
}

/* ---------- Small breakpoint ---------- */
@media (min-width: 600px) {
  .card-grid.is-2,
  .card-grid.is-3,
  .card-grid.is-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Medium breakpoint ---------- */
@media (min-width: 768px) {
  body {
    font-size: 17px;
  }

  h1 {
    font-size: 2.4rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .section {
    padding: 72px 0;
  }

  .hero {
    padding: 96px 0 80px;
  }

  .hero-inner {
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero p.lead {
    font-size: 1.2rem;
  }

  .card-grid.is-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid.is-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .step {
    grid-template-columns: 56px 1fr;
    padding: 22px 26px;
  }

  .step-number {
    width: 48px;
    height: 48px;
    font-size: 1.05rem;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
    gap: 28px;
  }

  .cta-band {
    padding: 56px 40px;
  }

  .cta-band h2 {
    font-size: 2rem;
  }
}

/* ---------- Large breakpoint ---------- */
@media (min-width: 1024px) {
  h1 {
    font-size: 2.6rem;
  }

  .hero h1 {
    font-size: 3.1rem;
  }

  .card-grid.is-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Inline navigation appears here ---------- */
@media (min-width: 1100px) {
  .nav-list a {
    padding: 8px 10px;
    font-size: 0.92rem;
    white-space: nowrap;
  }
}

/* ---------- Extra-large breakpoint ---------- */
@media (min-width: 1200px) {
  .nav-list a {
    padding: 8px 12px;
    font-size: 0.95rem;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
