/* Showcase "Siemens around the world" (ADR 0043): a full-bleed scroll story. The map fills the
   viewport behind the page and stays put; the story cards scroll over it, one stop per screen.
   Mobile first; light and dark follow the visitor's setting. */
.tours {
  /* Deep space behind the globe in both schemes; the star field of ADR 0050 lies on top. */
  --space: #00000e;
  --card: rgb(255 255 255 / 94%);
  --card-shadow: 0 4px 24px rgb(0 0 40 / 18%);
  margin: 0;
  background: #00000e;
}

@media (prefers-color-scheme: dark) {
  .tours {
    --card: rgb(0 24 59 / 92%);
    --card-shadow: 0 4px 24px rgb(0 0 0 / 50%);
    background: #000010;
  }
}

.tours .top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  background: linear-gradient(rgb(0 0 40 / 90%), rgb(0 0 40 / 0%));
  padding-bottom: 28px;
  pointer-events: none;
}

.tours .top a {
  pointer-events: auto;
}

.story {
  position: relative;
}

/* The map: one viewport, sticky, behind the cards. */
.map-wrap {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
  height: 100dvh;
  background: var(--space);
}

.map {
  position: absolute;
  inset: 0;
}

/* The star field of ADR 0050 (NASA SVS Deep Star Maps 2020, public domain), fading with zoom:
   the embed's own space module sets the class and the opacity. */
.map.map-space::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #00000e url("/embed/stars.webp") center / cover no-repeat;
  opacity: var(--map-space-opacity, 1);
  pointer-events: none;
}

/* The cards: pulled up over the map; only the cards take pointer events, the map takes the rest. */
.steps {
  position: relative;
  z-index: 1;
  margin-top: -100vh;
  margin-top: -100dvh;
  padding: 0 12px;
  pointer-events: none;
}

.card {
  pointer-events: auto;
  box-sizing: border-box;
  width: 100%;
  max-width: 26rem;
  padding: 16px 18px;
  background: var(--card);
  color: var(--text);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(6px);
}

.card p {
  margin: 0 0 12px;
}

.card > :last-child {
  margin-bottom: 0;
}

.hero {
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100dvh;
  /* Above the Layers button and the map credits. */
  padding-bottom: 112px;
  box-sizing: border-box;
}

.hero .card {
  font-size: 15px;
}

.step {
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 112px;
  box-sizing: border-box;
}

.step h2 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--petrol-dark);
}

.step .count {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.step.is-current .card {
  outline: 2px solid var(--petrol-dark);
  outline-offset: -2px;
}

/* On phones the card of the current stop stays above the map credits while its screen passes. */
.step .card {
  position: sticky;
  bottom: 112px;
}

.source {
  display: flex;
  align-items: center;
  min-height: 60vh;
  padding-bottom: 24px;
}

.source .card {
  font-size: 14px;
  color: var(--muted);
}

/* The player under the story: on phones a compact bar at the top, the cards show the caption. */
.tours .tour-caption {
  display: none;
}

.tours .tour-bar {
  margin-top: 0;
}

.tours .tour-player {
  top: 76px;
  bottom: auto;
  left: 12px;
  transform: none;
  /* Leaves the zoom and compass buttons free on the right. */
  width: calc(100% - 72px);
  padding: 6px 8px;
}

.status,
.notice {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 120px;
  z-index: 6;
  margin: 0;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--text);
  border-radius: 6px;
  font-size: 14px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

[hidden] {
  display: none !important;
}

/* Desktop: the story in a column on the left, each card centered on its screen, the player at
   the bottom right next to it. */
@media (min-width: 760px) {
  .steps {
    padding: 0 32px;
    width: 30rem;
    max-width: 40%;
    box-sizing: content-box;
  }

  .hero,
  .step {
    align-items: center;
    padding-bottom: 0;
  }

  .step .card {
    position: static;
  }

  .hero {
    padding-top: 72px;
  }

  .step h2 {
    font-size: 22px;
  }

  .tours .tour-player {
    top: auto;
    bottom: 40px;
    left: auto;
    right: 24px;
    transform: none;
    width: min(32rem, calc(100% - 34rem));
  }

  .notice,
  .status {
    left: auto;
    right: 24px;
    top: 72px;
    max-width: 28rem;
  }
}
