:root {
  --container-max: 1440px;
  --page-padding-mobile: 18px;
}

html,
body {
  max-width: 100%;
}

body {
  overflow-x: clip;
}

@supports not (overflow: clip) {
  body {
    overflow-x: hidden;
  }
}

:where(.section-shell, .portfolio-shell, .footer-shell, .hero-shell, .portfolio-hero-inner) {
  max-width: var(--container-max);
}

:where(.button, .submit-button, .filter-button, .text-link, .portfolio-link, .case-link, .project-link) {
  text-align: center;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

:where(.button, .submit-button, .filter-button, .menu-toggle, .faq-question, .footer-top-link):focus-visible {
  outline: 2px solid var(--accent, #ff6a00);
  outline-offset: 4px;
}

.portfolio-title,
.footer-wordmark,
.project-title span,
.case-title,
.case-title span,
.next-link h2 {
  letter-spacing: 0;
}

:where(.kicker, .eyebrow, .hero-kicker, .small-label, .meta, .cta-kicker, .footer-meta, .footer-group-title) {
  max-width: 100%;
}

.footer-contact-item,
.footer-contact-item a {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 680px) {
  :root {
    --page-padding-mobile: 18px;
  }

  :where(.section-shell, .portfolio-shell, .footer-shell, .hero-shell) {
    width: min(100%, calc(100vw - (var(--page-padding-mobile) * 2)));
    max-width: calc(100vw - (var(--page-padding-mobile) * 2));
    min-width: 0;
  }

  :where(.hero-grid, .portfolio-hero-inner, .intro-grid, .section-grid, .contact-layout, .cta-grid, .footer-brand, .footer-main, .pricing-grid, .faq-grid, .complex-grid, .quote-grid, .extra-grid) {
    min-width: 0;
  }

  :where(.hero-grid, .portfolio-hero-inner, .intro-grid, .section-grid, .contact-layout, .cta-grid, .footer-brand, .footer-main, .pricing-grid, .faq-grid, .complex-grid, .quote-grid, .extra-grid) > * {
    max-width: 100%;
    min-width: 0;
  }

  .title-line,
  .hero-title .line {
    overflow: visible;
  }

  .title-line > span,
  .hero-title .line span {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: normal;
  }

  main .hero h1,
  main .hero-title,
  main .portfolio-title,
  main .page-hero h1 {
    max-width: 100%;
    font-size: 2.05rem;
    line-height: 0.94;
  }

  main .case-title {
    max-width: 100%;
    font-size: 2.2rem;
    line-height: 0.98;
  }

  :where(.hero-copy, .section-lead, .lead, .intro-copy, .cta-copy p, .footer-lead) {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  :where(.kicker, .eyebrow, .hero-kicker, .small-label, .meta, .cta-kicker) {
    overflow-wrap: anywhere;
    line-height: 1.35;
  }

  .button-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .button,
  .submit-button {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding-inline: 14px;
    white-space: normal;
  }
}

@media (max-width: 360px) {
  main .hero h1,
  main .hero-title,
  main .portfolio-title,
  main .page-hero h1 {
    font-size: 1.9rem;
    line-height: 0.96;
  }

  :where(.button, .submit-button, .filter-button) {
    font-size: 0.7rem;
    letter-spacing: 0;
  }
}

@media (hover: none) and (pointer: coarse) {
  :where(.button:hover, .submit-button:hover, .filter-button:hover, .project-card:hover, .service-item:hover, .process-item:hover) {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(.title-line, .hero-title .line) {
    overflow: visible;
  }
}
