/* ============================================================
   NEXORA · Responsive behavior
   Ordered breakpoints: 1120 → 980 → 760 → 560
   ============================================================ */

/* ---------- 1120px: tighten two-column grids ---------------- */

@media (max-width: 1120px) {
  .audience-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nexora-bar li .label {
    display: none;
  }
}

/* ---------- 980px: single-column narrative ------------------ */

@media (max-width: 980px) {
  /* Navigation */
  .nav-links,
  .nav-cta-desktop {
    display: none;
  }

  .nav-burger {
    display: grid;
  }

  /* Hero */
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .hero-copy {
    text-align: center;
    display: grid;
    justify-items: center;
  }

  .hero .lead {
    margin-inline: auto;
  }

  .hero-stage {
    min-height: 520px;
    max-width: 560px;
    margin-inline: auto;
    width: 100%;
  }

  .float-move {
    left: 0;
  }

  .float-proof {
    right: 0;
  }

  /* Two-column sections stack */
  .pos-grid,
  .identity-grid,
  .rooms-layout,
  .move-grid,
  .ai-grid,
  .capability-grid,
  .faq-layout {
    grid-template-columns: 1fr;
  }

  .faq-side {
    position: static;
  }

  .capability-grid {
    gap: 3rem;
  }

  /* Loop: vertical timeline */
  .loop-steps {
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 460px;
    margin-inline: auto;
  }

  .loop-steps::before {
    top: 34px;
    bottom: 34px;
    left: 34px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, transparent, var(--accent) 15%, var(--accent-2) 85%, transparent);
    border-radius: 0;
  }

  .loop-step {
    grid-template-columns: 68px 1fr;
    justify-items: start;
    text-align: left;
    gap: 1.25rem;
    padding: 1.1rem 0;
  }

  .loop-step p {
    max-width: none;
  }

  .loop-num {
    left: -0.55rem;
    top: 50%;
    transform: translateY(-50%);
  }

  /* Discovery */
  .discovery-results {
    grid-template-columns: 1fr 1fr;
  }

  /* Opportunities */
  .opp-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Ecosystem fork spacing */
  .flow-branch {
    gap: clamp(1.5rem, 8vw, 4rem);
  }
}

/* ---------- 760px ------------------------------------------- */

@media (max-width: 767px) {
  :root {
    --section-pad: clamp(3.5rem, 3rem + 4vw, 5rem);
  }

  .hero {
    padding-top: 8rem;
  }

  .hero-stage {
    min-height: 500px;
    overflow: hidden;
  }

  .float-proof {
    top: 2%;
  }

  .float-move {
    bottom: 8%;
    width: 210px;
  }

  .float-match {
    right: 0;
  }

  .net-svg {
    opacity: 0.55;
  }

  /* Grids collapse fully */
  .discovery-results,
  .opp-grid,
  .rooms-minis,
  .ai-caps,
  .cap-list,
  .audience-grid {
    grid-template-columns: 1fr;
  }

  .claim-vs {
    grid-template-columns: 1fr;
  }

  .claim-vs > .icon {
    display: none;
  }

  /* Unified bar becomes a compact grid */
  .nexora-bar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.2rem 2rem;
    padding-block: 2rem;
  }

  .nexora-bar::before {
    display: none;
  }

  .nexora-bar li {
    flex-direction: row;
  }

  .nexora-bar .icon-tile {
    width: 42px;
    height: 42px;
  }

  /* Frag chain stays six-across: drop the connector, keep an even gap */
  .frag-chain {
    gap: 0.4rem;
  }

  .frag-link {
    display: none;
  }

  .frag-card span {
    display: none;
  }

  /* Identity card columns */
  .id-cols {
    grid-template-columns: 1fr;
  }

  /* Pos module stacks */
  .pos-body {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .pos-evidence {
    width: 100%;
  }

  /* Orbit visual */
  .orbit-stage {
    max-width: 340px;
  }

  .orbit-chip.o1, .orbit-chip.o2, .orbit-chip.o3, .orbit-chip.o4 { --orbit-r: 86px; }
  .orbit-chip.o5, .orbit-chip.o6 { --orbit-r: 128px; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: none;
  }
}

/* ---------- 560px ------------------------------------------- */

@media (max-width: 560px) {
  .hero-actions,
  .move-done-actions {
    width: 100%;
  }

  .hero-actions .btn {
    flex: 1 1 100%;
  }

  .hero-trust {
    flex-direction: column;
    gap: 0.6rem;
  }

  .dash-card {
    width: 100%;
  }

  .dash-stats .kpi-value {
    font-size: 1rem;
  }

  .float-proof { scale: 0.88; transform-origin: top right; }
  .float-move { scale: 0.9; transform-origin: bottom left; }
  .float-match { scale: 0.9; }

  .room-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .room-actions {
    width: 100%;
  }

  .room-actions .btn {
    flex: 1;
  }

  .frag-chain {
    gap: 0.3rem;
  }

  .frag-card {
    padding: 0.7rem 0.3rem;
    border-radius: var(--radius-sm);
  }

  .frag-card b {
    font-size: 0.6rem;
    letter-spacing: -0.01em;
  }

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

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }

  .upgrade-visual {
    gap: 0.5rem;
  }

  .discover-search {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  .modal-card {
    padding: 1.5rem;
  }
}
