:root {
  --company-navy: #1b2a41;
  --company-muted: #6b6d75;
  --company-border: #dcdde0;
  --company-yellow: #f6ab00;
}

/* Long company sections must remain visible even when the reveal threshold is not reached. */
.company-content.reveal-target {
  opacity: 1;
  transform: none;
}

.company-tabs {
  display: flex;
  gap: 8px;
  margin: 0 auto;
  padding: 48px 64px 0;
  max-width: 1920px;
  border-bottom: 1px solid var(--company-border);
}

.company-tabs a {
  padding: 16px 32px;
  color: var(--company-muted);
  font-size: 14px;
  white-space: nowrap;
}

.company-tabs a.is-current {
  color: #2b2b2f;
  font-weight: 700;
  background: #faf8f4;
  border-bottom: 3px solid var(--company-yellow);
}

.company-content {
  width: min(100% - 128px, 1792px);
  margin: 0 auto;
  padding: 64px 0 120px;
}

.company-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
}

.company-section-heading {
  margin: 0 0 40px;
}

.company-section-heading h2 {
  display: flex;
  align-items: end;
  gap: 16px;
  margin: 0;
  color: var(--company-navy);
  font-size: 24px;
  line-height: 1.4;
}

.company-section-heading h2 small {
  color: #aeb0b6;
  font-family: Roboto, sans-serif;
  font-size: 14px;
  letter-spacing: .04em;
}

.company-section-heading::after {
  display: block;
  width: 160px;
  height: 3px;
  margin-top: 8px;
  background: linear-gradient(to right, var(--company-navy) 0 62.5%, var(--company-yellow) 62.5% 100%);
  content: "";
}

.company-profile {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--company-border);
  border-right: 1px solid var(--company-border);
  font-size: var(--font-body);
  line-height: var(--line-body);
}

.company-profile th,
.company-profile td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--company-border);
  text-align: left;
  vertical-align: top;
}

.company-profile th {
  width: 132px;
  background: #efede8;
  color: var(--company-navy);
  font-size: 13px;
  white-space: nowrap;
}

.company-profile td p {
  margin: 0;
}

.company-profile td p + p {
  margin-top: .75em;
}

.company-profile a[target="_blank"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--company-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.company-profile a[target="_blank"]::after {
  display: inline-block;
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  background: currentColor;
  content: "";
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%3E%3Cpath%20fill='%23000'%20d='M10%201h5v5h-1.6V3.73L7.57%209.56%206.44%208.43%2012.27%202.6H10V1ZM2.6%203.4h5.2V5H4.2v6.8H11V8.2h1.6v5.2h-10v-10Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.license-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
}

.license-card {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--company-border);
}

.license-card h3 {
  position: relative;
  margin: 0 0 8px;
  padding-left: 12px;
  color: #2b2b2f;
  font-size: 15px;
  line-height: 1.45;
}

.license-card h3::before {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 4px;
  background: var(--company-yellow);
  content: "";
}

.license-card p {
  margin: 0;
  color: var(--company-muted);
  font-size: var(--font-body);
  line-height: var(--line-body);
}

.company-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  margin-top: 48px;
}

.company-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--company-muted);
  font-size: var(--font-body);
  line-height: var(--line-body);
}

.company-list li strong {
  display: inline-block;
  width: 160px;
  color: var(--company-navy);
}

.company-track-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #2b2b2f;
  font-size: var(--font-body);
  line-height: var(--line-body);
}

.greeting-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 80px;
  align-items: start;
}

.greeting-copy .company-section-heading {
  margin-bottom: 40px;
}

.greeting-copy h3 {
  margin: 0 0 32px;
  color: var(--company-navy);
  font-size: 20px;
  line-height: 1.6;
}

.greeting-copy p {
  margin: 0 0 24px;
  color: #2b2b2f;
  font-size: var(--font-body);
  line-height: var(--line-body);
}

.greeting-copy .greeting-lead {
  margin-bottom: 32px;
}

.greeting-copy .greeting-motto {
  margin-top: 40px;
  color: var(--company-navy);
  font-weight: 700;
  line-height: 1.7;
}

.greeting-signature {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  align-items: flex-end;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--company-border);
  color: var(--company-navy);
  font-size: 13px;
  font-weight: 700;
}

.greeting-signature__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 10px;
  white-space: nowrap;
}

.greeting-signature__company,
.greeting-signature__role {
  display: block;
}

.greeting-signature img {
  display: block;
  width: auto;
  height: auto;
}

@media (min-width: 561px) {
  .greeting-signature img {
    height: 60px;
  }

  .greeting-signature > p {
    margin: 0;
  }
}

.greeting-signature strong {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: .16em;
}

.greeting-book {
  margin: 48px 0 0;
  text-align: center;
}

.greeting-book img {
  display: block;
  width: min(100%, 320px);
  height: auto;
  margin: 0 auto;
}

.business-content {
  padding-top: 64px;
}

.business-content > .company-section-heading {
  margin-bottom: 40px;
}

.business-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.business-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  min-height: 280px;
  padding: 32px;
  background: #fff;
  border: 1px solid var(--company-border);
  border-radius: 4px;
}

/* Ignore empty paragraphs inserted by WordPress around the card HTML. */
.business-card > p:empty {
  display: none;
}

.business-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 392 / 280;
  overflow: hidden;
  background: #f1eee8;
}

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

.business-card__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.business-card__title {
  position: relative;
  display: block;
  padding-left: 16px;
  color: var(--company-navy);
  font-size: 21px;
  line-height: 1.45;
  font-weight: 700;
}

.business-card__title::before {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 4px;
  background: var(--company-yellow);
  content: "";
}

.business-card__text {
  margin: 0;
  color: #2b2b2f;
  font-size: var(--font-body);
  line-height: var(--line-body);
}

.business-card__link {
  color: var(--company-yellow);
  font-size: 13px;
  font-weight: 700;
}

.history-content {
  padding-top: 64px;
}

.history-content > .company-section-heading {
  margin-bottom: 40px;
}

.history-timeline {
  width: min(100%, 1120px);
  margin: 0;
}

.history-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  border-bottom: 1px solid #e3dfd6;
}

.history-row__left {
  display: grid;
  grid-template-columns: 80px 24px;
  align-items: stretch;
  padding: 16px 0;
  background: #faf8f4;
}

.history-year {
  padding-top: 8px;
  color: var(--company-navy);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.history-spine {
  position: relative;
  display: flex;
  justify-content: center;
}

.history-spine::before {
  width: 2px;
  background: var(--company-yellow);
  content: "";
}

.history-row__entries {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 16px 24px;
}

.history-entry {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-height: 35px;
  color: #2b2b2f;
  font-size: var(--font-body);
  line-height: var(--line-body);
}

.history-month {
  padding-top: 8px;
  color: var(--company-navy);
  text-align: right;
  white-space: nowrap;
}

.history-description {
  padding: 8px 0;
}

.office-content {
	width: calc(100% - 128px);
	max-width: 1792px;
	margin-right: auto;
	margin-left: auto;
  padding-top: 64px;
}

.site--office {
  overflow: visible;
}

.office-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.office-nav {
  position: sticky;
  top: 120px;
  align-self: start;
  z-index: 2;
  display: grid;
  justify-items: end;
  gap: 32px;
}

.office-nav a {
  display: block;
  padding: 0;
  color: var(--company-muted);
  font-size: 16px;
  line-height: 2;
  text-align: right;
  border-bottom: 2px solid transparent;
}

.office-nav a:hover,
.office-nav a.is-current {
  color: var(--company-navy);
  font-weight: 700;
  border-bottom-color: var(--company-yellow);
}

.office-sections {
  display: grid;
  gap: 48px;
  min-width: 0;
}

.office-area {
  scroll-margin-top: 120px;
}

.office-area h2 {
  margin: 0 0 24px;
  padding-bottom: 12px;
  color: var(--company-navy);
  font-size: 20px;
  line-height: 1.4;
  border-bottom: 1px solid var(--company-border);
}

.office-cards {
  display: grid;
  gap: 16px;
}

.office-card {
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--company-border);
  border-radius: 4px;
}

.office-card h3 {
  position: relative;
  margin: 0 0 10px;
  padding-left: 12px;
  color: var(--company-navy);
  font-size: 16px;
  line-height: 1.45;
}

.office-card h3::before {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 0;
  width: 4px;
  background: var(--company-yellow);
  content: "";
}

.office-card p {
  margin: 0;
  color: #2b2b2f;
  font-size: var(--font-body);
  line-height: var(--line-body);
}

.office-card p + p {
  color: var(--company-muted);
}

.company-list a {
  color: var(--company-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.office-map-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--company-navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.office-map-embed {
  margin-top: 16px;
  overflow: hidden;
  border-radius: 4px;
}

.office-map-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.office-map-embed {
  aspect-ratio: 16 / 9;
}

@media (min-width: 901px) {
  .office-card:has(.office-map-embed) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    column-gap: 32px;
    align-items: start;
    grid-template-rows: repeat(6, min-content) 1fr;
  }

  .office-card:has(.office-map-embed) > :not(.office-map-embed) {
    grid-column: 1;
  }

  .office-card:has(.office-map-embed) > .office-map-embed {
    grid-column: 2;
    grid-row: 1 / -1;
    margin-top: 0;
  }
}

@media (max-width: 1500px) {
  .company-tabs {
    padding-right: 40px;
    padding-left: 40px;
  }

  .company-content {
    width: calc(100% - 80px);
    padding-top: 48px;
  }

  .company-columns,
  .company-bottom-grid {
    gap: 32px;
  }

  .greeting-content {
    gap: 48px;
  }

  .business-content {
    padding-top: 48px;
  }

  .history-content {
    padding-top: 48px;
  }

  .business-content > .company-section-heading {
    margin-bottom: 40px;
  }

  .business-list {
    gap: 24px;
  }

  .business-card {
    gap: 24px;
    padding: 24px;
  }

  .history-timeline {
    width: 100%;
  }

  .office-content {
		width: calc(100% - 80px);
    padding-top: 48px;
  }

  .office-layout {
    grid-template-columns: 176px minmax(0, 1fr);
    gap: 24px;
  }
}

@media (max-width: 1400px) {
  .company-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .business-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .company-tabs {
    gap: 0;
    overflow-x: auto;
    padding: 24px 24px 0;
  }

  .company-tabs a {
    padding: 12px 16px;
    font-size: 14px;
  }

  .company-content {
    width: calc(100% - 48px);
    padding: 40px 0 72px;
  }

  .category-hero__title p {
    font-size: 14px;
  }

  .company-columns,
  .company-bottom-grid,
  .greeting-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .company-section-heading h2,
  .greeting-copy h2 {
    font-size: 20px;
  }

  .company-profile {
    font-size: 14px;
  }

  .company-profile th,
  .company-profile td {
    padding: 14px 12px;
  }

  .company-profile th {
    width: 96px;
    font-size: 14px;
    white-space: normal;
  }

  .license-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .company-list,
  .company-track-list,
  .license-card p,
  .greeting-copy p {
    font-size: 14px;
  }

  .company-list li strong {
    display: block;
    width: auto;
    margin-bottom: 2px;
  }

  .greeting-copy .company-section-heading {
    margin-bottom: 40px;
  }

  .greeting-copy h3 {
    margin-bottom: 24px;
    font-size: 17px;
  }

  .greeting-signature {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    font-size: 14px;
  }

  .greeting-signature__meta {
    gap: 12px;
    padding-bottom: 0;
    text-align: center;
  }

  .greeting-signature > p {
    margin-right: 0;
    margin-left: auto;
  }

  .greeting-book {
    margin-top: 0;
  }

  .business-list {
    grid-template-columns: 1fr;
  }

  .history-row {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .history-row__left {
    grid-template-columns: 40px 20px;
  }

  .history-year {
    font-size: 12px;
  }

  .history-entry {
    font-size: 14px;
    gap: 4px;
  }

  .history-row__entries {
    padding: 12px 8px;
  }

  .history-entry {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .history-description {
    overflow-wrap: anywhere;
  }

  .office-layout {
    display: block;
  }

  .office-content {
		width: auto;
		max-width: none;
    margin-right: 16px;
    margin-left: 16px;
  }

  .office-nav {
    position: sticky;
    top: 56px;
    z-index: 2;
    display: flex;
    gap: 0;
    overflow-x: auto;
    margin: 0 -24px 32px;
    padding: 8px 24px;
    background: rgba(250, 248, 244, .96);
    border-bottom: 1px solid var(--company-border);
  }

  .office-nav a {
    flex: 0 0 auto;
    padding: 8px 12px;
    font-size: 14px;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .office-nav a:hover,
  .office-nav a.is-current {
    border-bottom-color: var(--company-yellow);
  }

  .office-sections {
    gap: 40px;
  }

  .office-area h2 {
    font-size: 18px;
  }

  .office-area {
    scroll-margin-top: 56px;
  }

  .office-card {
    padding: 16px;
  }

  .office-card h3 {
    font-size: 16px;
  }

  .office-card p,
  .office-map-link {
    font-size: 14px;
  }
}

@media (max-width: 560px) {
  .business-card {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: 0;
    padding: 16px;
  }

  .business-card__title {
    font-size: 18px;
  }

  .business-card__text,
  .business-card__link {
    font-size: 14px;
  }
}

/* Block-editor headings inside the section heading: drop the generic underline/margins
   so only the company-section-heading underline remains. */
main .company-section-heading h2.wp-block-heading {
  margin: 0;
  font-size: 24px;
  line-height: 1.4;
}

main .company-section-heading h2.wp-block-heading::after {
  content: none;
  display: none;
}

/* Stacked sections inside one column (English company page) */
.company-columns > div > .company-profile + .company-section-heading,
.company-columns > div > .company-list + .company-section-heading,
.company-columns > div > .office-map-embed + .company-section-heading,
.company-columns > div > p + .company-section-heading {
  margin-top: 56px;
}

/* Office page: overflow:hidden on .site makes it the scroll container and breaks the sticky area nav.
   clip hides horizontal overflow the same way without creating a scroll container. */
.site:has(.office-layout) {
  overflow: visible;
  overflow-x: clip;
}
