.hero {
  position: relative;
  isolation: isolate;
  color: var(--text-light);
  background:
    radial-gradient(ellipse at 82% 7%, #244f8b 0, #132f57 31%, #081428 68%),
    var(--dark);
  overflow: clip;
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    repeating-linear-gradient(0deg, transparent 0 47px, #a4ccfd0e 47px 48px),
    repeating-linear-gradient(90deg, transparent 0 47px, #a4ccfd0e 47px 48px);
  mask-image: linear-gradient(#000 0%, transparent 86%);
  pointer-events: none;
}

.hero-inner { padding-block: calc(var(--header-height) + clamp(2.5rem, 4.65vw, 4.75rem)) clamp(2.65rem, 6vw, 5.8rem); }
.hero-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(15rem, .9fr);
  gap: clamp(1.25rem, 4vw, 4rem);
  align-items: end;
  margin-bottom: clamp(2.15rem, 3.7vw, 3.45rem);
}
.hero-kicker { color: var(--accent); display: flex; align-items: center; gap: .75rem; }
.hero-kicker::before { content: ""; width: 1.5rem; height: 1px; background: currentColor; }
.hero h1 { font-size: clamp(4.35rem, 6.85vw, 7.8rem); font-weight: 590; letter-spacing: -.086em; line-height: .91; margin-top: .21em; }
.hero h1 em { color: #bedbff; font: italic 400 1.045em/.95 var(--serif); letter-spacing: -.09em; padding-inline-end: .1em; white-space: nowrap; }
.hero-lead { padding-bottom: .1rem; color: var(--light-muted); font-size: clamp(1.05rem, 1.52vw, 1.38rem); line-height: 1.55; max-width: 21.5rem; }
.hero-lead a { display: inline-flex; align-items: center; min-height: 2.75rem; gap: .62rem; margin-top: .7rem; color: #e1edff; font-size: .95rem; font-weight: 650; text-decoration: underline; text-underline-offset: .32em; text-decoration-color: #92c4ff80; }
.hero-lead a::before { content: ""; width: .48rem; height: .48rem; flex: none; border: 1px solid #a8ceff; transform: rotate(45deg); }
.hero-lead a:hover { text-decoration-color: currentColor; color: white; }

.journey {
  position: relative;
  border: 1px solid #395f8b;
  color: #eef5ff;
  background: #0a1730;
  box-shadow: 0 27px 75px #030a1a66;
}
.journey::before, .journey::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: .8rem;
  height: .8rem;
  border-color: #9ed4ff;
  border-style: solid;
  pointer-events: none;
}
.journey::before { inset: -1px auto auto -1px; border-width: 1px 0 0 1px; }
.journey::after { inset: auto -1px -1px auto; border-width: 0 1px 1px 0; }
.journey-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: clamp(1rem, 2vw, 1.65rem) clamp(1rem, 2.2vw, 2rem);
  border-bottom: 1px solid #324b70;
  background: linear-gradient(108deg, #142744, #0d1d38 75%);
}
.journey-heading h2 { font-size: clamp(1.45rem, 2.85vw, 2.5rem); font-weight: 650; line-height: 1.05; letter-spacing: -.055em; }
.journey-heading p { margin-top: .35rem; color: #bdd0e9; font-size: .95rem; }
.journey-play, .journey-navigation button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: .58rem;
  color: #e1efff;
  border: 1px solid #527eae;
  background: #16345a;
  font-size: .875rem;
  font-weight: 650;
  padding: .57rem .86rem;
  transition: color .2s, background .2s, border .2s;
}
.journey-play { flex: none; }
.journey-play::before {
  content: "";
  width: .66rem;
  height: .72rem;
  background: #a6d7ff;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.journey-play.is-playing::before {
  background: linear-gradient(90deg, #a6d7ff 0 34%, transparent 34% 65%, #a6d7ff 65%);
  clip-path: none;
}
.journey-play:hover, .journey-navigation button:hover { background: #254e7f; border-color: #88b5e3; }
.journey-grid { display: grid; grid-template-columns: minmax(0, 1.92fr) minmax(0, 1fr); }
.journey-left { min-width: 0; display: flex; flex-direction: column; }
.journey-map-shell {
  position: relative;
  flex: 1 0 auto;
  width: 100%;
  height: clamp(20rem, 29vw, 28rem);
  background:
    radial-gradient(ellipse at 58% 48%, #21528a44, transparent 75%),
    linear-gradient(153deg, #0d1d36 0%, #09162c 66%, #101d3c);
}
#journey-map { position: absolute; display: block; inset: 0; width: 100%; height: 100%; touch-action: pan-y pinch-zoom; }
.journey-stages, .journey-navigation {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem clamp(.75rem, 1.65vw, 1.5rem);
  background: #0c1a32;
  border-top: 1px solid #304767;
}
.journey-stages { flex-wrap: wrap; }
.journey-stages button {
  flex: 1 0 auto;
  min-height: 2.75rem;
  padding: .56rem .55rem;
  background: #101f39;
  color: #bfcee4;
  border: 1px solid #3b5377;
  font-size: .875rem;
  line-height: 1.18;
  transition: background .2s, border .2s, color .2s;
}
.journey-stages button:hover { color: white; border-color: #679adc; }
.journey-stages button[aria-pressed="true"] { color: #07172e; background: #b6d9ff; border-color: #b6d9ff; font-weight: 720; }
.journey-navigation { justify-content: space-between; }
.journey-navigation button { color: #d6e8ff; border-color: #3e5a7c; background: transparent; min-width: 5rem; }
.journey-navigation > span { color: #acc8e9; font: .875rem/1 var(--mono); font-variant-numeric: tabular-nums; }
.journey-detail-link { display: none; }

.stage-detail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(1.18rem, 2.45vw, 2.1rem);
  background: linear-gradient(152deg, #142946, #0e1e37 64%);
  border-left: 1px solid #314c71;
}
.stage-heading .eyebrow { color: #a3ceff; }
.stage-heading h3 { margin: .24rem 0 .5rem; color: #f2f7ff; font-size: clamp(2.55rem, 4.1vw, 4.85rem); line-height: 1.03; font-weight: 630; letter-spacing: -.066em; overflow-wrap: anywhere; }
.stage-heading > p:last-child { color: #c8d9ef; line-height: 1.45; }
.stage-flow { display: grid; gap: .65rem; margin: 1rem 0; padding-top: .85rem; border-top: 1px solid #355174; }
.stage-flow > div { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); gap: .5rem; }
.stage-flow dt { color: #afcff3; font-weight: 650; font-size: .875rem; line-height: 1.45; }
.stage-flow dd { color: #d1def1; margin: 0; font-size: .94rem; line-height: 1.42; }
.stage-example { padding: .7rem .8rem .78rem; background: #1c3962; border-left: 2px solid #8bbfff; margin-top: auto; }
.stage-example .eyebrow { color: #c0dbff; font-size: .775rem; }
.stage-example > p:last-child { margin-top: .3rem; color: #e1edfe; font-size: .925rem; line-height: 1.47; }
.stage-brief { display: inline-flex; width: fit-content; align-items: center; min-height: 2.75rem; color: #c3e1ff; font-weight: 650; font-size: .92rem; text-decoration: underline; text-underline-offset: .25em; text-decoration-color: #7eabd5; margin-top: .53rem; }
.stage-brief:hover { color: white; text-decoration-color: white; }
.journey-return { display: flex; align-items: baseline; gap: .6rem 1rem; padding: .85rem clamp(1rem, 2.2vw, 2rem); border-top: 1px solid #324b70; background: #122340; color: #c9d9ed; font-size: .92rem; }
.journey-return strong { color: #e1efff; white-space: nowrap; }
.map-fallback { position: relative; padding: 1rem; color: var(--light-muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
  .hero-intro { grid-template-columns: minmax(0, 1.65fr) minmax(12rem, .9fr); }
  .hero h1 { font-size: clamp(3.6rem, 6.85vw, 5rem); }
  .journey-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .journey-map-shell { height: clamp(19.75rem, 47vw, 27rem); }
}

@media (max-width: 810px) {
  .hero-intro { grid-template-columns: 1fr; gap: 1rem; }
  .hero h1 { font-size: clamp(3.6rem, 10vw, 6rem); }
  .hero-lead { max-width: 32rem; font-size: 1.05rem; }
  .hero-lead a { margin-top: .4rem; }
  .journey-grid { grid-template-columns: minmax(0, 1fr); }
  .journey-map-shell { height: clamp(18.85rem, 57vw, 24rem); }
  .stage-detail { border-left: 0; border-top: 1px solid #314c71; min-height: 23rem; }
  .stage-example { margin-top: .25rem; }
  .journey-detail-link { display: grid; place-items: center; min-height: 2.75rem; background: #0c1a32; color: #b6d9ff; text-decoration: underline; text-underline-offset: .24em; }
}

@media (max-width: 540px) {
  .hero-inner { padding-top: calc(var(--header-height) + 2rem); }
  .hero-intro { margin-bottom: 1.45rem; }
  .hero-kicker { gap: .5rem; font-size: .74rem; }
  .hero-kicker::before { width: .75rem; }
  .hero h1 { font-size: clamp(3.55rem, 13.8vw, 4.75rem); max-width: 9ch; margin-top: .31em; }
  .journey-heading { align-items: start; gap: .65rem; }
  .journey-heading p { font-size: .9rem; }
  .journey-play { padding-inline: .62rem; }
  .journey-map-shell { height: clamp(17.25rem, 83vw, 23rem); }
  .journey-stages { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .36rem; }
  .journey-stages button { grid-column: span 3; padding-inline: .25rem; font-size: .83rem; }
  .journey-stages button:nth-child(-n+3) { grid-column: span 4; }
  .journey-return { display: grid; gap: .2rem; }
}

@media (max-width: 365px) {
  .journey-heading { flex-wrap: wrap; }
}
