@media (max-width: 1120px) {
  .hero__grid,
  .about-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .hero__content {
    max-width: 860px;
  }

  .device-stack {
    min-height: 500px;
  }

  .waving-avatar {
    left: calc(50% - 81px);
    top: -10px;
    width: 162px;
    height: 204px;
  }

  .device-card--main {
    margin-inline: auto;
  }

  .services-grid,
  .features-grid,
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 40px;
  }

  /* connector line only reads in a single row */
  .process::before {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --header-height: 74px;
  }

  .container {
    width: min(calc(100% - 32px), var(--container));
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 16px;
    right: 16px;
    display: grid;
    gap: 0;
    padding: 10px;
    border-radius: var(--radius-md);
    background: rgba(8, 1, 18, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
  }

  .nav-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-menu a {
    padding: 15px;
    border-radius: var(--radius-sm);
  }

  .nav-menu a:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .nav-cta {
    display: none;
  }

  .language-select {
    margin-inline-start: auto;
  }

  .section {
    padding: 86px 0;
  }

  .section--hero {
    padding-top: calc(var(--header-height) + 44px);
  }

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

  .device-stack {
    min-height: 430px;
  }

  .waving-avatar {
    left: calc(50% - 71px);
    top: -18px;
    width: 142px;
    height: 182px;
  }

  .dashboard-preview {
    grid-template-columns: 52px 1fr;
    min-height: 320px;
  }

  .dashboard-preview__content {
    padding: 16px;
  }

  .device-card--phone {
    width: 156px;
  }

  .orbit-badge {
    display: none;
  }

  /* Lighten the hero backdrop on smaller screens for smoother scrolling */
  .hero__grid-floor {
    opacity: 0.32;
  }

  .hero__network {
    opacity: 0.5;
  }

  .stat-card {
    padding: 28px 16px;
  }

  .tech-space {
    height: 520px;
  }

  .tech-planet {
    min-width: 128px;
    padding: 10px 13px;
    font-size: 0.9rem;
  }

  .tech-logo {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

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

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

  .cta-card {
    padding: 48px 26px;
  }

  .contact-card {
    padding: 38px 22px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-grid > a:last-child {
    justify-self: center;
  }

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

@media (max-width: 640px) {
  .hero h1 {
    font-size: clamp(2.15rem, 11.5vw, 3.45rem);
  }

  .hero__actions,
  .contact-actions {
    display: grid;
  }

  .btn {
    width: 100%;
  }

  .services-grid,
  .features-grid,
  .process {
    grid-template-columns: 1fr;
  }

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

  .chart-card {
    min-height: 132px;
    gap: 10px;
  }

  .device-card--phone {
    right: 12px;
    bottom: 4px;
    width: 132px;
    padding: 14px;
  }

  .waving-avatar {
    left: calc(50% - 63px);
    top: -8px;
    width: 126px;
    height: 166px;
  }

  .project-card__visual {
    min-height: 210px;
  }

  .tech-space {
    height: 640px;
    width: min(100% - 20px, 440px);
    border-radius: 16px;
  }

  .tech-planet {
    min-width: 112px;
    padding: 9px 11px;
    gap: 8px;
    font-size: 0.82rem;
  }

  .tech-logo {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .tech-planet:nth-of-type(1) { --x: 28% !important; --y: 11% !important; }
  .tech-planet:nth-of-type(2) { --x: 70% !important; --y: 18% !important; }
  .tech-planet:nth-of-type(3) { --x: 32% !important; --y: 29% !important; }
  .tech-planet:nth-of-type(4) { --x: 72% !important; --y: 39% !important; }
  .tech-planet:nth-of-type(5) { --x: 30% !important; --y: 50% !important; }
  .tech-planet:nth-of-type(6) { --x: 72% !important; --y: 60% !important; }
  .tech-planet:nth-of-type(7) { --x: 30% !important; --y: 71% !important; }
  .tech-planet:nth-of-type(8) { --x: 72% !important; --y: 79% !important; }
  .tech-planet:nth-of-type(9) { --x: 32% !important; --y: 89% !important; }
  .tech-planet:nth-of-type(10) { --x: 72% !important; --y: 93% !important; }

  .contact-email {
    word-break: break-word;
  }

  .scroll-top {
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
  }

  .floating-contact {
    right: max(14px, env(safe-area-inset-right));
    left: auto;
    bottom: calc(max(14px, env(safe-area-inset-bottom)) + 68px);
  }

  .floating-contact__item {
    width: 48px;
    height: 48px;
  }

  .floating-contact__item svg {
    width: 26px;
    height: 26px;
  }
}
