/*
 * pico.express landing page
 *
 * The motion system deliberately uses individual translate / rotate / scale
 * properties for SVG details. This composes with the positioning transforms in
 * the artwork instead of replacing them, and keeps animation on the compositor.
 */

:root {
  --accent: #d00dad;
  --accent-light: #dec0de;
  --gold: #e8c35a;
  --gold-light: #fff0ad;
  --ink: #271d28;
  --ink-soft: #665a66;
  --paper: #fbf9f6;
  --paper-deep: #f3eeea;
  --surface: rgb(255 255 255 / 76%);
  --surface-solid: #fffdfb;
  --line: rgb(83 51 76 / 13%);
  --accent-dark: #870474;
  --accent-wash: #f7eaf5;
  --shadow-sm: 0 8px 24px rgb(70 43 65 / 9%);
  --shadow-md: 0 22px 60px rgb(70 43 65 / 13%);
  --shadow-lg: 0 36px 100px rgb(65 36 61 / 19%);
  --radius-sm: 0.8rem;
  --radius-md: 1.35rem;
  --radius-lg: 2.25rem;
  --page-gutter: clamp(1.25rem, 4vw, 4.75rem);
  --content-width: 90rem;
  --header-height: 4.75rem;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.22, 1.25, 0.36, 1);
  color-scheme: light;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  background: var(--paper);
}

html.has-js {
  scroll-snap-type: y proximity;
}

body {
  min-width: 20rem;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 8%, rgb(222 192 222 / 32%), transparent 28rem),
    radial-gradient(circle at 8% 38%, rgb(232 195 90 / 12%), transparent 24rem),
    linear-gradient(145deg, #fffdfb 0%, var(--paper) 46%, #f5f1ee 100%);
  font-size: clamp(1rem, 0.94rem + 0.18vw, 1.125rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  opacity: 0.25;
  mix-blend-mode: multiply;
}

::selection {
  color: var(--ink);
  background: var(--accent-light);
}

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 4px;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}

button,
input,
textarea,
select {
  font: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

/* Pause purely decorative work when its section cannot be seen. JavaScript
 * applies these lifecycle classes without changing layout or painted styling. */
.is-animation-paused,
.is-animation-paused *,
.is-animation-paused::before,
.is-animation-paused::after,
.is-animation-paused *::before,
.is-animation-paused *::after,
.is-story-paused,
.is-story-paused *,
.is-story-paused::before,
.is-story-paused::after,
.is-story-paused *::before,
.is-story-paused *::after,
html.is-page-hidden *,
html.is-page-hidden *::before,
html.is-page-hidden *::after {
  animation-play-state: paused !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  color: white;
  background: var(--ink);
  border-radius: 0.7rem;
  font-weight: 750;
  translate: 0 -150%;
  transition: translate 160ms var(--ease-out);
}

.skip-link:focus {
  translate: 0;
}

/* Header */

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--header-height);
  padding-inline: var(--page-gutter);
  border-bottom: 1px solid transparent;
  transition:
    background-color 240ms ease,
    border-color 240ms ease,
    box-shadow 240ms ease;
}

.site-header.is-scrolled,
.site-header[data-scrolled="true"] {
  border-color: var(--line);
  background: rgb(251 249 246 / 78%);
  box-shadow: 0 7px 28px rgb(56 33 52 / 6%);
  -webkit-backdrop-filter: saturate(145%) blur(18px);
  backdrop-filter: saturate(145%) blur(18px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(100%, var(--content-width));
  height: 100%;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  gap: 0.65rem;
  align-items: center;
  justify-self: start;
  width: max-content;
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  filter: drop-shadow(0 4px 7px rgb(77 45 73 / 14%));
  transition: rotate 300ms var(--ease-spring);
}

.brand:hover .brand-mark {
  rotate: -7deg;
}

.site-nav {
  display: flex;
  gap: clamp(1.3rem, 3vw, 2.7rem);
  align-items: center;
}

.site-nav a,
.site-footer nav a {
  position: relative;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a::after,
.site-footer nav a::after {
  position: absolute;
  right: 0;
  bottom: -0.28rem;
  left: 0;
  height: 2px;
  content: "";
  background: var(--accent);
  border-radius: 99px;
  scale: 0 1;
  transform-origin: right;
  transition: scale 220ms var(--ease-out);
}

.site-nav a:hover::after,
.site-footer nav a:hover::after {
  scale: 1;
  transform-origin: left;
}

.header-cta {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.header-login {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  margin-right: 7.75rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 740;
  text-decoration: none;
  transition:
    color 180ms ease,
    translate 180ms var(--ease-spring);
}

.header-login:hover {
  color: var(--accent);
  translate: 0 -1px;
}

/* Shared typography and controls */

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-transform: uppercase;
}

.eyebrow span[aria-hidden="true"] {
  display: inline-block;
  margin-right: 0.45rem;
  color: var(--gold);
  font-size: 0.82em;
  animation: status-glow 2.4s ease-in-out infinite;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  margin-top: 0;
  color: var(--ink);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

h1 {
  margin-bottom: 1.55rem;
  font-size: clamp(3.25rem, 5.7vw, 6.9rem);
  font-weight: 790;
}

h1 span,
.final-cta h2 span {
  color: var(--accent);
}

h2 {
  margin-bottom: 1.25rem;
  font-size: clamp(2.35rem, 4.5vw, 4.75rem);
  font-weight: 780;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.16rem;
  font-weight: 760;
  letter-spacing: -0.035em;
}

.button {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: center;
  min-height: 3.35rem;
  padding: 0.82rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition:
    translate 220ms var(--ease-spring),
    box-shadow 220ms ease,
    background-color 220ms ease,
    border-color 220ms ease;
}

.button:hover {
  translate: 0 -3px;
  box-shadow: 0 13px 30px rgb(70 43 65 / 17%);
}

.button:active {
  translate: 0 0;
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, #e326c4, var(--accent) 58%, #a4088c);
  border-color: rgb(116 0 95 / 22%);
  box-shadow:
    0 10px 25px rgb(208 13 173 / 21%),
    inset 0 1px rgb(255 255 255 / 30%);
}

.button-primary:hover {
  background: linear-gradient(135deg, #e943cb, #be0a9f 65%, #93047c);
}

.button-secondary {
  color: var(--ink);
  background: rgb(255 255 255 / 70%);
  border-color: var(--line);
  box-shadow: 0 8px 26px rgb(70 43 65 / 8%);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.button-secondary:hover {
  border-color: rgb(208 13 173 / 25%);
  background: white;
}

.button-secondary svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: var(--accent);
}

.button-small {
  min-height: 2.65rem;
  padding: 0.7rem 1.1rem;
  font-size: 0.82rem;
}

/* Hero and miniature world */

main > [data-page-section] {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero {
  display: grid;
  grid-template-columns: minmax(24rem, 0.9fr) minmax(34rem, 1.1fr);
  gap: clamp(1rem, 1.8vw, 2.5rem);
  align-items: center;
  width: min(100%, calc(var(--content-width) + 7rem));
  min-height: calc(100svh - var(--header-height));
  margin-inline: auto;
  padding: clamp(2.5rem, 4.8vh, 5.5rem) var(--page-gutter) clamp(2rem, 4vh, 4.5rem);
}

.hero-copy {
  position: relative;
  z-index: 5;
  max-width: 42rem;
}

.hero-lede {
  max-width: 39rem;
  margin: 0 0 2rem;
  color: var(--ink-soft);
  font-size: clamp(1.08rem, 1rem + 0.35vw, 1.36rem);
  line-height: 1.55;
}

.hero-lede p {
  margin: 0;
}

.hero-lede p + p {
  margin-top: 0.8rem;
}

.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.diorama-shell {
  --scene-tilt: 3.5deg;
  --scene-scale: 1;
  --pointer-x: 0px;
  --pointer-y: 0px;
  --shadow-x: 0px;
  --shadow-y: 0px;
  position: relative;
  z-index: 1;
  container-name: diorama;
  container-type: inline-size;
  width: min(100%, 62rem);
  margin: 0;
  isolation: isolate;
}

.diorama-glow {
  position: absolute;
  z-index: -1;
  inset: 14% 5% 8%;
  background:
    radial-gradient(circle at 72% 40%, rgb(232 195 90 / 34%), transparent 21%),
    radial-gradient(circle at center, rgb(222 192 222 / 72%), transparent 64%);
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.67;
  scale: 1;
  translate: 0;
  transition: opacity 350ms ease;
}

.railway-svg {
  width: 112%;
  max-width: none;
  height: auto;
  margin-left: -6%;
  overflow: visible;
  transform: rotate(3deg);
  transform-origin: 52% 53%;
  filter: drop-shadow(0 18px 18px rgb(61 39 60 / 11%));
  will-change: auto;
  transition: none;
}

.diorama-shell figcaption.persona-caption {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  width: min(31rem, calc(100% - 2rem));
  margin: -1.55rem auto 0;
  padding: 0.65rem;
  color: var(--ink-soft);
  background: rgb(255 255 255 / 66%);
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  font-size: clamp(0.68rem, 1.5vw, 0.8rem);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.persona-prompt {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.persona-jumps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

.persona-jumps a {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  min-height: 2.75rem;
  padding: 0.55rem 0.75rem;
  color: var(--ink);
  text-decoration: none;
  background: rgb(255 255 255 / 78%);
  border: 1px solid rgb(208 13 173 / 12%);
  border-radius: 0.85rem;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    translate 180ms var(--ease-spring);
}

.persona-jumps a:hover {
  color: var(--accent-dark);
  background: white;
  border-color: rgb(208 13 173 / 28%);
  translate: 0 2px;
}

.persona-jumps svg,
.section-next svg {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: down-nudge 1.8s ease-in-out infinite;
}

/* SVG interaction states */

.station {
  display: none;
}

.route-stop {
  cursor: pointer;
  outline: none;
}

.route-stop-anchor {
  fill: transparent;
}

.route-stop-marker {
  fill: var(--surface-solid);
  stroke: var(--ink-soft);
  stroke-width: 4px;
  transform-box: fill-box;
  transform-origin: center;
  transition:
    fill 220ms ease,
    scale 260ms var(--ease-spring),
    stroke 220ms ease;
}

.route-stop-marker-shared {
  fill: var(--gold-light);
  stroke: var(--accent-dark);
}

.route-stop-marker-pico {
  fill: var(--accent);
  stroke: white;
}

.route-stop-cabin-placement,
.route-stop-cabin {
  pointer-events: none;
}

.route-stop-cabin {
  transform-box: fill-box;
  transform-origin: center;
  transition:
    filter 220ms ease,
    scale 260ms var(--ease-spring);
  filter: drop-shadow(0 3px 3px rgb(61 39 60 / 20%));
}

.route-stop-cabin-shadow {
  fill: #54394f;
  opacity: 0.18;
}

.route-stop-cabin-wall-left {
  fill: #c78954;
  stroke: #6f4437;
  stroke-width: 1.2px;
}

.route-stop-cabin-wall-right {
  fill: #9d6044;
  stroke: #6f4437;
  stroke-width: 1.2px;
}

.route-stop-cabin-planks {
  fill: none;
  stroke: #e4ae6d;
  stroke-width: 0.9px;
  opacity: 0.72;
}

.route-stop-cabin-roof {
  fill: #733a4c;
  stroke: #4e3040;
  stroke-width: 1.4px;
  stroke-linejoin: round;
}

.route-stop-cabin-roof-edge {
  fill: none;
  stroke: #a35a65;
  stroke-width: 1.1px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-stop-cabin-chimney {
  fill: #644041;
  stroke: #4e3040;
  stroke-width: 1px;
}

.route-stop-cabin-window {
  fill: #ffe49b;
  stroke: #6f4437;
  stroke-width: 1px;
  stroke-linejoin: round;
}

.route-stop-cabin-door {
  fill: #513744;
  stroke: #3f2d39;
  stroke-width: 1px;
  stroke-linejoin: round;
}

.route-stop-cabin-knob {
  fill: #e8c35a;
}

.route-stop:is(:hover, :focus-visible, .is-active) .route-stop-marker {
  fill: var(--gold-light);
  stroke: var(--accent-dark);
  scale: 1.22;
}

.route-stop:is(:hover, :focus-visible, .is-active) .route-stop-cabin {
  scale: 1.08;
  filter: drop-shadow(0 4px 4px rgb(61 39 60 / 24%)) drop-shadow(0 0 5px rgb(232 195 90 / 55%));
}

.route-stop:focus-visible .route-stop-anchor {
  fill: rgb(208 13 173 / 14%);
  stroke: var(--accent-dark);
  stroke-width: 3px;
}

.route-stop-label {
  pointer-events: none;
}

.route-stop-label rect {
  fill: rgb(255 253 251 / 94%);
  stroke: rgb(83 51 76 / 17%);
  stroke-width: 1.5px;
  filter: drop-shadow(0 5px 10px rgb(61 39 60 / 13%));
}

.route-stop-label text {
  fill: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 780;
  letter-spacing: 0.01em;
}

.route-stop-label .route-stop-note {
  fill: var(--accent-dark);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.station-tooltip {
  position: absolute;
  z-index: 20;
  display: grid;
  width: min(18.5rem, calc(100% - 2rem));
  padding: 0.9rem 1rem 1rem;
  color: white;
  pointer-events: none;
  background: rgb(39 29 40 / 92%);
  border: 1px solid rgb(255 255 255 / 15%);
  border-radius: 1rem;
  box-shadow: 0 16px 46px rgb(41 23 38 / 24%);
  opacity: 0;
  translate: -50% calc(-100% - 0.75rem);
  scale: 0.94;
  transform-origin: 50% 100%;
  transition:
    opacity 170ms ease,
    scale 220ms var(--ease-spring);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.station-tooltip::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 0.85rem;
  height: 0.85rem;
  content: "";
  background: rgb(39 29 40 / 92%);
  rotate: 45deg;
  translate: -50% -50%;
}

.station-tooltip.is-visible {
  opacity: 1;
  scale: 1;
}

.tooltip-kicker {
  margin-bottom: 0.2rem;
  color: var(--gold-light);
  font-size: 0.64rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tooltip-title {
  margin-bottom: 0.2rem;
  font-size: 0.93rem;
}

.tooltip-copy {
  color: rgb(255 255 255 / 76%);
  font-size: 0.76rem;
  line-height: 1.45;
}

/* The route is the hero; the miniature objects provide supporting context. */

.conventional-route > use,
.conventional-route-emphasis,
.pico-shortcut-track,
.pico-rollback-track,
.rolling-stock {
  transition:
    opacity 420ms ease,
    filter 420ms ease;
}

.conventional-route-emphasis {
  opacity: 0.58;
}

.pico-shortcut-track {
  opacity: 0.74;
}

.pico-rollback-track {
  opacity: 0.55;
}

.route-story {
  pointer-events: none;
}

.route-stage-card text {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.route-stage-card {
  --route-story-color: #8a6715;
}

.diorama-shell:is(.is-pico-route, .is-rollback-route) .route-stage-card {
  --route-story-color: var(--accent-dark);
}

.route-stage-card rect {
  fill: rgb(255 253 251 / 93%);
  stroke: rgb(83 51 76 / 15%);
  stroke-width: 2px;
  filter: drop-shadow(0 8px 18px rgb(61 39 60 / 12%));
}

.route-mode-title {
  fill: var(--route-story-color);
  font-size: 23px;
  font-weight: 850;
}

.route-mode-separator {
  fill: var(--ink-soft);
  font-size: 15px;
  font-weight: 760;
}

.route-mode-subtitle {
  fill: var(--ink-soft);
  font-size: 15px;
  font-weight: 760;
  letter-spacing: 0.015em;
}

.route-stage-divider {
  fill: none;
  stroke: var(--route-story-color);
  stroke-width: 1.5px;
  opacity: 0.26;
}

.route-stage-title {
  fill: var(--ink);
  font-size: 20px;
  font-weight: 820;
}

.route-stage-copy {
  fill: var(--ink-soft);
  font-size: 17px;
  font-weight: 680;
  letter-spacing: 0.01em;
}

.rollback-tunnel {
  opacity: 1;
  transition:
    opacity 420ms ease,
    filter 420ms ease;
}

.rollback-tunnel-frame {
  transform-box: fill-box;
  transform-origin: center;
  transition: filter 220ms ease;
}

.rollback-tunnel:is(:hover, :focus-visible, .is-active) .rollback-tunnel-frame {
  filter: drop-shadow(0 0 11px rgb(208 13 173 / 44%));
}

.rollback-tunnel:focus-visible .route-stop-anchor {
  fill: rgb(208 13 173 / 14%);
  stroke: var(--accent-dark);
  stroke-width: 3px;
}

.has-js .diorama-shell.is-conventional-route .pico-shortcut-track,
.has-js .diorama-shell.is-conventional-route .pico-rollback-track {
  opacity: 0.24;
}

.has-js .diorama-shell.is-conventional-route .conventional-route-emphasis {
  opacity: 1;
}

.has-js .diorama-shell.is-pico-route .conventional-route > use,
.has-js .diorama-shell.is-pico-route .conventional-route-emphasis {
  opacity: 0.3;
}

.has-js .diorama-shell.is-pico-route .pico-shortcut-track {
  opacity: 1;
}

.has-js .diorama-shell.is-pico-route .pico-route-flow {
  animation: pico-route-flow 0.9s linear infinite;
}

.has-js .diorama-shell.is-pico-route .pico-rollback-track {
  opacity: 0.38;
}

.has-js .diorama-shell.is-rollback-route .conventional-route > use,
.has-js .diorama-shell.is-rollback-route .conventional-route-emphasis {
  opacity: 0.25;
}

.has-js .diorama-shell.is-rollback-route .pico-shortcut-track {
  opacity: 0.55;
}

.has-js .diorama-shell.is-rollback-route .pico-rollback-track,
.has-js .diorama-shell.is-rollback-route .rollback-tunnel {
  opacity: 1;
}

.has-js .diorama-shell.is-rollback-route .rollback-route-flow {
  animation: rollback-route-flow 0.9s linear infinite;
}

.track-switcher {
  pointer-events: none;
  filter: drop-shadow(0 5px 6px rgb(61 39 60 / 18%));
}

.track-switcher-shadow {
  fill: rgb(61 39 60 / 19%);
}

.track-switcher-ties {
  fill: none;
  stroke: #70513d;
  stroke-width: 4px;
  stroke-linecap: round;
}

.track-switcher-stand {
  fill: #b88759;
  stroke: #55434b;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.track-switcher-direction {
  color: #b88524;
  transform: rotate(-28deg);
  transform-origin: 0 0;
  transition:
    color 320ms ease,
    transform 520ms var(--ease-spring);
}

.diorama-shell:is(.is-pico-route, .is-rollback-route)
  .track-switcher-build
  .track-switcher-direction {
  color: var(--accent);
  transform: rotate(28deg);
}

.track-switcher-observe .track-switcher-direction {
  transform: rotate(110deg);
}

.diorama-shell.is-rollback-route .track-switcher-observe .track-switcher-direction {
  color: var(--accent);
  transform: rotate(37deg);
}

.track-switcher-arm {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 4px;
}

.track-switcher-flag {
  fill: currentColor;
  stroke: #fffaf0;
  stroke-linejoin: bevel;
  stroke-width: 2px;
}

.track-switcher-stripe {
  fill: none;
  stroke: rgb(255 250 240 / 88%);
  stroke-width: 2.4px;
  stroke-linecap: round;
}

.track-switcher-pivot {
  fill: #f6e3ad;
  stroke: currentColor;
  stroke-width: 3px;
}

.diorama-shell.is-resetting .rolling-stock {
  opacity: 0;
}

/* Every moving group is positioned directly from the rail path. Its local
 * origin is the axle line, so scaling or bobbing cannot pull wheels off-track. */

.rail-vehicle {
  will-change: transform;
}

.vehicle-shadow {
  fill: #412c41;
  opacity: 0.2;
}

.vehicle-coupler {
  fill: none;
  stroke: #625966;
  stroke-width: 3px;
  stroke-linecap: round;
}

.carriage-body {
  fill: #746c75;
  stroke: #342d35;
  stroke-width: 2px;
}

.carriage-accent {
  fill: none;
  stroke: var(--accent-light);
  stroke-width: 3px;
  stroke-linecap: round;
}

.carriage-label {
  fill: white;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 820;
}

.diff-carriage .vehicle-wheel {
  fill: #322c34;
  stroke: #211d22;
  stroke-width: 2px;
}

.diorama-shell.is-rollback-route .diff-carriage-selected .carriage-body,
.diorama-shell.is-story-static .diff-carriage-selected .carriage-body {
  fill: var(--accent);
  stroke: var(--accent-dark);
}

.diorama-shell.is-rollback-route .diff-carriage-selected .carriage-accent,
.diorama-shell.is-story-static .diff-carriage-selected .carriage-accent {
  stroke: var(--gold-light);
}

.diorama-shell.has-conventional-faults .diff-carriage-selected .carriage-body {
  fill: #d83a55;
  stroke: #7f1d31;
}

.diorama-shell.has-conventional-faults .diff-carriage-selected .carriage-accent {
  stroke: var(--gold-light);
}

.railway-pause {
  position: absolute;
  z-index: 25;
  top: clamp(0.4rem, 2vw, 1rem);
  right: clamp(0.25rem, 1.5vw, 0.85rem);
  display: inline-flex;
  gap: 0.38rem;
  align-items: center;
  min-height: 2rem;
  padding: 0.38rem 0.62rem;
  color: var(--ink-soft);
  cursor: pointer;
  background: rgb(255 253 251 / 82%);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  font-size: 0.66rem;
  font-weight: 760;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.railway-pause svg {
  width: 0.8rem;
  height: 0.8rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.railway-pause .play-icon,
.railway-pause[aria-pressed="true"] .pause-icon {
  display: none;
}

.railway-pause[aria-pressed="true"] .play-icon {
  display: block;
}

.railway-pause:hover {
  color: var(--accent-dark);
  background: white;
}

/* Diorama movement: factory */

.factory-smoke {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: smoke-rise 3s ease-out infinite;
}

.factory-smoke.smoke-two {
  animation-delay: -1.45s;
}

.conveyor-belt {
  animation: conveyor-shine 1.7s linear infinite;
}

.crate-one {
  animation: crate-travel 3s ease-in-out infinite;
}

.crate-two {
  animation: crate-travel 3s ease-in-out -1.5s infinite;
}

.worker-one,
.worker-two {
  animation: worker-bob 1.8s ease-in-out infinite;
}

.worker-two {
  animation-delay: -0.9s;
}

/* Diorama movement: test lab */

.bubble {
  transform-box: fill-box;
  transform-origin: center;
  animation: bubble-rise 1.55s ease-in infinite;
}

.bubble-two {
  animation-delay: -0.55s;
}

.bubble-three {
  animation-delay: -1.1s;
}

.gauge-line,
.metrics-graph {
  stroke-dasharray: 90;
  stroke-dashoffset: 90;
  animation: draw-gauge 2.4s ease-in-out infinite;
}

.led {
  animation: led-blink 1.8s steps(2, end) infinite;
}

.led-two,
.led-four {
  animation-delay: -0.6s;
}

.led-three,
.led-five {
  animation-delay: -1.2s;
}

/* Diorama movement: signals */

.semaphore-arm {
  transform-box: fill-box;
  transform-origin: 100% 50%;
  animation: semaphore 5s var(--ease-spring) infinite;
}

.signal-red {
  animation: red-signal 5s steps(1, end) infinite;
}

.signal-gold {
  animation: gold-signal 5s steps(1, end) infinite;
}

.flag-lever {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: lever-click 5s var(--ease-spring) infinite;
}

.lever-two {
  animation-delay: -2.5s;
}

/* Diorama movement: canary */

.canary {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: canary-hop 4.8s var(--ease-spring) infinite;
}

.egg {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: egg-wobble 5.4s ease-in-out infinite;
}

.egg-two {
  animation-delay: -2.7s;
}

.feather {
  transform-box: fill-box;
  transform-origin: center;
  animation: feather-float 4.5s ease-in-out infinite;
}

.feather-two {
  animation-delay: -2.2s;
}

/* Diorama movement: bridge, water, landscape */

.reflection {
  animation: water-sparkle 4.2s linear infinite;
}

.reflection-two {
  animation-direction: reverse;
  animation-duration: 5.3s;
}

.boat-route {
  offset-path: path(
    "M793 145C811 234 867 274 848 357C828 460 748 479 764 593C772 649 824 687 846 735"
  );
  offset-rotate: auto;
  animation: boat-travel 18s ease-in-out infinite;
}

.boat {
  transform-box: fill-box;
  transform-origin: center;
  animation: boat-bob 3.2s ease-in-out infinite;
}

.radar-sweep {
  transform-box: fill-box;
  transform-origin: center;
  animation: wheel-turn 5s linear infinite;
}

.flag {
  transform-box: fill-box;
  transform-origin: left center;
  animation: flag-flutter 1.9s ease-in-out infinite;
}

.lantern,
.glowing-window {
  animation: lantern-flicker 2.8s ease-in-out infinite;
}

.lantern-two,
.lantern-three {
  animation-delay: -1.35s;
}

.tree {
  animation: none;
}

.cloud {
  animation: cloud-drift 11s ease-in-out infinite alternate;
}

.cloud-two {
  animation-delay: -5s;
  animation-duration: 14s;
}

.flower {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: flower-sway 3.5s ease-in-out infinite alternate;
}

/* Diorama movement: observatory */

.telescope-barrel {
  transform-box: fill-box;
  transform-origin: 48% 70%;
  animation: telescope-scan 7s ease-in-out infinite;
}

.dish {
  transform-box: fill-box;
  transform-origin: 65% 75%;
  animation: dish-scan 5.5s ease-in-out infinite;
}

.star {
  transform-box: fill-box;
  transform-origin: center;
  animation: star-twinkle 2s ease-in-out infinite;
}

.star-two {
  animation-delay: -0.7s;
}

.star-three {
  animation-delay: -1.4s;
}

.constellation path {
  animation: constellation-glimmer 4s ease-in-out infinite;
}

/* Diorama movement: rollback tunnel */

.rollback-portal {
  transform-box: fill-box;
  transform-origin: center;
  animation: portal-breathe 2.3s ease-in-out infinite;
}

.particle {
  transform-box: fill-box;
  transform-origin: center;
  animation: particle-float 2.4s ease-in-out infinite;
}

.particle-two {
  animation-delay: -0.6s;
}

.particle-three {
  animation-delay: -1.2s;
}

.particle-four {
  animation-delay: -1.8s;
}

.spark {
  transform-box: fill-box;
  transform-origin: center;
  animation: spark-pop 1.8s ease-in-out infinite;
}

.spark-two {
  animation-delay: -0.55s;
}

.spark-three {
  animation-delay: -1.1s;
}

.forward-arrow {
  animation: forward-nudge-svg 1.45s ease-in-out infinite;
}

/* Diorama movement: metrics */

.graph-line-two {
  animation-delay: -1.15s;
}

.radar {
  transform-box: fill-box;
  transform-origin: center;
}

.tower-window {
  filter: drop-shadow(0 0 7px rgb(232 195 90 / 62%));
}

/* Sections */

.journey-section,
.features-section {
  position: relative;
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding: clamp(5.5rem, 11vw, 10rem) var(--page-gutter);
}

.journey-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: center;
  min-height: calc(100svh - var(--header-height));
  padding-top: clamp(3rem, 6vh, 5rem);
  padding-bottom: clamp(2rem, 4vh, 3.5rem);
  container-name: journey;
  container-type: inline-size;
}

.journey-section::before {
  position: absolute;
  z-index: -1;
  inset: 4% var(--page-gutter) 0;
  content: "";
  background:
    radial-gradient(circle at 15% 22%, rgb(222 192 222 / 26%), transparent 22rem),
    linear-gradient(160deg, rgb(255 255 255 / 68%), rgb(247 242 246 / 62%));
  border: 1px solid rgb(255 255 255 / 84%);
  border-radius: clamp(2rem, 5vw, 4.5rem);
  box-shadow: inset 0 0 0 1px rgb(83 51 76 / 4%);
}

.section-heading {
  max-width: 49rem;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.section-heading > p:last-child {
  max-width: 42rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.12rem;
}

.section-heading-centered {
  margin-inline: auto;
  text-align: center;
}

.journey-section > .section-heading {
  margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
}

.journey-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  align-items: start;
}

.journey-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.journey-summary-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  height: 100%;
  min-height: 8rem;
  padding: 1.15rem;
  background: rgb(255 255 255 / 78%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 9px 28px rgb(65 43 64 / 6%);
}

.journey-summary-card h3 {
  margin-bottom: 0.4rem;
  font-size: 1.02rem;
  line-height: 1.18;
}

.journey-summary-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.48;
}

.journey-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: journey;
}

.journey-card {
  position: relative;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.9rem;
  align-items: start;
  height: 100%;
  min-height: 9.5rem;
  padding: 1.15rem;
  overflow: hidden;
  cursor: default;
  background: rgb(255 255 255 / 72%);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: 0 9px 28px rgb(65 43 64 / 6%);
  transition:
    translate 280ms var(--ease-spring),
    border-color 220ms ease,
    box-shadow 280ms ease,
    background-color 220ms ease;
}

.has-js .journey-card {
  cursor: pointer;
}

.journey-card::after {
  position: absolute;
  right: -2.5rem;
  bottom: -2.5rem;
  width: 7rem;
  height: 7rem;
  content: "";
  background: radial-gradient(circle, rgb(222 192 222 / 45%), transparent 67%);
  opacity: 0;
  scale: 0.75;
  transition:
    opacity 240ms ease,
    scale 300ms var(--ease-out);
}

.journey-card:is(:hover, :focus-visible, .is-active) {
  z-index: 1;
  background: rgb(255 255 255 / 94%);
  border-color: rgb(208 13 173 / 28%);
  box-shadow: 0 18px 44px rgb(77 42 70 / 12%);
  translate: 0 -5px;
}

.journey-card:is(:hover, :focus-visible, .is-active)::after {
  opacity: 1;
  scale: 1;
}

.journey-number {
  padding-top: 0.35rem;
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.11em;
}

.journey-icon {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  background: var(--accent-wash);
  border: 1px solid rgb(208 13 173 / 10%);
  border-radius: 0.8rem;
  box-shadow: inset 0 1px rgb(255 255 255 / 75%);
  font-size: 1.15rem;
  transition: rotate 260ms var(--ease-spring);
}

.journey-card:is(:hover, :focus-visible, .is-active) .journey-icon {
  rotate: -7deg;
}

.journey-card h3 {
  margin-bottom: 0.45rem;
  line-height: 1.2;
}

.journey-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.83rem;
  line-height: 1.55;
}

.journey-principle {
  position: relative;
  top: auto;
  display: grid;
  grid-template-columns: auto minmax(15rem, 0.75fr) minmax(20rem, 1fr);
  column-gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.3rem);
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 75% 10%, rgb(232 195 90 / 18%), transparent 45%),
    linear-gradient(145deg, #3c253a, #291d2b 70%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.journey-layout .journey-principle {
  grid-template-columns: auto minmax(12rem, 0.7fr) minmax(16rem, 1fr);
  padding: 1.25rem 1.5rem;
  border-radius: 1.6rem;
}

.journey-layout .principle-portal {
  width: 3.35rem;
  height: 3.35rem;
}

.journey-layout .journey-principle h3 {
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
}

.journey-principle::after {
  position: absolute;
  right: -3rem;
  bottom: -5rem;
  width: 13rem;
  height: 13rem;
  content: "";
  background: var(--accent);
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.24;
}

.principle-illustration {
  display: flex;
  grid-row: 1 / 3;
  gap: 0.6rem;
  align-items: center;
  margin: 0;
  color: var(--gold);
  font-size: 1.5rem;
}

.principle-portal {
  display: grid;
  place-items: center;
  width: 4.2rem;
  height: 4.2rem;
  color: white;
  background: radial-gradient(circle, #f35bd6 4%, var(--accent) 38%, #5d2057 72%);
  border: 2px solid rgb(255 255 255 / 25%);
  border-radius: 45% 45% 34% 34%;
  box-shadow:
    0 0 0 8px rgb(222 192 222 / 10%),
    0 0 32px rgb(208 13 173 / 50%);
  animation: portal-breathe 2.3s ease-in-out infinite;
}

.journey-principle .eyebrow {
  grid-column: 2;
  margin-bottom: 0.5rem;
  color: var(--gold-light);
}

.journey-principle h3 {
  grid-column: 2;
  margin: 0;
  color: white;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1.07;
}

.journey-principle > p:last-child {
  position: relative;
  z-index: 1;
  grid-column: 3;
  grid-row: 1 / 3;
  margin-bottom: 0;
  color: rgb(255 255 255 / 70%);
  font-size: 0.92rem;
}

/* Features */

.features-section {
  container-name: features;
  container-type: inline-size;
}

.audience-section {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(1rem, 2vh, 1.5rem);
  align-items: center;
  min-height: calc(100svh - var(--header-height));
  padding-top: clamp(4.5rem, 8vh, 7rem);
  padding-bottom: clamp(2rem, 4vh, 3.5rem);
}

.audience-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 4vw, 4.5rem);
  align-items: center;
  width: 100%;
  padding: clamp(2rem, 4vw, 4.25rem);
  background:
    radial-gradient(circle at 12% 18%, rgb(222 192 222 / 25%), transparent 22rem),
    linear-gradient(150deg, rgb(255 255 255 / 90%), rgb(249 245 247 / 76%));
  border: 1px solid rgb(255 255 255 / 90%);
  border-radius: clamp(2rem, 5vw, 4.5rem);
  box-shadow:
    inset 0 0 0 1px rgb(83 51 76 / 4%),
    var(--shadow-md);
}

.audience-section-developers .audience-layout {
  color: white;
  background:
    radial-gradient(circle at 80% 15%, rgb(208 13 173 / 23%), transparent 27rem),
    radial-gradient(circle at 18% 82%, rgb(232 195 90 / 12%), transparent 23rem),
    linear-gradient(145deg, #3c253b, #201721 74%);
  border-color: rgb(255 255 255 / 10%);
}

.audience-heading {
  margin-bottom: 0;
}

.audience-heading h2 {
  font-size: clamp(2.6rem, 4.3vw, 4.8rem);
}

.audience-section-developers .audience-heading h2 {
  color: white;
}

.audience-section-developers .audience-heading .eyebrow {
  color: var(--gold-light);
}

.audience-section-developers .audience-heading > p:last-child {
  color: rgb(255 255 255 / 72%);
}

.audience-grid {
  align-items: stretch;
}

.audience-card {
  min-height: 14.5rem;
}

.audience-card .feature-icon {
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.section-next {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  justify-self: center;
  min-height: 2.75rem;
  padding: 0.55rem 0.9rem;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 760;
  text-decoration: none;
  background: rgb(255 255 255 / 70%);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition:
    color 180ms ease,
    background-color 180ms ease,
    translate 180ms var(--ease-spring);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.section-next:hover {
  color: var(--accent-dark);
  background: white;
  translate: 0 2px;
}

.section-next-after-journey {
  margin: clamp(1.25rem, 2.5vh, 2rem) auto 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  position: relative;
  min-height: 16rem;
  padding: clamp(1.5rem, 3vw, 2rem);
  overflow: hidden;
  background: linear-gradient(155deg, rgb(255 255 255 / 92%), rgb(249 245 247 / 86%));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 15px 40px rgb(67 41 63 / 8%);
  transition:
    translate 300ms var(--ease-spring),
    rotate 300ms var(--ease-spring),
    box-shadow 300ms ease;
}

.feature-card::before {
  position: absolute;
  top: -6rem;
  right: -6rem;
  width: 12rem;
  height: 12rem;
  content: "";
  background: var(--accent-light);
  border-radius: 50%;
  filter: blur(34px);
  opacity: 0.24;
  transition:
    scale 450ms var(--ease-out),
    opacity 300ms ease;
}

.feature-card:hover,
.feature-card.is-active {
  z-index: 1;
  box-shadow: 0 26px 65px rgb(67 41 63 / 14%);
  rotate: -0.7deg;
  translate: 0 -7px;
}

.feature-card:nth-child(even):hover,
.feature-card:nth-child(even).is-active {
  rotate: 0.7deg;
}

.feature-card:hover::before,
.feature-card.is-active::before {
  opacity: 0.4;
  scale: 1.25;
}

.feature-card-accent {
  background: linear-gradient(145deg, #fff 0%, #f7e8f4 100%);
  border-color: rgb(208 13 173 / 18%);
}

.feature-card-gold {
  background: linear-gradient(145deg, #fffef9 0%, #fbf3cf 100%);
  border-color: rgb(164 124 22 / 18%);
}

.feature-card-gold::before {
  background: var(--gold);
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: clamp(2rem, 3vw, 3rem);
  color: var(--accent-dark);
  background: var(--accent-wash);
  border: 1px solid rgb(208 13 173 / 12%);
  border-radius: 1.05rem;
  box-shadow:
    inset 0 1px white,
    0 8px 18px rgb(76 39 69 / 8%);
  font-size: 1.35rem;
  font-weight: 800;
  transition:
    rotate 300ms var(--ease-spring),
    scale 300ms var(--ease-spring);
}

.feature-card:hover .feature-icon,
.feature-card.is-active .feature-icon {
  rotate: -8deg;
  scale: 1.08;
}

.feature-card-gold .feature-icon {
  color: #70520c;
  background: #f9e8a6;
  border-color: rgb(143 105 16 / 14%);
}

.feature-card h3 {
  position: relative;
  font-size: 1.27rem;
}

.feature-card p {
  position: relative;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.58;
}

/* Final CTA and footer */

.cta-section {
  display: grid;
  align-items: center;
  width: min(100%, var(--content-width));
  min-height: calc(100svh - var(--header-height));
  margin-inline: auto;
  padding: clamp(4rem, 8vh, 7rem) var(--page-gutter);
}

.final-cta {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: clamp(3.75rem, 7vw, 6rem) var(--page-gutter) clamp(4.75rem, 8vw, 7rem);
  overflow: hidden;
  color: white;
  text-align: center;
  background:
    radial-gradient(circle at 18% 18%, rgb(208 13 173 / 35%), transparent 26rem),
    radial-gradient(circle at 82% 30%, rgb(232 195 90 / 17%), transparent 22rem),
    linear-gradient(145deg, #3c253b, #201721 74%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: clamp(2rem, 5vw, 4.5rem);
  box-shadow: var(--shadow-lg);
}

.final-cta::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image: radial-gradient(circle, rgb(255 255 255 / 24%) 0 1px, transparent 1.5px);
  background-size: 31px 31px;
  mask-image: linear-gradient(to bottom, black, transparent 62%);
}

.final-cta .eyebrow {
  position: relative;
  color: var(--gold-light);
}

.final-cta h2 {
  position: relative;
  margin-bottom: 1.3rem;
  color: white;
  font-size: clamp(3rem, 7vw, 7rem);
}

.final-cta h2 span {
  color: #f47ddd;
}

.final-cta > p:not(.eyebrow) {
  position: relative;
  max-width: 38rem;
  margin: 0 auto 2rem;
  color: rgb(255 255 255 / 70%);
  font-size: 1.08rem;
}

.cta-stars {
  position: absolute;
  inset: 9% 12% auto;
  display: flex;
  justify-content: space-between;
  color: var(--gold);
  opacity: 0.68;
}

.cta-stars span {
  animation: star-twinkle 2.8s ease-in-out infinite;
}

.cta-stars span:nth-child(2) {
  animation-delay: -0.5s;
}

.cta-stars span:nth-child(3) {
  animation-delay: -1s;
}

.cta-stars span:nth-child(4) {
  animation-delay: -1.5s;
}

.cta-stars span:nth-child(5) {
  animation-delay: -2s;
}

.cta-actions {
  position: relative;
  z-index: 2;
  justify-content: center;
}

.button-gold {
  color: #2f250e;
  background: linear-gradient(180deg, #f8df80, var(--gold));
  border-color: rgb(255 249 202 / 30%);
  box-shadow:
    0 13px 34px rgb(232 195 90 / 24%),
    inset 0 1px rgb(255 255 255 / 48%);
}

.button-gold:hover {
  background: linear-gradient(180deg, #ffe98e, #efca5e);
}

.text-link {
  padding: 0.8rem 1rem;
  color: rgb(255 255 255 / 78%);
  font-size: 0.91rem;
  font-weight: 680;
  text-decoration-color: rgb(255 255 255 / 35%);
}

.text-link:hover {
  color: white;
  text-decoration-color: var(--gold);
}

.cta-track {
  position: absolute;
  right: -4%;
  bottom: 2.3rem;
  left: -4%;
  height: 1.8rem;
  border-top: 5px solid #9b7b51;
  border-bottom: 5px solid #9b7b51;
  opacity: 0.55;
}

.cta-track::after {
  position: absolute;
  inset: -6px 0;
  content: "";
  background: repeating-linear-gradient(90deg, transparent 0 18px, #5f493a 19px 23px);
}

.cta-train {
  position: absolute;
  z-index: 1;
  top: -1.25rem;
  left: 0;
  color: var(--gold);
  font-size: 1.55rem;
  text-shadow: 0 0 14px rgb(232 195 90 / 75%);
  animation: cta-train 12s linear infinite;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  width: min(100%, var(--content-width));
  margin-inline: auto;
  padding: 2rem var(--page-gutter) 3rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

.brand-footer {
  font-size: 0.92rem;
}

.brand-footer .brand-mark {
  width: 1.9rem;
  height: 1.9rem;
}

.site-footer > p {
  margin: 0;
  text-align: center;
}

.site-footer nav {
  display: flex;
  gap: 1.35rem;
  justify-self: end;
}

.site-footer .copyright {
  grid-column: 1 / -1;
  color: #8c818b;
  font-size: 0.69rem;
}

/* Reveal behavior is progressive: content is hidden only after JS marks it ready. */

.reveal-ready:not(.is-visible),
.reveal-ready [data-reveal]:not(.is-visible) {
  opacity: 0;
  translate: 0 1.5rem;
  transition:
    opacity 650ms ease,
    translate 650ms var(--ease-out);
}

.reveal-ready.is-visible,
.reveal-ready [data-reveal].is-visible {
  opacity: 1;
  translate: 0;
}

.journey-track li:nth-child(2n) .reveal-ready:not(.is-visible),
.feature-card:nth-child(2).reveal-ready:not(.is-visible),
.feature-card:nth-child(5).reveal-ready:not(.is-visible) {
  transition-delay: 70ms;
}

.journey-track li:nth-child(3n) .reveal-ready:not(.is-visible),
.feature-card:nth-child(3).reveal-ready:not(.is-visible),
.feature-card:nth-child(6).reveal-ready:not(.is-visible) {
  transition-delay: 140ms;
}

/* SVG + interface keyframes */

@keyframes status-glow {
  0%,
  100% {
    opacity: 0.55;
    scale: 0.82;
  }
  50% {
    opacity: 1;
    scale: 1.14;
  }
}

@keyframes station-pulse {
  0%,
  100% {
    opacity: 0.18;
    scale: 0.92;
  }
  50% {
    opacity: 0.32;
    scale: 1.06;
  }
}

@keyframes down-nudge {
  0%,
  100% {
    translate: 0;
  }
  50% {
    translate: 0 0.22rem;
  }
}

@keyframes forward-nudge-svg {
  0%,
  100% {
    translate: -3px 0;
    opacity: 0.72;
  }
  50% {
    translate: 5px 0;
    opacity: 1;
  }
}

@keyframes train-bob {
  from {
    translate: 0 0;
  }
  to {
    translate: 0 -1.7px;
  }
}

@keyframes wheel-turn {
  to {
    rotate: 1turn;
  }
}

@keyframes rod-drive {
  from {
    translate: -2px 0;
  }
  to {
    translate: 2px 0;
  }
}

@keyframes headlight-glow {
  0%,
  100% {
    opacity: 0.76;
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 7px #fff4a2);
  }
}

@keyframes smoke-rise {
  0% {
    translate: 0 8px;
    scale: 0.72;
    opacity: 0;
  }
  24% {
    opacity: 0.85;
  }
  100% {
    translate: 10px -22px;
    scale: 1.16;
    opacity: 0;
  }
}

@keyframes whistle {
  0% {
    opacity: 0;
    scale: 0.75;
  }
  22%,
  70% {
    opacity: 1;
    scale: 1;
  }
  100% {
    opacity: 0;
    translate: 8px -4px;
    scale: 1.12;
  }
}

@keyframes pico-route-flow {
  to {
    stroke-dashoffset: -17;
  }
}

@keyframes rollback-route-flow {
  to {
    stroke-dashoffset: 15;
  }
}

@keyframes conveyor-shine {
  0%,
  100% {
    filter: brightness(0.96);
  }
  50% {
    filter: brightness(1.12);
  }
}

@keyframes crate-travel {
  0%,
  12% {
    translate: -8px 5px;
  }
  50% {
    translate: 7px -4px;
  }
  88%,
  100% {
    translate: 15px -9px;
  }
}

@keyframes worker-bob {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -3px;
  }
}

@keyframes bubble-rise {
  0% {
    translate: 0 5px;
    scale: 0.7;
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    translate: 2px -12px;
    scale: 1.12;
    opacity: 0;
  }
}

@keyframes draw-gauge {
  0%,
  15% {
    stroke-dashoffset: 90;
  }
  45%,
  72% {
    stroke-dashoffset: 0;
  }
  100% {
    stroke-dashoffset: -90;
  }
}

@keyframes led-blink {
  0%,
  55% {
    opacity: 0.3;
    filter: none;
  }
  56%,
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 4px currentColor);
  }
}

@keyframes semaphore {
  0%,
  34%,
  100% {
    rotate: 0deg;
  }
  42%,
  78% {
    rotate: 31deg;
  }
}

@keyframes red-signal {
  0%,
  39%,
  82%,
  100% {
    fill: #ff655f;
    filter: drop-shadow(0 0 6px #ff655f);
  }
  40%,
  81% {
    fill: #554342;
    filter: none;
  }
}

@keyframes gold-signal {
  0%,
  39%,
  82%,
  100% {
    fill: #554d3c;
    filter: none;
  }
  40%,
  81% {
    fill: #ffe36d;
    filter: drop-shadow(0 0 7px #ffe36d);
  }
}

@keyframes lever-click {
  0%,
  35%,
  100% {
    rotate: -7deg;
  }
  42%,
  78% {
    rotate: 13deg;
  }
}

@keyframes canary-hop {
  0%,
  52%,
  100% {
    translate: 0 0;
    rotate: 0deg;
  }
  57% {
    translate: 0 -14px;
    rotate: -4deg;
  }
  62% {
    translate: 2px 0;
    rotate: 3deg;
  }
  67% {
    translate: 0 -7px;
    rotate: -2deg;
  }
  73% {
    translate: 0 0;
    rotate: 0deg;
  }
}

@keyframes egg-wobble {
  0%,
  70%,
  100% {
    rotate: 0deg;
  }
  76% {
    rotate: -5deg;
  }
  84% {
    rotate: 4deg;
  }
  91% {
    rotate: -2deg;
  }
}

@keyframes feather-float {
  0%,
  100% {
    translate: 0 0;
    rotate: -4deg;
  }
  50% {
    translate: 7px -7px;
    rotate: 9deg;
  }
}

@keyframes water-sparkle {
  to {
    stroke-dashoffset: -118;
  }
}

@keyframes boat-travel {
  0%,
  100% {
    offset-distance: 0%;
  }
  50% {
    offset-distance: 100%;
  }
}

@keyframes boat-bob {
  0%,
  100% {
    translate: 0 0;
    rotate: -1.5deg;
  }
  50% {
    translate: 0 -4px;
    rotate: 1.5deg;
  }
}

@keyframes flag-flutter {
  0%,
  100% {
    scale: 0.92 1;
  }
  50% {
    scale: 1.04 0.96;
  }
}

@keyframes lantern-flicker {
  0%,
  100% {
    opacity: 0.72;
    filter: brightness(0.96);
  }
  45% {
    opacity: 1;
    filter: brightness(1.16);
  }
  53% {
    opacity: 0.84;
  }
  68% {
    opacity: 1;
  }
}

@keyframes cloud-drift {
  from {
    translate: -9px 0;
  }
  to {
    translate: 15px -3px;
  }
}

@keyframes flower-sway {
  from {
    rotate: -3deg;
  }
  to {
    rotate: 4deg;
  }
}

@keyframes telescope-scan {
  0%,
  100% {
    rotate: -4deg;
  }
  50% {
    rotate: 6deg;
  }
}

@keyframes dish-scan {
  0%,
  100% {
    rotate: -10deg;
  }
  50% {
    rotate: 12deg;
  }
}

@keyframes star-twinkle {
  0%,
  100% {
    opacity: 0.35;
    scale: 0.78;
  }
  50% {
    opacity: 1;
    scale: 1.2;
    filter: drop-shadow(0 0 5px var(--gold));
  }
}

@keyframes constellation-glimmer {
  0%,
  100% {
    opacity: 0.18;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes portal-breathe {
  0%,
  100% {
    opacity: 0.82;
    scale: 0.96;
    filter: saturate(0.94);
  }
  50% {
    opacity: 1;
    scale: 1.035;
    filter: saturate(1.2) brightness(1.09);
  }
}

@keyframes particle-float {
  0%,
  100% {
    translate: -2px 5px;
    opacity: 0.28;
    scale: 0.7;
  }
  50% {
    translate: 4px -8px;
    opacity: 1;
    scale: 1.15;
  }
}

@keyframes spark-pop {
  0%,
  100% {
    opacity: 0.28;
    scale: 0.7;
    rotate: -10deg;
  }
  50% {
    opacity: 1;
    scale: 1.2;
    rotate: 8deg;
  }
}

@keyframes cta-train {
  from {
    translate: -4rem 0;
  }
  to {
    translate: calc(100vw + 6rem) 0;
  }
}

/* Container-level layout refinements */

@container journey (max-width: 64rem) {
  .journey-summary,
  .journey-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .journey-principle {
    grid-template-columns: auto 1fr;
    column-gap: 1.5rem;
  }

  .principle-illustration {
    grid-row: 1 / 4;
    margin: 0;
  }

  .journey-principle .eyebrow,
  .journey-principle h3,
  .journey-principle > p:last-child {
    grid-column: 2;
    grid-row: auto;
  }
}

@container features (max-width: 60rem) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-card {
    min-height: 16rem;
  }
}

@container diorama (max-width: 38rem) {
  .station-tooltip {
    width: min(15.5rem, calc(100% - 1rem));
    padding: 0.7rem 0.8rem;
  }

  .tooltip-copy {
    font-size: 0.68rem;
  }
}

/* Responsive layout */

@media (max-width: 74rem) {
  .hero {
    grid-template-columns: minmax(22rem, 0.9fr) minmax(29rem, 1.1fr);
    padding-inline: max(1.5rem, 3vw);
  }

  h1 {
    font-size: clamp(3.1rem, 6vw, 5.4rem);
  }

  .site-nav {
    gap: 1.25rem;
  }

  .audience-layout {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .audience-heading {
    max-width: 58rem;
    margin-inline: auto;
    text-align: center;
  }

  .audience-heading > p:last-child {
    margin-inline: auto;
  }

  .audience-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Keep the longer introduction inside a common landscape viewport. This only
 * affects layouts that still place the copy and railway side by side. */
@media (min-width: 62.01rem) and (max-height: 58rem) {
  .hero {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .hero-copy .eyebrow {
    margin-bottom: 0.55rem;
  }

  .hero-copy h1 {
    margin-bottom: 0.85rem;
    font-size: clamp(3rem, 5vw, 5rem);
  }

  .hero-lede {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.4;
  }

  .hero-lede p + p {
    margin-top: 0.55rem;
  }

  .diorama-shell {
    justify-self: center;
    width: min(90%, 53rem);
  }

  .diorama-shell figcaption.persona-caption {
    gap: 0.3rem;
    margin-top: -1.8rem;
    padding: 0.4rem;
  }

  .persona-prompt {
    display: none;
  }

  .persona-jumps a {
    min-height: 2.25rem;
    padding: 0.35rem 0.65rem;
  }
}

/* Keep the information-dense journey inside shorter landscape viewports. */
@media (min-width: 62.01rem) and (max-height: 52rem) {
  .journey-section {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .journey-section > .section-heading {
    margin-bottom: 0.75rem;
  }

  .journey-section > .section-heading .eyebrow {
    margin-bottom: 0.45rem;
  }

  .journey-section > .section-heading h2 {
    margin-bottom: 0.6rem;
    font-size: clamp(2rem, 3.3vw, 3.25rem);
  }

  .journey-section > .section-heading > p:last-child {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .journey-layout {
    gap: 0.65rem;
  }

  .journey-summary {
    gap: 0.6rem;
  }

  .journey-summary-card {
    min-height: 6rem;
    padding: 0.75rem;
  }

  .journey-summary-card h3 {
    margin-bottom: 0.25rem;
    font-size: 0.92rem;
  }

  .journey-summary-card p {
    font-size: 0.72rem;
    line-height: 1.38;
  }

  .journey-layout .journey-principle {
    padding: 0.7rem 1rem;
  }

  .journey-layout .principle-portal {
    width: 2.75rem;
    height: 2.75rem;
  }

  .journey-layout .journey-principle h3 {
    font-size: 1.45rem;
  }

  .journey-layout .journey-principle > p:last-child {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  .section-next-after-journey {
    min-height: 2.25rem;
    margin-top: 0.55rem;
    padding-block: 0.35rem;
  }
}

@media (max-width: 62rem) {
  :root {
    --header-height: 4.35rem;
  }

  .header-inner {
    grid-template-columns: 1fr auto auto;
    gap: 0.65rem;
  }

  .site-nav {
    display: none;
  }

  .header-login {
    grid-column: 2;
    margin-right: 0;
  }

  .header-cta {
    grid-column: 3;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2.25rem;
    min-height: auto;
    padding-top: clamp(4rem, 8vw, 6rem);
  }

  .hero-copy {
    max-width: 52rem;
    margin-inline: auto;
    text-align: center;
  }

  .hero-lede {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .diorama-shell {
    width: min(100%, 53rem);
    margin-inline: auto;
  }

  .audience-section,
  .cta-section {
    min-height: auto;
  }

  .audience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .railway-svg {
    width: 104%;
    margin-left: -2%;
  }

  .journey-section::before {
    inset-inline: 1rem;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer > p:not(.copyright) {
    display: none;
  }
}

@media (max-width: 43rem) {
  :root {
    --page-gutter: 1.1rem;
  }

  .brand-mark {
    width: 2rem;
    height: 2rem;
  }

  .header-cta {
    display: none;
  }

  .header-inner {
    grid-template-columns: 1fr auto;
  }

  .header-login {
    grid-column: 2;
  }

  .hero {
    gap: 1.25rem;
    padding-top: 3.5rem;
    padding-bottom: 4rem;
  }

  h1 {
    font-size: clamp(3rem, 14.3vw, 4.4rem);
  }

  .hero-lede {
    font-size: 1.03rem;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions .button {
    width: 100%;
  }

  .diorama-shell {
    width: calc(100% + 1rem);
    margin-left: -0.5rem;
  }

  .railway-svg {
    width: 130%;
    margin-left: -15%;
  }

  .diorama-shell figcaption {
    margin-top: -0.35rem;
  }

  .diorama-shell figcaption.persona-caption {
    width: min(calc(100% - 1rem), 28rem);
  }

  .journey-section,
  .features-section {
    padding-top: 5.5rem;
    padding-bottom: 5.5rem;
  }

  .journey-section {
    min-height: calc(100svh - var(--header-height));
    padding-top: 2rem;
    padding-bottom: 1.5rem;
  }

  .journey-section > .section-heading {
    margin-bottom: 1.15rem;
    text-align: center;
  }

  .journey-section > .section-heading > p:last-child {
    margin-inline: auto;
    font-size: 0.92rem;
    line-height: 1.45;
  }

  .journey-section::before {
    inset: 1rem 0.45rem 0;
    border-radius: 2.2rem;
  }

  .journey-track,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .journey-layout {
    gap: 0.8rem;
  }

  .journey-summary {
    gap: 0.65rem;
  }

  .journey-summary-card {
    min-height: 5.5rem;
    padding: 0.8rem;
  }

  .journey-summary-card h3 {
    margin: 0;
    font-size: 0.88rem;
  }

  .journey-summary-card p {
    display: none;
  }

  .audience-layout {
    gap: 2rem;
    padding: 1.5rem;
    border-radius: 2.2rem;
  }

  .audience-card {
    min-height: 13rem;
  }

  .journey-card {
    min-height: auto;
  }

  .journey-layout .journey-principle {
    display: block;
    padding: 1rem 1.1rem;
    border-radius: 1.7rem;
  }

  .journey-layout .principle-illustration {
    display: none;
  }

  .journey-layout .journey-principle .eyebrow {
    margin-bottom: 0.35rem;
  }

  .journey-layout .journey-principle h3 {
    margin-bottom: 0.5rem;
    font-size: 1.45rem;
  }

  .journey-layout .journey-principle > p:last-child {
    font-size: 0.8rem;
  }

  .section-next-after-journey {
    margin-top: 0.8rem;
  }

  .feature-card {
    min-height: 15rem;
  }

  .feature-icon {
    margin-bottom: 3rem;
  }

  .final-cta {
    width: calc(100% - 1rem);
    margin-bottom: 0;
    border-radius: 2rem;
  }

  .cta-section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .final-cta h2 {
    font-size: clamp(2.75rem, 13.5vw, 4.5rem);
  }

  .cta-actions {
    display: grid;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    padding-bottom: 2rem;
    text-align: center;
  }

  .brand-footer,
  .site-footer nav {
    justify-self: center;
  }

  .site-footer .copyright {
    grid-column: 1;
  }
}

@media (max-width: 25rem) {
  .brand span {
    font-size: 0.94rem;
  }

  .header-login {
    font-size: 0.8rem;
  }

  .persona-jumps {
    grid-template-columns: 1fr;
  }

  .journey-card {
    grid-template-columns: auto 1fr;
  }

  .journey-card > div {
    grid-column: 1 / -1;
  }
}

/* Accessibility preferences */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .railway-svg {
    transform: rotate(3deg) !important;
  }

  .diorama-shell .conventional-route > use,
  .diorama-shell .conventional-route-emphasis,
  .diorama-shell .pico-shortcut-track,
  .diorama-shell .pico-rollback-track,
  .diorama-shell .route-stage-card,
  .diorama-shell .rollback-tunnel,
  .diorama-shell .rolling-stock {
    opacity: 1;
  }

  .has-js .diorama-shell.is-rollback-route.is-story-static .conventional-route > use,
  .has-js .diorama-shell.is-rollback-route.is-story-static .conventional-route-emphasis,
  .has-js .diorama-shell.is-rollback-route.is-story-static .pico-shortcut-track,
  .has-js .diorama-shell.is-rollback-route.is-story-static .pico-rollback-track {
    opacity: 1;
  }

  .railway-pause {
    display: none;
  }

  .reveal-ready:not(.is-visible),
  .reveal-ready [data-reveal] {
    opacity: 1;
    translate: 0;
  }

  .cta-train {
    left: 12%;
    translate: 0;
  }
}

@media (prefers-contrast: more) {
  :root {
    --ink-soft: #493e48;
    --line: rgb(39 29 40 / 32%);
  }

  .button,
  .persona-jumps a,
  .section-next,
  .audience-layout,
  .journey-card,
  .feature-card {
    border-width: 2px;
  }

  .route-stop-label rect,
  .station-tooltip {
    background: var(--ink);
    opacity: 1;
  }
}

@media (forced-colors: active) {
  :root {
    forced-color-adjust: auto;
  }

  .button,
  .persona-jumps a,
  .section-next,
  .audience-layout,
  .journey-card,
  .feature-card,
  .journey-principle,
  .final-cta,
  .station-tooltip {
    border: 2px solid ButtonText;
  }

  .route-stop.is-active .route-stop-marker,
  .route-stop:focus-visible .route-stop-marker {
    fill: Highlight;
    stroke: Highlight;
    opacity: 1;
  }

  .route-stop-label rect {
    fill: CanvasText;
  }

  .route-stop-label text {
    fill: Canvas;
  }

  .button-primary,
  .button-gold {
    color: ButtonText;
    background: ButtonFace;
  }
}

@media print {
  .site-header,
  .cta-track,
  .station-tooltip {
    display: none !important;
  }

  body {
    background: white;
  }

  .hero {
    min-height: auto;
  }

  .journey-principle,
  .audience-layout,
  .final-cta {
    color: black;
    background: white;
    border: 2px solid #444;
    box-shadow: none;
  }
}
