/* ═══════════════════════════════════════════════════════════════
   ATLAS — real MapLibre map base (replaces the engraved SVG)
   ═══════════════════════════════════════════════════════════════ */
.atlas {
  position: fixed;
  inset: 0;
  z-index: var(--z-map);
  overflow: hidden;
  background: var(--bg);
}

.atlas-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  contain: layout style;
}

.atlas-canvas .maplibregl-map {
  width: 100%;
  height: 100%;
  font-family: var(--ff-sans);
}

/* FontAwesome SVG helper */
.fa-svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  fill: currentColor;
  vertical-align: -0.125em;
}

.fa-spin {
  animation: fa-spin 2s infinite linear;
}

@keyframes fa-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(359deg);
  }
}

/* Tone the native map controls to the brand */
.maplibregl-ctrl-group {
  background: var(--surface) !important;
  border: 1px solid var(--border-mid) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: var(--glass-shadow) !important;
}

.maplibregl-ctrl-group button+button {
  border-top: 1px solid var(--border) !important;
}

.maplibregl-ctrl-group button span {
  filter: invert(1) sepia(.4) saturate(2) hue-rotate(5deg);
}

[data-theme="light"] .maplibregl-ctrl-group button span {
  filter: none;
}

.maplibregl-ctrl-attrib {
  background: var(--surface) !important;
  color: var(--text-mut) !important;
  font-size: 9px;
}

.maplibregl-ctrl-attrib a {
  color: var(--text-mut) !important;
}

.maplibregl-ctrl-bottom-right {
  bottom: 8px;
  right: 8px;
}

.maplibregl-user-location-dot,
.maplibregl-user-location-dot::before {
  background-color: var(--brand-gold) !important;
}

.maplibregl-user-location-accuracy-circle {
  background-color: rgba(196, 168, 130, .18) !important;
}

/* texture above the map, below the chrome */
.atlas-grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: var(--grain-op);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.atlas-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: var(--vignette);
}

/* legibility scrim behind the editorial headline (top-left) */
.atlas-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(105deg, var(--bg) 0%, rgba(10, 10, 10, .55) 26%, transparent 52%);
}

[data-theme="light"] .atlas-scrim {
  background: linear-gradient(105deg, var(--bg) 0%, rgba(236, 228, 214, .6) 26%, transparent 52%);
}

/* City nodes */
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  z-index: 5;
}

/* City markers (MapLibre sets the element transform → no transform here;
   the dot sits on the coordinate, labels float below it) */
.node {
  position: relative;
  cursor: pointer;
  line-height: 0;
  z-index: 5;
}

.node-dot {
  display: block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--node);
  box-shadow: 0 0 0 4px var(--node-ring), var(--glow);
  position: relative;
  transition: transform var(--dur-fast) var(--ease);
}

.node-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--node);
  opacity: 0;
  animation: nodePulse 2.6s var(--ease) infinite;
}

@keyframes nodePulse {
  0% {
    opacity: .5;
    transform: scale(.8);
  }

  100% {
    opacity: 0;
    transform: scale(2.1);
  }
}

.node:hover .node-dot,
.node.active .node-dot {
  transform: scale(1.35);
}

.node-labels {
  position: absolute;
  top: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.node-label {
  font-family: var(--ff-serif);
  font-size: var(--fs-md);
  letter-spacing: var(--ls-base);
  color: var(--text);
  text-shadow: 0 1px 6px var(--bg), 0 0 10px var(--bg);
}

.node-sub {
  font-family: var(--ff-sans);
  font-size: .56rem;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-mut);
  text-shadow: 0 1px 6px var(--bg);
}

.node-origin .node-dot {
  width: 15px;
  height: 15px;
  background: var(--ink-bright);
}

.node-origin .node-label {
  font-style: italic;
}

/* drop-off pin from booking autocomplete */
.dropoff-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}

.dropoff-pin .dp-dot {
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: #5cba5c;
  box-shadow: 0 0 0 4px rgba(92, 186, 92, .25), 0 2px 8px rgba(0, 0, 0, .4);
}

.dropoff-pin .dp-label {
  font-family: var(--ff-sans);
  font-size: .54rem;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: #5cba5c;
  text-shadow: 0 1px 5px var(--bg);
  margin-top: 6px;
}

/* pickup pin (gold) from booking address / GPS */
.pickup-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  pointer-events: none;
}

.pickup-pin .pk-dot {
  width: 14px;
  height: 14px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--ink-bright);
  box-shadow: 0 0 0 4px var(--node-ring), 0 2px 8px rgba(0, 0, 0, .4);
}

.pickup-pin .pk-label {
  font-family: var(--ff-sans);
  font-size: .54rem;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ink-bright);
  text-shadow: 0 1px 5px var(--bg);
  margin-top: 6px;
}

/* Hero copy block — top-left, editorial */
.atlas-copy {
  position: absolute;
  top: clamp(60px, 10vh, 104px);
  left: clamp(20px, 6vw, 72px);
  z-index: 6;
  max-width: min(92vw, 820px);
  pointer-events: none;
}

.atlas-copy .atlas-eyebrow,
.atlas-copy .atlas-h1 a {
  pointer-events: auto;
}

.atlas-eyebrow {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: var(--ls-ultra);
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: var(--sp-4);
}

.atlas-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--ink);
}

.atlas-h1 {
  font-family: var(--ff-serif);
  font-size: var(--fs-hero);
  font-weight: 300;
  line-height: 1.08;
  color: var(--text);
  letter-spacing: -.01em;
  text-shadow: 0 2px 18px var(--bg);
}

.atlas-h1>span {
  display: block;
  white-space: nowrap;
}

.atlas-h1 em {
  font-style: italic;
  color: var(--ink-bright);
}

.atlas-sub {
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: var(--fs-lg);
  color: var(--text-mut);
  margin-top: var(--sp-6);
  line-height: 1.45;
  max-width: 30ch;
  text-shadow: 0 2px 14px var(--bg);
}

.atlas-sub .hint {
  display: block;
  font-family: var(--ff-sans);
  font-style: normal;
  font-size: .6rem;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 10px;
}

/* Front-page CTA — WhatsApp + Call */
.atlas-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: var(--sp-6);
  pointer-events: auto;
}

.atlas-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: .8rem 1.4rem;
  font-family: var(--ff-sans);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: var(--ls-xwide);
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--border-mid);
  border-radius: 24px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}

.atlas-btn svg {
  width: 16px;
  height: 16px;
  fill: var(--ink);
}

.atlas-btn:hover {
  border-color: var(--ink);
  background: var(--ink-faint);
  transform: translateY(-2px);
}

.atlas-btn:active {
  transform: translateY(1px);
}

.atlas-btn.wa {
  color: #5cba5c;
  border-color: rgba(92, 186, 92, .4);
}

.atlas-btn.wa svg {
  fill: #5cba5c;
}

.atlas-btn.wa:hover {
  border-color: #5cba5c;
  background: rgba(92, 186, 92, .08);
}

[data-theme="light"] .atlas-btn.wa {
  color: #1b5a1b;
}

[data-theme="light"] .atlas-btn.wa svg {
  fill: #1b5a1b;
}

@media (max-width:600px) {
  .atlas-cta {
    margin-top: var(--sp-5);
  }

  .atlas-btn {
    padding: .75rem 1.1rem;
  }
}

/* Coordinates ticker (top corner detail) */
.atlas-coords {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  font-family: var(--ff-sans);
  font-size: .56rem;
  letter-spacing: var(--ls-wide);
  color: var(--text-mut);
  text-transform: uppercase;
  display: flex;
  gap: 14px;
}

.atlas-coords b {
  color: var(--ink);
  font-weight: 600;
}

/* Theme toggle is now in the header */

/* selected city floating card */
.route-card {
  position: absolute;
  z-index: 7;
  transform: translate(-50%, calc(-100% - 22px));
  width: 230px;
  background: var(--surface);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .4);
  animation: cardIn var(--dur-base) var(--ease);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-100% - 8px)) scale(.94);
  }
}

.route-card::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 14px;
  height: 14px;
  background: var(--surface);
  border-right: 1px solid var(--border-mid);
  border-bottom: 1px solid var(--border-mid);
}

/* card flips below the pin when the pin sits high on the map */
.route-card.below {
  transform: translate(-50%, 22px);
}

.route-card.below::after {
  bottom: auto;
  top: -7px;
  border: none;
  border-left: 1px solid var(--border-mid);
  border-top: 1px solid var(--border-mid);
}

@keyframes cardInBelow {
  from {
    opacity: 0;
    transform: translate(-50%, 8px) scale(.94);
  }
}

.route-card.below {
  animation: cardInBelow var(--dur-base) var(--ease);
}

.route-card.map-card {
  left: 0;
  top: 0;
  transform: translate(-50%, calc(-100% - 20px));
  animation: mapCardIn var(--dur-base) var(--ease);
}

@keyframes mapCardIn {
  from {
    transform: translate(-50%, calc(-100% - 8px)) scale(.96);
  }
}

.rc-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.rc-city {
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  font-weight: 300;
}

.rc-flag {
  font-size: 1.1rem;
}

.rc-meta {
  display: flex;
  gap: 16px;
  margin: 10px 0 14px;
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-mut);
}

.rc-meta b {
  display: block;
  font-family: var(--ff-serif);
  font-size: 1.15rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-bright);
  margin-top: 3px;
}

.rc-actions {
  display: flex;
  gap: 8px;
}

.rc-btn {
  flex: 1;
  padding: .6rem;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  border: 1px solid var(--border-mid);
  border-radius: var(--r-sm);
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text);
}

.rc-btn svg {
  width: 13px;
  height: 13px;
}

.rc-btn.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.rc-btn.primary svg {
  fill: var(--bg);
}

.rc-btn:not(.primary) svg {
  fill: var(--ink);
}

.rc-btn:active {
  transform: translateY(2px);
}

.rc-btn.primary:hover {
  background: var(--ink-bright);
}

.rc-btn:not(.primary):hover {
  border-color: var(--ink);
  background: var(--ink-faint);
}

@media (max-width:600px) {
  .atlas-h1 {
    font-size: clamp(2.4rem, 13vw, 3.6rem);
  }

  .compass {
    width: 54px;
    height: 54px;
    bottom: 14%;
    right: 8%;
  }

  .node-label {
    font-size: .92rem;
  }

  .route-card {
    width: 200px;
  }

  /* Position Hero CTA buttons at the bottom edge of mobile screen */
  .atlas-copy {
    position: absolute;
    top: clamp(40px, 5vh, 70px);
    bottom: 20px;
    left: clamp(16px, 4vw, 32px);
    right: clamp(16px, 4vw, 32px);
    height: auto;
    display: flex;
    flex-direction: column;
    max-width: none;
    pointer-events: none;
  }

  .atlas-cta {
    margin-top: auto;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    pointer-events: auto;
  }

  .atlas-btn {
    width: 80%;
    margin: 0 auto;
    justify-content: center;
    padding: .85rem 1.2rem;
  }
}

/* Fix touch target size for MapLibre controls to satisfy accessibility audits */
.maplibregl-ctrl-group button {
  width: 48px !important;
  height: 48px !important;
}

/* ── Navbar Transparent (Floating Header) ── */
.atlas-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: clamp(16px, 4vh, 32px) clamp(16px, 6vw, 72px);
  pointer-events: none; /* Let clicks pass through empty spaces to the map */
}

.header-left {
  display: flex;
  justify-content: flex-start;
  pointer-events: auto;
}

.header-center {
  display: flex;
  justify-content: center;
  pointer-events: auto;
}

.header-right {
  display: flex;
  justify-content: flex-end;
  pointer-events: auto;
}

.header-logo {
  height: clamp(30px, 5vh, 45px);
  width: auto;
  filter: brightness(0) invert(1); /* Ensure it's white for dark theme */
  transition: filter var(--dur-fast) var(--ease);
}

[data-theme="light"] .header-logo {
  filter: brightness(0); /* Black for light theme */
}

/* Style for icon-only buttons (no circle/border) */
.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text);
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
  opacity: 0.85;
}

.header-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.header-btn:hover {
  transform: translateY(-2px);
  opacity: 1;
}

.header-btn:active {
  transform: translateY(1px);
}