/* ── Fullscreen Atlas ───────────────────────────────────────────── */

.atlas-overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  overflow: hidden;
  background: var(--atlas-bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity .38s ease, visibility .38s ease;
  isolation: isolate;
}
.atlas-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.atlas-overlay.is-opening .atlas-topbar,
.atlas-overlay.is-opening .atlas-hud {
  animation: atlasUiIn .8s .33s both;
}
@keyframes atlasUiIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.atlas-ambient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 48% 50%, rgba(56,48,35,.33) 0%, rgba(16,15,13,.22) 37%, transparent 68%),
    linear-gradient(180deg, #0b0b0a 0%, #090909 58%, #080808 100%);
}
.atlas-ambient::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 30%, rgba(0,0,0,.23) 100%);
}

.atlas-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px clamp(24px, 3.3vw, 52px);
  pointer-events: none;
}
.atlas-topbar button { pointer-events: auto; }
.atlas-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #d9d7d2;
  font-size: .64rem;
  letter-spacing: .24em;
}
.atlas-brand-rule {
  width: 28px;
  height: 1px;
  background: #77746c;
}
.atlas-brand-meta {
  color: #595955;
  font-size: .53rem;
  letter-spacing: .18em;
}
.atlas-topbar-right {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 65px);
}
.atlas-count {
  color: #5d5d59;
  font-size: .52rem;
  letter-spacing: .17em;
}
.atlas-close {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  background: transparent;
  color: #8e8c87;
  font: inherit;
  font-size: .54rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s;
}
.atlas-close:hover { color: #fff; }
.atlas-close-mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 50%;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1;
  transition: border-color .25s, transform .35s var(--atlas-ease);
}
.atlas-close:hover .atlas-close-mark {
  border-color: rgba(255,255,255,.35);
  transform: rotate(90deg);
}

.atlas-field {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.atlas-frame {
  --atlas-size: min(72vh, 49vw, 760px);
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--atlas-size);
  height: var(--atlas-size);
  border-radius: 50%;
  translate: -50% -50%;
  will-change: transform;
  z-index: 2;
}
.atlas-frame-glow {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226,217,200,.075) 0%, rgba(226,217,200,0) 67%);
  pointer-events: none;
}
.atlas-globe {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 30px 70px rgba(0,0,0,.5));
}
.atlas-globe.is-dragging { cursor: grabbing; }

.atlas-globe .globe-rim { stroke: rgba(245,245,245,.27); stroke-width: 1.1; }
.atlas-globe .globe-outer-rim { stroke: rgba(245,245,245,.075); stroke-width: 1; }
.atlas-globe .globe-graticule { stroke: rgba(245,245,245,.115); stroke-width: .72; }
.atlas-globe .globe-land { stroke: rgba(245,245,245,.6); stroke-width: 1.18; }

.atlas-marker {
  cursor: pointer;
  outline: none;
  opacity: 0;
  pointer-events: none;
}
.atlas-marker.is-visible {
  pointer-events: all;
}
.atlas-marker .marker-hit {
  fill: transparent;
  stroke: none;
}
.atlas-marker .marker-dot {
  fill: rgba(245,245,245,.52);
  stroke: rgba(245,245,245,.28);
  stroke-width: .7;
  transition: fill .2s, stroke .2s, r .2s;
}
.atlas-marker .marker-ring {
  fill: none;
  stroke: rgba(245,245,245,.48);
  stroke-width: .8;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transition: opacity .3s;
}
.atlas-marker:hover .marker-dot,
.atlas-marker:focus-visible .marker-dot {
  fill: #fff;
  stroke: rgba(255,255,255,.8);
}
.atlas-marker:hover .marker-ring,
.atlas-marker:focus-visible .marker-ring {
  opacity: .68;
}
.atlas-marker.is-active .marker-dot {
  fill: #f5f1e8;
  stroke: rgba(255,255,255,.9);
}
.atlas-marker.is-active .marker-ring {
  opacity: 1;
  stroke: rgba(245,241,232,.75);
  animation: markerBreath 2.8s ease-in-out infinite;
}
@keyframes markerBreath {
  0%, 100% { transform: scale(.82); opacity: .36; }
  50% { transform: scale(1.13); opacity: .9; }
}

.atlas-marker:focus-visible .marker-hit {
  fill: rgba(255,255,255,.07);
}

.atlas-hud {
  position: absolute;
  right: clamp(24px, 3.3vw, 52px);
  bottom: 27px;
  left: clamp(24px, 3.3vw, 52px);
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 30px;
  color: #666662;
  font-size: .52rem;
  letter-spacing: .17em;
  pointer-events: none;
}
.atlas-hud-label {
  display: block;
  margin-bottom: 10px;
  color: #474744;
  font-size: .47rem;
  letter-spacing: .23em;
}
.atlas-hud-place {
  display: block;
  max-width: 340px;
  color: #a7a49d;
  font-family: var(--font-serif);
  font-size: .94rem;
  letter-spacing: .025em;
  text-transform: none;
}
.atlas-hint {
  margin: 0;
  color: #575752;
  font-size: .48rem;
  text-align: center;
  transition: opacity .35s;
}
.atlas-hint span { padding: 0 .3rem; color: #383835; }
.atlas-overlay.has-interacted .atlas-hint { opacity: 0; }
.atlas-hud-coords {
  margin: 0;
  color: #5e5e59;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: .52rem;
  text-align: right;
}

.atlas-journey-panel {
  position: absolute;
  top: 50%;
  right: clamp(28px, 5.4vw, 92px);
  z-index: 7;
  width: clamp(245px, 21vw, 306px);
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transform: translate(18px, -50%);
  transition: opacity .5s var(--atlas-ease), transform .65s var(--atlas-ease);
}
.atlas-overlay.has-selection .atlas-journey-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}
.atlas-panel-close {
  position: absolute;
  z-index: 2;
  top: -30px;
  right: 0;
  border: 0;
  background: transparent;
  color: #666661;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: color .2s;
}
.atlas-panel-close:hover { color: #fff; }
.atlas-panel-image-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #151515;
}
.atlas-panel-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.85) brightness(.88);
}
.atlas-panel-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(9,9,9,.5));
  pointer-events: none;
}
.atlas-panel-index {
  position: absolute;
  z-index: 1;
  right: 12px;
  bottom: 10px;
  color: rgba(255,255,255,.46);
  font-family: var(--font-sans);
  font-size: .48rem;
  letter-spacing: .15em;
}
.atlas-panel-meta {
  margin: 21px 0 9px;
  color: #77756e;
  font-size: .55rem;
  letter-spacing: .16em;
  line-height: 1.7;
}
.atlas-panel-title {
  margin: 0;
  color: #e6e2d9;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 2.25vw, 2.4rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.005em;
}
.atlas-panel-story {
  display: -webkit-box;
  overflow: hidden;
  margin: 16px 0 0;
  color: #8d8b84;
  font-size: .79rem;
  line-height: 1.72;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}
.atlas-panel-enter {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding: 13px 0;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: transparent;
  color: #c4c0b6;
  font-family: var(--font-sans);
  font-size: .54rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.atlas-panel-enter:hover {
  color: #fff;
  border-color: rgba(255,255,255,.32);
}
.atlas-panel-enter span { font-size: .92rem; letter-spacing: 0; transition: transform .3s var(--atlas-ease); }
.atlas-panel-enter:hover span { transform: translateX(5px); }

.atlas-loading {
  position: absolute;
  z-index: 9;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%,-50%);
  transition: opacity .2s, visibility .2s;
}
.atlas-overlay.is-loading .atlas-loading { opacity: 1; visibility: visible; }
.atlas-loading span {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.12);
  border-top-color: rgba(255,255,255,.6);
  border-radius: 50%;
  animation: atlasSpin 1.1s linear infinite;
}
@keyframes atlasSpin { to { transform: rotate(360deg); } }
.atlas-loading p {
  margin: 0;
  color: #666;
  font-family: var(--font-sans);
  font-size: .49rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.atlas-grain {
  position: absolute;
  z-index: 6;
  inset: 0;
  opacity: .035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

/* ── Smaller desktop and tablet ────────────────────────────────── */
@media (max-width: 1180px) {
  .atlas-frame { --atlas-size: min(68vh, 48vw, 650px); }
  .atlas-journey-panel { right: 3vw; width: 250px; }
  .atlas-topbar-right { gap: 26px; }
  .atlas-count { display: none; }
}

@media (max-width: 960px) {
  .teaser-globe-button { width: min(74vw, 360px); }

  .atlas-frame { --atlas-size: min(62vh, 77vw, 610px); top: 46%; }
  .atlas-topbar { padding: 22px 22px; }
  .atlas-brand-meta, .atlas-close span:first-child { display: none; }
  .atlas-frame { top: 45%; }
  .atlas-hud {
    right: 22px;
    bottom: 20px;
    left: 22px;
    grid-template-columns: 1fr auto;
  }
  .atlas-hint { display: none; }
  .atlas-hud-coords { font-size: .47rem; }
  .atlas-journey-panel {
    top: auto;
    right: 18px;
    bottom: 76px;
    left: 18px;
    width: auto;
    display: grid;
    grid-template-columns: 112px 1fr;
    grid-template-rows: auto auto auto 1fr;
    column-gap: 18px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(13,13,12,.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateY(14px);
    transition: opacity .4s, transform .55s var(--atlas-ease);
  }
  .atlas-overlay.has-selection .atlas-journey-panel { transform: translateY(0); }
  .atlas-panel-image-wrap { grid-row: 1 / 5; aspect-ratio: 3/4; }
  .atlas-panel-close { top: 8px; right: 9px; z-index: 3; font-size: 1.2rem; }
  .atlas-panel-meta { margin: 0 20px .35rem 0; font-size: .43rem; }
  .atlas-panel-title { margin: 0; padding-right: 20px; font-size: 1.5rem; }
  .atlas-panel-story { display: none; }
  .atlas-panel-enter { margin-top: 10px; padding: 10px 0; border-bottom: 0; font-size: .48rem; }
  .atlas-field { align-items: flex-start; }
}

@media (max-width: 640px) {
  .atlas-frame { --atlas-size: min(54vh, 88vw, 520px); top: 42%; }
  .atlas-brand-rule { width: 16px; }
  .atlas-brand { font-size: .57rem; gap: 9px; }
  .atlas-close-mark { width: 28px; height: 28px; }
  .atlas-journey-panel { bottom: 66px; grid-template-columns: 92px 1fr; padding: 12px; }
  .atlas-panel-image-wrap { aspect-ratio: 3/4; }
  .atlas-panel-title { font-size: 1.28rem; }
  .atlas-hud-place { font-size: .82rem; }
  .atlas-hud-coords { display: none; }
  .atlas-hud { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
  }
  .teaser-globe-button::after,
  .teaser-globe-glow,
  .atlas-journey-panel,
  .atlas-close-mark {
    transition-duration: .01ms !important;
  }
  .atlas-overlay.is-opening .atlas-topbar,
  .atlas-overlay.is-opening .atlas-hud,
  .atlas-marker.is-active .marker-ring,
  .atlas-loading span {
    animation: none !important;
  }
}



/* ── Live-site integration ─────────────────────────────────────── */

body.atlas-open { overflow: hidden !important; }

.trips-globe-rail.is-atlas-trigger {
  cursor: pointer;
  outline: none;
}
.trips-globe-rail.is-atlas-trigger .trips-globe-frame {
  transition: filter .4s ease;
}
.trips-globe-rail.is-atlas-trigger:hover .trips-globe-frame,
.trips-globe-rail.is-atlas-trigger:focus-visible .trips-globe-frame {
  filter: drop-shadow(0 0 28px rgba(236,229,216,.07));
}
.trips-globe-rail.is-atlas-trigger:focus-visible .trips-globe-frame {
  outline: 1px solid rgba(255,255,255,.32);
  outline-offset: 7px;
  border-radius: 50%;
}
.atlas-trigger-cue {
  display: block;
  margin-top: 9px;
  color: #6f6f6c;
  font-family: var(--font-sans);
  font-size: .5rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .48;
  transition: opacity .3s ease, color .3s ease;
}
.trips-globe-rail.is-atlas-trigger:hover .atlas-trigger-cue,
.trips-globe-rail.is-atlas-trigger:focus-visible .atlas-trigger-cue {
  opacity: 1;
  color: #b3b0a8;
}
.atlas-mobile-trigger {
  display: none;
  margin: 1.6rem auto 0;
  padding: .7rem 0;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: #b1aea6;
  font-family: var(--font-sans);
  font-size: .62rem;
  letter-spacing: .19em;
  text-transform: uppercase;
  cursor: pointer;
}
.atlas-mobile-trigger:hover { color: #fff; border-color: rgba(255,255,255,.42); }
.atlas-mobile-trigger span { margin-left: .55rem; font-size: .83rem; }

@media (max-width: 1023px) {
  .atlas-mobile-trigger { display: inline-flex; align-items: center; }
}

@media (max-width: 640px) {
  .atlas-overlay { z-index: 960; }
}
