#content:has(> .inner-page) {
  width: 100%;
  padding: 0;
  background: var(--paper);
}

.inner-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  background: #e5edf7;
}

.inner-hero-copy, .inner-body {
  width: min(calc(100% - 2 * var(--gutter)), 1480px);
  margin-inline: auto;
}

.inner-hero-copy {
  position: relative;
  padding-block: clamp(28px, 4vw, 63px) clamp(36px, 5.4vw, 86px);
}

.inner-hero .crumb { margin: 0 0 clamp(24px, 4vw, 56px); }
.inner-hero .crumb a { display: inline-flex; align-items: center; gap: .65em; min-height: 28px; font-size: .9rem; font-weight: 650; }
.inner-hero .crumb a::before { content: "←"; }
.inner-hero .crumb a:hover { color: #0039c9; }
.inner-kicker { margin-block: 0 .65em; font-size: .85rem; font-weight: 700; }

#content .inner-hero h1 {
  max-width: 26ch;
  margin: 0;
  font-size: clamp(34px, 5.1vw, 78px);
  line-height: 1.01;
  letter-spacing: -.048em;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.inner-hero .lead {
  margin-block: clamp(14px, 2vw, 28px) 0;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  text-wrap: pretty;
}

.inner-hero-photo {
  color: white;
  background: var(--navy);
  --outline: #9dc9ff;
}

.inner-hero-photo .inner-hero-copy { min-height: clamp(360px, 32vw, 495px); }
#content .inner-hero-photo h1 { max-width: min(17ch, 60%); }
.inner-hero-photo .lead { max-width: min(46ch, 53%); color: #dce9fa; }
.inner-hero-photo .crumb a { color: #cbdff8; }
.inner-hero-photo .crumb a:hover { color: white; }
.inner-hero .actions { margin-block-end: 0; }

.inner-hero-visual {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 39%;
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%);
  background: #4278a4;
}

.inner-hero-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inner-hero-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, #061d31 0%, rgb(6 29 49 / .83) 16%, rgb(6 29 49 / .38) 43%, rgb(6 29 49 / .06) 100%);
}

.inner-body { padding-block: clamp(34px, 5vw, 72px) clamp(48px, 6vw, 95px); }
.inner-body > :first-child, .inner-body section:first-child { margin-block-start: 0; }
.inner-body section + section { margin-block-start: clamp(32px, 5vw, 70px); }
.inner-body h2 { font-size: clamp(24px, 2.85vw, 41px); letter-spacing: -.036em; text-wrap: pretty; }
.inner-body .text { max-width: 69ch; }
.inner-body .text > h2:not(:first-child) { margin-block-start: 1.35em; }
.inner-body .text li, .service-article .list > li { margin-block-end: .5em; }
.inner-body .text li::marker, .service-article li::marker { color: var(--accent); }
.inner-related { margin-block: 1.4em 0; font-weight: 700; }
.inner-body a:not(.button):hover { color: #0048c1; }

.service-layout, .contact-layout {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 340px);
  gap: clamp(28px, 6vw, 100px);
}

.service-article { min-width: 0; }
.service-article .steps { max-width: none; }
.service-article .steps article { border-color: #7ca5ec; }
.service-article details { max-width: none; background: white; margin-block-end: 8px; }
.service-aside {
  padding: clamp(21px, 2.8vw, 34px);
  border-radius: 16px;
  background: white;
  border-block-start: 4px solid var(--accent);
}
.service-aside h2 { font-size: clamp(23px, 2.1vw, 32px); }
.service-aside p { color: var(--muted); }
.service-call { display: block; width: fit-content; margin-block-start: 14px; font-weight: 700; }
.contact-layout .info { margin: 0; }
.contact-layout .actions { align-items: start; }

.portfolio-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(13px, 2vw, 27px); }
.portfolio-tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: clamp(225px, 24vw, 340px);
  border-radius: 14px;
  background: var(--navy);
  color: white;
}
.portfolio-tile img, .portfolio-tile::before { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
.portfolio-tile img { object-fit: cover; transition: transform .45s ease; }
.portfolio-tile::before { z-index: 0; content: ""; background: linear-gradient(0deg, #061d31 3%, rgb(6 29 49 / .94) 37%, rgb(6 29 49 / .5) 70%, transparent 100%); }
.portfolio-tile-copy { position: relative; width: 100%; padding: 21px 65px 22px 22px; }
.portfolio-tile-copy h3 { margin: 0 0 7px; font-size: clamp(20px, 2vw, 30px); letter-spacing: -.025em; text-wrap: pretty; }
.portfolio-tile-copy p { margin: 0; color: #e0ecfc; }
.portfolio-arrow {
  position: absolute;
  right: 15px;
  bottom: 17px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  font-size: 1.3rem;
  transition: color .2s ease, background-color .2s ease;
}
.inner-body .portfolio-tile:hover { color: #c1dbff; }
.portfolio-tile:is(:hover, :focus-visible) img { transform: scale(1.06); }
.portfolio-tile:is(:hover, :focus-visible) .portfolio-arrow { background: var(--accent); color: white; }
.portfolio-tile:only-child { grid-column: span 2; }

@media (min-width: 1100px) {
  #lab-materials + .portfolio-tiles { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  #lab-materials + .portfolio-tiles > a { grid-column: span 4; }
  #lab-materials + .portfolio-tiles > a:nth-child(n+4) { grid-column: span 3; }
}

.company-overview { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(25px, 5vw, 90px); align-items: center; }
.inner-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.inner-stats > div { padding-inline: 12px; border-inline-start: 1px solid #95b6ee; }
.inner-stats dt { color: var(--accent); font: 800 clamp(26px, 4vw, 62px)/1.1 Manrope, sans-serif; letter-spacing: -.05em; }
.inner-stats dd { margin: .5em 0 0; color: var(--muted); font-size: .9rem; }
.company-directory, .editorial-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.company-directory a, .editorial-grid article { padding: 20px; background: white; border-radius: 9px; }
.company-directory a { display: flex; gap: 12px; align-items: center; justify-content: space-between; color: var(--ink); }
.company-directory a span { color: var(--accent); }
.editorial-grid h2 { font-size: clamp(20px, 2vw, 30px); margin-block-end: .4em; overflow-wrap: anywhere; }
.editorial-grid p:last-child { margin: 0; }
.team-portrait {
  display: block;
  width: min(100%, 160px);
  height: auto;
  aspect-ratio: 1;
  margin-block-end: 18px;
  border-radius: 8px;
  object-fit: cover;
}
.review-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.review-letter { display: grid; align-content: start; gap: 16px; }
.review-author { color: var(--muted); font-weight: 650; }
.review-original { display: grid; justify-items: start; gap: 8px; width: fit-content; max-width: 100%; font-weight: 650; }
.review-original img { display: block; width: auto; max-width: 100%; height: 280px; object-fit: contain; border: 1px solid #d4e0ef; }
.contact-map { overflow: hidden; border-radius: 14px; background: white; }
.contact-map-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 24px; padding: clamp(18px, 3vw, 32px); }
.contact-map-heading h2 { margin-block-end: .25em; }
.contact-map-heading p { margin: 0; color: var(--muted); }
.contact-map iframe { display: block; width: 100%; height: clamp(300px, 42vw, 490px); border: 0; background: #e4edf6; }

.document-scans { display: grid; grid-template-columns: repeat(3, minmax(0, 248px)); gap: 16px; }
.document-scan { display: grid; grid-template-rows: auto 1fr; color: var(--ink); background: white; border-radius: 12px; }
.document-preview {
  display: grid;
  place-items: center;
  height: clamp(170px, 23vw, 265px);
  padding: 14px;
  overflow: hidden;
  background: #dce6f4;
  border-radius: 12px 12px 0 0;
}
.document-preview img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.document-caption { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 14px; font-size: .92rem; }
.document-caption > span:not(.sr-only) { color: var(--accent); }
.document-list { display: grid; gap: 9px; max-width: 54rem; margin: 0; padding: 0; list-style: none; }
.document-list a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 60px; padding: 11px 16px; border-radius: 8px; background: white; color: var(--ink); }
.file-label { padding: 4px 8px; border-radius: 4px; background: #e0ebfd; color: #063580; font-size: .74rem; font-weight: 750; }
.file-download { color: var(--accent); font-size: 1.25rem; }
.inner-body .gallery { max-width: none; }
.inner-body .gallery figure { background: white; border-radius: 12px; overflow: hidden; }
.inner-body .gallery figcaption { padding: 12px 16px; }
.inner-body .project-card h2 {
  margin: 0;
  font-size: clamp(23px, 2.35vw, 35px);
  line-height: 1.12;
}
.inner-body .project-card p { max-width: 48ch; }
.inner-body a.project-card:is(:hover,:focus-visible) { color: white; }

@media (max-width: 1000px) {
  .portfolio-tiles, .company-directory, .editorial-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .company-overview { grid-template-columns: 1fr; }
  .inner-stats { max-width: 540px; }
}

@media (max-width: 720px) {
  .service-layout, .contact-layout { grid-template-columns: 1fr; }
  .editorial-grid.review-grid { grid-template-columns: 1fr; }
  .service-aside { max-width: 560px; }
  .inner-hero-photo .inner-hero-copy { min-height: auto; padding-block-start: 21px; padding-block-end: 32px; }
  #content .inner-hero-photo h1 { max-width: 21ch; }
  .inner-hero-photo .lead { max-width: 45ch; }
  .inner-hero-visual { position: relative; inset: auto; margin-inline-start: 13%; height: clamp(140px, 36vw, 245px); clip-path: polygon(16% 0, 100% 0, 100% 100%, 0 100%); }
  .inner-hero-visual::after { background: linear-gradient(0deg, #061d31 0%, transparent 60%); }
  .inner-hero-photo .crumb { margin-block-end: 21px; }
}

@media (max-width: 515px) {
  .portfolio-tiles, .company-directory, .editorial-grid { grid-template-columns: 1fr; }
  .portfolio-tile:only-child { grid-column: auto; }
  .document-scans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .document-preview { height: 170px; }
  .document-caption { gap: 6px; font-size: .86rem; }
}

@media (prefers-reduced-motion: reduce) {
  .portfolio-tile img, .portfolio-arrow { transition: none; }
  .portfolio-tile:is(:hover, :focus-visible) img { transform: none; }
}
