/* Offices. single-office.php and template-offices.php
 *
 * Hero: hero-capability.css. Tab bar: section-tabs.css. Cards: pro-card.css.
 * Tokens only. Arrow link copies the button arrow, same as careers.css.
 */

.hlb-office {
  --hlb-office-wide:  1120px;
  --hlb-office-grid:  856px;
  --hlb-office-muted: var(--hlb-slate);

  background: var(--hlb-white);
  color: var(--hlb-ink);
  font-family: var(--hlb-font-body);
}

/* --- Type --- */

.hlb-office .hlb-office-heading {
  margin: 0 0 28px;
  color: var(--hlb-navy);
  font: 400 clamp(22px, 2.4vw, 30px)/1.2 var(--hlb-font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hlb-office .hlb-office-heading--center {
  margin-bottom: 48px;
  text-align: center;
}

/* T, F labels. Display face, small caps look */
.hlb-office .hlb-office-info__label {
  display: inline-block;
  min-width: 1.6em;
  color: var(--hlb-office-muted);
  font: 400 12px/1 var(--hlb-font-display);
  letter-spacing: 0.12em;
}

/* --- Details: photo left, text right --- */

.hlb-office-info {
  padding: 80px var(--hlb-gutter) 72px;
}

.hlb-office-info__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  max-width: var(--hlb-office-wide);
  margin: 0 auto;
}

@media (min-width: 900px) {
  .hlb-office-info--has-image .hlb-office-info__inner {
    grid-template-columns: minmax(0, 440fr) minmax(0, 560fr);
    column-gap: clamp(48px, 7vw, 120px);
    align-items: center;
  }
}

/* Safari: stretched aspect item sizes from the row. Pin it */
.hlb-office-info__media {
  position: relative;
  width: 100%;
  align-self: start;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #EFF1F5;
}

.hlb-office-info__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hlb-office .hlb-office-info__address {
  margin: 0 0 24px;
  font: 400 20px/1.5 var(--hlb-font-body);
  font-style: normal;
  color: var(--hlb-ink);
}

/* WYSIWYG wraps the address in a p */
.hlb-office .hlb-office-info__address p {
  margin: 0;
  font: inherit;
  color: inherit;
}

.hlb-office .hlb-office-info__phones,
.hlb-office .hlb-office-info__phones li,
.hlb-office .hlb-office-card__phones,
.hlb-office .hlb-office-card__phones li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.hlb-office .hlb-office-info__phones li::before,
.hlb-office .hlb-office-card__phones li::before {
  content: none !important;
}

.hlb-office .hlb-office-info__phones {
  display: grid;
  gap: 8px;
  margin-bottom: 36px !important;
  font: 400 17px/1.4 var(--hlb-font-body);
}

/* --- Arrow link. Button arrow, shaft stretches on hover --- */

.hlb-office .hlb-office-arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font: 400 13px/1.2 var(--hlb-font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hlb-office-arrow-link .hlb-button__arrow {
  flex: 0 0 auto;
  width: 46px;
  height: 8px;
  margin-right: -10px;
  overflow: visible;
  fill: none;
}

.hlb-office-arrow-link .hlb-button__arrow-shaft,
.hlb-office-arrow-link .hlb-button__arrow-head {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  transition: transform .32s cubic-bezier(.22, .61, .36, 1);
}

.hlb-office-arrow-link .hlb-button__arrow-shaft {
  transform-origin: left center;
  transform: scaleX(0.778);
}

.hlb-office-arrow-link .hlb-button__arrow-head {
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateX(-10px);
}

.hlb-office-arrow-link:hover .hlb-button__arrow-shaft,
.hlb-office-arrow-link:focus-visible .hlb-button__arrow-shaft {
  transform: scaleX(1);
}

.hlb-office-arrow-link:hover .hlb-button__arrow-head,
.hlb-office-arrow-link:focus-visible .hlb-button__arrow-head {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
  .hlb-office-arrow-link .hlb-button__arrow-shaft,
  .hlb-office-arrow-link .hlb-button__arrow-head {
    transition: none;
  }
}

/* --- Professionals. Fade like the capability pros --- */

.hlb-office-pros {
  padding: 72px var(--hlb-gutter) 112px;
  background: linear-gradient(180deg, rgba(191, 199, 214, 0.25) 0, rgba(191, 199, 214, 0) 1117px);
}

.hlb-office-pros__inner {
  max-width: var(--hlb-office-grid);
  margin: 0 auto;
}

.hlb-office .hlb-office-pros__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hlb-office .hlb-office-pros__grid > li {
  margin: 0;
  padding: 0;
}

.hlb-office .hlb-office-pros__grid > li::before {
  content: none;
}

@media (max-width: 767px) {
  .hlb-office-info {
    padding-block: 48px;
  }

  .hlb-office-pros {
    padding-block: 48px 72px;
  }

  .hlb-office .hlb-office-heading--center {
    margin-bottom: 32px;
  }

  .hlb-office .hlb-office-pros__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 16px;
  }

  .hlb-office .hlb-office-info__address {
    font-size: 18px;
  }
}

/* --- Landing grid --- */

.hlb-office-list {
  padding: 80px var(--hlb-gutter) 112px;
}

.hlb-office .hlb-office-list__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 32px;
  max-width: var(--hlb-office-wide);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.hlb-office .hlb-office-list__grid > li {
  margin: 0;
  padding: 0;
}

.hlb-office .hlb-office-list__grid > li::before {
  content: none;
}

@media (max-width: 999px) {
  .hlb-office .hlb-office-list__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .hlb-office-list {
    padding-block: 48px 72px;
  }

  .hlb-office .hlb-office-list__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }
}

.hlb-office-card {
  position: relative;
}

.hlb-office-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  margin-bottom: 24px;
  overflow: hidden;
  background: #EFF1F5;
}

.hlb-office-card__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hlb-office .hlb-office-card__title {
  margin: 0 0 14px;
  color: var(--hlb-navy);
  font: 400 22px/1.2 var(--hlb-font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hlb-office-card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.hlb-office-card__title a:focus-visible {
  outline: none;
}

.hlb-office-card__title a:focus-visible::after {
  outline: 2px solid var(--hlb-navy);
  outline-offset: 3px;
}

.hlb-office .hlb-office-card__address {
  margin: 0 0 14px;
  font: 400 15px/1.6 var(--hlb-font-body);
  font-style: normal;
  color: var(--hlb-ink);
}

.hlb-office .hlb-office-card__address p {
  margin: 0;
  font: inherit;
  color: inherit;
}

/* Phones sit over the stretched link so they stay tappable */
.hlb-office .hlb-office-card__phones {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  font: 400 15px/1.5 var(--hlb-font-body);
}

/* Office photos are wide header shots, photo on the right. Show that side */
.single-office .hlb-cap-hero__image img {
  object-position: 80% center;
}
