/* Entry & Atlas — cinematic introduction */

body.sa-entry-active {
  overflow: hidden;
}

.sa-entry {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #141413;
  color: #f7f7f5;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 1.4s var(--ease),
    visibility 0s linear 0s;
}

.sa-entry.is-exiting {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 1.2s var(--ease),
    visibility 0s linear 1.2s;
  pointer-events: none;
}

/* ——— Entry screen ——— */
.sa-entry-screen,
.sa-atlas {
  position: absolute;
  inset: 0;
}

.sa-entry-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 1.1s var(--ease);
}

.sa-entry-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sa-entry-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(12, 11, 10, 0.55) 0%, rgba(12, 11, 10, 0.72) 100%),
    url("../assets/images/93246E32-B289-4EFD-9B55-030470ECC986.png") center 42% / cover no-repeat;
}

.sa-entry-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 45%, transparent 0%, rgba(12, 11, 10, 0.35) 100%);
  pointer-events: none;
}

.sa-entry-content {
  position: relative;
  z-index: 1;
  max-width: min(34rem, 88vw);
  padding: clamp(2rem, 6vw, 3rem);
  text-align: center;
}

.sa-entry-quote {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.94);
  margin: 0 0 clamp(2.5rem, 6vw, 3.5rem);
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 1.2s var(--ease),
    transform 1.2s var(--ease);
}

.sa-entry-quote.is-fading {
  opacity: 0;
  transform: translateY(-0.75rem);
}

.sa-entry-cta {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #f7f7f5;
  background: transparent;
  border: 1px solid rgba(247, 247, 245, 0.42);
  padding: 0.95rem 2.4rem;
  cursor: pointer;
  transition:
    background-color 0.5s var(--ease),
    border-color 0.5s var(--ease),
    opacity 0.5s var(--ease);
}

.sa-entry-cta:hover:not(:disabled) {
  background: rgba(247, 247, 245, 0.08);
  border-color: rgba(247, 247, 245, 0.65);
}

.sa-entry-cta:disabled {
  cursor: default;
  opacity: 0.85;
}

.sa-entry-cta.is-loading {
  border-color: rgba(247, 247, 245, 0.28);
}

.sa-entry-cta.is-loading::after {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-left: 0.65rem;
  border-radius: 50%;
  border: 1px solid rgba(247, 247, 245, 0.35);
  border-top-color: rgba(247, 247, 245, 0.9);
  vertical-align: middle;
  animation: sa-entry-spin 1.1s linear infinite;
}

@keyframes sa-entry-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ——— Atlas ——— */
.sa-atlas {
  opacity: 0;
  visibility: hidden;
  background: #080807;
  transition:
    opacity 1.6s var(--ease),
    visibility 0s linear 1.6s;
}

.sa-atlas.is-visible {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 1.6s var(--ease),
    visibility 0s linear 0s;
}

.sa-atlas-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #080807;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sa-atlas-map-layer {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.sa-atlas-map-layer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: scale(1.05);
  transition: transform 9s var(--ease);
  pointer-events: none;
}

.sa-atlas.is-visible .sa-atlas-map-layer::before {
  transform: scale(1);
}

.sa-atlas-map-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  filter: saturate(0.92) contrast(1.02) brightness(0.98);
}

.sa-atlas-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 74% 60% at 50% 46%, transparent 0%, rgba(4, 4, 4, 0.22) 58%, rgba(2, 2, 2, 0.62) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.34) 0%, transparent 16%, transparent 80%, rgba(0, 0, 0, 0.48) 100%);
}

.sa-atlas-clouds {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.48;
  background:
    radial-gradient(ellipse 34% 24% at 8% 10%, rgba(18, 18, 18, 0.92) 0%, transparent 72%),
    radial-gradient(ellipse 28% 22% at 92% 8%, rgba(16, 16, 16, 0.88) 0%, transparent 70%),
    radial-gradient(ellipse 36% 26% at 6% 88%, rgba(14, 14, 14, 0.9) 0%, transparent 74%),
    radial-gradient(ellipse 30% 24% at 94% 86%, rgba(14, 14, 14, 0.88) 0%, transparent 72%);
  animation: sa-atlas-drift 22s ease-in-out infinite alternate;
}

.sa-atlas-clouds::before,
.sa-atlas-clouds::after {
  content: "";
  position: absolute;
  inset: -8%;
  opacity: 0.35;
  background: radial-gradient(ellipse 42% 28% at 24% 18%, rgba(255, 255, 255, 0.05) 0%, transparent 68%);
  animation: sa-cloud-drift 28s ease-in-out infinite;
}

.sa-atlas-clouds::after {
  background: radial-gradient(ellipse 38% 24% at 78% 22%, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
  animation-duration: 36s;
  animation-direction: reverse;
}

@keyframes sa-atlas-drift {
  from {
    opacity: 0.48;
  }
  to {
    opacity: 0.62;
  }
}

@keyframes sa-cloud-drift {
  from {
    transform: translate3d(-1.5%, 0, 0);
  }
  to {
    transform: translate3d(2%, 1%, 0);
  }
}

.sa-atlas-pins {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.sa-atlas-pin {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 248, 236, 0.96);
  box-shadow:
    0 0 6px 2px rgba(255, 236, 200, 0.55),
    0 0 16px 5px rgba(245, 215, 160, 0.28),
    0 0 28px 10px rgba(230, 190, 120, 0.14);
  cursor: pointer;
  transition:
    background-color 0.55s var(--ease),
    box-shadow 0.55s var(--ease),
    transform 0.55s var(--ease);
}

.sa-atlas-pin::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 244, 220, 0.42) 0%,
    rgba(245, 210, 150, 0.16) 42%,
    transparent 72%
  );
  opacity: 0.72;
  transition: opacity 0.55s var(--ease);
}

.sa-atlas-pin:hover,
.sa-atlas-pin.is-active {
  background: rgba(255, 252, 244, 1);
  transform: scale(1.15);
  box-shadow:
    0 0 8px 3px rgba(255, 242, 210, 0.72),
    0 0 20px 7px rgba(245, 220, 165, 0.42),
    0 0 36px 14px rgba(230, 195, 120, 0.22);
}

.sa-atlas-pin:hover::before,
.sa-atlas-pin.is-active::before {
  opacity: 1;
}

/* ——— Atlas hover card ——— */
.sa-atlas-card {
  position: fixed;
  z-index: 3;
  width: min(22.5rem, calc(100vw - 2rem));
  background: #f7f7f5;
  color: var(--text);
  border-radius: 3px;
  box-shadow:
    0 1.25rem 2.75rem rgba(0, 0, 0, 0.1),
    0 0.2rem 0.65rem rgba(0, 0, 0, 0.04);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.35rem);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease),
    visibility 0s linear 0.5s;
  pointer-events: none;
}

.sa-atlas-card.is-measuring {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: block;
}

.sa-atlas-card.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  z-index: 5;
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease),
    visibility 0s linear 0s;
  pointer-events: auto;
}

.sa-atlas-card-inner {
  display: grid;
  grid-template-columns: 42% 1fr;
  align-items: stretch;
  min-height: 8.5rem;
}

.sa-atlas-card-media {
  overflow: hidden;
  background: #dedbd6;
  line-height: 0;
  min-height: 8.5rem;
}

.sa-atlas-card-media img {
  width: 100%;
  height: 100%;
  min-height: 8.5rem;
  object-fit: cover;
  display: block;
}

.sa-atlas-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.35rem 1.5rem 1.35rem 1.25rem;
}

.sa-atlas-card-title {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
}

.sa-atlas-card-loc,
.sa-atlas-card-year {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--text-soft);
  margin: 0;
}

.sa-atlas-card-loc {
  margin-bottom: 0.1rem;
}

.sa-atlas-card-year {
  margin-bottom: 1.15rem;
}

.sa-atlas-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  margin-top: auto;
  transition: opacity 0.35s ease;
}

.sa-atlas-card-link:hover {
  opacity: 0.68;
  color: var(--text);
}

.sa-atlas-card-arrow {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.4s var(--ease);
}

.sa-atlas-card-link:hover .sa-atlas-card-arrow {
  transform: translateX(3px);
}

@media (max-width: 480px) {
  .sa-atlas-card-inner {
    grid-template-columns: 38% 1fr;
    min-height: 7.5rem;
  }

  .sa-atlas-card-media,
  .sa-atlas-card-media img {
    min-height: 7.5rem;
  }

  .sa-atlas-card-body {
    padding: 1.1rem 1.15rem 1.1rem 1rem;
  }
}

.sa-atlas-footer {
  position: absolute;
  bottom: clamp(1.5rem, 4vw, 2.5rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
}

.sa-atlas-continue {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(247, 247, 245, 0.72);
  text-decoration: none;
  border-bottom: 1px solid rgba(247, 247, 245, 0.28);
  padding-bottom: 2px;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.sa-atlas-continue:hover {
  color: rgba(247, 247, 245, 0.95);
  border-bottom-color: rgba(247, 247, 245, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .sa-atlas-map-layer::before,
  .sa-atlas-clouds,
  .sa-atlas-clouds::before,
  .sa-atlas-clouds::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .sa-atlas-pin,
  .sa-atlas-pin::before {
    transition-duration: 0.01ms !important;
  }

  .sa-atlas.is-visible .sa-atlas-map-layer::before {
    transform: scale(1);
  }
}

