/* ==========================================================================
   responsive.css — mobile-first progressive enhancement
   Base styles = mobile (320px+). Everything below is an enhancement.
   ========================================================================== */

/* ---------- 380px+ : comfortable phones ---------- */
@media (min-width: 380px) {
  .hero__actions .btn {
    min-width: 0;
  }
}

/* ---------- 480px+ : large phones ---------- */
@media (min-width: 480px) {
  .grid--2,
  .case-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .case-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-grid {
    gap: 0.6rem;
  }
}

/* ---------- 768px+ : tablets ---------- */
@media (min-width: 768px) {
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .case-facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-step {
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: var(--space-lg);
  }

  .founder {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: start;
  }

  .contact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- 1024px+ : desktop ---------- */
@media (min-width: 1024px) {
  .nav-desktop {
    display: block;
  }

  .header__cta {
    display: inline-flex !important;
  }

  .hamburger {
    display: none;
  }

  .header__inner {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-inline: 1.35rem;
  }

  .nav-desktop {
    justify-self: center;
  }

  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(2.5rem, 5vw, 5rem);
  }

  .hero-stats {
    max-width: 34rem;
  }

  /* Before/After: 3-column with transformation arrow */
  .ba {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: var(--space-lg);
    align-items: center;
  }

  .ba__arrow svg {
    transform: rotate(0deg);
    animation-name: nudge-x;
  }

  @keyframes nudge-x {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(6px); }
  }

  /* Service chapters: alternating layout */
  .chapter {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(3rem, 6vw, 5.5rem);
    align-items: center;
  }

  .chapter--reverse .chapter__body {
    order: 2;
  }

  .chapter--reverse .chapter__visual {
    order: 1;
  }

  /* Case study body: content + sticky results */
  .case-body {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
  }

  .case-body__aside {
    position: sticky;
    top: 7rem;
  }

  .footer__grid {
    grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
    gap: var(--space-2xl);
  }

  .contact-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: start;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .page-hero__inner {
    max-width: 20ch;
  }

  .page-hero__inner {
    max-width: none;
  }
}

/* ---------- 1280px+ ---------- */
@media (min-width: 1280px) {
  .section-head {
    max-width: 52ch;
  }
}

/* ---------- 1440px+ : keep text controlled while frame widens ---------- */
@media (min-width: 1440px) {
  .container--wide {
    width: min(100% - 5rem, var(--container-wide));
  }
}

/* ---------- 1920px+ ---------- */
@media (min-width: 1920px) {
  :root {
    --container-width: 1360px;
    --container-wide: 1520px;
  }
}

/* ---------- Coarse pointers: no custom cursor, no hover reliance ---------- */
@media (pointer: coarse), (hover: none) {
  .cursor-dot,
  .cursor-ring {
    display: none !important;
  }

  .card::after {
    opacity: 1;
  }
}

/* ---------- Short landscape phones ---------- */
@media (max-height: 520px) and (orientation: landscape) {
  .nav-overlay {
    justify-content: flex-start;
    padding-top: 5.5rem;
  }

  .nav-overlay__link {
    font-size: 1.6rem;
  }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .nav-overlay,
  .cta-band,
  .loader,
  .cursor-dot,
  .cursor-ring,
  .scroll-progress {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }
}
