/* Site-wide responsive fixes */

img,
.case-study__img {
  max-width: 100%;
  height: auto;
}

.row {
  max-width: 100%;
}

/* —— Small phones / mobile —— */
@media (max-width: 639.98px) {
  .section-stage {
    min-height: auto;
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .hero-stage.section-stage,
  .talk-cta.section-stage {
    min-height: 100dvh;
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .section-stage--work {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .xl-header,
  .about-block__title,
  .recent-work-pin .xl-header {
    font-size: clamp(2.15rem, 10.5vw, 3.1rem) !important;
    line-height: 1.15 !important;
    letter-spacing: -.05rem !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .xs-header-variant {
    font-size: 1.15rem !important;
    line-height: 1.3 !important;
  }

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

  .theme-btn {
    width: 100%;
    box-sizing: border-box;
    padding: 1rem 1.25rem;
    white-space: normal;
    text-align: center;
  }

  .talk-cta__word {
    font-size: clamp(3.75rem, 22vw, 6.5rem) !important;
    line-height: .88 !important;
    letter-spacing: -.04em !important;
    margin-left: 0 !important;
  }

  .talk-cta__meta {
    margin-top: 1.25rem;
    max-width: 100%;
  }

  .about-block__copy {
    max-width: 100%;
    margin-bottom: .5rem;
  }

  .about-services .columns {
    margin-bottom: 1.75rem;
  }

  .about-services .columns:last-child {
    margin-bottom: 0;
  }

  .case-study-block__featured-study {
    margin-bottom: 2.5rem;
  }

  .case-study-feature__title {
    font-size: 1.15rem !important;
    line-height: 1.35 !important;
  }

  .sticker {
    position: static !important;
    top: auto !important;
    margin-bottom: 1rem;
  }

  /* Expertise rail: shorter panels, no forced full-viewport emptiness */
  .services-track {
    min-height: 0 !important;
  }

  .services-intro,
  .service-card {
    width: min(88vw, 22rem);
    min-height: 0 !important;
    height: auto !important;
  }

  .service-media {
    height: 32vh;
    flex-basis: 32vh;
  }

  .services-title {
    font-size: clamp(2rem, 9vw, 3rem);
    max-width: 11ch;
  }

  .services-kicker {
    font-size: 1.05rem;
  }

  .service-name {
    font-size: clamp(1.35rem, 6vw, 1.85rem);
  }

  .site-footer__inner {
    padding: 3rem 0 1.75rem;
  }

  .site-footer__wordmark {
    margin: 2.5rem 0 1.5rem;
    font-size: clamp(1.25rem, 7.5vw, 2rem);
    line-height: 1.05;
    padding: 0 .25rem;
  }

  .site-footer__copy {
    max-width: 100%;
  }

  .site-footer__bottom {
    gap: 1rem;
  }
}

/* —— Tablet —— */
@media (min-width: 640px) and (max-width: 1023.98px) {
  .section-stage {
    min-height: auto;
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  .hero-stage.section-stage,
  .talk-cta.section-stage {
    min-height: 100dvh;
  }

  .xl-header,
  .about-block__title {
    font-size: clamp(2.75rem, 7vw, 4.5rem) !important;
    line-height: 1.12 !important;
  }

  .talk-cta__word {
    font-size: clamp(6rem, 16vw, 10rem) !important;
  }

  .theme-btn {
    padding: 1rem 1.5rem;
  }

  /* About: 2x2 instead of cramped 4-up */
  .about-services .columns.medium-3 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }

  .about-services .columns {
    margin-bottom: 2rem;
  }

  .about-block__copy {
    max-width: 100%;
  }

  .services-intro,
  .service-card {
    width: 70vw;
    min-height: auto !important;
    height: auto !important;
  }

  .services-track {
    min-height: 0 !important;
  }

  .service-media {
    height: 34vh;
    flex-basis: 34vh;
  }

  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .site-footer__wordmark {
    font-size: clamp(1.75rem, 5vw, 3.25rem);
  }
}

/* —— Between tablet and desktop foundation medium —— */
@media (min-width: 860px) and (max-width: 1023.98px) {
  .about-services .columns.medium-3 {
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }
}

/* Prevent horizontal page bleed from oversized display type */
@media (max-width: 1023.98px) {
  .talkSection.talk-cta,
  .talk-cta {
    overflow-x: hidden;
  }

  .tl-wrapper,
  main {
    overflow-x: clip;
  }

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