.hero--legacy .hero-timeline {
  position: absolute;
  z-index: 5;
  right: var(--pad-end);
  bottom: 0;
  left: var(--pad-start);
  color: #0f1c23;
}

.hero--legacy .hero-timeline::before {
  position: absolute;
  top: 0;
  right: calc(-1 * var(--pad-end));
  bottom: 0;
  left: calc(-1 * var(--pad-start));
  background: rgb(255 255 255 / 52%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  content: '';
  pointer-events: none;
}

.hero-timeline__scroll {
  position: relative;
  display: flex;
  min-height: 64px;
  overflow: hidden;
}

.hero-timeline__step {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 64px;
}

.hero-timeline__link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 64px;
  padding: 10px 30px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: var(--nav-size);
  font-weight: 450;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: color 180ms ease;
}

.hero-timeline__link:is(:hover, :focus-visible, .is-active) {
  color: var(--cyan, #07d5d1);
}

.hero-timeline__link:focus-visible {
  z-index: 2;
  outline: 2px solid #0f1c23;
  outline-offset: 3px;
}

.hero-timeline__step:not(:last-child)::after {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 5px;
  width: 20px;
  height: 20px;
  border-top: 1px solid rgb(15 28 35 / 34%);
  border-right: 1px solid rgb(15 28 35 / 34%);
  content: '';
  pointer-events: none;
  transform: translateY(-50%) rotate(45deg);
}

.hero-timeline__detail {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  min-height: clamp(188px, 23vh, 300px);
  padding: clamp(24px, 2.6vw, 50px);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 240ms ease, transform 300ms cubic-bezier(.22, 1, .36, 1), visibility 240ms;
}

.hero--legacy .hero-timeline__detail::before {
  position: absolute;
  inset: 0 calc(-1 * var(--pad-end)) 0 calc(-1 * var(--pad-start));
  background: rgb(255 255 255 / 52%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  content: '';
  pointer-events: none;
}

.hero-timeline__detail > * {
  position: relative;
}

.hero-timeline.is-open .hero-timeline__detail {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hero-timeline__detail h2,
.hero-timeline__dialog h2 {
  margin: 0 0 12px;
  color: #0f1c23;
  font-family: var(--font-display);
  font-size: clamp(30px, 2.7vw, 50px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.035em;
}

.hero-timeline__detail p,
.hero-timeline__dialog p {
  max-width: 75ch;
  margin: 0;
  color: #0f1c23;
  font-size: clamp(17px, 1.1vw, 22px);
  line-height: 1.4;
}


.hero-timeline__detail p a,
.hero-timeline__dialog p a {
  color: inherit;
  border-bottom: 1px solid rgb(7 213 209 / 40%);
  text-decoration: none;
  transition: border-color 180ms ease;
}

.hero-timeline__detail p a:hover,
.hero-timeline__detail p a:focus-visible,
.hero-timeline__dialog p a:hover,
.hero-timeline__dialog p a:focus-visible {
  border-bottom-color: transparent;
}

.hero-timeline__dialog:not([open]) { display: none; }

@media (max-width: 900px) {
  .hero-timeline__scroll {
    min-height: 58px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .hero-timeline__scroll::-webkit-scrollbar { display: none; }

  .hero-timeline__step {
    flex: 0 0 auto;
    min-width: 190px;
    min-height: 58px;
    scroll-snap-align: center;
  }

  .hero-timeline__link {
    min-height: 58px;
    padding: 10px 32px 10px 24px;
  }
}

@media (max-width: 700px) {
  .hero-timeline__scroll,
  .hero-timeline__step { min-height: 56px; }

  .hero-timeline__step { min-width: 170px; }
  .hero-timeline__link { min-height: 56px; }
  .hero-timeline__detail { display: none; }

  .hero-timeline__dialog[open] {
    position: fixed;
    inset: auto 0 0;
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: none;
    max-height: min(78dvh, 640px);
    margin: 0;
    padding: 48px 24px calc(32px + env(safe-area-inset-bottom));
    overflow-y: auto;
    border: 0;
    border-radius: 20px 20px 0 0;
    color: #0f1c23;
    background: rgb(255 255 255 / 52%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    backdrop-filter: blur(18px) saturate(130%);
    box-shadow: 0 -14px 55px rgb(11 28 36 / 18%);
    animation: hero-timeline-sheet-in 260ms cubic-bezier(.22, 1, .36, 1) both;
  }

  .hero-timeline__dialog::backdrop {
    background: rgb(11 28 36 / 48%);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
  }

  .hero-timeline__dialog h2 { padding-right: 28px; font-size: clamp(27px, 7vw, 36px); }
  .hero-timeline__dialog p { font-size: 17px; }

  .hero-timeline__dialog-close {
    position: absolute;
    top: 16px;
    right: 18px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border: 0;
    color: #0f1c23;
    background: transparent;
    cursor: pointer;
  }

  .hero-timeline__dialog-close svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.5; fill: none; }
}

@keyframes hero-timeline-sheet-in {
  from { opacity: .7; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-timeline__detail { transition: none; }
  .hero-timeline__dialog[open] { animation: none; }
}

@media (max-width: 680px) {
  .hero.hero--legacy.hero--cms-image {
    height: auto;
    min-height: 0;
  }

  .hero.hero--legacy.hero--cms-image::after { content: none; }

  .hero.hero--legacy.hero--cms-image .hero-cms-image {
    position: relative;
    z-index: 0;
    display: block;
    width: 100%;
    height: clamp(380px, 124vw, 540px);
    max-width: 100%;
    object-fit: cover;
    object-position: 40% top;
  }

  .hero.hero--legacy.hero--cms-image .hero-cms-preview {
    inset: 0 auto auto 0;
    width: 100%;
    height: clamp(380px, 124vw, 540px);
    max-width: 100%;
    object-fit: cover;
    object-position: 40% top;
  }

  .hero.hero--legacy.hero--cms-image .hero-layout {
    height: auto;
    min-height: 0;
    padding-inline: 0;
  }

  .hero.hero--legacy.hero--cms-image .hero-timeline {
    position: relative;
    inset: auto;
    margin-top: -56px;
  }

  .hero.hero--legacy.hero--cms-image .hero-timeline::before {
    right: 0;
    left: 0;
  }
}
