/* Mobile is deliberately isolated so the settled desktop composition stays exact. */
@media (max-width: 767px) {
  :root { --rail: 100%; }
  html, body { width: 100%; min-width: 0 !important; overflow-x: clip; }
  body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .site, .landing-main, .page-rail, .rail, .final-rail { width: 100%; max-width: 100%; margin: 0; border-left: 0; border-right: 0; }
  .section { overflow: hidden; }

  .public-site-header { height: calc(60px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .public-site-header__rail { width: 100%; height: 60px; padding: 0 20px; grid-template-columns: 1fr auto; }
  .public-site-header__nav { display: none; }
  .public-site-header__actions { grid-column: 2; width: auto; }
  .public-site-header__cta { min-height: 36px; padding-inline: 14px; }

  .hero { width: 100%; height: auto; min-height: 0; margin: 0; display: flex; flex-direction: column; }
  .hero::after { display: none; }
  .hero__copy { height: auto; padding: 64px 24px 48px; gap: 40px; }
  .hero__content, .hero__description, .hero__divider, .hero__proof { width: 100%; }
  .hero__eyebrow { margin-bottom: 18px; font-size: 11px; white-space: normal; }
  .hero h1 { max-width: 360px; font-size: clamp(39px, 11vw, 48px); line-height: 1.02; letter-spacing: -1.7px; }
  .hero__description { margin-top: 20px; font-size: 16px; }
  .hero__actions { width: 100%; margin-top: 28px; }
  .hero-email-intake { display: grid; grid-template-columns: minmax(0,1fr) auto; }
  .hero-email-intake input,.hero__actions .button { min-height: 44px; }
  .hero-email-intake input { width: 100%; }
  .hero-email-intake__error { top: 48px; }
  .hero__speedrun, .hero__backing { flex-wrap: wrap; }
  .hero__proof-grid { gap:0; padding:0; }
  .hero__proof-grid img { width:auto; height:9.48px; }
  .hero__visual { width: 100%; height: min(121vw, 520px); background: #f5f5f3; }
  .hero-personas { width: 100%; height: 100%; }
  .hero-personas__frame { top: 24px; left: 20px; width: calc(100% - 40px); height: calc(100% - 48px); }
  .hero-personas__caption { right: 28px; bottom: 8px; left: 28px; font-size: 8px; }

  .problem-section, .speed-section, .evidence { width: 100%; height: auto; padding: 72px 20px; }
  .problem-section { gap: 40px; }
  .section-heading, .evidence-heading-split { width: 100%; height: auto; text-align: left; }
  .heading-copy h2, .evidence h2 { font-size: 32px; line-height: 1.12; letter-spacing: -1px; }
  .heading-copy p, .evidence-heading-split > p, .people-heading p { margin-top: 14px; font-size: 15px; line-height: 1.5; }
  .problem-visual { width: 100%; height: 360px; }
  .problem-visual > :not(.alert-core) { transform: scale(.67); transform-origin: center; }
  .problem-visual .orbit { left: 50%; top: 50%; transform: translate(-50%,-50%) scale(.67); }
  .problem-visual .radar-sweep { left: calc(50% - 389px); top: calc(50% - 389px); }
  .signal-now, .signal-analytics { left: -15px; }
  .signal-support, .signal-research { left: auto; right: -15px; }
  .signal-now, .signal-support { top: 50px; }
  .signal-analytics, .signal-research { top: 245px; }
  .alert-core { left: 50%; top: 50%; transform: translate(-50%,-50%) scale(.85); }

  .speed-section { min-height: 0; gap: 40px; }
  .speed-heading { width: 100%; }
  .speed-heading .heading-copy h2 { font-size: clamp(17px, 5.5vw, 24px); letter-spacing: -.7px; }
  .speed-card { width: 100%; height: auto; padding: 24px 16px; gap: 22px; }
  .speed-row { width: 100%; grid-template-columns: 82px 1fr 70px; gap: 10px; }
  .speed-label, .speed-value { font-size: 12px; }
  .speed-fade { display: none; }

  .evidence-heading-split { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
  .evidence-proof { gap: 40px; }
  .proof-body { width: 100%; height: auto; display: flex; flex-direction: column; gap: 32px; }
  .proof-steps { width: 100%; height: auto; }
  .proof-step { min-height: 116px; }
  .step-copy { padding: 24px 0 20px 18px; }
  .step-copy p { font-size: 13px; }
  .winner-frame { width: 100%; height: 300px; }
  .winner-stack { top: 62px; left: 20px; width: calc(100% - 40px); }
  .winner-primary { width: 100%; }
  .winner-secondary { width: calc(100% - 24px); gap: 16px; }
  .winner-card { height: 88px; padding: 18px; }
  .winner-card h3 { font-size: 14px; }
  .winner-card p { max-width: 190px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }

  .evidence-people { display: flex; flex-direction: column; gap: 40px; }
  .behavior-frame { order: 2; width: 100%; height: 350px; }
  .behavior-sheet { top: 20px; left: 20px; width: calc(100% - 40px); transform-origin: top left; }
  .people-copy { order: 1; width: 100%; height: auto; gap: 36px; }
  .people-heading { gap: 0; }
  .people-reasons { gap: 20px; }
  .reason-row + .reason-row { padding-top: 20px; }
  .reason-row h3, .reason-row p { font-size: 14px; line-height: 21px; }

  .evidence-use-cases { gap: 36px; }
  .use-cases-heading { height: auto; }
  .use-cases-heading > p { white-space: normal; }
  .use-case-grid { width: 100%; height: auto; display: flex; flex-direction: column; gap: 40px; }
  .use-case { gap: 20px; }
  .case-visual { height: 220px; }
  .case-copy { gap: 8px; }
  .case-copy h3 { font-size: 15px; line-height: 22px; }

  .closing-cta { width: 100%; height: auto; min-height: 0; padding: 72px 24px; }
  .closing-cta__art { display: none; }
  .closing-cta__content { gap: 28px; }
  .closing-cta__copy { gap: 18px; }
  .closing-cta h2 { font-size: 38px; line-height: 1.05; letter-spacing: -1.5px; }
  .closing-cta__copy p { font-size: 15px; }
  .closing-cta__actions { width: min(100%, 296px); margin-inline: auto; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); justify-content: center; }
  .closing-cta__actions .btn { width: 100%; min-height: 44px; padding-inline: 10px; }

  .site-footer { width: 100%; height: auto; padding: 56px 24px calc(32px + env(safe-area-inset-bottom)); }
  .site-footer__content { gap: 40px; }
  .site-footer__top { flex-direction: column; gap: 36px; }
  .site-footer__brand > p { max-width: 280px; font-size: 16px; }
  .site-footer__nav { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; justify-content: start; }
  .footer-column { width: auto; }
  .site-footer__bottom { align-items: flex-start; flex-direction: column; gap: 20px; }
  .site-footer__bottom > div { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 12px 20px; white-space: normal; }

  .demo-drawer { height: 100dvh; }
  .demo-drawer__story { padding-top: 36px; }
}

@media (max-width: 359px) {
  .hero__copy { padding-inline: 20px; }
  .hero h1 { font-size: 38px; }
  .heading-copy h2, .evidence h2 { font-size: 29px; }
  .closing-cta h2 { font-size: 34px; }
  .speed-row { grid-template-columns: 72px 1fr 62px; gap: 7px; }
}
@media (max-width: 640px){
  .hero__proof-grid { height:9.48px; }
}

/* Keep the five-logo lockup proportional on narrow viewports. */
@media (max-width: 900px) {
  .hero__proof { width:100%; max-width:100%; }
  .hero__proof-grid { width:100%; height:30px; transform:none; }
  .hero__proof-grid .hero__proof-wordmark--stanford{left:0;top:.9467px;width:11.6371%;height:15.148px}
  .hero__proof-grid .hero__proof-wordmark--waterloo{left:21.1223%;top:.9467px;width:14.1304%;height:14.586px}
  .hero__proof-grid .hero__proof-wordmark--nvidia{left:44.7379%;top:.9467px;width:16.7652%;height:17.988px}
  .hero__proof-grid .hero__proof-wordmark--uber{left:70.9883%;top:.9467px;width:7.1006%;height:17.988px}
  .hero__proof-grid .hero__proof-wordmark--amazon{left:87.574%;top:.9467px;width:12.426%;height:26.509px}
}
