/* ============================================================
   Shared responsive overrides for QuizCrunch.
   The site is styled with inline styles, so every rule here
   uses !important to win over them at mobile widths.
   Hooks: qc-* classes added in the page markup, plus the
   data-* attributes the components already carry.
   ============================================================ */

/* ---------- Tablet and below: stack the two-column layouts ---------- */
@media (max-width: 960px) {
  .qc-grid-2 { grid-template-columns: 1fr !important; }
  .qc-contact-grid { grid-template-columns: 1fr !important; }
  .qc-founder-grid { grid-template-columns: 1fr !important; gap: 40px !important; }

  /* Home hero: single column, floating cards become in-flow */
  .qc-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    padding-top: 56px !important;
    padding-bottom: 64px !important;
  }
  .qc-hero-copy { padding-left: 0 !important; }
  .qc-hero-copy > div:last-of-type { flex-wrap: wrap !important; row-gap: 12px; }
  .qc-hero-stage { min-height: 0 !important; }
  .qc-hero-side { display: none !important; }
  [data-hero-card="check"] { position: static !important; width: 100% !important; }
  [data-hero-card="team"] {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    margin-top: 16px;
  }
}

/* ---------- Phones ---------- */
@media (max-width: 768px) {
  body { overflow-x: clip; }

  /* Typography: shrink the display headings */
  h1 { font-size: clamp(34px, 9.5vw, 44px) !important; line-height: 1.12 !important; }
  .qc-h2 { font-size: clamp(27px, 7.5vw, 34px) !important; line-height: 1.18 !important; }
  .qc-h3 { font-size: 26px !important; }

  /* Nav: logo + CTA on the first row, links wrap onto a second row */
  .qc-nav {
    height: auto !important;
    flex-wrap: wrap !important;
    padding: 10px 20px !important;
  }
  .qc-nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 18px !important;
    padding: 8px 0 4px;
  }

  /* Card grids */
  .qc-grid-3 { grid-template-columns: 1fr !important; }
  .qc-grid-4 { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
  .qc-footer-grid { grid-template-columns: 1fr 1fr !important; gap: 30px !important; }

  .qc-cta-strip { padding: 36px 22px !important; }
  .qc-card { padding: 28px 20px !important; }
  .qc-form-row { grid-template-columns: 1fr !important; }

  /* ProcessFlow steps: tighter number-column gutter */
  [data-step] { gap: 16px !important; }

  /* Dashboard hover popovers are desktop-only affordances; stop their
     fixed min-width from adding hidden horizontal scroll on phones */
  [data-cat-pop] { min-width: 0 !important; }

  /* ProcessFlow upload scene: let the generated-question pills wrap
     instead of clipping at the right edge */
  [data-scene="0"] div { white-space: normal !important; }
}

/* ---------- Small phones ---------- */
@media (max-width: 480px) {
  .qc-footer-grid { grid-template-columns: 1fr !important; }
  .qc-nav-cta a { padding: 8px 14px !important; font-size: 13px !important; }
}
