/**
 * NexusForge Theme - Deep Responsive & Cross-Device Stylesheet
 * Engineered for seamless rendering across smartphones, tablets, laptops, and ultra-wide displays
 */

/* ==========================================================================
   LARGE DESKTOPS & ULTRA-WIDE SCREENS (> 1440px)
   ========================================================================== */
@media (min-width: 1441px) {
  .nf-hero-content {
    max-width: 720px;
  }

  .nf-container {
    max-width: 1360px;
  }
}

/* ==========================================================================
   LAPTOPS & MEDIUM DESKTOPS (1025px - 1280px)
   ========================================================================== */
@media (max-width: 1280px) {
  .nf-hero-grid {
    gap: 2.5rem;
  }

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

  .nf-pipeline-stages {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   TABLETS & SMALL LAPTOPS (769px - 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --nf-header-height: 72px;
  }

  .nf-nav-desktop {
    display: none;
  }

  .nf-mobile-toggle {
    display: flex;
  }

  .nf-hero-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    text-align: center;
  }

  .nf-hero-content {
    max-width: 100%;
    margin: 0 auto;
  }

  .nf-hero-badge-wrap {
    display: flex;
    justify-content: center;
  }

  .nf-hero-ctas {
    justify-content: center;
  }

  .nf-hero-meta {
    justify-content: center;
  }

  .nf-hero-visual {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
  }

  .nf-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .nf-banner-inner {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem;
    gap: 2rem;
  }

  .nf-banner-content {
    max-width: 100%;
  }

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

  .nf-floating-card-1 {
    right: 0;
  }

  .nf-floating-card-2 {
    left: 0;
  }
}

/* ==========================================================================
   MOBILE PHONES & PORTRAIT TABLETS (481px - 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .nf-hero {
    padding-top: calc(var(--nf-header-height) + 2rem);
    padding-bottom: 4rem;
  }

  .nf-stats-section,
  .nf-incubation-section,
  .nf-products-section,
  .nf-capabilities-section,
  .nf-blog-section,
  .nf-pitch-banner {
    padding: 4rem 0;
  }

  .nf-section-header {
    margin-bottom: 2.5rem;
  }

  .nf-grid-2 {
    grid-template-columns: 1fr;
  }

  .nf-grid-3 {
    grid-template-columns: 1fr;
  }

  .nf-pipeline-stages {
    grid-template-columns: 1fr;
  }

  .nf-form-row {
    grid-template-columns: 1fr;
  }

  .nf-modal-dialog {
    padding: 1.75rem;
    max-height: 85vh;
  }

  .nf-floating-card-1,
  .nf-floating-card-2 {
    position: static;
    margin-top: 1rem;
    display: inline-flex;
    animation: none;
  }

  .nf-hero-meta {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

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

  .nf-footer-bottom {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
}

/* ==========================================================================
   SMALL SMARTPHONES (320px - 480px)
   ========================================================================== */
@media (max-width: 480px) {
  :root {
    --nf-header-height: 64px;
  }

  .nf-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

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

  .nf-hero-ctas .nf-btn {
    width: 100%;
  }

  .nf-btn {
    width: 100%;
    padding: 0.85rem 1.25rem;
  }

  .nf-hero-actions {
    gap: 0.5rem;
  }

  .nf-header-actions .nf-btn-primary {
    display: none; /* Keep header clean on small phones, available in drawer */
  }

  .nf-stat-card {
    padding: 1.5rem 1rem;
  }

  .nf-card {
    padding: 1.25rem;
  }

  .nf-banner-inner {
    padding: 1.75rem 1.25rem;
  }

  .nf-filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .nf-filter-tabs::-webkit-scrollbar {
    display: none;
  }

  .nf-filter-btn {
    flex-shrink: 0;
  }

  .nf-modal {
    padding: 0.75rem;
    align-items: flex-end; /* Mobile bottom sheet style */
  }

  .nf-modal-dialog {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    padding: 1.5rem 1.25rem;
    max-height: 90vh;
  }

  .nf-newsletter-form {
    flex-direction: column;
  }

  .nf-newsletter-form .nf-btn {
    width: 100%;
  }

  .nf-back-to-top {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 40px;
    height: 40px;
  }
}

/* ==========================================================================
   DEVICE SPECIFIC TOUCH & ACCESSIBILITY ENHANCEMENTS
   ========================================================================== */
@media (hover: none) and (pointer: coarse) {
  /* Enhance hit targets on touchscreens */
  .nf-nav-menu a,
  .nf-drawer-menu a,
  .nf-btn,
  .nf-filter-btn,
  .nf-action-icon-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* Reduced motion preference */
@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;
  }

  .nf-ticker-track {
    animation: none;
  }
}

/* Print Stylesheet */
@media print {
  .nf-site-header,
  .nf-theme-toggle,
  .nf-mobile-toggle,
  .nf-mobile-drawer,
  .nf-drawer-backdrop,
  .nf-modal,
  .nf-back-to-top,
  .nf-hero-ambient-glow,
  .nf-hero-ambient-glow-2 {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .nf-card, .nf-stage-card, .nf-product-card {
    border: 1px solid #cccccc !important;
    page-break-inside: avoid;
  }
}
