/* =====================================================================
   ADROAS — css/responsive.css
   All responsive breakpoints and reduced-motion overrides.
   MUST load last — overrides all other stylesheets.
   ===================================================================== */


/* ─────────────────────────────────────────────────────────────────────
   11. RESPONSIVE
   ───────────────────────────────────────────────────────────────────── */

/* 1280px — laptop */
@media (max-width: 1280px) {
  .hero-inner { padding-top: calc(var(--header-h) + 6.5rem); }
}

/* 1024px — tablet landscape */
@media (max-width: 1024px) {
  :root { --pad-x: clamp(1.5rem, 6vw, 4.5rem); }
  .site-nav      { gap: 1.75rem; }
  .header-inner  { gap: 1.75rem; }
  .hero-inner    { padding-top: calc(var(--header-h) + 5.5rem); }
  .features-grid { gap: 1.5rem; }
}

/* 992px — wide tablet */
@media (max-width: 992px) {
  .preview-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .preview-text {
    text-align: center;
  }

  .flow-chips {
    justify-content: center;
  }

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

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

/* 768px — tablet portrait: mobile nav */
@media (max-width: 768px) {
  :root { --header-h: 76px; --pad-x: 1.5rem; }

  .header-actions { display: none; }
  .hero-bg-video { display: none; }

  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(248, 246, 239, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(24, 38, 58, 0.08);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 12px 24px rgba(24, 38, 58, 0.08);
    display: none;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    z-index: 90;
    transform: none;
    transition: none;
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav .nav-link--home {
    display: none !important;
  }
  .nav-link {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy);
    text-align: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(24, 38, 58, 0.05);
    opacity: 0.9;
    width: 100%;
    display: block;
    transition: color 0.15s ease;
  }
  .nav-link:hover {
    color: var(--blue);
  }
  .nav-link:last-child {
    border-bottom: none;
  }
  .nav-toggle {
    display: flex;
    margin-left: 0;
  }
  
  .mobile-nav-actions {
    display: flex !important;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
  }
  
  .mobile-home-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(24, 38, 58, 0.08);
    background: rgba(255, 255, 255, 0.60);
    color: var(--navy);
    transition: background-color 0.2s ease, border-color 0.2s ease;
  }
  .mobile-home-link:hover {
    background: #ffffff;
    border-color: rgba(24, 38, 58, 0.16);
  }
  .mobile-home-icon {
    width: 20px;
    height: 20px;
    color: var(--navy);
  }
  
  .site-nav .mobile-only-cta {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: var(--navy) !important;
    color: #ffffff !important;
    border-radius: 10px;
    padding: 0.85rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    border-bottom: none;
    text-align: center;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(24, 38, 58, 0.15);
    opacity: 1 !important;
    width: auto;
  }
  .site-nav .mobile-only-cta:hover {
    background: var(--blue) !important;
  }

  .hero-inner { padding-top: calc(var(--header-h) + 4.25rem); }
  .br-md { display: none; }

  /* Reduce background intensity on mobile */
  .hbg-veils {
    -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.40) 32%, rgba(0,0,0,1) 70%);
    mask-image:         linear-gradient(90deg, rgba(0,0,0,0.04) 0%, rgba(0,0,0,0.40) 32%, rgba(0,0,0,1) 70%);
  }
  .hbg-mesh {
    -webkit-mask-image: linear-gradient(90deg, transparent 24%, rgba(0,0,0,0.45) 50%, rgba(0,0,0,1) 80%);
    mask-image:         linear-gradient(90deg, transparent 24%, rgba(0,0,0,0.45) 50%, rgba(0,0,0,1) 80%);
  }
  .hbg-nodes {
    -webkit-mask-image: linear-gradient(90deg, transparent 38%, rgba(0,0,0,0.55) 58%, rgba(0,0,0,1) 82%);
    mask-image:         linear-gradient(90deg, transparent 38%, rgba(0,0,0,0.55) 58%, rgba(0,0,0,1) 82%);
  }
  /* Soften halftone fields on small screens */
  .hbg-texture-a { opacity: 0.26; }
  .hbg-texture-b { opacity: 0.42; }
  .hbg-cloud-a,
  .hbg-cloud-b,
  .hbg-cloud-c { opacity: 0.84; }
  .hbg-grain { opacity: 0.05; }

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

  /* Section layout */
  .section {
    padding-block: clamp(3rem, 6vw, 4.5rem);
    padding-inline: var(--pad-x);
  }
  .problem-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .problem-left {
    text-align: center;
  }
  .problem-left .section-title {
    text-align: center;
  }
  .problem-left .section-desc {
    text-align: center;
  }
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .flagship-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .phase-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .category-meta {
    grid-template-columns: 1fr !important;
  }
  .faq-question {
    padding: 1.1rem 1.25rem !important;
    font-size: 0.98rem !important;
  }
  /* Compact footer section styles under 768px */
  .site-footer {
    padding: 2.5rem var(--pad-x) 1.5rem !important;
  }
  .footer-container {
    flex-direction: column;
    gap: 1.5rem !important;
  }
  .footer-nav {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
    width: 100%;
  }
  .footer-brand {
    max-width: 100% !important;
    text-align: center;
  }
  .site-footer .wordmark--footer {
    justify-content: center;
    margin-bottom: 0.5rem !important;
  }
  .site-footer .brand-symbol {
    height: 26px !important;
  }
  .site-footer .brand-wm-text {
    font-size: 0.8rem !important;
  }
  .footer-tagline {
    font-size: 0.82rem !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }
  .footer-col {
    gap: 0.5rem !important;
    text-align: center;
  }
  .footer-col-title {
    font-size: 0.76rem !important;
    margin-bottom: 0.25rem !important;
  }
  .footer-link {
    font-size: 0.82rem !important;
  }
  .footer-bottom {
    padding-top: 1rem !important;
    justify-content: center !important;
    text-align: center;
  }
  .footer-copy {
    font-size: 0.76rem !important;
  }

  /* Chat widget — icon-only on mobile */
  .help-widget {
    bottom: 16px;
    right: 16px;
  }

  .help-widget-launcher-text {
    display: none;
  }

  .help-widget-launcher {
    padding: 0.85rem;
    border-radius: 50%;
  }

  .help-widget-panel {
    width: calc(100vw - 32px);
    right: 0;
    max-height: 480px;
    height: calc(100vh - 100px);
  }
}

/* 580px — small mobile */
@media (max-width: 580px) {
  .timeline {
    padding-left: 0;
  }
  .timeline::before {
    display: none;
  }
  .timeline-badge {
    position: relative;
    left: 0;
    top: 0;
    margin-bottom: 0.75rem;
  }

  .dashboard-card {
    padding: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .stat-item {
    padding: 1rem;
  }

  .preview-table th,
  .preview-table td {
    padding: 0.75rem 0.88rem;
  }
}

/* 480px — mobile */
@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .btn--primary, .btn--secondary { justify-content: center; width: 100%; }
  .process-strip { gap: 0.3rem 0.5rem; }
  .process-item  { font-size: 0.76rem; white-space: normal; }

  /* Typography scale adjustments for narrow viewports */
  .hero .headline,
  .hero--compact .headline {
    font-size: clamp(2rem, 8vw, 2.5rem) !important;
    line-height: 1.1 !important;
  }

  .hero .subhead,
  .hero--compact .subhead {
    font-size: 1.05rem !important;
    line-height: 1.4 !important;
  }

  /* Compact example workflows layout on phone viewports */
  .example-row {
    padding: 0.75rem 1rem !important;
    gap: 0.5rem !important;
    font-size: 0.88rem !important;
  }

  .workflow-step-arrow {
    font-size: 0.82rem !important;
  }

  /* Reduce section padding slightly more on phone viewports */
  .section {
    padding-block: 2.5rem !important;
  }

  /* Chat widget adjustments for very small viewports */
  .help-widget-panel {
    width: calc(100vw - 24px) !important;
    right: -4px !important;
    max-height: 440px !important;
  }

  /* Prevent wordmark title overlap if any */
  .brand-wm-text {
    font-size: 0.8rem !important;
    letter-spacing: 0.08em !important;
  }
}


/* ─────────────────────────────────────────────────────────────────────
   12. REDUCED MOTION
   ───────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero-bg-video { display: none; }
  .btn--primary, .btn--secondary,
  .btn--hdr-ghost, .btn--hdr-dark,
  .nav-link, .nav-toggle__bar,
  .site-nav { transition: none; }
}

