/* Atlas Split — shared homepage and destination-area explorer. */

.rmof-atlas-section {
  width: auto;
}

.rmof-atlas-section__inner {
  width: min(1700px, 100%);
  margin-inline: auto;
}

.rmof-atlas-section__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 42rem);
  align-items: end;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-bottom: clamp(1.4rem, 3vw, 2rem);
}

.rmof-atlas-section__head h2 {
  max-width: 14ch;
  margin: 0;
  color: var(--rmof-salt, #f4f7ff);
  font-family: var(--rmof-font-display);
  font-size: clamp(2.2rem, 4.8vw, 4.6rem);
  font-weight: 300;
  letter-spacing: -.025em;
  line-height: 1.02;
  text-wrap: balance;
}

.rmof-atlas-section__head p {
  max-width: 65ch;
  margin: 0;
  color: var(--rmof-muted, #b1bfd9);
  font-size: clamp(.9rem, 1.2vw, 1rem);
  line-height: 1.7;
}

.rmof-atlas {
  display: grid;
  grid-template-columns: minmax(240px, .72fr) minmax(480px, 1.6fr) minmax(300px, .9fr);
  height: clamp(520px, 38vw, 640px);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--rmof-border-subtle, #263b59);
  background: var(--rmof-depth, #030816);
  color: var(--rmof-salt, #f4f7ff);
}

.rmof-atlas__list {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  border-right: 1px solid var(--rmof-border-subtle, #263b59);
  background: var(--rmof-surface, #071020);
}

.rmof-atlas__list-head {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1rem;
  color: var(--rmof-soft, #8290ae);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.rmof-atlas__links {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--rmof-border-interactive, #516f91) var(--rmof-depth, #030816);
  scrollbar-width: thin;
}

.rmof-atlas__links::-webkit-scrollbar {
  width: 8px;
}

.rmof-atlas__links::-webkit-scrollbar-track {
  background: var(--rmof-depth, #030816);
}

.rmof-atlas__links::-webkit-scrollbar-thumb {
  background: var(--rmof-border-interactive, #516f91);
  border: 2px solid var(--rmof-depth, #030816);
}

.rmof-atlas__link,
.rmof-atlas__all {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--rmof-border-interactive, #516f91) 44%, transparent);
  color: var(--rmof-muted, #b1bfd9);
  padding: .65rem 1rem;
  text-decoration: none;
  transition: background-color 180ms cubic-bezier(.16, 1, .3, 1), color 180ms cubic-bezier(.16, 1, .3, 1), border-color 180ms cubic-bezier(.16, 1, .3, 1);
}

.rmof-atlas__link strong {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: .86rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rmof-atlas__link span {
  flex: 0 0 auto;
  color: var(--rmof-soft, #8290ae);
  font-size: .65rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.rmof-atlas__link:hover,
.rmof-atlas__link.is-active {
  background: rgb(var(--rmof-action-rgb, 77 141 255) / .09);
  color: var(--rmof-salt, #f4f7ff);
}

.rmof-atlas__link.is-active {
  border-top-color: var(--rmof-action, #4d8dff);
}

.rmof-atlas__link.is-active span {
  color: var(--rmof-action, #4d8dff);
}

.rmof-atlas__link:focus-visible,
.rmof-atlas__all:focus-visible,
.rmof-atlas__preview-cta:focus-visible {
  position: relative;
  z-index: 5;
  outline: 3px solid var(--rmof-focus, #8bb9ff);
  outline-offset: -3px;
}

.rmof-atlas__all {
  flex: 0 0 auto;
  min-height: 52px;
  margin-top: auto;
  border-top-color: var(--rmof-border-interactive, #516f91);
  color: var(--rmof-action, #4d8dff);
  font-size: .69rem;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.rmof-atlas__all:hover {
  background: rgb(var(--rmof-action-rgb, 77 141 255) / .09);
  color: var(--rmof-action-hover, #6ba7ff);
}

.rmof-atlas__plot {
  position: relative;
  min-width: 0;
  min-height: 520px;
  overflow: hidden;
  background: var(--rmof-depth, #030816);
}

.rmof-atlas__map-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(100% - 2rem);
  aspect-ratio: 2 / 1;
  transform: translate(-50%, -50%);
}

.rmof-atlas__base {
  display: block;
  width: 100%;
  height: 100%;
}

.rmof-atlas__grid path {
  fill: none;
  stroke: var(--rmof-border-subtle, #263b59);
  stroke-width: 1;
  opacity: .58;
}

.rmof-atlas__world-land {
  opacity: .82;
}

.rmof-atlas__local-frame {
  fill: rgb(var(--rmof-action-rgb, 77 141 255) / .025);
  stroke: var(--rmof-border-interactive, #516f91);
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
  opacity: .7;
}

.rmof-atlas__north {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--rmof-soft, #8290ae);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .12em;
}

.rmof-atlas__pin {
  position: absolute;
  left: var(--rmof-atlas-x);
  top: var(--rmof-atlas-y);
  display: flex;
  align-items: center;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.rmof-atlas__pin-core {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--rmof-border-interactive, #516f91);
  transform: scale(.2222);
  transition: transform 180ms cubic-bezier(.16, 1, .3, 1), background-color 180ms cubic-bezier(.16, 1, .3, 1);
}

.rmof-atlas__pin-core::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  display: none;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rmof-action, #4d8dff);
  transform: translate(-50%, -50%);
}

.rmof-atlas__pin-label {
  display: none;
  margin-left: .6rem;
  color: var(--rmof-salt, #f4f7ff);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .03em;
  line-height: 1.2;
  text-shadow: 0 2px 8px var(--rmof-canvas, #01030a);
  white-space: nowrap;
}

.rmof-atlas__pin.is-active {
  z-index: 3;
}

.rmof-atlas__pin.is-active .rmof-atlas__pin-core {
  border: 2px solid var(--rmof-focus, #8bb9ff);
  background: var(--rmof-surface, #071020);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .34);
  transform: scale(1);
}

.rmof-atlas__pin.is-active .rmof-atlas__pin-core::after {
  display: block;
}

.rmof-atlas__pin.is-active .rmof-atlas__pin-label {
  display: block;
}

.rmof-atlas__pin--label-left {
  flex-direction: row-reverse;
}

.rmof-atlas__pin--label-left .rmof-atlas__pin-label {
  margin-right: .6rem;
  margin-left: 0;
  text-align: right;
}

.rmof-atlas__preview {
  position: relative;
  min-width: 0;
  min-height: 492px;
  margin: 14px;
  overflow: hidden;
  background: var(--rmof-card, #0b1628);
}

.rmof-atlas__preview-media,
.rmof-atlas__preview-media::after {
  position: absolute;
  inset: 0;
}

.rmof-atlas__preview-media::after {
  content: '';
  background: linear-gradient(180deg, rgb(1 3 10 / .04) 26%, rgb(1 3 10 / .96) 100%);
}

.rmof-atlas__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.86) brightness(.78);
  opacity: 1;
  transition: opacity 180ms cubic-bezier(.16, 1, .3, 1);
}

.rmof-atlas__preview.is-swapping img {
  opacity: .38;
}

.rmof-atlas__preview-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: var(--rmof-border-interactive, #516f91);
  font-family: var(--rmof-font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 200;
  letter-spacing: .08em;
}

.rmof-atlas__preview.is-image-missing .rmof-atlas__preview-placeholder {
  display: grid;
}

.rmof-atlas__preview.is-image-missing img {
  display: none;
}

.rmof-atlas__preview-copy {
  position: absolute;
  z-index: 2;
  left: clamp(1.1rem, 2.2vw, 1.65rem);
  right: clamp(1.1rem, 2.2vw, 1.65rem);
  bottom: clamp(1.1rem, 2.2vw, 1.65rem);
}

.rmof-atlas__preview-copy p,
.rmof-atlas__preview-count {
  color: var(--rmof-muted, #b1bfd9);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.rmof-atlas__preview-copy p {
  margin: 0 0 .45rem;
}

.rmof-atlas__preview-copy h3 {
  margin: 0 0 .4rem;
  color: var(--rmof-salt, #f4f7ff);
  font-family: var(--rmof-font-display);
  font-size: clamp(1.7rem, 2.6vw, 2.45rem);
  font-weight: 300;
  line-height: 1.05;
}

.rmof-atlas__preview-count {
  display: block;
  margin-bottom: 1.1rem;
}

.rmof-atlas__preview-cta {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--rmof-border-interactive, #516f91);
  color: var(--rmof-action, #4d8dff);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .09em;
  text-decoration: none;
  text-transform: uppercase;
}

.rmof-atlas__preview-cta:hover {
  color: var(--rmof-action-hover, #6ba7ff);
}

@media (max-width: 1280px) {
  .rmof-atlas-section__head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .rmof-atlas {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    grid-template-areas:
      'plot preview'
      'list list';
    height: auto;
    min-height: 0;
  }

  .rmof-atlas__plot {
    grid-area: plot;
    min-height: clamp(390px, 34vw, 434px);
  }

  .rmof-atlas__preview {
    grid-area: preview;
    min-height: calc(clamp(390px, 34vw, 434px) - 28px);
  }

  .rmof-atlas__list {
    grid-area: list;
    border-top: 1px solid var(--rmof-border-subtle, #263b59);
    border-right: 0;
  }

  .rmof-atlas__list-head,
  .rmof-atlas__all {
    display: none;
  }

  .rmof-atlas__links {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .rmof-atlas__link {
    flex: 0 0 auto;
    min-width: 190px;
    scroll-snap-align: start;
  }
}

@media (max-width: 760px) {
  .rmof-atlas-section__head h2 {
    font-size: clamp(2.1rem, 10vw, 3rem);
  }

  .rmof-atlas {
    display: flex;
    flex-direction: column;
    border: 0;
    background: transparent;
  }

  .rmof-atlas__plot {
    order: 1;
    min-height: 260px;
    border: 1px solid var(--rmof-border-subtle, #263b59);
  }

  .rmof-atlas__map-frame {
    width: calc(100% - 1rem);
  }

  .rmof-atlas__preview {
    order: 2;
    min-height: 252px;
    margin: 12px 0 0;
  }

  .rmof-atlas__list {
    order: 3;
    padding-top: 12px;
    border: 0;
    background: transparent;
  }

  .rmof-atlas__link {
    min-width: 180px;
    min-height: 48px;
    border: 1px solid var(--rmof-border-subtle, #263b59);
    padding: .55rem .8rem;
  }

  .rmof-atlas__link + .rmof-atlas__link {
    margin-left: 8px;
  }

  .rmof-atlas__link.is-active {
    border-color: var(--rmof-action, #4d8dff);
  }

  .rmof-atlas__pin-label {
    font-size: .64rem;
  }
}

@media (hover: none), (pointer: coarse) {
  .rmof-atlas__link:hover,
  .rmof-atlas__all:hover {
    background: inherit;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rmof-atlas *,
  .rmof-atlas *::before,
  .rmof-atlas *::after {
    scroll-behavior: auto;
    transition-duration: .01ms;
  }
}
