/* The /atlas page — the desk-globe and its index of places. Page-scoped, loaded
   only by src/atlas.njk. Colours come from the design tokens in atlas.css. */

.at-atlas {
  padding-top: 44px;
  max-width: 1040px;
  margin: 0 auto;
  text-align: center; /* centre the header + globe; the index resets to left */
}

.at-atlas-dek {
  color: var(--text-mid);
  max-width: 56ch;
  margin: 10px auto 18px;
  line-height: 1.6;
}

.at-globe {
  position: relative; /* anchor for the zoom controls */
  margin: 0 auto 4px;
  width: 100%;
  /* big, but always fits the viewport so the whole globe + stand is visible
     without scrolling — it shrinks with height on short screens */
  max-width: min(700px, 76vh);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* "Bring it closer" zoom buttons, tucked into the empty top-right corner
   (outside the globe's circle). Wheel / double-tap / pinch zoom too. */
.at-globe-zoom {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.at-globe-zoom button {
  width: 30px;
  height: 30px;
  padding: 0;
  font-family: var(--mono);
  font-size: 17px;
  line-height: 1;
  color: var(--accent);
  background: rgba(10, 14, 11, 0.66);
  border: 1px solid var(--border-accent-dim);
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.at-globe-zoom button:hover,
.at-globe-zoom button:focus-visible {
  background: rgba(212, 184, 118, 0.14);
  border-color: var(--accent);
  outline: none;
}

.at-globe-canvas {
  width: 100%;
  height: auto;
  display: block;
  /* own all touch gestures so a one-finger drag turns the globe (spin + tilt)
     and two fingers pinch-zoom — the browser's pan/scroll directional lock used
     to eat the rotate. The globe is only ~screen-width tall on phones, with the
     place index below it, so the page still scrolls from the surrounding area. */
  touch-action: none;
  cursor: grab;
}
.at-globe-canvas:active {
  cursor: grabbing;
}

/* The globe's caption now carries the explanation + how-to, so it reads as a
   sentence below the globe rather than terse microcopy. */
.at-globe-cap {
  margin: 14px auto 0;
  max-width: 56ch;
  color: var(--text-mid);
  line-height: 1.6;
}

.at-atlas-index {
  margin: 30px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--border-dim);
  text-align: left; /* lists read left-aligned even though the page centres */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 26px 32px;
  align-items: start;
}
.at-atlas-journey {
  margin: 0;
}
.at-atlas-journey-label {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.at-atlas-journey ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.at-atlas-journey li {
  margin: 0;
}
.at-atlas-journey a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--border-dim);
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.at-atlas-journey a:hover,
.at-atlas-journey a:focus-visible {
  color: var(--accent);
  border-color: var(--border-accent-dim);
  outline: none;
}
.at-atlas-name {
  font-size: 14px;
}
.at-atlas-cat {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* Waypoints — the one-off pins, as a single dense band spanning the full width
   beneath the journey columns. A middot-separated flow, not orphaned rows. */
.at-atlas-waypoints {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid var(--border-dim);
}
.at-atlas-waypoints .at-atlas-journey-label {
  margin-bottom: 11px;
}
.at-atlas-waypoints-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14px;
  line-height: 2;
}
.at-atlas-waypoints-list li {
  display: inline;
}
.at-atlas-waypoints-list li:not(:last-child)::after {
  content: "·";
  margin: 0 9px;
  color: var(--text-faint);
}
.at-atlas-waypoints-list a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s ease;
}
.at-atlas-waypoints-list a:hover,
.at-atlas-waypoints-list a:focus-visible {
  color: var(--accent);
  outline: none;
}
.at-atlas-waypoints-list .more a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

.at-atlas-empty {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 13px;
}

@media (max-width: 640px) {
  .at-atlas {
    padding-top: 64px;
  }
  .at-atlas-index {
    grid-template-columns: 1fr;
  }
  .at-globe-zoom button {
    width: 38px; /* larger touch target on phones */
    height: 38px;
  }
}
