/* ==========================================================================
   JOURNEY  ·  #courses  ·  A1 → A2 → B1 → B2
   Two layouts from ONE DOM:
   · base            → vertical timeline (phones, tablets, reduced motion, no JS)
   · @media (pinned) → desktop pinned "road to the gate" stage (JS-driven)
   The `pinned` media query below MUST mirror PIN_Q in assets/js/sections/journey.js.
   Never put a stylesheet `transform` on an SVG element that GSAP animates
   (GSAP writes the transform *attribute*, which a CSS rule would override).
   ========================================================================== */

.journey {
  --j-card-w: clamp(23rem, 31vw, 31rem);
  --j-glass: linear-gradient(165deg, rgba(15, 58, 128, 0.6) 0%, rgba(6, 27, 63, 0.86) 58%, rgba(4, 15, 38, 0.92) 100%);
  --j-line: 0.75rem; /* x of the timeline rail inside .journey__levels */
  --j-gutter-l: 2.4rem; /* left padding that makes room for the rail */
  position: relative;
  background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 20%, var(--navy-800) 56%, var(--navy-700) 100%);
  overflow: clip;
}

.journey__defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* The desktop-only scenery is hidden on the timeline layout */
.journey__sky,
.journey__sky-art,
.journey__scene {
  display: none;
}
.journey__hint {
  display: none;
  white-space: nowrap;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}

/* Timeline atmosphere: a few stars up top */
.journey::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 46%;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(1.6px 1.6px at 12% 16%, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(1.2px 1.2px at 38% 8%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.8px 1.8px at 64% 22%, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1.2px 1.2px at 86% 12%, rgba(255, 255, 255, 0.75), transparent),
    radial-gradient(1.4px 1.4px at 24% 44%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.2px 1.2px at 52% 52%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1.6px 1.6px at 92% 48%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1.2px 1.2px at 72% 76%, rgba(255, 255, 255, 0.55), transparent);
  background-size: 460px 400px;
  -webkit-mask-image: linear-gradient(#000 25%, transparent);
  mask-image: linear-gradient(#000 25%, transparent);
}

.journey__pin {
  position: relative;
  z-index: 1;
}
.journey__pin::before {
  /* tricolour seam where the light hero meets the night sky */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 4;
  height: 5px;
  background: var(--grad-flag);
  pointer-events: none;
}

.journey__inner {
  display: grid;
  gap: clamp(1.75rem, 4.5vw, 3rem);
}
.journey__intro {
  display: grid;
  gap: clamp(1.75rem, 4.5vw, 3rem);
  align-content: start;
}
.journey__head {
  max-width: 46rem;
}

/* --------------------------------------------------------------------------
   Level pills — the poster's A1 / A2 / B1 / B2 capsules (overview + jump links)
   -------------------------------------------------------------------------- */
.journey-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 30rem;
}
.journey-step__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.5rem;
  padding: 0.3rem 1.1rem 0.3rem 0.3rem;
  border-radius: var(--r-pill);
  background: var(--sky-100);
  color: var(--navy-800);
  box-shadow: 0 10px 26px rgba(2, 8, 24, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.journey-step__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(2, 8, 24, 0.45), inset 0 0 0 1px #fff;
}
.journey-step__link:focus-visible {
  outline-offset: 4px;
}
.journey-step__code {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 2.9rem;
  height: 2.9rem;
  padding-inline: 0.55rem;
  border-radius: var(--r-pill);
  background: var(--grad-blue);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.journey-step__days {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.journey-step__fill {
  /* gold progress fill — only used on the pinned layout */
  position: absolute;
  inset: 0;
  z-index: -1;
  display: none;
  background: var(--grad-gold);
  transform-origin: 0 50%;
}
.journey-step.is-current .journey-step__link {
  box-shadow: 0 0 0 3px var(--gold), 0 12px 32px rgba(255, 200, 30, 0.3);
}

/* --------------------------------------------------------------------------
   Timeline (base layout): rail + nodes + cards
   -------------------------------------------------------------------------- */
.journey__levels {
  position: relative;
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
  padding-left: var(--j-gutter-l);
  --p: 1; /* rail progress 0 → 1 (JS draws it on scroll) */
}
.journey__levels::before,
.journey__levels::after {
  content: "";
  position: absolute;
  left: calc(var(--j-line) - 1.5px);
  top: 1.9rem;
  bottom: 0;
  width: 3px;
  border-radius: 3px;
}
.journey__levels::before {
  background: rgba(255, 255, 255, 0.14);
}
.journey__levels::after {
  background: linear-gradient(180deg, var(--gold) 0%, var(--blue-400) 100%);
  transform-origin: 50% 0;
  transform: scaleY(var(--p));
}
.journey-level {
  position: relative;
}
.journey-level::before {
  /* the station node on the rail */
  content: "";
  position: absolute;
  z-index: 2;
  left: calc(var(--j-line) - var(--j-gutter-l) - 0.7rem);
  top: 1.2rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--navy-900);
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 5px rgba(255, 200, 30, 0.16), 0 0 18px rgba(255, 200, 30, 0.5);
  transition: border-color 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), background-color 0.5s var(--ease-out);
}
.journey--tl .journey-level:not(.is-lit)::before {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.journey-card {
  position: relative;
  display: grid;
  gap: 1rem 1.5rem;
  padding: clamp(1.25rem, 3.2vw, 1.75rem);
  border-radius: var(--r-lg);
  background: var(--j-glass);
  border: 1px solid var(--line-on-dark);
  box-shadow: 0 30px 70px rgba(2, 8, 24, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  overflow: hidden;
  isolation: isolate;
}
.journey-card::after {
  /* faint tricolour hairline across the card top */
  content: "";
  position: absolute;
  inset: 0 1.75rem auto 1.75rem;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--grad-flag);
  opacity: 0.85;
}

.journey-card__head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.journey-card__badge {
  display: grid;
  place-items: center;
  flex: none;
  min-width: 4.1rem;
  height: 3.5rem;
  padding-inline: 0.8rem;
  border-radius: 1.15rem;
  background: var(--grad-blue);
  color: #fff;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-glow-blue), inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}
.journey-card__titles {
  min-width: 0;
}
.journey-card__step {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.journey-card__title {
  font-size: var(--fs-xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: #fff;
}
.journey-card__note {
  /* hand-lettered German line; on the pinned layout it lives on the map instead */
  margin-top: 0.15rem;
  font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.7rem);
  transform: rotate(-2deg);
  transform-origin: 0 100%;
}

.journey-card__duration {
  display: flex;
  align-items: flex-end;
  gap: 1.1rem;
}
.journey-card__days {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex: none;
}
.journey-card__num {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 2rem + 3vw, 3.75rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.journey-card__unit {
  font-family: var(--font-display);
  font-size: var(--fs-base);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}
.journey-card__ticks {
  /* one tick per day: 30 or 40, via --n */
  position: relative;
  flex: 1;
  height: 1.15rem;
  margin-bottom: 0.4rem;
  background: rgba(255, 255, 255, 0.16);
  -webkit-mask: linear-gradient(90deg, #000 0 58%, transparent 58% 100%) 0 0 / calc(100% / var(--n)) 100% repeat-x;
  mask: linear-gradient(90deg, #000 0 58%, transparent 58% 100%) 0 0 / calc(100% / var(--n)) 100% repeat-x;
}
.journey-card__fill {
  position: absolute;
  inset: 0;
  background: var(--grad-gold);
  transform-origin: 0 50%;
}

.journey-card__label {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.journey-card__list {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
}
.journey-card__list li {
  display: grid;
  grid-template-columns: 1.3rem 1fr;
  gap: 0.6rem;
  align-items: start;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--on-dark);
}
.journey-card__list .icon {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.12rem;
  color: var(--gold);
  stroke-width: 2.6;
}
.journey-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.journey-card__chips li {
  padding: 0.42rem 0.85rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line-on-dark);
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}
.journey-card__chips small {
  font-size: inherit;
  font-weight: 500;
  color: var(--on-dark-soft);
}
.journey-card__foot {
  display: flex;
}

@media (min-width: 700px) {
  .journey {
    --j-line: 1.15rem;
    --j-gutter-l: 3.5rem;
  }
}
@media (min-width: 700px) and (max-width: 1023.98px) {
  .journey-card::before {
    /* faint outlined level code in the empty lower-left corner */
    content: attr(data-code);
    position: absolute;
    z-index: -1;
    left: 1.1rem;
    bottom: 4.6rem;
    font-family: var(--font-display);
    font-size: clamp(6rem, 13vw, 8.5rem);
    font-weight: 800;
    line-height: 0.8;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.1);
    pointer-events: none;
  }
}
@media (min-width: 700px) {
  .journey-steps {
    grid-template-columns: repeat(4, auto);
    justify-content: start;
    max-width: none;
  }
}
/* two-column card body only where the card is wide: tablets, and wide desktops
   (between 1024 and 1279 the timeline column is narrow, so cards stay single-column) */
@media (min-width: 700px) and (max-width: 1023.98px), (min-width: 1280px) {
  .journey-card {
    grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
    grid-template-areas:
      "head head"
      "dur body"
      "foot body";
    align-items: start;
  }
  .journey-card__head {
    grid-area: head;
  }
  .journey-card__duration {
    grid-area: dur;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .journey-card__ticks {
    flex: none;
    width: 100%;
    margin-bottom: 0;
  }
  .journey-card__body {
    grid-area: body;
  }
  .journey-card__foot {
    grid-area: foot;
    align-self: end;
  }
}

/* Desktop widths without the pinned stage (reduced motion, short or portrait windows):
   sticky intro + pill stack on the left, the timeline on the right. */
@media (min-width: 1024px) {
  .journey__inner {
    grid-template-columns: minmax(16rem, 23rem) minmax(0, 1fr);
    column-gap: clamp(2.5rem, 5vw, 5rem);
    align-items: start;
  }
  .journey__intro {
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
  }
  .journey__title {
    font-size: clamp(2.4rem, 3.3vw, 3.4rem);
  }
  .journey-steps {
    grid-template-columns: minmax(0, 1fr);
    max-width: 15rem;
  }
}

/* --------------------------------------------------------------------------
   Finale (timeline layout): gate + "Ziel: Deutschland"
   -------------------------------------------------------------------------- */
.journey-finale {
  display: grid;
  gap: clamp(1rem, 3vw, 1.75rem);
  justify-items: center;
  margin-top: clamp(1rem, 4vw, 2.5rem);
}
.journey-finale__gate {
  width: min(100%, 31rem);
  height: auto;
  overflow: visible;
}
.journey-finale__card {
  display: grid;
  gap: 1rem;
  justify-items: center;
  width: min(100%, 38rem);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  border-radius: var(--r-xl);
  background: var(--j-glass);
  border: 1px solid var(--line-on-dark);
  box-shadow: 0 30px 80px rgba(2, 8, 24, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  text-align: center;
}
.journey-finale__script {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem);
  transform: rotate(-2deg);
}
.journey-finale__title {
  display: grid;
  gap: 0.2rem;
  justify-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.journey-finale__banner {
  position: relative;
  display: inline-grid;
  place-items: center;
  padding: 0.5em 1.1em 0.58em;
  font-size: clamp(1.7rem, 1.1rem + 3.2vw, 2.7rem);
  isolation: isolate;
}
.journey-finale__banner .brush {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.journey-finale__banner--ziel {
  color: #fff;
  transform: rotate(-2deg);
}
.journey-finale__banner--ziel .brush {
  color: var(--schwarz);
}
.journey-finale__banner--land {
  color: var(--gold);
  transform: rotate(1.2deg);
}
.journey-finale__banner--land .brush {
  color: var(--rot);
}
.journey-finale__word {
  display: block;
}
.journey-finale__lead {
  max-width: 28rem;
  font-size: var(--fs-lg);
  color: var(--on-dark-soft);
}
.journey-finale__stats {
  display: flex;
  gap: clamp(1.75rem, 6vw, 3rem);
  justify-content: center;
}
.journey-finale__stat {
  display: flex;
  flex-direction: column-reverse; /* number above its label, DOM keeps term → value */
  align-items: center;
  gap: 0.15rem;
}
.journey-finale__stat dt {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}
.journey-finale__stat dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.8rem + 3vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.journey-finale__sum {
  font-size: var(--fs-sm);
  color: var(--ink-mute);
}
.journey-finale__cta {
  display: grid;
  gap: 0.7rem;
  justify-items: center;
}
.journey-finale__phone {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--on-dark);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 0.3em;
  transition: color var(--dur-fast) ease, text-decoration-color var(--dur-fast) ease;
}
.journey-finale__phone:hover {
  color: var(--gold);
  text-decoration-color: var(--gold);
}

/* --------------------------------------------------------------------------
   Gate artwork (shared by the desktop scene and the timeline finale)
   -------------------------------------------------------------------------- */
.journey-gate__interior {
  fill: var(--navy-950);
}
.journey-gate__light,
.journey-gate__side-light rect {
  fill: url(#jg-light);
}
.journey-gate__skyline {
  fill: color-mix(in srgb, var(--navy-800) 72%, var(--gold-deep));
}
.journey-gate__beam {
  fill: url(#jg-beam);
}
.journey-gate__shade {
  fill: url(#jg-shade);
}
.journey-gate__frame--cool {
  fill: url(#jg-stone-cool);
}
.journey-gate__frame--warm {
  fill: url(#jg-stone-warm);
}
.journey-door__panel {
  fill: url(#jg-door);
  stroke: var(--gold);
  stroke-opacity: 0.55;
  stroke-width: 1.5;
}
.journey-door__inset {
  fill: rgba(4, 15, 38, 0.38);
  stroke: var(--gold);
  stroke-opacity: 0.4;
  stroke-width: 1;
}
.journey-door__stud {
  fill: var(--gold);
}
.journey-gate__motes circle {
  fill: var(--gold-soft);
}

/* Finale gate on the timeline layout: warm stone, light on, doors open.
   `.journey--anim` (set by JS when it animates the doors) lifts the static
   "open" pose so GSAP owns the transform attribute. */
.journey-finale__gate .journey-gate__frame--cool {
  display: none;
}
.journey:not(.journey--anim) .journey-finale__gate .journey-door--l {
  transform: scaleX(0.09);
  transform-origin: 140px 196px;
}
.journey:not(.journey--anim) .journey-finale__gate .journey-door--r {
  transform: scaleX(0.09);
  transform-origin: 260px 196px;
}

/* --------------------------------------------------------------------------
   Scene artwork (only displayed on the pinned layout)
   -------------------------------------------------------------------------- */
.journey-moon__disc {
  fill: var(--on-dark);
}
.journey-moon__crater {
  fill: var(--navy-600);
  opacity: 0.16;
}
.journey-sun {
  opacity: 0;
}
.journey-sun__disc {
  stroke: var(--white);
  stroke-opacity: 0.6;
  stroke-width: 3;
}
.journey-sun__rays {
  fill: none;
  stroke: var(--gold-soft);
  stroke-width: 3.2;
  stroke-linecap: round;
  opacity: 0.55;
  transform-box: view-box;
  transform-origin: 0 0;
  animation: journey-spin 140s linear infinite;
}
.journey-cloud {
  fill: rgba(255, 255, 255, 0.58);
  animation: journey-drift 90s ease-in-out infinite alternate;
}
.journey-cloud--2 { animation-duration: 120s; animation-delay: -30s; fill: rgba(255, 255, 255, 0.42); }
.journey-cloud--3 { animation-duration: 150s; animation-delay: -60s; }
.journey-cloud--4 { animation-duration: 110s; animation-delay: -15s; fill: rgba(255, 255, 255, 0.34); }
.journey__stars circle {
  fill: #fff;
}
.journey__stars .is-twinkle {
  animation: journey-twinkle 3.2s ease-in-out infinite alternate;
}

.journey-ridge--a {
  fill: url(#jg-ridge-a);
  opacity: 0.6;
}
.journey-ridge--b {
  fill: url(#jg-ridge-b);
  opacity: 0.92;
}
.journey-skyline {
  fill: var(--navy-700);
  stroke: var(--navy-700);
  stroke-width: 1;
  opacity: 0.85;
}
.journey-hill {
  fill: url(#jg-hill);
}
.journey-hill--day {
  fill: url(#jg-hill-day);
  opacity: 0;
}
.journey-rim {
  fill: none;
  stroke: var(--gold-soft);
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0;
}
.journey-trees use {
  fill: var(--navy-950);
  opacity: 0.88;
}

.journey-guide {
  fill: none;
  stroke: var(--blue-300);
  stroke-opacity: 0.55;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 0.1 9;
}
.journey-road__asphalt {
  fill: color-mix(in srgb, var(--navy-950) 70%, transparent);
}
.journey-road__edge {
  fill: none;
  stroke: var(--gold-soft);
  stroke-opacity: 0.8;
  stroke-width: 2.2;
  stroke-linejoin: round;
}
.journey-road__dash {
  fill: none;
  stroke: var(--on-dark);
  stroke-opacity: 0.85;
  stroke-width: 2;
  stroke-dasharray: 11 13;
}
.journey-road__trail {
  fill: none;
  stroke: var(--gold);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.journey-lamp__halo {
  fill: url(#jg-sun-glow);
  opacity: 0;
  transition: opacity 0.7s var(--ease-out);
}
.journey-lamp__bulb {
  fill: var(--navy-600);
  stroke: var(--blue-300);
  stroke-opacity: 0.5;
  stroke-width: 1;
  transition: fill 0.5s ease;
}
.journey-lamp.is-on .journey-lamp__halo {
  opacity: 0.95;
}
.journey-lamp.is-on .journey-lamp__bulb {
  fill: var(--gold-soft);
}

/* stations */
.journey-station:not([transform]) {
  visibility: hidden; /* until journey.js has placed it on the road */
}
.journey-station__halo {
  fill: url(#jg-sun-glow);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}
.journey-station.is-current .journey-station__halo {
  opacity: 1;
  animation: journey-halo 2.6s ease-in-out infinite;
}
.journey-station__ring {
  fill: var(--navy-900);
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 3;
  transition: stroke 0.5s var(--ease-out);
}
.journey-station__disc {
  fill: var(--navy-700);
  transition: fill 0.5s var(--ease-out);
}
.journey-station__code {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  text-anchor: middle;
  fill: rgba(255, 255, 255, 0.6);
  transition: fill 0.5s var(--ease-out);
}
.journey-station.is-lit .journey-station__ring {
  stroke: var(--gold);
}
.journey-station.is-lit .journey-station__disc {
  fill: var(--blue-600);
}
.journey-station.is-lit .journey-station__code {
  fill: #fff;
}
.journey-station__tag {
  opacity: 0;
  transition: opacity 0.5s var(--ease-out), translate 0.6s var(--ease-out);
  translate: 0 6px;
}
.journey-station__tag rect {
  fill: var(--sky-100);
  stroke: var(--gold);
  stroke-width: 2;
}
.journey-station__tag text {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  text-anchor: middle;
  fill: var(--navy-800);
}
.journey-station.is-lit .journey-station__tag {
  opacity: 1;
  translate: 0 0;
}
.journey-station__note {
  font-family: var(--font-script);
  font-size: 34px;
  font-weight: 700;
  text-anchor: middle;
  fill: var(--gold);
  stroke: rgba(4, 15, 38, 0.8);
  stroke-width: 7;
  stroke-linejoin: round;
  paint-order: stroke;
  opacity: 0;
  translate: 0 8px;
  transition: opacity 0.5s var(--ease-out), translate 0.7s var(--ease-out);
}
.journey-station.is-current .journey-station__note {
  opacity: 1;
  translate: 0 0;
}

.journey-traveller__glow {
  fill: url(#jg-sun-glow);
}
.journey-traveller__pulse {
  fill: none;
  stroke: var(--gold-soft);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: journey-pulse 2s ease-out infinite;
}
.journey-traveller__core {
  fill: url(#jg-sun);
  stroke: var(--white);
  stroke-width: 2;
}
.journey-traveller__cap {
  color: var(--navy-900);
  stroke-width: 2.2;
}

@keyframes journey-spin {
  to { transform: rotate(360deg); }
}
@keyframes journey-drift {
  from { transform: translateX(-60px); }
  to { transform: translateX(90px); }
}
@keyframes journey-twinkle {
  from { opacity: 0.2; }
  to { opacity: 1; }
}
@keyframes journey-halo {
  0%, 100% { transform: scale(0.82); opacity: 0.65; }
  50% { transform: scale(1.08); opacity: 1; }
}
@keyframes journey-pulse {
  from { transform: scale(0.9); opacity: 0.75; }
  to { transform: scale(2.1); opacity: 0; }
}

/* Pause ambient loops while the section is offscreen (journey.js toggles the class) */
.journey--paused *,
.journey--paused *::before,
.journey--paused *::after {
  animation-play-state: paused !important;
}

/* ==========================================================================
   PINNED LAYOUT  (desktop, short-motion OK).  Mirrors PIN_Q in journey.js.
   Guarded by html.js (no-JS gets the timeline) and :not(.journey--static)
   (JS drops to the timeline if it ever fails to start the stage).
   ========================================================================== */
@media (min-width: 1024px) and (min-height: 640px) and (min-aspect-ratio: 5/4) and (prefers-reduced-motion: no-preference) {
  html.js:not(.no-gsap):not(.lga-fail-journey):not(.reveal-failsafe:not(.is-ready)) .journey:not(.journey--static) {
    --j-pad-x: max(var(--gutter), (100% - var(--container)) / 2);
    --j-pad-b: clamp(0.9rem, 2.8vh, 2rem);
    --j-hud-h: 3.5rem;
    --j-scene-left: calc(var(--j-pad-x) + var(--j-card-w) + 1.5rem);
    --j-scene-bottom: calc(var(--j-pad-b) + var(--j-hud-h) + 1.2rem);
    padding-block: 0;
    overflow: visible;
    background: var(--grad-night);

    &::before,
    &::after {
      display: none;
    }

    & .journey__pin {
      height: 100vh;
      height: 100svh;
      min-height: 640px;
      overflow: hidden;
      background: var(--grad-night);
    }

    /* sky colour layers + stars/clouds */
    & .journey__sky {
      display: block;
      position: absolute;
      inset: 0;
    }
    & .journey__sky-layer {
      position: absolute;
      inset: 0;
      opacity: 0;
    }
    & .journey__sky-dawn {
      background: radial-gradient(70% 55% at 66% 72%, color-mix(in srgb, var(--gold) 46%, transparent), transparent 70%),
        linear-gradient(180deg, var(--navy-800) 0%, var(--navy-600) 40%, color-mix(in srgb, var(--rot) 34%, var(--navy-600)) 72%, color-mix(in srgb, var(--gold) 58%, var(--rot)) 100%);
    }
    & .journey__sky-day {
      background: radial-gradient(60% 50% at 66% 60%, color-mix(in srgb, var(--gold-soft) 55%, transparent), transparent 72%),
        linear-gradient(180deg, var(--blue-600) 0%, var(--blue-500) 38%, var(--blue-300) 74%, var(--gold-soft) 100%);
    }
    & .journey__sky-art {
      display: block;
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
    }
    & .journey__clouds {
      opacity: 0;
    }

    /* the scene occupies the area right of the card column */
    & .journey__scene {
      display: block;
      position: absolute;
      z-index: 2;
      top: var(--header-h);
      right: 0;
      bottom: var(--j-scene-bottom);
      left: var(--j-scene-left);
    }
    & .journey__scene-svg {
      display: block;
      width: 100%;
      height: 100%;
      overflow: visible;
    }
    & .journey-gate__light {
      opacity: 0;
    }
    & .journey-gate__side-light {
      opacity: 0;
    }
    & .journey-gate__skyline {
      opacity: 0;
    }
    & .journey-gate__beam {
      opacity: 0;
    }
    & .journey-gate__frame--warm {
      opacity: 0;
    }

    /* foreground UI */
    & .journey__inner {
      position: absolute;
      inset: 0;
      z-index: 3;
      display: flex;
      flex-direction: column;
      gap: 0;
      padding-top: calc(var(--header-h) + clamp(0.35rem, 1.8vh, 1.5rem));
      padding-bottom: var(--j-pad-b);
      pointer-events: none;
    }
    & .journey__intro {
      display: contents;
    }
    & .journey__head {
      order: 1;
      margin-top: -1.5rem;
      margin-bottom: 1.25rem;
      max-width: none;
      gap: 0.3rem;
      pointer-events: auto;
    }
    & .journey__title {
      font-size: clamp(1.9rem, 0.5rem + 2.75vw, 3.15rem);
      white-space: nowrap;
    }
    & .journey__lead {
      display: none;
    }
    & .journey__head .eyebrow {
      color: var(--gold);
      text-shadow: 0 1px 8px rgb(0 0 0 / 0.35);
    }
    & .journey__title .text-gradient {
      /* white → gold: stays legible on night, dawn and the bright day sky */
      background-image: linear-gradient(100deg, var(--white) 0%, var(--gold-soft) 55%, var(--gold) 100%);
    }

    & .journey__cards {
      order: 2;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      width: var(--j-card-w);
      margin-top: clamp(0.6rem, 2vh, 1.4rem);
    }
    & .journey__levels {
      grid-area: 1 / 1;
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      padding: 0;
      gap: 0;
    }
    & .journey__levels::before,
    & .journey__levels::after,
    & .journey-level::before {
      display: none;
    }
    & .journey-level {
      grid-area: 1 / 1;
      align-self: start;
      min-width: 0;
    }
    & .journey-level:not(:first-child),
    & .journey-finale {
      opacity: 0;
      pointer-events: none;
    }
    & .journey-card {
      display: grid;
      grid-template-columns: 1fr;
      grid-template-areas: none;
      gap: clamp(0.6rem, 1.7vh, 1rem);
      padding: clamp(1rem, 2.4vh, 1.6rem) clamp(1.1rem, 1.6vw, 1.5rem);
      pointer-events: auto;
    }
    & .journey-card__note {
      display: none;
    }
    & .journey-card__head,
    & .journey-card__duration,
    & .journey-card__body,
    & .journey-card__foot {
      grid-area: auto;
    }
    & .journey-card__duration {
      flex-direction: row;
      align-items: flex-end;
      gap: 1.1rem;
    }
    & .journey-card__ticks {
      flex: 1;
      width: auto;
      margin-bottom: 0.4rem;
    }
    & .journey-card__body {
      display: grid;
      align-content: start;
    }
    & .journey-card__list {
      margin-bottom: clamp(0.6rem, 1.6vh, 1.1rem);
    }
    & .journey-card__foot {
      align-self: auto;
    }

    /* finale card lives in the same grid cell as the level cards */
    & .journey-finale {
      grid-area: 1 / 1;
      align-self: start;
      margin: 0;
      gap: 0;
      justify-items: stretch;
      width: 100%;
    }
    & .journey-finale__gate {
      display: none;
    }
    & .journey-finale__card {
      width: 100%;
      justify-items: start;
      text-align: left;
      gap: clamp(0.5rem, 1.5vh, 0.95rem);
      padding: clamp(1rem, 2.4vh, 1.6rem) clamp(1.1rem, 1.6vw, 1.5rem);
      pointer-events: auto;
    }
    & .journey-finale__banner {
      font-size: clamp(1.45rem, 0.7rem + 1.8vw, 2.15rem);
    }
    & .journey-finale__title {
      justify-items: start;
    }
    & .journey-finale__lead {
      font-size: var(--fs-base);
    }
    & .journey-finale__stats {
      justify-content: flex-start;
      gap: 2rem;
    }
    & .journey-finale__stat {
      flex-direction: row-reverse;
      align-items: baseline;
      gap: 0.5rem;
    }
    & .journey-finale__stat dd {
      font-size: clamp(2.1rem, 1.2rem + 2vw, 2.8rem);
    }
    & .journey-finale__cta {
      justify-items: start;
    }

    /* HUD: the level pills across the bottom, filled gold as you travel */
    & .journey__hud {
      position: absolute;
      /* leave room for the floating WhatsApp button when the container is narrower than ~1440 */
      inset-inline: 0 max(0px, calc(6.5rem - max(var(--gutter), (100vw - var(--container)) / 2)));
      bottom: var(--j-pad-b);
      pointer-events: auto;
    }
    & .journey-steps {
      display: flex;
      gap: 0.75rem;
      max-width: none;
    }
    & .journey-step {
      flex: var(--d) 1 0;
      min-width: 0;
    }
    & .journey-step__link {
      height: var(--j-hud-h);
      background: color-mix(in srgb, var(--sky-100) 94%, transparent);
    }
    & .journey-step__fill {
      display: block;
      transform: scaleX(0);
    }
    & .journey-step__code {
      height: calc(var(--j-hud-h) - 0.7rem);
      min-width: calc(var(--j-hud-h) - 0.7rem);
    }

    & .journey__hint {
      display: flex;
    }
    & .journey-card__foot {
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem 1rem;
    }

    /* short viewports (13" laptops): tighten everything so card + HUD always fit */
    @media (max-height: 800px) {
      & {
        --j-hud-h: 3rem;
        --j-pad-b: 0.8rem;
      }
      & .journey__head .eyebrow {
        display: none;
      }
      & .journey__title {
        font-size: clamp(1.7rem, 0.3rem + 2.4vw, 2.5rem);
      }
      & .journey__cards {
        margin-top: 0.55rem;
      }
      & .journey-card,
      & .journey-finale__card {
        gap: 0.5rem;
        padding: 0.9rem 1.15rem;
      }
      & .journey-card__badge {
        min-width: 3.4rem;
        height: 2.9rem;
        border-radius: 1rem;
        font-size: 1.25rem;
      }
      & .journey-card__num {
        font-size: 2.5rem;
      }
      & .journey-card__label {
        margin-bottom: 0.35rem;
      }
      & .journey-card__list {
        gap: 0.35rem;
        margin-bottom: 0.55rem;
      }
      & .journey-card__list li {
        line-height: 1.35;
      }
      & .journey-card__chips li {
        padding: 0.3rem 0.7rem;
        font-size: 0.875rem;
      }
      & .journey-finale__banner {
        font-size: clamp(1.25rem, 0.5rem + 1.5vw, 1.7rem);
      }
      & .journey-finale__sum {
        display: none;
      }
      & .journey-finale__stat dd {
        font-size: 2rem;
      }
    }
  }
}

.journey__hint-mouse {
  position: relative;
  width: 1.15rem;
  height: 1.85rem;
  border: 2px solid currentColor;
  border-radius: 0.6rem;
}
.journey__hint-mouse::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0.3rem;
  width: 3px;
  height: 0.4rem;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--gold);
  animation: journey-wheel 1.6s var(--ease-in-out) infinite;
}
@keyframes journey-wheel {
  0% { transform: translateY(0); opacity: 1; }
  80%, 100% { transform: translateY(0.65rem); opacity: 0; }
}

/* ---------- Reduced motion: calm timeline, doors open, no ambient loops ---------- */
@media (prefers-reduced-motion: reduce) {
  .journey *,
  .journey *::before,
  .journey *::after {
    animation: none !important;
  }
}

.journey { padding-bottom: calc(var(--section-y) + var(--r-xl)); }
