/* ==========================================================================
   NEXORA — Responsive Breakpoints & Accessibility
   Ensuring flawless experience across mobile, tablet, desktop, and ultra-wide.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Large Screen & Ultra-wide Adjustments (min-width: 1600px)
   -------------------------------------------------------------------------- */
@media (min-width: 1600px) {
  :root {
    --container-max: 1480px;
    --container-wide: 1720px;
  }
}

/* --------------------------------------------------------------------------
   Tablet & Medium Desktops (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .dashboard-content-area {
    grid-template-columns: 1fr;
  }

  .workflow-grid {
    flex-direction: column;
    gap: 20px;
  }

  .workflow-connector {
    width: 2px;
    height: 24px;
    margin: 0 auto;
  }

  .workflow-connector::after {
    top: 0;
    left: -3px;
    animation: dataTravelV 2s infinite linear;
  }

  @keyframes dataTravelV {
    0% { top: 0%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
  }
}

/* --------------------------------------------------------------------------
   Mobile & Small Tablet (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  /* Disable Custom Cursor on Touch */
  #custom-cursor,
  #custom-cursor-dot {
    display: none !important;
  }

  body {
    cursor: auto !important;
  }

  a, button, input, select, textarea {
    cursor: auto !important;
  }

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

  /* Header & Mobile Menu */
  .site-header {
    height: 72px;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    height: calc(100vh - 72px);
    background: rgba(3, 5, 10, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: flex-start;
    padding: 36px 24px;
    gap: 20px;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease-out-expo);
    overflow-y: auto;
  }

  .nav-links.mobile-active {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.25rem;
    width: 100%;
  }

  .mobile-toggle {
    display: block;
  }

  .header-actions .btn-primary {
    display: none;
  }

  /* Hero Section Mobile */
  .hero-orb-wrapper {
    max-width: 320px;
  }

  /* Chatbot Drawer Mobile */
  .chatbot-panel {
    bottom: 84px;
    right: 12px;
    width: calc(100vw - 24px);
    height: calc(100vh - 100px);
  }

  /* Multi-Step Planner Mobile */
  .planner-stepper {
    margin-bottom: 24px;
  }

  .planner-step-node {
    width: 32px;
    height: 32px;
    font-size: 0.78rem;
  }

  /* Footer Mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* Dashboard KPI Mobile */
  .dash-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Small Mobile Devices (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .btn {
    width: 100%;
    padding: 12px 20px;
  }

  .header-actions {
    gap: 8px;
  }

  .brand-logo {
    font-size: 1.3rem;
  }
}

/* --------------------------------------------------------------------------
   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;
  }

  .marquee-track {
    animation: none !important;
    overflow-x: auto;
  }

  .perspective-grid-plane {
    animation: none !important;
  }

  .scanline-box::after {
    display: none !important;
  }
}
