:root {
  color-scheme: dark;
  --bg: #06121c;
  --panel: rgba(9, 21, 33, 0.9);
  --text-primary: #f5f8ff;
  --text-muted: rgba(245, 248, 255, 0.7);
  --accent: #ffd27f;
  --accent-strong: #ffb347;
  --border: rgba(255, 255, 255, 0.08);
  --route: rgba(255, 255, 255, 0.65);
  --plane-rotation: -30deg;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  background: linear-gradient(135deg, #2b0614, #701b2b 55%, #8b2a3a);
  color: var(--text-primary);
  line-height: 1.5;
}

a {
  color: inherit;
}

.journey-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(320px, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  padding: clamp(1.5rem, 4vw, 3.5rem);
  align-items: flex-start;
}

.passport-panel {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
}

.passport-card {
  background: var(--panel);
  border-radius: 32px;
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--border);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 420px;
}

.passport-card__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.passport-card h1 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  margin: 0;
}

.passport-card__lede {
  margin: 0;
  color: var(--text-muted);
}

.passport-card__cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cta-primary {
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #4d2200;
  padding: 0.95rem 2rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.cta-primary:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: 3px;
}

.cta-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}

.text-link {
  text-align: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.map-stage {
  width: 100%;
  height: 100%;
}

.map-scene {
  position: relative;
  width: 100%;
  min-height: clamp(320px, 65vh, 760px);
  border-radius: 40px;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35), 0 40px 120px rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.map-art,
.route-layer {
  width: 100%;
  height: 100%;
  display: block;
}

.map-art {
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0.85;
}

.route-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.route-path {
  fill: none;
  stroke: var(--route);
  stroke-width: 2.5;
  stroke-dasharray: 8 8;
  opacity: 0.75;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.6));
}

.marker {
  position: absolute;
  top: var(--y);
  left: var(--x);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  pointer-events: none;
}

.marker__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 15px rgba(255, 210, 127, 0.7);
}

.marker__pulse {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 210, 127, 0.5);
  animation: markerPulse 2.8s ease-out infinite;
}

.marker__label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

@keyframes markerPulse {
  0% {
    transform: scale(0.3);
    opacity: 0.9;
  }
  70% {
    transform: scale(1);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.plane {
  position: absolute;
  width: 46px;
  height: 46px;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) rotate(var(--plane-rotation));
  transition: opacity 0.4s ease;
  opacity: 1;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6));
}

.plane.is-hidden {
  opacity: 0;
}

.plane__body {
  position: absolute;
  inset: 12px 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, #fefefe, #8ec5ff);
}

.plane__body::before,
.plane__body::after {
  content: "";
  position: absolute;
  background: inherit;
}

.plane__body::before {
  width: 100%;
  height: 6px;
  top: 50%;
  left: -12px;
  transform: translateY(-50%);
  border-radius: 4px;
}

.plane__body::after {
  width: 16px;
  height: 12px;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

body.journey-started .passport-card {
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

body:not(.journey-started) .passport-card {
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.slideshow-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 5, 10, 0.7);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 1.5rem;
}

.slideshow-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.slideshow-card {
  width: min(540px, 90vw);
  background: rgba(12, 18, 27, 0.95);
  border-radius: 28px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.slideshow-location {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.slideshow-stage {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  min-height: clamp(220px, 40vh, 360px);
  background: rgba(255, 255, 255, 0.05);
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.slide.is-visible {
  opacity: 1;
}

.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(6, 9, 14, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.3s ease, opacity 0.3s ease;
}

.slide-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.slide-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.slide-nav--prev {
  left: 0.75rem;
}

.slide-nav--next {
  right: 0.75rem;
}

.slideshow-message {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  background: rgba(6, 9, 14, 0.4);
  backdrop-filter: blur(4px);
}

.slideshow-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-secondary {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.cta-secondary:hover {
  transform: translateY(-2px);
}

.slideshow-controls .cta-primary,
.slideshow-controls .cta-secondary {
  flex: 1 1 45%;
}

@media (max-width: 900px) {
  .journey-layout {
    grid-template-columns: 1fr;
  }

  .passport-card {
    max-width: none;
  }

  .map-scene {
    min-height: clamp(360px, 70vh, 640px);
  }
}

@media (max-width: 540px) {
  .slideshow-controls {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marker__pulse {
    display: none;
  }

  .slide {
    transition: none;
  }

  .route-path {
    stroke-dasharray: 4 8;
  }
}
