/* Mobile-only alignment and overflow safeguards for the public website. */
@media (max-width: 767px) {
    html,
    body {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        overflow-x: hidden;
        overflow-x: clip;
    }

    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    .site-main,
    .site-main > section {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        overflow-x: clip;
    }

    /* Normalize page containers without changing desktop layout. */
    .site-main > section > .mx-auto,
    .site-main > section > .relative.mx-auto {
        width: calc(100% - 2rem);
        min-width: 0;
        max-width: 46rem;
        margin-inline: auto;
        padding-left: 0;
        padding-right: 0;
        text-align: center;
    }

    .site-main .grid {
        min-width: 0;
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
    }

    .site-main .grid > *,
    .site-main article,
    .site-main form,
    .site-main label {
        min-width: 0;
        max-width: 100%;
    }

    .site-main article,
    .site-main form {
        width: 100%;
        margin-inline: auto;
    }

    .site-main article,
    .site-main article > div,
    .site-main form,
    .site-main label,
    .site-main address {
        text-align: center;
    }

    .site-main h1,
    .site-main h2,
    .site-main h3,
    .site-main p,
    .site-main a,
    .site-main strong,
    .site-footer p,
    .site-footer a,
    .site-footer address {
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: normal;
    }

    .site-main h1 {
        font-size: clamp(2rem, 10vw, 3rem);
        line-height: 1.08;
        text-wrap: balance;
    }

    .site-main h2 {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
        line-height: 1.15;
        text-wrap: balance;
    }

    .site-main h3,
    .career-role-title {
        white-space: normal;
        text-wrap: balance;
    }

    .site-main article img,
    .site-main article svg,
    .site-main article picture {
        display: block;
        max-width: 100%;
        margin-inline: auto;
    }

    .service-card-logo,
    .service-card-uploaded-logo,
    .ai-capability-logo,
    .career-role-logo {
        margin-inline: auto;
    }

    .portfolio-card-logo {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .site-main input,
    .site-main select,
    .site-main textarea,
    .site-main button {
        min-width: 0;
        max-width: 100%;
    }

    .site-main input,
    .site-main select,
    .site-main textarea {
        width: 100%;
        text-align: left;
    }

    .site-main a.inline-flex,
    .site-main button {
        justify-content: center;
        white-space: normal;
    }

    .site-footer,
    .site-footer-grid,
    .site-footer-bottom {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        overflow-x: clip;
        text-align: center;
    }

    .site-footer-grid {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
    }

    .site-footer-grid > div,
    .site-footer-bottom > * {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin-inline: auto;
    }

    .site-footer img,
    .site-footer svg,
    .site-footer picture {
        display: block;
        max-width: 100%;
        margin-inline: auto;
        object-fit: contain;
    }

    .site-footer-grid p {
        margin-inline: auto;
    }

    /* Contact form content remains left-aligned while the page layout stays centered. */
    .contact-page .contact-info-card,
    .contact-page .contact-info-card p,
    .contact-page .contact-form,
    .contact-page .contact-form label,
    .contact-page .contact-form label > span,
    .contact-page .contact-form .contact-service-field,
    .contact-page .contact-form .contact-service-field > span {
        text-align: left;
    }

    .contact-page .contact-form .contact-service-field,
    .contact-page .contact-form .contact-service-select,
    .contact-page .contact-form .contact-service-trigger {
        width: 100%;
        max-width: 100%;
    }
}
