/* ==========================================================================
   Launchpad Technology — Responsive Layer
   ========================================================================== */

/* ---------- Tablet (<=1024px) ---------- */
@media (max-width: 1024px) {
  :root { --space-2xl: 6rem; }

  .nav-links { gap: 1.4rem; }
  .nav-link span { font-size: 0.85rem; }

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

  .showcase-scene { grid-template-columns: 1fr; }
  .scene-copy { order: 1; text-align: center; }
  .scene-copy p { margin-inline: auto; }
  .scene-photo { margin-inline: auto; }
  .scene-steps { justify-content: center; }
  .device-mock { order: 2; }

  .flow-diagram { grid-template-columns: repeat(2, 1fr); }

  .bento-grid { grid-template-columns: repeat(2, 1fr); }
  .bento-lg { grid-column: span 2; }

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

  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-brand { grid-column: span 3; margin-bottom: 1rem; }

  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-wide { grid-column: span 2; }
}

/* ---------- Mobile nav (<=880px) ---------- */
@media (max-width: 880px) {
  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 101;
  }

  .nav-links {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(320px, 80vw);
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-subtle);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.75rem;
    padding: 2rem 2.5rem;
    transform: translateX(100%);
    transition: transform var(--dur-base) var(--ease-premium);
    z-index: 99;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-link { font-size: 1.05rem; }

  .nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.is-active span:nth-child(2) { opacity: 0; }
  .nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-right .btn-primary { display: none; }

  .nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: border-color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-premium);
  }
  .nav-close svg { width: 18px; height: 18px; }
  .nav-close:hover { border-color: var(--accent-cyan); transform: rotate(90deg); }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(7,17,31,0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-base) var(--ease-premium);
    z-index: 97;
  }
  .nav-backdrop.is-open { opacity: 1; pointer-events: auto; }
}

/* ---------- Small tablet / large mobile (<=768px) ---------- */
@media (max-width: 768px) {
  :root { --space-2xl: 4.5rem; --space-xl: 3.5rem; }
  .container { padding: 0 1.25rem; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1.5rem; }

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

  .showcase-panel { padding: 1.75rem; }
  .showcase-tabs { gap: 0.4rem; }
  .showcase-tab { padding: 0.55rem 0.9rem; font-size: 0.78rem; }
  .tab-label { display: none; }

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

  .flow-diagram { grid-template-columns: 1fr; gap: 2.5rem 1rem; }

  .bento-grid { grid-template-columns: 1fr; grid-auto-rows: 190px; }
  .bento-lg, .bento-card { grid-column: span 1; }

  .timeline { grid-template-columns: 1fr; row-gap: 1.75rem; }
  .timeline-line {
    top: 0;
    bottom: 0;
    left: 12px;
    right: auto;
    width: 2px;
    height: auto;
    transform: none;
  }
  .timeline-line-fill { width: 100%; height: var(--fill-pct, 0%); transition: height 1s var(--ease-premium); }
  .timeline-step { flex-direction: row; align-items: center; text-align: left; gap: 0.85rem; }
  .tl-num { flex-shrink: 0; }

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

  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: span 2; }

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

  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }

  .cta-actions { flex-direction: column; align-items: stretch; }
  .cta-actions .btn { justify-content: center; }
}

/* ---------- Mobile (<=520px) ---------- */
@media (max-width: 520px) {
  .hero-title { font-size: clamp(2rem, 9vw, 2.6rem); }
  .hero-trust { display: none; }

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

  .dash-grid { grid-template-columns: 1fr; }
  .dash-wide { grid-column: span 1; }

  .phone-mock .device-frame { width: 100%; max-width: 260px; }

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

  .trade-actions { flex-wrap: wrap; }
  .portfolio-val { margin-left: 0; text-align: left; width: 100%; }
}

/* Respect reduced motion at all breakpoints already handled in animations.css */
