/* After "And much more" is scrolled to the bottom, the section sticks,
   its content dissolves, then Welcome our Runner fades in. */

.runner-welcome-shell {
  position: relative;
  background: rgb(20, 20, 19);
  z-index: 2;
}

.runner-welcome-shell .runner-capabilities {
  position: sticky;
  top: var(--welcome-stick-top, 0px);
  overflow: visible;
}

.runner-welcome-shell .runner-capabilities__inner {
  will-change: opacity, filter;
}

.runner-welcome-shell .runner-lifecycle-finale {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0 24px;
  box-sizing: border-box;
  font-family: var(--_typography---type-font-headings, "Libre Caslon Condensed", "Times New Roman", serif);
  font-size: clamp(52px, 7.4vw, 108px);
  font-weight: 400;
  font-style: normal;
  line-height: 0.94;
  letter-spacing: -0.03em;
  text-align: center;
  color: #faf9f5;
  opacity: 0;
  pointer-events: none;
  will-change: opacity, filter, transform;
}

.runner-welcome-shell .runner-welcome-line {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.15em;
  max-width: 100%;
}

.runner-welcome-shell .runner-welcome-kicker {
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  white-space: nowrap;
  flex: none;
}

/* Full wordmark canvas, cropped to the glyph band. The short (R) is
   scaled onto the long mark's R; letters then open to the right. */
.runner-welcome-shell .runner-welcome-mark {
  position: relative;
  flex: none;
  /* Cropped to the visible (R). The canvas is scaled so the parentheses match the “Welcome our” text. */
  width: 1.58em;
  height: calc(4.4em * 0.36);
  margin-left: -0.27em;
  overflow: hidden;
  /* Close: shrink after the letters fold back into (R). */
  transition: width 0.18s cubic-bezier(0.22, 0.61, 0.18, 1) 0.14s;
}

.runner-welcome-shell .is-open .runner-welcome-mark {
  width: 4.1em;
  transition: width 0.62s cubic-bezier(0.33, 1, 0.68, 1);
}

@media (max-width: 767px) {
  .runner-welcome-shell .runner-lifecycle-finale {
    container-type: inline-size;
    font-size: clamp(46px, 14.2vw, 64px);
    padding: 0 12px;
  }

  .runner-welcome-shell .runner-welcome-kicker {
    font-size: 0.88em;
  }

  .runner-welcome-shell .runner-welcome-mark {
    width: 1.45em;
    height: calc(4em * 0.36);
    margin-left: -0.24em;
  }

  .runner-welcome-shell .is-open .runner-welcome-mark {
    width: 3.65em;
  }
}

/* Narrow mobile: stack the mark centered under “Welcome our”. */
@container (max-width: 40rem) {
  .runner-welcome-shell .runner-welcome-line {
    flex-direction: column;
    gap: 0.22em;
  }

  .runner-welcome-shell .runner-welcome-mark {
    margin-left: 0;
  }
}

.runner-welcome-shell .runner-welcome-mark__canvas {
  position: absolute;
  left: 0;
  width: 4.4em;
  aspect-ratio: 1;
  top: 50%;
  transform: translateY(-46.625%);
}

@media (max-width: 767px) {
  .runner-welcome-shell .runner-welcome-mark__canvas {
    width: 4em;
  }
}

/* After base canvas positioning — stacked mobile: optically center glyphs under kicker. */
@container (max-width: 40rem) {
  .runner-welcome-shell .runner-welcome-mark__canvas {
    left: -0.17em;
  }
}

.runner-welcome-shell .runner-welcome-mark__short,
.runner-welcome-shell .runner-welcome-mark__glyph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.runner-welcome-shell .runner-welcome-mark__short {
  transform-origin: 0 0;
  transform: translate(-19.864%, 7.318%) scale(0.8408);
  transition: opacity 0.12s ease 0.16s;
}

.runner-welcome-shell .runner-welcome-mark__glyph {
  opacity: 0;
  transition:
    opacity 0.1s ease,
    transform 0.14s cubic-bezier(0.22, 0.61, 0.18, 1);
}

.runner-welcome-shell .runner-welcome-mark__glyph--paren-r {
  transform: translateX(-55.476%);
  transition-delay: 0.08s;
}

.runner-welcome-shell .runner-welcome-mark__glyph--u,
.runner-welcome-shell .runner-welcome-mark__glyph--n1,
.runner-welcome-shell .runner-welcome-mark__glyph--n2,
.runner-welcome-shell .runner-welcome-mark__glyph--e,
.runner-welcome-shell .runner-welcome-mark__glyph--r-letter {
  transform: translateX(-1.4%);
}

/* Close stagger: last letter folds first, then (R) returns. */
.runner-welcome-shell .runner-welcome-mark__glyph--r-letter { transition-delay: 0s; }
.runner-welcome-shell .runner-welcome-mark__glyph--e { transition-delay: 0.03s; }
.runner-welcome-shell .runner-welcome-mark__glyph--n2 { transition-delay: 0.05s; }
.runner-welcome-shell .runner-welcome-mark__glyph--n1 { transition-delay: 0.08s; }
.runner-welcome-shell .runner-welcome-mark__glyph--u { transition-delay: 0.1s; }
.runner-welcome-shell .runner-welcome-mark__glyph--paren-l,
.runner-welcome-shell .runner-welcome-mark__glyph--cap-r {
  transition-delay: 0.12s;
}

.runner-welcome-shell .is-open .runner-welcome-mark__short {
  opacity: 0;
  transition: opacity 0.28s cubic-bezier(0.33, 1, 0.68, 1) 0.05s;
}

.runner-welcome-shell .is-open .runner-welcome-mark__glyph--paren-l,
.runner-welcome-shell .is-open .runner-welcome-mark__glyph--cap-r {
  opacity: 1;
  transition: opacity 0.32s cubic-bezier(0.33, 1, 0.68, 1);
}

.runner-welcome-shell .is-open .runner-welcome-mark__glyph--paren-r {
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 0.3s cubic-bezier(0.33, 1, 0.68, 1),
    transform 0.52s cubic-bezier(0.33, 1, 0.68, 1) 0.08s;
}

.runner-welcome-shell .is-open .runner-welcome-mark__glyph--u,
.runner-welcome-shell .is-open .runner-welcome-mark__glyph--n1,
.runner-welcome-shell .is-open .runner-welcome-mark__glyph--n2,
.runner-welcome-shell .is-open .runner-welcome-mark__glyph--e,
.runner-welcome-shell .is-open .runner-welcome-mark__glyph--r-letter {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.36s cubic-bezier(0.33, 1, 0.68, 1),
    transform 0.48s cubic-bezier(0.33, 1, 0.68, 1);
}

.runner-welcome-shell .is-open .runner-welcome-mark__glyph--u { transition-delay: 0.1s; }
.runner-welcome-shell .is-open .runner-welcome-mark__glyph--n1 { transition-delay: 0.16s; }
.runner-welcome-shell .is-open .runner-welcome-mark__glyph--n2 { transition-delay: 0.22s; }
.runner-welcome-shell .is-open .runner-welcome-mark__glyph--e { transition-delay: 0.28s; }
.runner-welcome-shell .is-open .runner-welcome-mark__glyph--r-letter { transition-delay: 0.34s; }

@media (prefers-reduced-motion: reduce) {
  .runner-welcome-shell {
    height: auto !important;
  }

  .runner-welcome-shell .runner-capabilities {
    position: relative;
    top: auto;
  }

  .runner-welcome-shell .runner-lifecycle-finale {
    position: relative;
    inset: auto;
    height: auto;
    min-height: 70vh;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }

  .runner-welcome-shell .runner-welcome-mark {
    width: 4.1em;
    transition: none !important;
  }

  .runner-welcome-shell .runner-welcome-mark__short {
    opacity: 0 !important;
  }

  .runner-welcome-shell .runner-welcome-mark__glyph {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .runner-welcome-shell .runner-welcome-mark {
    width: 3.65em;
  }
}
