:root {
  --lab-ink: #202221;
  --lab-blue: #57747e;
  --lab-paper: #fff;
  --lab-rule: rgba(32, 34, 33, .14);
  --lab-font-display: 'DM Serif Text', Georgia, serif;
  --lab-font-body: Barlow, sans-serif;
  --lab-grid-gap: 20px;
  --lab-shell: min(calc(100% - clamp(40px, 9.375vw, 180px)), 1740px);
  --lab-type-display-size: clamp(76px, 5.729vw, 110px);
  --lab-type-display-line: .91;
  --lab-type-display-tracking: -.02em;
  --lab-type-heading-size: clamp(48px, 3.125vw, 60px);
  --lab-type-heading-line: 1;
  --lab-type-heading-tracking: -.02em;
  --lab-type-eyebrow-size: clamp(17px, 1.146vw, 22px);
  --lab-type-eyebrow-line: 26px;
  --lab-type-lead-size: clamp(17px, 1.146vw, 22px);
  --lab-type-lead-line: 26px;
  --lab-type-body-size: clamp(18px, 1.042vw, 20px);
  --lab-type-body-line: clamp(27px, 1.563vw, 30px);
  --lab-type-meta-size: clamp(15px, .938vw, 18px);
  --lab-type-meta-line: clamp(21px, 1.458vw, 28px);
}

/*
 * Global header contract: keep the off-canvas trigger identical to the
 * homepage on every Salient template.
 */
body #top .slide-out-widget-area-toggle .label {
  color: var(--lab-ink) !important;
  font: 400 20px/24px var(--lab-font-body) !important;
  letter-spacing: 0 !important;
  text-transform: uppercase;
}

body #top .slide-out-widget-area-toggle .lines,
body #top .slide-out-widget-area-toggle .lines::before,
body #top .slide-out-widget-area-toggle .lines::after,
body #top .slide-out-widget-area-toggle .lines-button::after {
  background-color: var(--lab-ink) !important;
}

.lab-shell {
  margin-inline: auto;
  width: var(--lab-shell);
}

/*
 * Shared page canvas: custom LAB pages escape Salient's content rail once,
 * then every internal .lab-shell applies the approved safe area.
 */
:where(.lab-divisions-page, .lab-division-detail, .lab-about, .lab-method) {
  margin-left: calc(50% - 50vw);
  max-width: none;
  width: 100vw;
}

.lab-type-display,
.lab-display {
  color: var(--lab-ink);
  font-family: var(--lab-font-display);
  font-size: var(--lab-type-display-size);
  font-weight: 400;
  letter-spacing: var(--lab-type-display-tracking);
  line-height: var(--lab-type-display-line);
  margin: 0;
}

.lab-type-heading,
.lab-heading {
  color: var(--lab-ink);
  font-family: var(--lab-font-display);
  font-size: var(--lab-type-heading-size);
  font-weight: 400;
  letter-spacing: var(--lab-type-heading-tracking);
  line-height: var(--lab-type-heading-line);
  margin: 0;
}

.lab-type-eyebrow,
.lab-eyebrow {
  align-items: center;
  color: var(--lab-blue);
  display: flex;
  font-family: var(--lab-font-body);
  font-size: var(--lab-type-eyebrow-size);
  font-weight: 600 !important;
  gap: 12px;
  letter-spacing: 0;
  line-height: var(--lab-type-eyebrow-line);
  margin: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Marker-led eyebrows use the lighter label weight from the visual system. */
.lab-eyebrow,
.lab-project-index__eyebrow,
.lab-project-single__eyebrow,
.lab-type-eyebrow:has(> span) {
  font-weight: 400 !important;
}

.lab-eyebrow::before {
  background: currentColor;
  border-radius: 50%;
  content: '';
  display: block;
  flex: 0 0 auto;
  height: clamp(10px, .938vw, 18px);
  width: clamp(10px, .938vw, 18px);
}

.lab-type-lead {
  font-family: var(--lab-font-body);
  font-size: var(--lab-type-lead-size);
  font-weight: 600;
  letter-spacing: 0;
  line-height: var(--lab-type-lead-line);
  text-transform: uppercase;
}

.lab-type-body {
  font-family: var(--lab-font-body);
  font-size: var(--lab-type-body-size);
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: var(--lab-type-body-line);
}

.lab-type-meta {
  font-family: var(--lab-font-body);
  font-size: var(--lab-type-meta-size);
  font-weight: 400;
  line-height: var(--lab-type-meta-line);
}

.lab-type-card-title {
  font-family: var(--lab-font-body);
  font-size: var(--lab-type-body-size);
  font-weight: 700;
  line-height: var(--lab-type-body-line);
}

.lab-type-card-heading {
  /* Salient's dynamic `body h3` rule is more specific than this class. */
  font-family: 'DM Serif Text', Georgia, serif !important;
  font-size: clamp(20px, 1.198vw, 23px);
  font-weight: 400;
  line-height: 32px;
  text-transform: none !important;
}

.lab-type-display--project {
  line-height: .75;
}

.lab-type-display--statement {
  font-size: min(6.875vw, 132px);
  letter-spacing: min(-.146vw, -2.8px);
  line-height: .857;
}

.lab-type-display--integration {
  font-size: clamp(72px, 7.292vw, 140px);
  line-height: .857;
}

.lab-type-display--method {
  font-size: min(5.368vw, 100px);
  line-height: .82;
}

.lab-type-heading--compact {
  font-size: min(2.917vw, 56px);
}

.lab-text-highlight {
  color: var(--lab-blue);
}

.lab-button {
  align-items: center;
  background: var(--lab-blue);
  border: 0;
  border-radius: 999px;
  box-sizing: border-box;
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font: 400 clamp(18px, 1.146vw, 22px)/1 var(--lab-font-body);
  justify-content: center;
  margin-top: 28px;
  max-width: calc(100vw - 48px);
  min-height: 49px;
  min-width: min(220px, calc(100vw - 48px));
  padding: 12px 19px;
  text-align: center;
  text-decoration: none;
  transition: translate 320ms cubic-bezier(.22, 1, .36, 1);
  white-space: normal;
  width: max-content;
}

.lab-button:hover {
  background: var(--lab-blue);
  color: #fff;
}

.lab-button:focus-visible,
.lab-text-link:focus-visible,
.lab-project-card__link:focus-visible {
  outline: 3px solid var(--lab-blue);
  outline-offset: 4px;
}

.lab-sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.lab-footer {
  background: var(--lab-ink);
  color: #fff;
  overflow: visible;
  position: relative;
}

.lab-footer a:not(.lab-button) {
  color: #fff;
  display: block;
  text-decoration: none;
}

.lab-footer a:not(.lab-button):hover {
  color: #a7c2c9;
}

.lab-footer .lab-eyebrow {
  color: #91abb3;
}

.lab-footer__contacts > .lab-eyebrow,
.lab-footer__primary-nav > .lab-eyebrow,
.lab-footer__division-nav > .lab-eyebrow {
  color: #fff;
}

.lab-footer__contacts > .lab-eyebrow::before,
.lab-footer__primary-nav > .lab-eyebrow::before,
.lab-footer__division-nav > .lab-eyebrow::before {
  background: var(--lab-blue);
}

.lab-footer .lab-heading {
  color: #fff;
}

.lab-footer__cta .lab-heading span {
  color: var(--lab-blue);
}

.lab-footer p:not(.lab-eyebrow) {
  color: #d6dddd;
}

.lab-footer__to-top {
  align-items: center;
  background: var(--lab-ink);
  border-radius: 50%;
  color: #fff;
  display: flex !important;
  font: 300 35px/1 var(--lab-font-body);
  height: 64px;
  justify-content: center;
  opacity: 0;
  position: absolute;
  right: min(4.948vw, 95px);
  text-decoration: none;
  top: -87px;
  transition: opacity .2s linear, background-color .2s ease;
  visibility: hidden;
  width: 64px;
  z-index: 4;
}

.lab-footer__to-top > span[aria-hidden] {
  align-items: center;
  display: flex;
  flex: 0 0 1em;
  height: 1em;
  justify-content: center;
  line-height: 1;
  transform: none;
  width: 1em;
}

.lab-footer__to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.lab-footer__to-top:hover {
  background: var(--lab-blue);
  color: #fff;
}

.lab-footer__to-top:focus-visible {
  outline: 3px solid var(--lab-blue);
  outline-offset: 4px;
}

@media (max-width: 1199px) {
  .lab-footer__to-top {
    height: 52px;
    right: 20px;
    top: -70px;
    width: 52px;
  }
}

@media (min-width: 768px) {
  .lab-footer {
    height: min(38.802vw, 745px);
    min-height: 0;
    padding: 0;
  }

  .lab-footer__grid {
    column-gap: var(--lab-grid-gap);
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    height: 100%;
    padding: 0;
    position: relative;
  }

  .lab-footer__cta,
  .lab-footer__contacts,
  .lab-footer__primary-nav,
  .lab-footer__division-nav,
  .lab-footer__legal {
    bottom: auto;
    left: 0;
    margin: 0;
    position: absolute;
    right: 0;
    top: min(5.26vw, 101px);
    z-index: 2;
  }

  .lab-footer__cta {
    box-sizing: border-box;
    grid-column: 1 / span 5;
    padding-left: 6px;
  }

  .lab-footer__contacts {
    grid-column: 6 / span 3;
  }

  .lab-footer__primary-nav {
    grid-column: 9 / span 2;
  }

  .lab-footer__division-nav {
    grid-column: 11 / span 2;
  }

  .lab-footer .lab-eyebrow::before {
    height: min(.885vw, 17px);
    width: min(.938vw, 18px);
  }

  .lab-footer__cta .lab-heading {
    font-size: min(2.917vw, 56px);
    margin: 14px 0 0;
    max-width: min(25.573vw, 491px);
  }

  .lab-footer__cta > p:not(.lab-eyebrow) {
    margin: 14px 0 0;
    max-width: min(28.906vw, 555px);
    white-space: nowrap;
  }

  .lab-footer__cta .lab-button {
    margin-left: -6px;
    margin-top: 18px;
  }

  .lab-footer__contacts a,
  .lab-footer__contacts > p:not(.lab-eyebrow),
  .lab-footer nav a {
    font-family: var(--lab-font-body);
    font-size: var(--lab-type-body-size);
    font-weight: 400;
    line-height: min(2.135vw, 41px);
  }

  .lab-footer__contacts a,
  .lab-footer__contacts > p:not(.lab-eyebrow) {
    box-sizing: border-box;
    padding-left: 31px;
    position: relative;
  }

  .lab-footer__contacts a::before,
  .lab-footer__contacts > p:not(.lab-eyebrow)::before {
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    content: '';
    left: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .lab-footer__contacts a[href^='tel:']::before {
    background-image: url('../images/footer-phone.svg');
    height: 19px;
    width: 19px;
  }

  .lab-footer__contacts a[href^='mailto:']::before {
    background-image: url('../images/footer-email.svg');
    height: 12px;
    width: 19px;
  }

  .lab-footer__contacts > p:not(.lab-eyebrow)::before,
  .lab-footer__contacts .lab-footer__address::before {
    background-image: url('../images/footer-location.svg');
    height: 20px;
    left: 2px;
    width: 15px;
  }

  .lab-footer__contacts a:first-of-type,
  .lab-footer nav a:first-of-type {
    margin-top: 16px;
  }

  .lab-footer__contacts > p:not(.lab-eyebrow) {
    margin: 0;
    white-space: nowrap;
  }

  .lab-footer__legal {
    grid-column: 11 / span 2;
    top: min(32.917vw, 632px);
  }

  .lab-footer__legal p,
  .lab-footer__legal a {
    color: #fff;
    margin: 0;
  }

  .lab-footer__wordmark {
    bottom: 0;
    display: block;
    height: min(11.406vw, 219px) !important;
    left: 0;
    margin: 0;
    max-width: none;
    position: absolute;
    width: min(72.482vw, 1391.646px) !important;
  }
}

@media (max-width: 1199px) {
  :root {
    --lab-type-display-size: clamp(64px, 8vw, 92px);
    --lab-type-heading-size: clamp(48px, 5vw, 58px);
    --lab-type-eyebrow-size: 17px;
    --lab-type-eyebrow-line: 22px;
    --lab-type-lead-size: 17px;
    --lab-type-lead-line: 22px;
    --lab-type-body-size: 18px;
    --lab-type-body-line: 27px;
    --lab-type-meta-size: 15px;
    --lab-type-meta-line: 21px;
  }
}

@media (max-width: 767px) {
  :root {
    --lab-shell: calc(100% - 40px);
    --lab-type-display-size: clamp(44px, 12vw, 54px);
    --lab-type-display-line: .95;
    --lab-type-heading-size: clamp(32px, 9vw, 40px);
    --lab-type-eyebrow-size: 14px;
    --lab-type-eyebrow-line: 18px;
    --lab-type-lead-size: 16px;
    --lab-type-lead-line: 21px;
    --lab-type-body-size: 17px;
    --lab-type-body-line: 26px;
    --lab-type-meta-size: 15px;
    --lab-type-meta-line: 19px;
  }

  .lab-type-display--project {
    line-height: .83;
  }

  .lab-type-display--statement {
    font-size: var(--lab-type-display-size);
  }

  .lab-type-display--integration {
    font-size: var(--lab-type-display-size);
  }

  .lab-type-display--method {
    font-size: var(--lab-type-display-size);
  }

  .lab-type-heading--compact {
    font-size: var(--lab-type-heading-size);
  }

  .lab-type-card-heading {
    font-size: 18px;
    line-height: 24px;
  }

  body h1:not(.lab-type-display):not(.lab-display) {
    font-size: var(--lab-type-display-size);
  }

  body h2:not(.lab-type-display):not(.lab-display):not(.lab-type-heading):not(.lab-heading) {
    font-size: var(--lab-type-heading-size);
  }

  body h3:not(.lab-type-card-heading) {
    font-size: clamp(20px, 6vw, 24px);
  }

  body h4 {
    font-size: clamp(18px, 5vw, 20px);
  }

  body h5 {
    font-size: clamp(16px, 4.5vw, 18px);
  }

  body h6 {
    font-size: clamp(14px, 4vw, 16px);
  }

  .lab-footer {
    min-height: 720px;
    padding: 72px 0 0;
  }

  .lab-footer__grid {
    display: grid;
    gap: 34px 20px;
    grid-template-columns: 1fr 1fr;
    padding-bottom: 0;
  }

  .lab-footer__cta {
    grid-column: 1 / -1;
  }

  .lab-footer__legal {
    grid-column: 1 / -1;
  }

  .lab-footer__cta .lab-button {
    display: inline-flex;
    margin-left: 0;
  }

  .lab-footer__wordmark {
    display: block;
    height: calc(100vw * 219 / 1391.65) !important;
    margin-top: 56px;
    max-width: none;
    width: 100vw !important;
  }
}

/* Intermediate responsive footer: keep the tablet layout in normal flow so
   the columns cannot overlap while preserving the authored desktop canvas. */
@media (min-width: 768px) and (max-width: 1023px) {
  .lab-footer {
    height: auto;
    min-height: 0;
    padding: clamp(72px, 8vw, 96px) 0 0;
  }

  .lab-footer__grid {
    column-gap: 0;
    display: grid;
    gap: 44px clamp(28px, 5vw, 52px);
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    height: auto;
    padding: 0;
    position: relative;
  }

  .lab-footer__cta,
  .lab-footer__contacts,
  .lab-footer__primary-nav,
  .lab-footer__division-nav,
  .lab-footer__legal {
    bottom: auto;
    left: auto;
    margin: 0;
    position: static;
    right: auto;
    top: auto;
  }

  .lab-footer__cta {
    grid-column: 1 / -1;
    padding-left: 6px;
  }

  .lab-footer__contacts {
    grid-column: 1;
    grid-row: 2;
  }

  .lab-footer__primary-nav {
    grid-column: 2;
    grid-row: 2;
  }

  .lab-footer__division-nav {
    grid-column: 2;
    grid-row: 3;
  }

  .lab-footer__legal {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .lab-footer__cta > p:not(.lab-eyebrow),
  .lab-footer__contacts > p:not(.lab-eyebrow) {
    white-space: normal;
  }

  .lab-footer__wordmark {
    bottom: auto;
    display: block;
    height: calc(100vw * 219 / 1391.65) !important;
    left: auto;
    margin-top: 56px;
    margin-bottom: 0 !important;
    max-width: none;
    position: static;
    width: 100vw !important;
  }

  .lab-footer__cta .lab-button {
    margin-left: 0;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .lab-button:hover {
    translate: 0 -5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lab-button {
    transition: none;
  }

  .lab-button:hover {
    translate: none;
  }
}
