/* ============================================================
   CYBERPUNK DESIGN SYSTEM — responsive.css
   Responsive Layouts
   ============================================================ */

@import './variables.css';

/* ============================================================
   BREAKPOINTS
   - Mobile: < 640px
   - Tablet: 640px - 1024px
   - Desktop: > 1024px
   ============================================================ */

/* ============================================================
   MOBILE FIRST BASE
   ============================================================ */

@media (max-width: 639px) {
  /* Container */
  .container {
    padding-inline: var(--space-4);
  }

  /* Navigation */
  .navbar-inner {
    padding: 0 var(--space-4);
  }

  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(5, 5, 16, 0.98);
    flex-direction: column;
    padding: var(--space-6);
    gap: var(--space-4);
    border-bottom: 1px solid var(--color-border-default);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle {
    display: flex;
  }

  /* Typography */
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }

  /* Grid */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  /* Buttons */
  .btn-lg {
    width: 100%;
  }

  /* Cards */
  .card {
    margin-inline: calc(-1 * var(--space-4));
    border-radius: 0;
  }

  /* Back to top */
  .back-to-top {
    right: var(--space-4);
    bottom: var(--space-4);
  }
}

/* ============================================================
   TABLET
   ============================================================ */

@media (min-width: 640px) and (max-width: 1023px) {
  .container {
    padding-inline: var(--space-6);
  }

  /* Grid */
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   DESKTOP
   ============================================================ */

@media (min-width: 1024px) {
  /* Grid */
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }

  /* Footer */
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

/* ============================================================
   LARGE SCREENS
   ============================================================ */

@media (min-width: 1536px) {
  .container {
    max-width: var(--container-2xl);
  }
}

/* ============================================================
   LANDSCAPE ORIENTATION
   ============================================================ */

@media (max-height: 500px) and (orientation: landscape) {
  .navbar {
    position: absolute;
  }

  .section {
    padding-block: var(--space-12);
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .glitch::before,
  .glitch::after {
    animation: none;
  }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
  .navbar,
  .footer,
  .back-to-top,
  .loading-overlay {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  a {
    color: black;
    text-decoration: underline;
  }

  .card {
    break-inside: avoid;
    border: 1px solid #ccc;
  }
}
