:root {
  --bg: #05070d;
  --text: #eef2f8;
  --muted: #a3adbf;
  --accent: #ff7a3d;
  --accent-soft: rgba(255, 122, 61, 0.18);
  --card: rgba(9, 13, 24, 0.74);
  --card-border: rgba(255, 255, 255, 0.09);
  --line: rgba(255, 255, 255, 0.14);
  --radius: 18px;
  --col: min(560px, 44vw);
  --col-right: 6vw;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--accent); }

/* ---------- Globe background ---------- */

.globe-wrap {
  position: fixed;
  top: 0;
  left: -40vw;          /* globe centre sits at ~30vw, clear of the card column */
  width: 140vw;
  height: 100vh;
  height: 100lvh;
  z-index: 0;
  pointer-events: none;
}

#globe, #globe canvas { display: block; }

.globe-vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 45%, rgba(5, 7, 13, 0.55) 100%),
    radial-gradient(ellipse at 30% 50%, transparent 55%, rgba(5, 7, 13, 0.5) 100%);
}

.no-globe .globe-wrap { display: none; }
.no-globe body {
  background: radial-gradient(ellipse at 30% 40%, #10203f 0%, var(--bg) 70%);
  background-attachment: fixed;
}

/* Globe markers (rendered by globe.gl as HTML overlays) */
.marker {
  position: relative;
  pointer-events: none;
  display: grid;
  place-items: center;
}
.marker-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(5, 7, 13, 0.6);
  transition: background 0.3s, transform 0.3s;
}
.marker.is-past .marker-dot { background: var(--accent); }
.marker.is-active .marker-dot {
  background: var(--accent);
  transform: scale(1.5);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 18px var(--accent);
}
.marker-label {
  position: absolute;
  left: 14px;
  white-space: nowrap;
  font: 600 12px/1 var(--body);
  letter-spacing: 0.02em;
  color: #fff;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.7);
  opacity: 0;
  transition: opacity 0.3s;
}
.marker.is-active .marker-label { opacity: 1; background: var(--accent); color: #140802; }

/* ---------- Page sections ---------- */

.hero, .timeline, .outro {
  position: relative;
  z-index: 2;
  width: var(--col);
  margin-left: auto;
  margin-right: var(--col-right);
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10vh 0;
}

.eyebrow {
  margin: 0 0 12px;
  font: 600 13px/1.4 var(--body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1 {
  margin: 0;
  font: 700 clamp(3rem, 6.5vw, 5.75rem)/0.95 var(--display);
  letter-spacing: -0.03em;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.6);
}

.lede {
  margin: 20px 0 0;
  font-size: 1.15rem;
  color: #d5dbe6;
  max-width: 34ch;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

.hero-sun {
  margin: 18px 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.scroll-cue {
  align-self: flex-start;
  margin-top: 36px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  background: rgba(5, 7, 13, 0.5);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, background 0.2s;
}
.scroll-cue:hover { border-color: var(--accent); background: var(--accent-soft); }
.scroll-cue span { display: inline-block; animation: bob 1.8s ease-in-out infinite; }

@keyframes bob { 50% { transform: translateY(4px); } }

/* ---------- Timeline ---------- */

.timeline { padding-left: 44px; }

.timeline-line {
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.timeline-progress {
  position: absolute;
  inset: 0;
  background: linear-gradient(var(--accent), #ffb37f);
  transform-origin: top;
  transform: scaleY(var(--progress, 0));
}

.stop {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8vh 0;
}

.stop-node {
  position: absolute;
  left: -44px;
  top: 50%;
  width: 32px;
  height: 32px;
  margin-top: -16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 13px/1 var(--display);
  color: var(--muted);
  background: var(--bg);
  border: 2px solid var(--line);
  transition: color 0.3s, border-color 0.3s, background 0.3s, box-shadow 0.3s;
}
.stop.is-past .stop-node { border-color: var(--accent); color: var(--accent); }
.stop.is-active .stop-node {
  color: #140802;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft), 0 0 24px var(--accent);
}

.stop-card {
  width: 100%;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transition: opacity 0.8s cubic-bezier(.2, .7, .2, 1), transform 0.8s cubic-bezier(.2, .7, .2, 1), border-color 0.4s;
}
.stop.is-active .stop-card { border-color: rgba(255, 122, 61, 0.45); }

/* Reveal-on-scroll only once JS is running, so content is never hidden without it */
.js-anim .stop-card { opacity: 0; transform: translateY(48px) scale(0.98); }
.js-anim .stop.is-visible .stop-card { opacity: 1; transform: none; }

.stop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.stop-step, .stop-location, .stop-daynight {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
}
.stop-step { background: var(--accent); color: #140802; }
.stop-location { background: rgba(255, 255, 255, 0.08); }
.stop-daynight { background: rgba(255, 255, 255, 0.05); color: var(--muted); font-weight: 500; }
.stop-daynight.is-day { color: #ffd98a; }
.stop-daynight.is-night { color: #a9c3ff; }

.stop-title {
  margin: 0;
  font: 700 clamp(1.5rem, 2.4vw, 2rem)/1.15 var(--display);
  letter-spacing: -0.01em;
}
.stop-byline { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }
.stop-byline strong { color: var(--text); font-weight: 600; }

/* ---------- Video (lite YouTube embed) ---------- */

.video {
  position: relative;
  margin-top: 18px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #0d1220;
  border: 1px solid var(--card-border);
}
.video iframe, .video-play, .video-play img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-play {
  padding: 0;
  cursor: pointer;
  background: #000;
}
.video-play img { object-fit: cover; transition: transform 0.5s, filter 0.3s; filter: brightness(0.85); }
.video-play:hover img, .video-play:focus-visible img { transform: scale(1.04); filter: brightness(1); }
.video-play:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.video-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  background: rgba(255, 0, 0, 0.9);
  display: grid;
  place-items: center;
  transition: transform 0.2s, background 0.2s;
}
.video-play:hover .video-play-icon { transform: translate(-50%, -50%) scale(1.08); background: #f00; }
.video-play-icon::after {
  content: "";
  margin-left: 4px;
  border-style: solid;
  border-width: 10px 0 10px 17px;
  border-color: transparent transparent transparent #fff;
}

.video-fallback, .video-missing {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}
.video-missing {
  background: repeating-linear-gradient(135deg, #0d1220 0 14px, #10172a 14px 28px);
}

/* ---------- Description + socials ---------- */

.stop-body { margin-top: 16px; color: #d5dbe6; }
.stop-body > :first-child { margin-top: 0; }
.stop-body > :last-child { margin-bottom: 0; }
.stop-body ul { padding-left: 1.2em; }
.stop-body img { max-width: 100%; border-radius: 10px; }

.socials {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  padding: 16px 0 0;
  list-style: none;
  border-top: 1px solid var(--card-border);
}
.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.socials a:hover, .socials a:focus-visible { background: var(--accent); color: #140802; transform: translateY(-2px); }
.socials svg { width: 18px; height: 18px; }

/* ---------- Outro ---------- */

.outro {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10vh 0 14vh;
}
.outro h2 {
  margin: 0;
  font: 700 clamp(2.2rem, 4.5vw, 3.5rem)/1 var(--display);
  letter-spacing: -0.02em;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 28px 0 0;
}
.stats div {
  padding: 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
}
.stats dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.stats dd { margin: 4px 0 0; font: 700 1.9rem/1.1 var(--display); font-variant-numeric: tabular-nums; }
.outro-note { margin: 24px 0 0; color: #d5dbe6; max-width: 42ch; }

/* ---------- Narrow screens: globe centred behind full-width cards ---------- */

@media (max-width: 900px) {
  :root { --col: auto; --col-right: 16px; }

  .hero, .timeline, .outro { margin-left: 16px; }

  /* Taller canvas pulled upward puts the globe's centre at ~30% of the screen,
     filling the space above the hero text instead of sitting behind it */
  .globe-wrap { left: 0; width: 100vw; top: -40vh; height: 140vh; height: calc(100lvh + 40vh); }
  .globe-vignette { background: rgba(5, 7, 13, 0.35); }

  .hero { min-height: 100vh; min-height: 100svh; justify-content: flex-end; padding: 0 0 7vh; }
  .timeline { padding-left: 36px; }
  .timeline-line { left: 11px; }
  .stop-node { left: -36px; width: 24px; height: 24px; margin-top: -12px; font-size: 11px; }
  .stop { min-height: 0; padding: 0; margin-bottom: 70vh; }
  .stop:first-of-type { margin-top: 40vh; }
  .stop-card { padding: 18px; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .stats div { padding: 12px; }
  .stats dd { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js-anim .stop-card { transform: none; }
}
