.office-section {
  --office-ink: #211c17;
  --office-accent: #ef5143;
  position: relative;
  isolation: isolate;
  padding: clamp(32px, 3.2vw, 64px) var(--layout-gutter) clamp(36px, 4vw, 76px) var(--layout-content-left);
  overflow: clip;
  background: var(--paper) url('/assets/paper-seamless.webp') repeat;
  color: var(--office-ink);
  scroll-margin-top: 16px;
}

.office-gallery {
  container-type: inline-size;
  max-width: 1760px;
  margin-inline: auto;
}

.office-eyebrow {
  margin: 0 0 12px;
  color: var(--office-accent);
  font: 500 clamp(13px, 1.8cqw, 26px)/1.2 LiraStudioUnbounded, Arial, sans-serif;
  letter-spacing: -.035em;
}

.office-title {
  position: relative;
  z-index: 3;
  margin: 0;
  font: 500 clamp(34px, 12.4cqw, 220px)/1.04 LiraStudioUnbounded, Arial, sans-serif;
  letter-spacing: -.075em;
  white-space: nowrap;
  pointer-events: none;
}

.office-title span { color: var(--office-accent); }

.office-stage {
  position: relative;
  margin-top: -1.2cqw;
  padding-block: 0 1.5cqw;
}

.office-print {
  margin: 0;
  padding: clamp(5px, .6cqw, 10px);
  background: #fffaf2;
  box-shadow: 0 8px 14px -6px rgb(48 30 15 / .24), 0 1px 3px rgb(48 30 15 / .08);
}

.office-print img { display: block; width: 100%; height: 100%; object-fit: cover; }

.office-main {
  position: relative;
  width: 77%;
  margin-left: 22.5%;
  transform: rotate(.4deg);
}

.office-photo-window {
  position: relative;
  aspect-ratio: 2.02;
  overflow: hidden;
  background: #eeece4;
  touch-action: pan-y pinch-zoom;
}

.office-photo-window > img { position: absolute; inset: 0; }
.office-photo-window[data-portrait] > img { object-fit: contain; }

.office-aside {
  position: absolute;
  z-index: 1;
  left: 0;
  top: 8%;
  width: 20.3%;
}

.office-aside .office-print { transform: rotate(-.5deg); }
.office-aside .office-print img { aspect-ratio: .73; height: auto; }

.office-caption {
  max-width: 15em;
  margin: 20px 0 0;
  font: 400 clamp(14px, 1.6cqw, 23px)/1.3 Onest, Arial, sans-serif;
  letter-spacing: -.025em;
}

.office-detail {
  position: absolute;
  z-index: 2;
  right: -1.8%;
  bottom: -2.5%;
  width: 25.8%;
  transform: rotate(-1.8deg);
}

.office-detail img { aspect-ratio: 1.5; height: auto; }

.office-bottom {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8cqw, 30px);
  margin-top: clamp(28px, 4cqw, 68px);
}

.office-filmstrip {
  flex: 1;
  min-width: 0;
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 3px;
  background: var(--office-ink);
}

.office-filmstrip::-webkit-scrollbar { display: none; }

.office-thumbnail {
  position: relative;
  flex: 0 0 25%;
  display: block;
  min-width: 0;
  aspect-ratio: 2.55;
  border: 3px solid var(--office-ink);
  scroll-snap-align: start;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.office-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  opacity: .75;
  transition: filter 180ms ease, opacity 180ms ease;
}

.office-thumbnail[aria-current='true'] { border-color: var(--office-accent); }
.office-thumbnail:is([aria-current='true'], :hover, :focus-visible) img { filter: none; opacity: 1; }
.office-thumbnail:focus-visible { outline: 3px solid #fffaf2; outline-offset: -6px; }

.office-counter {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
  font: 600 clamp(15px, 1.7cqw, 25px)/1 Onest, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.045em;
}

.office-counter-current { color: var(--office-accent); }

@media (min-width: 1700px) {
  .office-section { padding-right: max(var(--layout-gutter), 3vw); }
}

@media (max-width: 1023px) and (min-width: 701px) {
  .office-photo-window { aspect-ratio: 1.7; }
  .office-aside { top: 8%; }
  .office-caption { margin-top: 14px; font-size: 1.9cqw; }
  .office-bottom { margin-top: 5cqw; }
}

@media (max-width: 700px) {
  .office-section {
    padding: 30px 16px 36px calc(var(--rail) + 2 * var(--rail-inset) + 14px);
  }
  .office-eyebrow { font-size: clamp(10px, 3.15cqw, 16px); margin-bottom: 10px; }
  .office-title { font-size: 17cqw; line-height: 1; white-space: normal; letter-spacing: -.07em; }
  .office-title span { display: block; }
  .office-stage { margin-top: -1cqw; padding-bottom: 22cqw; }
  .office-main { width: 100%; margin-left: 0; transform: rotate(.4deg); }
  .office-photo-window { aspect-ratio: 1.17; }
  .office-photo-window > img { object-position: 46% center; }
  .office-aside { position: relative; top: auto; width: 100%; display: flex; align-items: end; gap: 5%; margin-top: 20px; }
  .office-aside .office-print { flex: 0 0 36%; }
  .office-aside .office-print img { aspect-ratio: .86; }
  .office-caption { align-self: start; max-width: 10em; margin: 8px 0 4px; font-size: clamp(13px, 4.5cqw, 18px); }
  .office-detail { width: 47%; right: -1%; bottom: 0; }
  .office-detail img { aspect-ratio: 1.5; }
  .office-bottom { gap: 12px; margin-top: 24px; align-items: end; }
  .office-filmstrip { padding: 2px; }
  .office-thumbnail { flex-basis: 46%; aspect-ratio: 1.6; border-width: 2px; }
  .office-counter { font-size: 14px; padding-bottom: 5px; }
}

@media (max-width: 360px) {
  .office-section { padding-inline: calc(var(--rail) + 2 * var(--rail-inset) + 10px) 12px; }
  .office-bottom { gap: 8px; }
  .office-counter { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .office-thumbnail img { transition: none; }
  .office-filmstrip { scroll-behavior: auto; }
}

html[data-motion='reduced'] .office-thumbnail img { transition: none; }
