/* Mobile layout hardening for the deployed static build. */
@media (max-width: 560px) {
  html,
  body,
  main {
    max-width: 100%;
    overflow-x: clip;
  }

  .site-header,
  .hero,
  .section-pad {
    padding-left: 20px;
    padding-right: 20px;
  }

  .brand {
    min-width: 0;
    gap: 9px;
    letter-spacing: 0.1em;
  }

  .brand-mark {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
  }

  .hero-kicker {
    max-width: 100%;
    letter-spacing: 0.13em;
    overflow-wrap: anywhere;
  }

  .hero-copy,
  .hero-grid,
  .service-grid,
  .service-card,
  .process-layout,
  .process-sticky,
  .steps,
  .step,
  .contact-grid,
  .contact-copy,
  .lead-form {
    min-width: 0;
  }

  .hero-copy h1 {
    max-width: 100%;
    font-size: clamp(48px, 15vw, 64px);
    line-height: 0.86;
    overflow-wrap: anywhere;
  }

  .hero-intro {
    max-width: 100%;
  }

  .hero-footer {
    max-width: 100%;
  }

  .hero-footer span:nth-of-type(n + 3),
  .hero-footer i:nth-of-type(n + 3) {
    display: none;
  }

  .service-grid,
  .process-layout,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .service-card {
    width: 100%;
  }

  .problems h2,
  .section-heading h2,
  .portfolio-head h2,
  .process-sticky h2,
  .contact-copy h2 {
    max-width: 100%;
    font-size: clamp(42px, 13vw, 58px);
    overflow-wrap: anywhere;
  }

  .process-sticky p {
    padding-left: 20px;
  }

  .step {
    grid-template-columns: 34px minmax(0, 1fr) 16px;
    gap: 10px;
  }

  .step h3 {
    font-size: clamp(26px, 9vw, 32px);
    overflow-wrap: anywhere;
  }

  .case-main h3 {
    font-size: clamp(28px, 9vw, 34px);
    overflow-wrap: anywhere;
  }

  .case-status {
    align-items: flex-start;
    line-height: 1.5;
  }

  .case-metric {
    padding: 28px 22px;
  }

  .case-metric strong {
    font-size: clamp(50px, 17vw, 68px);
    overflow-wrap: anywhere;
  }

  .philosophy-orbit {
    right: -120px;
  }

  .modal {
    width: 100vw;
    max-width: 100%;
  }

  .modal h2,
  .success-message h3 {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 350px) {
  .brand > span:last-child {
    max-width: 180px;
    font-size: 7px;
    line-height: 1.35;
  }

  .hero-copy h1 {
    font-size: 14.5vw;
  }
}

/* Desktop and breakpoint hardening. */
html,
body,
main {
  max-width: 100%;
  overflow-x: clip;
}

.hero-grid,
.problems-layout,
.section-heading,
.service-grid,
.service-card,
.portfolio-head,
.case-card,
.case-main,
.case-metric,
.process-layout,
.process-sticky,
.steps,
.step,
.contact-grid,
.contact-copy,
.lead-form {
  min-width: 0;
}

.section-heading {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
}

.process-layout {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.contact-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
}

.step {
  grid-template-columns: 55px minmax(0, 1fr) 30px;
}

.case-metric strong {
  width: 100%;
  max-width: 100%;
  line-height: 0.95;
}

@media (min-width: 1101px) {
  .case-card {
    grid-template-columns:
      140px minmax(0, 1fr)
      clamp(300px, 23vw, 340px);
  }

  .case-metric {
    padding: 34px 32px;
  }

  .case-metric strong {
    font-size: clamp(52px, 4.2vw, 64px);
    white-space: normal;
  }
}

@media (min-width: 821px) and (max-width: 1100px) {
  .case-card {
    grid-template-columns: 100px minmax(0, 1fr) 260px;
  }

  .case-metric {
    padding: 30px 28px;
  }

  .case-metric strong {
    font-size: 44px;
    white-space: normal;
  }
}

@media (min-width: 561px) and (max-width: 820px) {
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .case-card {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .case-metric {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1050px) {
  .process-layout,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .process-sticky {
    position: static;
  }

  .contact-grid {
    gap: 60px;
  }
}

@media (min-width: 561px) and (max-width: 700px) {
  .portfolio-head {
    flex-direction: column;
    align-items: stretch;
  }

  .add-case {
    width: 100%;
    min-width: 0;
  }
}

.footer-address {
  color: var(--paper);
  letter-spacing: 0.04em;
  margin-top: 10px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  display: block;
}

.brand-mark {
  background: transparent;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  clip-path: none;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 560px) {
  .brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }
}
