/* Local landmark photographs on the homepage preview. */
.office-band {
  --location-paper: #faf8f3;
  --location-ink: #233f40;
  --location-muted: #52615e;
  color: var(--location-ink);
  background: var(--location-paper);
  padding: clamp(28px, 3.6vw, 54px) 0;
  border-bottom: 1px solid #d9dbd3;
}

.office-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0 16px;
  margin-bottom: 18px;
}

.office-head h2 {
  font-size: clamp(2.15rem, 3.7vw, 3.3rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.office-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  --blend-width: clamp(24px, 2.35vw, 38px);
  --scene-ratio: 1.68;
}

.office-tile {
  color: inherit;
  display: block;
  min-width: 0;
}

.office-scene {
  display: block;
  position: relative;
  aspect-ratio: var(--scene-ratio);
  pointer-events: none;
}

/* Screen the monochrome image over the ink, then tone its highlights with ivory.
   Keep that color treatment within a single photograph. */
.office-print {
  position: absolute;
  inset: 0;
  display: block;
  isolation: isolate;
  background: #373b3a;
}

.office-print img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--landmark-position, 50% 40%);
  filter: grayscale(1) brightness(var(--exposure, 1));
  mix-blend-mode: screen;
}

.office-print::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #f7f4ed;
  mix-blend-mode: multiply;
}

.office-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 89%, var(--location-paper));
}

.office-cornwall { --landmark-position: 44% 56%; --exposure: 1.13; }
.office-yorktown { --landmark-position: 50% 38%; }
.office-stony-point { --landmark-position: 34% 6%; }
.office-the-bronx { --landmark-position: 50% 18%; }
.office-white-plains { --landmark-position: 49% 12%; --exposure: .94; }

.office-caption { padding: 12px 12px 0 0; }
.office-caption small {
  display: block;
  color: var(--location-muted);
  font: 600 .75rem/1.4 var(--sans);
  letter-spacing: .075em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.office-caption h3 {
  font: 500 clamp(1.35rem, 1.9vw, 1.85rem)/1.12 var(--serif);
  margin: 0 0 5px;
}
.office-caption span {
  display: block;
  font: 400 .875rem/1.5 var(--sans);
  color: var(--location-muted);
}

.office-tile:hover h3,
.office-tile:focus-visible h3 {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.office-tile:focus-visible {
  outline: 2px solid var(--location-ink);
  outline-offset: 4px;
  position: relative;
  z-index: 1;
}

/* Overlap just the photographs, leaving each office link its own hit area. */
@media (min-width: 901px) {
  .office-grid { position: relative; }
  .office-scene::after { display: none; }
  .office-grid::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: calc(5 * var(--scene-ratio));
    pointer-events: none;
    background:
      linear-gradient(to bottom, rgb(250 248 243 / .20), transparent 5%, transparent 87%, var(--location-paper)),
      linear-gradient(to right, rgb(250 248 243 / .35), transparent 1.3%, transparent 98.7%, rgb(250 248 243 / .35));
  }
  .office-tile + .office-tile .office-print {
    left: calc(0px - var(--blend-width));
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--blend-width));
    mask-image: linear-gradient(to right, transparent, #000 var(--blend-width));
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .office-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 16px; }
}

@media (max-width: 640px) {
  .office-band .wrap { width: calc(100% - 40px); }
  .office-head { margin-bottom: 10px; }
  .office-grid { grid-template-columns: 1fr; }
  .office-tile {
    display: grid;
    grid-template-columns: clamp(84px, 26vw, 134px) minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid #d5d9d1;
  }
  .office-scene { aspect-ratio: 1.25; }
  .office-cornwall { --landmark-position: 26% 56%; }
  .office-scene::after {
    background: linear-gradient(to right, transparent 90%, var(--location-paper));
  }
  .office-caption { padding: 0; }
  .office-caption small { margin-bottom: 2px; }
  .office-caption h3 { margin-bottom: 2px; font-size: 1.5rem; }
}

.landmark-credits {
  padding-top: 12px;
  color: #d3ded9;
  font: 400 .8125rem/1.6 var(--sans);
}
.landmark-credits summary {
  width: max-content;
  margin-inline-start: auto;
  padding: 10px 0;
  min-height: 44px;
  cursor: pointer;
}
.landmark-credits p { margin: 0 0 5px; }
.landmark-credits ul { margin: 6px 0 18px; padding: 0 0 0 20px; }
.landmark-credits a { display: inline; color: inherit; text-decoration: underline; }

