/* ==========================================================================
   DBAnchor Responsive Stylesheet & Media Queries
   Breakpoints: 320px, 375px, 430px, 768px, 1024px, 1440px, 1920px
   ========================================================================== */

/* Large Desktop (1440px+) */
@media (min-width: 1440px) {
  :root {
    --container-max: 1320px;
  }
  
  .hero-title {
    font-size: 4rem;
  }
}

/* Standard Laptop / Desktop (max-width: 1200px) */
@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1.5fr repeat(4, 1fr);
    gap: 2rem;
  }
  
  .docs-layout {
    gap: 2rem;
  }
}

/* Tablet Landscape & Small Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .hero-content {
    align-items: center;
    text-align: center;
  }
  
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }

  .nav-links {
    display: none;
  }
  
  .nav-actions .nav-install-badge {
    display: none;
  }
  
  .mobile-nav-toggle {
    display: flex;
  }

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

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

  .dx-comparison-grid {
    grid-template-columns: 1fr;
  }

  .quickstart-steps {
    grid-template-columns: 1fr;
  }

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

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
    margin-bottom: 2rem;
  }

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

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

/* Tablet Portrait (max-width: 768px) */
@media (max-width: 768px) {
  .section {
    padding: 3.5rem 0;
  }
  
  .hero-section {
    padding-top: 2.5rem;
    padding-bottom: 3.5rem;
  }

  .hero-title {
    font-size: 2.35rem;
  }

  .hero-subline {
    font-size: 1.05rem;
  }

  .hero-description {
    font-size: 0.98rem;
  }

  .cards-grid-3, .cards-grid-2 {
    grid-template-columns: 1fr;
  }

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

  .card {
    padding: 1.5rem;
  }

  .arch-modules-grid {
    grid-template-columns: 1fr;
  }

  .terminal-key-val {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .cli-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .cli-search-box {
    width: 100%;
  }

  .cli-tags-group {
    justify-content: flex-start;
  }

  .oss-banner {
    padding: 2.5rem 1.25rem;
  }

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

  .back-to-top {
    left: 1rem;
    bottom: 1rem;
    width: 38px;
    height: 38px;
  }

  .toast-container {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .toast {
    width: 100%;
    justify-content: center;
  }
}

/* Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn, 
  .hero-actions .hero-quick-pip {
    width: 100%;
    justify-content: center;
  }

  .btn {
    width: 100%;
  }

  .hero-quick-pip {
    justify-content: space-between;
  }

  .terminal-body {
    padding: 1rem 0.85rem;
    font-size: 0.78rem;
  }

  .risk-table th, .risk-table td {
    padding: 0.75rem 0.85rem;
    font-size: 0.82rem;
  }

  .brand-lockup {
    font-size: 1.1rem;
  }

  .brand-logo-img {
    width: 28px;
    height: 28px;
  }

  .arch-diagram-wrap {
    padding: 1.5rem 0.85rem;
  }

  .oss-actions .btn {
    width: 100%;
  }
}

/* Small Screens / Compact Mobile (320px - 375px) */
@media (max-width: 375px) {
  .hero-title {
    font-size: 1.75rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .trust-item {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
  }
}

/* Accessibility: Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .status-pulse-dot {
    animation: none !important;
  }
}

/* Print Styles */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  
  .site-header, .site-footer, .back-to-top, .toast-container, .mobile-nav-drawer {
    display: none !important;
  }
  
  .card, .terminal-window, .code-box {
    border: 1px solid #ccc;
    background: #fff;
    color: #000;
  }
}
