/*
 * Legacy inner-page widths and scoped homepage content alignment.
 * The public header and footer own their independent shared container rules.
 */
:root {
  /* YTO-style shared desktop canvas: all pages use one horizontal rhythm. */
  --site-approved-wrap: min(1680px, calc(100vw - 160px));
  --shell: var(--site-approved-wrap);
  --about-shell: var(--site-approved-wrap);
  --wrap: var(--site-approved-wrap);
}

/* Standard inner-page content containers. */
.section-shell,
.about-uiux .about-shell,
.about-uiux .about-ref-shell,
.site-header .site-wrap,
.site-header .nav-row,
.footer .site-wrap,
.site-footer .footer-main,
.site-footer .footer-filing {
  width: var(--site-approved-wrap);
  max-width: none;
  margin-inline: auto;
}

/* Legacy inner-page footer used a separate 1180px gutter calculation. */
.site-footer {
  padding-inline: 0;
}

@media (max-width: 1199px) {
  :root {
    --site-approved-wrap: calc(100vw - 96px);
  }
}

@media (max-width: 767px) {
  :root {
    --site-approved-wrap: calc(100vw - 40px);
  }
}

/* Homepage sections after the hero and industry-responsibility section.
 * Match the About page's desktop gutters without changing --wrap, the first
 * two sections, or the fixed-size customer-logo cells and their animation.
 */
@media (min-width: 1201px) {
  #main > :is(#platform, #products, #ai, #cases, #clients, #news, #contact) > .site-wrap {
    width: calc(100% - 240px);
    max-width: none;
    margin-inline: auto;
  }

  #main > #clients > .client-marquee {
    width: calc(100% - 240px) !important;
    max-width: none !important;
    margin-inline: auto;
    padding-inline: 0;
  }
}

/* Match the homepage's intermediate desktop behaviour. */
@media (min-width: 1101px) and (max-width: 1199px) {
  :root {
    --site-approved-wrap: min(1600px, calc(100% - clamp(48px, 10vw, 192px)));
  }

  .site-footer {
    padding-inline: max(24px, 5vw);
  }
}

/* Match the homepage's tablet and mobile gutters. */
@media (max-width: 1100px) {
  :root {
    --site-approved-wrap: calc(100% - 56px);
  }

  .site-footer {
    padding-inline: 28px;
  }
}

@media (max-width: 800px) {
  :root {
    --site-approved-wrap: calc(100% - 40px);
  }

  .site-footer {
    padding-inline: 20px;
  }
}

@media (max-width: 430px) {
  :root {
    --site-approved-wrap: calc(100% - 32px);
  }

  .site-footer {
    padding-inline: 16px;
  }
}
