/* Mobile-only layout fixes. Desktop rules unchanged above 768px. */
@media (max-width: 768px) {
  html,
  body {
    overflow-x: clip;
  }

  .container {
    width: min(100% - 1.5rem, var(--max));
  }

  .nav-inner {
    gap: 0.75rem;
    min-width: 0;
  }

  .site-header .logo-img {
    max-width: 132px;
    height: auto;
  }

  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
    padding-inline: 0;
  }

  .hero h1 {
    max-width: none !important;
    text-wrap: balance;
  }

  .hero .lede {
    max-width: none;
  }

  .hero .cta-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .hero .cta-row .btn {
    width: 100%;
    justify-content: center;
  }

  .clientele {
    max-width: 100%;
    overflow: hidden;
  }

  .clientele-marquee {
    max-width: 100%;
    overflow: hidden;
  }

  .clientele-track {
    max-width: none;
  }

  .platform-layers,
  .problem-grid,
  .how-rail,
  .metric-wall,
  .trust-strip,
  .quote-band {
    grid-template-columns: 1fr !important;
  }

  .how-rail::before {
    display: none;
  }

  .impact-bar-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
  }

  .impact-bar .btn {
    width: 100%;
    justify-content: center;
  }

  body.has-impact-bar {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }

  .page-hero-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem;
  }

  .page-hero:not(.page-hero--center) .page-hero-grid > div:first-child {
    max-width: 100%;
    align-items: stretch;
  }

  .page-hero:not(.page-hero--center) .page-hero-grid > div:first-child h1,
  .page-hero:not(.page-hero--center) .page-hero-grid > div:first-child .h1,
  .page-hero:not(.page-hero--center) .page-hero-grid > div:first-child .h-display.h1 {
    max-width: none !important;
  }

  .page-hero .cta-row,
  .page-hero .cta-paths {
    flex-direction: column;
    align-items: stretch !important;
    width: 100%;
  }

  .page-hero .cta-row .btn,
  .page-hero .cta-paths .btn {
    width: 100%;
    justify-content: center;
  }

  .insight-strip {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .insight-pill {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 8.5rem;
  }

  .workflow-steps,
  .persona-row,
  .persona-row-6,
  .feature-groups,
  .cap-grid,
  .metrics-grid {
    grid-template-columns: 1fr !important;
  }

  .ucl-evidence,
  .ocr-demo {
    max-width: 100%;
    padding-inline: 0;
  }

  .ucl-dash-img,
  .ocr-demo-video {
    width: 100%;
    max-width: 100%;
    height: auto;
  }

  .ucl-dash-img:not(.te-dash) {
    max-height: none;
    object-fit: contain;
  }

  .ucl-dash-img.te-dash {
    max-height: min(42vh, 320px);
    object-fit: contain;
  }

  .ocr-demo-frame,
  .ff-reimagined,
  .ff-tabs {
    max-width: 100%;
  }

  .ocr-demo-steps {
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }

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

@media (max-width: 480px) {
  .insight-pill {
    flex: 1 1 100%;
  }

  .ocr-demo-steps {
    grid-template-columns: 1fr;
  }
}
