/* K-O history: an editorial timeline, with motion as progressive enhancement. */
.heritage-intro {
  padding: 160px 0 75px;
  background: #fff;
}

.heritage-intro .breadcrumb,
.heritage-intro .heritage-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 42px;
  color: #637481;
  font-size: 11px;
}

.heritage-intro h1 {
  max-width: 1100px;
  margin: 0 0 40px;
  color: var(--ink);
  font-size: clamp(56px, 7.6vw, 112px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.heritage-intro-copy {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(35px, 7vw, 110px);
  padding-top: 34px;
  border-top: 1px solid #d8e0e5;
}

.heritage-intro-copy > p {
  max-width: 570px;
  margin-bottom: 0;
  color: #586b79;
  font-size: 16px;
  line-height: 1.8;
}

.heritage-intro-copy > p:first-child {
  color: var(--ink);
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.5;
  letter-spacing: -0.025em;
}

.heritage-section {
  padding: 95px 0 110px;
  background: #fff;
  scroll-margin-top: 110px;
}

.heritage-heading {
  max-width: 980px;
  margin-bottom: 90px;
}

.heritage-heading .eyebrow {
  margin-bottom: 25px;
}

.heritage-heading h2 {
  margin-bottom: 25px;
  color: var(--ink);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 400;
  line-height: 1.08;
}

.heritage-heading > p:not(.eyebrow) {
  max-width: 600px;
  margin-bottom: 0;
  font-size: 16px;
  line-height: 1.8;
}

.heritage-track {
  --heritage-spine-x: 50%;
  --heritage-dot-top: 39px;
  position: relative;
  max-width: 1260px;
  margin: 0 auto;
  isolation: isolate;
}

.heritage-track::before,
.heritage-progress {
  position: absolute;
  z-index: -1;
  top: var(--heritage-start, 39px);
  left: var(--heritage-spine-x);
  width: 2px;
  height: var(--heritage-length, calc(100% - 100px));
  margin-left: -1px;
  pointer-events: none;
}

.heritage-track::before {
  content: "";
  background: #d5e0e8;
}

.heritage-progress {
  display: block;
  background: var(--blue);
  transform: scaleY(var(--heritage-progress, 1));
  transform-origin: center top;
}

.heritage-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.heritage-event {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr);
  align-items: start;
  padding: 0 0 76px;
  scroll-margin-top: 125px;
}

.heritage-event:last-child {
  padding-bottom: 0;
}

/* Markers belong to the row, never to the animated text. */
.heritage-event::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: var(--heritage-dot-top);
  left: var(--heritage-spine-x);
  width: 13px;
  height: 13px;
  border: 2px solid var(--blue);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 7px #fff;
  transform: translate(-50%, -50%);
}

.heritage-event.is-reached::before {
  background: var(--blue);
}

.heritage-event.is-current::before {
  border-color: var(--red);
  background: var(--red);
  box-shadow:
    0 0 0 7px #fff,
    0 0 0 8px #b9000b24;
}

.heritage-year {
  grid-row: 1;
  grid-column: 3;
  padding-left: 24px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(70px, 6.7vw, 90px);
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1;
  letter-spacing: -0.055em;
}

.heritage-year > span {
  display: inline-block;
}

.heritage-body {
  grid-row: 1;
  grid-column: 1;
  justify-self: end;
  width: 100%;
  max-width: 500px;
  padding-right: 24px;
}

.heritage-event:nth-child(even) .heritage-year {
  grid-column: 1;
  padding-right: 24px;
  padding-left: 0;
  text-align: right;
}

.heritage-event:nth-child(even) .heritage-body {
  grid-column: 3;
  justify-self: start;
  padding-right: 0;
  padding-left: 24px;
}

.heritage-body .heritage-kicker {
  margin: 0 0 15px;
  color: var(--red);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.13em;
}

.heritage-body h3 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(25px, 2.5vw, 34px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.16;
}

.heritage-body > p:not(.heritage-kicker) {
  margin: 0;
  color: #5d6d78;
  font-size: 15px;
  line-height: 1.85;
}

.heritage-body > p + p:not(.heritage-kicker) {
  margin-top: 14px;
}

.heritage-body .text-link,
.heritage-body .btn {
  margin-top: 22px;
}

.heritage-event.is-reached .heritage-year {
  color: var(--blue);
}

/* The Today milestone closes the timeline with a photographic feature. */
.heritage-today {
  margin-bottom: 96px;
  scroll-margin-top: 110px;
}

.heritage-today-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 30px;
  border: 7px solid #eaf1f8;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
}

.heritage-today-marker::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 7px);
  left: calc(50% - 1px);
  width: 2px;
  height: 40px;
  background: #b8cee1;
}

.heritage-today-marker svg {
  width: 25px;
  height: 25px;
}

.heritage-today-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  min-height: clamp(660px, 50vw, 760px);
  overflow: hidden;
  padding: clamp(40px, 4.5vw, 68px) 32px 32px;
  color: #fff;
  background: #102433;
  text-align: center;
}

.heritage-today-background,
.heritage-today-card::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.heritage-today-background {
  z-index: -2;
  object-fit: cover;
  object-position: center 52%;
}

.heritage-today-card::after {
  content: "";
  z-index: -1;
  background: linear-gradient(
    180deg,
    #071b2ce8 0%,
    #0a2034c9 32%,
    #0c2235b8 60%,
    #071929c9 100%
  );
}

.heritage-today-content {
  width: 100%;
  max-width: 850px;
}

.heritage-today-content .eyebrow {
  justify-content: center;
  gap: 10px;
  margin: 0 0 22px;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.heritage-today-content .eyebrow > span {
  width: 6px;
  height: 6px;
  background: #91c5f4;
}

.heritage-today-content h2 {
  margin: 0 0 22px;
  color: #fff;
  font-size: clamp(42px, 5.2vw, 76px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.heritage-today-content .lead {
  max-width: 670px;
  margin: 0 auto 28px;
  color: #f3f7fb;
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.65;
  text-wrap: pretty;
}

.heritage-today-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 48px;
  padding: 10px 20px;
  border: 1px solid #ffffff8c;
  background: #071b2c55;
  color: #fff;
  font-size: 13px;
  transition:
    background 250ms,
    border-color 250ms;
}

.heritage-today-link span {
  font-size: 21px;
  transition: transform 250ms var(--ease);
}

.heritage-today-link:is(:hover, :focus-visible) {
  border-color: #fff;
  background: var(--blue);
}

.heritage-today-link:is(:hover, :focus-visible) span {
  transform: translate(2px, -2px);
}

.heritage-today-card .heritage-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(620px, 100%);
  margin: 76px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid #ffffff4d;
}

.heritage-today-card .heritage-facts > div {
  min-width: 0;
  padding: 0 20px;
}

.heritage-today-card .heritage-facts > div + div {
  border-left: 1px solid #ffffff4d;
}

.heritage-today-card .heritage-facts dt {
  margin: 0 0 7px;
  color: #fff;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.035em;
}

.heritage-facts dt span {
  font-size: 0.48em;
  letter-spacing: 0;
}

.heritage-today-card .heritage-facts dd {
  margin: 0;
  color: #e2ebf3;
  font-size: 11px;
  letter-spacing: 0.025em;
  line-height: 1.5;
}

.heritage-today-caption {
  margin: 14px 0 0;
  color: #607481;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  .js-motion .heritage-today-card .heritage-today-background {
    transform: scale(1.065);
    transition: transform 3.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .js-motion .heritage-today-card.visible .heritage-today-background {
    transform: scale(1);
  }

  .js-motion .heritage-today-content > *,
  .js-motion .heritage-today-card .heritage-facts {
    transition:
      opacity 800ms var(--ease),
      transform 900ms var(--ease);
    transition-delay: 160ms;
  }

  .js-motion .heritage-today-card:not(.visible) .heritage-today-content > *,
  .js-motion .heritage-today-card:not(.visible) .heritage-facts {
    opacity: 0;
    transform: translateY(18px);
  }

  .js-motion .heritage-today-content > h2 {
    transition-delay: 240ms;
  }
  .js-motion .heritage-today-content > .lead {
    transition-delay: 340ms;
  }
  .js-motion .heritage-today-content > .heritage-today-link {
    transition-delay: 440ms;
  }
  .js-motion .heritage-today-card .heritage-facts {
    transition-delay: 540ms;
  }
}

.new-chapter.heritage-chapter {
  width: min(1440px, calc(100% - 80px));
  margin: 0 auto 120px;
  padding: 72px 0;
  background: var(--ink);
}

.heritage-chapter > .wrap {
  width: auto;
  margin: 0;
  padding-right: clamp(24px, 5vw, 72px);
  padding-left: clamp(24px, 5vw, 72px);
}

.heritage-chapter .new-chapter-grid {
  gap: clamp(40px, 5vw, 80px);
}

.heritage-chapter .new-chapter-grid > * {
  min-width: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .heritage-motion .heritage-progress {
    transition: transform 150ms linear;
  }

  .heritage-motion .heritage-event::before {
    transition:
      background 250ms,
      border-color 250ms,
      box-shadow 250ms;
  }

  .heritage-motion .heritage-year > span,
  .heritage-motion .heritage-body {
    transition:
      opacity 650ms ease,
      transform 800ms cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .heritage-motion .heritage-event:not(.is-revealed) .heritage-year > span {
    opacity: 0;
    transform: translateY(18px);
  }

  .heritage-motion .heritage-event:not(.is-revealed) .heritage-body {
    opacity: 0;
    transform: translate(-22px, 10px);
  }

  .heritage-motion
    .heritage-event:nth-child(even):not(.is-revealed)
    .heritage-body {
    transform: translate(22px, 10px);
  }

  .heritage-motion .heritage-event.is-revealed .heritage-year > span {
    transition-delay: 80ms;
  }

  .heritage-motion .heritage-event.is-revealed .heritage-year > span,
  .heritage-motion .heritage-event.is-revealed .heritage-body {
    opacity: 1;
    transform: none;
  }

  .heritage-motion .heritage-year {
    transition: color 300ms;
  }
}

@media (max-width: 1050px) {
  .heritage-event {
    grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
  }

  .heritage-body,
  .heritage-event:nth-child(even) .heritage-year {
    padding-right: 15px;
  }

  .heritage-year,
  .heritage-event:nth-child(even) .heritage-body {
    padding-left: 15px;
  }
}

@media (max-width: 760px) {
  .heritage-intro {
    padding-top: 135px;
    padding-bottom: 55px;
  }

  .heritage-intro h1 {
    font-size: clamp(47px, 10vw, 70px);
    margin-bottom: 30px;
  }

  .heritage-intro-copy {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 25px;
  }

  .heritage-section {
    padding: 60px 0 75px;
  }

  .heritage-heading {
    margin-bottom: 52px;
  }

  .heritage-track {
    --heritage-spine-x: 8px;
    --heritage-dot-top: 31px;
  }

  .heritage-event {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 0 62px 45px;
  }

  .heritage-event .heritage-year,
  .heritage-event:nth-child(even) .heritage-year {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 22px;
    padding: 0;
    font-size: clamp(58px, 12vw, 74px);
    text-align: left;
  }

  .heritage-event .heritage-body,
  .heritage-event:nth-child(even) .heritage-body {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    max-width: 540px;
    padding: 0;
  }

  .heritage-body h3 {
    font-size: 28px;
  }

  .heritage-body > p:not(.heritage-kicker) {
    font-size: 14px;
    line-height: 1.8;
  }

  .heritage-today {
    margin-bottom: 64px;
  }

  .heritage-today-card {
    min-height: 680px;
    padding: 42px 22px 28px;
  }

  .heritage-today-background {
    object-position: 50% 50%;
  }

  .heritage-today-card .heritage-facts {
    margin-top: 65px;
  }
  .heritage-today-card .heritage-facts > div {
    padding: 0 10px;
  }

  .new-chapter.heritage-chapter {
    width: calc(100% - 36px);
    margin-bottom: 70px;
    padding: 40px 0;
  }

  .heritage-chapter > .wrap {
    padding-right: 24px;
    padding-left: 24px;
  }
}

@media (max-width: 760px) and (prefers-reduced-motion: no-preference) {
  .heritage-motion .heritage-event:not(.is-revealed) .heritage-body,
  .heritage-motion
    .heritage-event:nth-child(even):not(.is-revealed)
    .heritage-body {
    transform: translateY(14px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .heritage-event .heritage-year > span,
  .heritage-event .heritage-body {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .heritage-progress {
    transform: scaleY(1);
    transition: none;
  }

  .heritage-event::before,
  .heritage-year {
    transition: none;
  }
}

@media print {
  .heritage-event {
    break-inside: avoid;
  }

  .heritage-event .heritage-year > span,
  .heritage-event .heritage-body {
    opacity: 1 !important;
    transform: none !important;
  }

  .heritage-progress {
    transform: scaleY(1);
  }
}

@media (max-width: 400px) {
  .heritage-today-content h2 {
    font-size: 36px;
  }
  .heritage-today-card {
    padding-inline: 18px;
  }
  .heritage-today-card .heritage-facts dt {
    font-size: 22px;
  }
}

@media print {
  .heritage-today-card {
    break-inside: avoid;
    print-color-adjust: exact;
  }
  .js-motion .heritage-today-card .heritage-today-content > *,
  .js-motion .heritage-today-card .heritage-facts {
    opacity: 1 !important;
    transform: none !important;
  }
}
