/* ============================================================
   CyberSpaceMedia LLC — Responsive Styles
   Breakpoints: 320 / 480 / 768 / 1024 / 1280 / 1440
   ============================================================ */

/* Large monitors */
@media (min-width: 1440px) {
  :root {
    --container: 1200px;
    --container-wide: 1360px;
  }
}

/* Laptop / small desktop */
@media (max-width: 1280px) {
  .process-track {
    grid-template-columns: repeat(3, 1fr);
  }
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento__item--lg { grid-column: span 2; grid-row: span 1; }
}

/* Tablet landscape / small laptop */
@media (max-width: 1024px) {
  .nav-desktop { display: none; }
  .header-actions .btn--secondary { display: none; }
  .menu-toggle { display: flex; }
  .nav-mobile { display: block; }

  .home-hero__grid,
  .page-hero__grid,
  .split,
  .split--reverse > *:first-child {
    grid-template-columns: 1fr;
    order: unset;
  }
  .split--reverse > *:first-child { order: unset; }

  .home-hero {
    padding: 3rem 0 3.5rem;
  }
  .home-hero h1 { max-width: none; }
  .home-hero__panel { max-width: 520px; }
  .hero-board__footer { grid-template-columns: 1fr; }
  .hero-board__footer > div:first-child { border-right: none; border-bottom: 1px solid var(--color-border); }

  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  .pricing-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid .pricing-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    max-width: 420px;
    justify-self: center;
    width: 100%;
  }

  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }

  .case-detail-meta { grid-template-columns: repeat(2, 1fr); }

  .tech-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet portrait */
@media (max-width: 768px) {
  :root {
    --header-h: 68px;
    --header-h-compact: 60px;
  }

  .section { padding: var(--space-16) 0; }
  .section--tight { padding: var(--space-12) 0; }

  .container { padding: 0 var(--space-5); }

  .home-hero__brand { font-size: 1.25rem; }
  .home-hero__pills { margin-top: var(--space-6); padding-top: var(--space-5); }
  .hero-board__row { grid-template-columns: 1fr; }

  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5 {
    grid-template-columns: 1fr;
  }

  .process-track { grid-template-columns: 1fr 1fr; }

  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-grid .pricing-card:last-child:nth-child(odd) {
    max-width: none;
  }

  .form-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; text-align: center; }

  .bento { grid-template-columns: 1fr; }
  .bento__item--lg,
  .bento__item--wide { grid-column: span 1; }

  .tech-grid { grid-template-columns: 1fr; }

  .solution-row {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
  .solution-row__num { font-size: var(--fs-xl); }

  .cloud-row { grid-template-columns: 1fr; }

  .why-item { grid-template-columns: 36px 1fr; gap: var(--space-4); }

  .contact-layout { grid-template-columns: 1fr !important; }

  .page-hero { padding: var(--space-8) 0 var(--space-12); }
  .home-hero { padding: var(--space-10) 0 var(--space-14); }

  .cookie-banner {
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
  }

  .diagram-h {
    flex-direction: column;
    align-items: stretch;
  }
  .diagram-h-arrow {
    justify-content: center;
    transform: rotate(90deg);
  }
}

/* Large phone */
@media (max-width: 480px) {
  .btn-group { flex-direction: column; align-items: stretch; }
  .btn-group .btn { width: 100%; }

  .process-track { grid-template-columns: 1fr; }

  .header-actions .btn--primary {
    padding: 0.55rem 0.9rem;
    font-size: var(--fs-xs);
  }

  .logo__text { font-size: var(--fs-sm); }

  .case-detail-meta { grid-template-columns: 1fr; }

  .faq-categories { gap: var(--space-2); }
  .faq-cat-btn { font-size: var(--fs-xs); padding: 0.4rem 0.75rem; }

  .cookie-banner {
    left: var(--space-3);
    right: var(--space-3);
    bottom: var(--space-3);
    padding: var(--space-5);
  }
  .cookie-banner__actions .btn {
    font-size: 0.7rem;
    padding: 0.45rem 0.4rem;
  }
  .cookie-banner__actions .btn__icon {
    width: 0.85em;
    height: 0.85em;
  }
}

/* Small phone */
@media (max-width: 360px) {
  .container { padding: 0 var(--space-4); }
  h1 { font-size: 1.75rem; }

  .cookie-banner__actions {
    flex-wrap: wrap;
  }
  .cookie-banner__actions .btn {
    flex: 1 1 calc(50% - 0.25rem);
  }
  .cookie-banner__actions .btn:last-child {
    flex: 1 1 100%;
  }
}

/* Contact page two-column helper */
.contact-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: var(--space-10);
  align-items: start;
}

@media (max-width: 1024px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* Print */
@media print {
  .site-header,
  .site-footer,
  .cookie-banner,
  .cookie-modal,
  .menu-toggle,
  .btn { display: none !important; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
}
