/**
 * ==============================================================================
 * VELNORA — Premium SaaS & AI Startup HTML Website Template
 * Stylesheet: responsive.css (Viewport Breakpoints & Media Adaptations)
 * Breakpoints Tested: 320px, 375px, 430px, 768px, 1024px, 1440px, 1920px
 * ==============================================================================
 */

/* -----------------------------------------------------------------------------
 * 1. LARGE DESKTOP & HIGH RESOLUTION (1440px to 1920px+)
 * ----------------------------------------------------------------------------- */
@media (min-width: 1440px) {
  :root {
    --container-max: 1280px;
  }

  .mockup-container {
    max-width: 1180px;
  }
}

@media (min-width: 1920px) {
  :root {
    --container-max: 1360px;
  }

  body {
    font-size: 1.0625rem; /* 17px base for ultra-wide screens */
  }
}

/* -----------------------------------------------------------------------------
 * 2. DESKTOP & LAPTOP (1024px to 1279px)
 * ----------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .mockup-body {
    grid-template-columns: 200px 1fr 240px;
  }

  .bento-grid {
    gap: var(--space-4);
  }
}

@media (max-width: 1024px) {
  /* Navigation switch to mobile pattern */
  .site-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .header-actions .btn-primary {
    display: none; /* Hide primary trial button in header to conserve space; available in drawer */
  }

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

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

  /* Bento adjustments */
  .col-span-8, .col-span-7, .col-span-5, .col-span-4 {
    grid-column: span 12;
  }

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

  .footer-brand {
    grid-column: span 3;
    margin-bottom: var(--space-4);
  }

  /* Mockup stacked layout */
  .mockup-body {
    grid-template-columns: 1fr;
  }

  .mockup-sidebar {
    display: none; /* Hidden on tablet to focus on live workflow & telemetry */
  }

  .mockup-inspector {
    border-left: none;
    border-top: 1px solid var(--color-surface-dark-border);
    flex-direction: row;
    flex-wrap: wrap;
  }

  .telemetry-card {
    flex: 1;
    min-width: 140px;
  }
}

/* -----------------------------------------------------------------------------
 * 3. TABLET DEVICES (768px to 1023px)
 * ----------------------------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --space-16: 3rem;
    --space-20: 3.75rem;
    --space-24: 4.5rem;
    --space-32: 5rem;
  }

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

  .section-header {
    margin-bottom: var(--space-10);
  }

  /* Typography downscaling for tablets */
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.85rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }

  /* Collapse 2-column grids */
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .hero-metrics-strip {
    flex-direction: column;
    gap: var(--space-3);
  }

  .mockup-node-grid {
    grid-template-columns: 1fr;
  }

  .brands-grid {
    gap: var(--space-6);
  }

  .brand-item {
    font-size: var(--text-sm);
  }

  /* Pricing Cards */
  .pricing-card.featured {
    order: -1; /* Emphasize featured tier at the top on single-column */
  }

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

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

  .footer-bottom-links {
    flex-wrap: wrap;
    gap: var(--space-4);
  }

  .cta-box {
    padding: var(--space-10) var(--space-6);
  }
}

/* -----------------------------------------------------------------------------
 * 4. MOBILE SCREENS (375px to 430px: iPhone 13/14/15/16, Pixel, Galaxy)
 * ----------------------------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --container-pad: 1.15rem;
  }

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

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

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

  .cta-box .cta-actions .btn {
    width: 100%;
  }

  .mockup-addressbar {
    max-width: 200px;
    font-size: var(--text-2xs);
  }

  .mockup-status-badge {
    display: none;
  }

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

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

  .workflow-step {
    grid-template-columns: 44px 1fr;
    gap: var(--space-4);
  }

  .workflow-step:not(:last-child)::after {
    left: 21px;
    top: 48px;
  }

  .step-number {
    width: 44px;
    height: 44px;
    font-size: var(--text-base);
  }

  .price-amount {
    font-size: 2.75rem;
  }
}

/* -----------------------------------------------------------------------------
 * 5. ULTRA-COMPACT MOBILE (320px: iPhone SE 1st gen, small handsets)
 * ----------------------------------------------------------------------------- */
@media (max-width: 360px) {
  :root {
    --container-pad: 0.85rem;
  }

  .site-logo {
    font-size: 1.1rem;
  }

  .site-logo .logo-icon {
    width: 26px;
    height: 26px;
  }

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

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

  .card {
    padding: var(--space-5);
  }

  .pricing-card {
    padding: var(--space-5);
  }

  .mockup-topbar {
    padding: 0.5rem 0.75rem;
  }

  .mockup-controls {
    display: none; /* Hide macOS window dots on tight 320px screens */
  }

  .mockup-addressbar {
    max-width: 100%;
  }
}

/* -----------------------------------------------------------------------------
 * 6. ACCESSIBILITY: 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;
  }

  .reveal-item {
    opacity: 1 !important;
    transform: none !important;
  }

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

/* -----------------------------------------------------------------------------
 * 7. PRINT MEDIA STYLES
 * ----------------------------------------------------------------------------- */
@media print {
  .site-header,
  .announcement-bar,
  .site-footer,
  .btn,
  .nav-toggle,
  .mobile-nav-drawer,
  .cta-box {
    display: none !important;
  }

  body {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 12pt;
  }

  .card, .pricing-card {
    border: 1px solid #CCC !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }
}
