/* Match the header width and shrink continuously with the viewport. */
.container {
  width: 100%;
  max-width: 75rem;
  margin-inline: auto;
  padding-inline: clamp(15px, 2.5vw, 30px);
}

/* Content fills its container; only actual columns change at the desktop breakpoint. */
.content-pair,
.history-events {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px 30px;
}

.history-intro {
  max-width: 42rem;
}

.content-pair > *,
.history-intro > *,
.history-event > * {
  min-width: 0;
}

.company-intro > :last-child { display: flex; }
.company-intro .block-wrap-1 { margin-right: 0; }
.company-intro__heading { padding-top: 1rem; }

.team-grid,
.service-features,
.coating-grid {
  display: grid;
  gap: 30px;
}

.team-grid { grid-template-columns: minmax(0, 1fr); }
.team-grid .profile-creative { height: 100%; }
.service-features { grid-template-columns: minmax(0, 1fr); }
.service-features > * { display: flex; min-width: 0; }
.service-features .box-feature { width: 100%; max-width: 100%; }
.coating-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-bottom: 30px;
}

* + :is(.content-pair, .team-grid, .coating-grid, .history-intro, .history-events, .career-followup) {
  margin-top: 40px;
}

/* The empty vacancies slot preserves the existing space above the closing copy. */
.career-followup { display: grid; }
.career-followup:not(:has(> *)) { margin-bottom: -30px; }

.history-event {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  row-gap: 16px;
  align-items: center;
}

.quote-copy > *,
.quote-form > *,
.faq-layout > *,
.not-found-layout > * {
  width: 100%;
  margin-inline: auto;
}

.faq-layout > *,
.not-found-layout > * {
  max-width: 42rem;
}

.quote-copy > * { max-width: 36rem; }
.quote-form > * { max-width: 48rem; }

@media (max-width: 767.98px) {
  .timeline {
    position: relative;
    max-width: 340px;
    margin-inline: auto;
  }

  .timeline::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 8px;
    width: 2px;
    background: #909296;
  }

  .timeline__item {
    padding-left: 32px;
  }

  .timeline__item::before {
    top: 5px;
    bottom: auto;
    left: 2px;
    width: 14px;
    height: 14px;
    border: 0;
    border-radius: 50%;
    background: #f5a63f;
  }

  .timeline__item-header {
    padding-left: 0;
  }
}

.quote-copy:has(> .quote-copy__intro) { margin-bottom: -40px; }

.quote-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px 30px;
}

.quote-fields > * { grid-column: 1 / -1; min-width: 0; }
.quote-fields__message-action { align-self: start; margin-top: 1.7rem; }
.quote-fields .button { vertical-align: middle; user-select: none; }
.quote-fields .button:focus { box-shadow: 0 0 0 .2rem rgb(0 123 255 / 25%); }

.contact-intro { padding-bottom: 1.5rem; }
.not-found-break { display: none; }

.footer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "funding funding"
    "copyright social";
  align-items: center;
  gap: 1rem;
  padding-block: 1.5rem;
}

.footer-layout > * { min-width: 0; }

.footer-layout__copyright { grid-area: copyright; text-align: left; }

.footer-layout__funding {
  grid-area: funding;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgb(255 255 255 / 15%);
}

.footer-layout__funding a {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 80%;
  max-width: 280px;
  margin-inline: auto;
}

.footer-layout__funding img { display: block; width: 100%; height: auto; }

.footer-layout__social { grid-area: social; text-align: right; }

/* Leave room for the fixed back-to-top button when it is available. */
@media (hover: hover) and (pointer: fine) and (width < 87.5rem) {
  .footer-layout__social { padding-inline-end: 56px; }
}

@media (hover: hover) and (pointer: fine) and (576px <= width < 87.5rem) {
  .footer-layout__social { padding-inline-end: 76px; }
}

.footer-layout__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.footer-layout a:focus-visible {
  outline: 2px solid #f5a63f;
  outline-offset: 4px;
}

@media (max-width: 575.98px) {
  .service-features { gap: 12px; }
}

@media (min-width: 576px) {
  .service-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-events { grid-template-columns: max-content minmax(0, 1fr); }
  .history-event > :last-child { grid-column: 1 / -1; margin-top: 0; }
  .quote-fields > :nth-child(3) { grid-column: span 3; }
  .quote-fields > :nth-child(4) { grid-column: span 1; }
}

@media (min-width: 768px) {
  .content-pair { row-gap: 50px; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coating-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .history-events { grid-template-columns: max-content minmax(0, 1fr) minmax(0, 1.5fr); }
  .history-event > :last-child { grid-column: auto; }
  .quote-copy:has(> .quote-copy__intro) { margin-bottom: -50px; }
  .quote-fields { align-items: end; }
  .quote-fields > :nth-child(1) { grid-column: span 3; }
  .quote-fields > :nth-child(2) { grid-column: span 1; }
  .footer-layout {
    grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) auto;
    grid-template-areas: "copyright funding social";
    padding-block: 1rem;
  }
  .footer-layout__funding { padding-bottom: 0; border-bottom: 0; }
}

@media (min-width: 992px) {
  .content-pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(48px, 6vw, 80px);
  }
  .company-intro,
  .services-intro,
  .career-layout { align-items: center; }
  .company-intro,
  .services-intro { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .production-layout { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .career-layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .career-layout > :first-child { grid-column: 2; grid-row: 1; }
  .career-layout > :last-child { grid-column: 1; grid-row: 1; }
  .team-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .coating-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .not-found-break { display: block; }
  .footer-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.site-main > section:last-child {
  flex-grow: 1;
}

.page > header,
.page > footer {
  flex-shrink: 0;
}

.career-departments {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 18px 32px;
  margin-top: 28px;
  color: #151515;
  line-height: var(--line-height-body);
  text-align: left;
}

.career-departments > li {
  position: relative;
  padding-left: 18px;
}

.career-departments > li::before {
  content: "";
  position: absolute;
  top: .65em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f5a63f;
}

.career-departments__roles {
  display: block;
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: .9em;
}

/* Service titles use the card width instead of a fixed narrow text column. */
.service-features .box-feature {
  padding: 40px;
}

.service-features .box-feature > * {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.service-features .box-feature__icon {
  position: static;
}

.service-features .box-feature__title {
  font-size: var(--font-size-large);
  overflow-wrap: anywhere;
}

@media (width < 576px) {
  .service-features .box-feature {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem;
  }

  .service-features .box-feature > * {
    margin: 0;
  }

  .service-features .box-feature__icon {
    flex: 0 0 2.5rem;
    font-size: 2rem;
    line-height: 1;
    text-align: center;
  }

  .service-features .box-feature__title {
    flex: 1;
    min-width: 0;
    padding-left: .75rem;
    line-height: 1.4;
  }
}
