/* Connectmind — shared mobile/tablet responsive overrides */

/* --- Site header (≤899px matches JS mobile nav breakpoint) --- */
@media (max-width: 899px) {
  .cm-site-header {
    gap: 10px !important;
    padding-left: clamp(12px, 4vw, 20px) !important;
    padding-right: clamp(12px, 4vw, 20px) !important;
  }

  .cm-site-header > a img {
    height: 36px !important;
  }

  .cm-header-actions {
    gap: 8px !important;
  }

  .cm-header-actions .cm-login-btn {
    height: 38px !important;
    padding: 0 14px !important;
    font-size: 12px !important;
  }
}

@media (max-width: 380px) {
  .cm-site-header > a img {
    height: 32px !important;
  }

  .cm-header-actions .cm-login-btn {
    padding: 0 11px !important;
    letter-spacing: 0.02em !important;
  }
}

/* --- Index hero content box --- */
.cm-hero-content {
  box-sizing: content-box !important;
  max-width: clamp(600px, 52vw, 720px) !important;
}

@media (max-width: 640px) {
  .cm-hero-content {
    max-width: 100% !important;
    padding-top: 96px !important;
    padding-bottom: 72px !important;
  }
}

/* --- Compare: FROM → TO table --- */
@media (max-width: 640px) {
  .cm-fromto-head {
    display: none !important;
  }

  .cm-fromto-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    align-items: start !important;
  }

  .cm-fromto-row .cm-fromto-arrow {
    display: none !important;
  }

  .cm-fromto-row .cm-fromto-to {
    text-align: left !important;
    padding-top: 10px !important;
    border-top: 1px dashed rgba(196, 172, 252, 0.18) !important;
  }

  .cm-fromto-row .cm-fromto-to::before {
    content: "→ ";
    color: #a683fa;
    font-weight: 300;
  }
}

/* --- Compare: horizontal matrix scroll hint --- */
.cm-matrix-scroll-wrap {
  position: relative;
}

.cm-scroll-hint {
  display: none;
  margin: 0 0 10px;
  font: 400 11px "Inter", sans-serif;
  letter-spacing: 0.08em;
  color: #7c7699;
}

@media (max-width: 899px) {
  .cm-scroll-hint {
    display: block;
  }

  .cm-matrix-scroll-wrap::after {
    content: "";
    position: sticky;
    right: 0;
    float: right;
    width: 40px;
    height: 100%;
    margin-top: -100%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(10, 3, 34, 0.92));
  }
}

/* --- FAQ accordion column span --- */
.cm-faq-list {
  grid-column: 1 / -1 !important;
}

@media (min-width: 720px) {
  #faq .cm-faq-list {
    grid-column: 2 / -1 !important;
  }
}

/* --- About: founder cards --- */
@media (max-width: 560px) {
  .cm-founder-card {
    grid-template-columns: 1fr !important;
  }

  .cm-founder-card > div:first-child {
    max-width: 220px;
  }
}

/* --- Use-cases: animation viz labels --- */
@media (max-width: 480px) {
  .cm-usecase-viz [style*="white-space:nowrap"] {
    white-space: normal !important;
    text-align: center !important;
    max-width: min(44vw, 140px) !important;
    line-height: 1.25 !important;
  }

  .cm-usecase-viz [style*="animation:cm-tag"] {
    white-space: normal !important;
    text-align: center !important;
    max-width: min(88vw, 260px) !important;
  }
}

/* --- Compact footer link rows --- */
@media (max-width: 480px) {
  .cm-compact-footer .cm-footer-links {
    gap: 10px 14px !important;
    font-size: 12px !important;
  }

  .cm-compact-footer {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
}

/* --- Contact form submit row --- */
@media (max-width: 480px) {
  .cm-contact-submit-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .cm-contact-submit-row > div {
    max-width: none !important;
  }

  .cm-contact-submit-row button {
    width: 100% !important;
    justify-content: center !important;
  }
}

/* --- Compare: WHERE IT FITS rows on narrow screens --- */
@media (max-width: 480px) {
  .cm-fits-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}
