/* =========================================================================
   SAINTOX — Responsive breakpoints
   Mobile is designed deliberately, not shrunk: stacking order, simplified
   cockpit visual, and full-width CTAs below 560px.
   ========================================================================= */

/* ---- tablet / small laptop (<=980px) -------------------------------------- */
@media (max-width: 980px) {
  :root {
    --text-3xl: 2.75rem;
    --container-pad: clamp(1.25rem, 5vw, 2.5rem);
  }

  .site-nav { display: none; }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }

  .hero__visual { order: -1; }

  .hero__headline, .hero__lead, .hero__trust { max-width: none; }

  .thinks-split { grid-template-columns: 1fr; }

  .pulse-card__cols { grid-template-columns: 1fr 1fr; }

  .cockpit__stats { grid-template-columns: repeat(3, 1fr); }
  .cockpit__stats .cockpit__stat:nth-child(4),
  .cockpit__stats .cockpit__stat:nth-child(5) { grid-column: span 1; }
  .cockpit { padding: var(--space-4); }
  .cockpit__stats, .cockpit__departments { gap: var(--space-2); }
}

/* ---- mobile (<=720px) ------------------------------------------------------ */
@media (max-width: 720px) {
  :root {
    --text-3xl: 2.25rem;
    --text-2xl: 1.9rem;
    --text-xl: 1.5rem;
    --space-9: 4rem;
    --space-8: 3rem;
  }

  .site-header__inner { gap: var(--space-3); padding-block: var(--space-3); }
  .site-header__actions { gap: var(--space-3); }
  .site-header__cta .btn--sm { padding: 0.55rem 0.9rem; }

  .hero { padding-block: var(--space-7); }
  .hero__copy { order: 1; }
  .hero__visual { order: 2; }
  .hero__headline { font-size: var(--text-3xl); }
  .hero__logo { width: min(150px, 42vw); margin-bottom: var(--space-4); }

  .btn-row { flex-direction: column; align-items: stretch; }
  .btn-row .btn { width: 100%; }

  .cockpit__title { display: none; }
  .cockpit__stats { grid-template-columns: repeat(2, 1fr); }
  .cockpit__departments { grid-template-columns: repeat(2, 1fr); }

  .pipeline {
    flex-direction: column;
    align-items: stretch;
  }
  .pipeline__step { text-align: center; }
  .pipeline__arrow { transform: rotate(90deg); align-self: center; }

  .pulse-card__cols { grid-template-columns: 1fr; }
  .pulse-card__head { flex-direction: column; align-items: flex-start; gap: var(--space-2); }

  .contact-cta { flex-direction: column; align-items: stretch; }
  .contact-cta .btn { width: 100%; }
  .contact-email { text-align: center; }

  .site-footer__inner { flex-direction: column; align-items: flex-start; }
  /* `flex: 1 1 20rem` sets a *height* basis once the container direction
     becomes column — reset it here or the tagline leaves a 20rem gap. */
  .site-footer__tagline { flex: 0 0 auto; }
  .site-footer__meta { flex-direction: column; gap: var(--space-2); }
}

/* ---- intentional mobile operations summary (<=560px) --------------------- */
@media (max-width: 560px) {
  .cockpit {
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    will-change: auto;
  }

  .cockpit__label {
    margin-bottom: var(--space-4);
    color: var(--color-text-secondary);
    font-size: var(--text-xs);
    text-align: left;
  }

  .cockpit__chrome,
  .cockpit__footline,
  .cockpit__stat:nth-child(5),
  .cockpit__dept:nth-child(4) { display: none; }

  .cockpit__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
    margin-bottom: var(--space-3);
  }

  .cockpit__stat {
    min-height: 5rem;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-3);
  }

  .cockpit__stat-value { font-size: 1.375rem; }

  .cockpit__stat-label {
    font-size: var(--text-xs);
    line-height: 1.3;
  }

  .cockpit__departments {
    grid-template-columns: 1fr;
    gap: var(--space-2);
    margin-bottom: 0;
  }

  .cockpit__dept {
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 1fr);
    grid-template-areas:
      "icon name"
      "icon status";
    align-items: center;
    column-gap: var(--space-3);
    row-gap: 2px;
    padding: var(--space-3) var(--space-4);
    text-align: left;
  }

  .cockpit__dept svg { grid-area: icon; }

  .cockpit__dept-name {
    grid-area: name;
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    font-weight: 600;
  }

  .cockpit__dept-status {
    display: block;
    grid-area: status;
    color: var(--color-text-tertiary);
    font-size: var(--text-xs);
    line-height: 1.35;
  }
}

/* ---- small mobile (<=420px) ------------------------------------------------ */
@media (max-width: 420px) {
  .cockpit__stats { grid-template-columns: 1fr 1fr; }
  .cockpit__stat-label { font-size: var(--text-xs); }
  .brand__word { font-size: 0.7rem; }
  .brand { gap: var(--space-1); }
  .brand__logo { width: 28px; height: 28px; }
  .site-header__actions { gap: var(--space-2); }
  .site-header__cta .btn--sm { padding-inline: 0.7rem; }
}
