:root {
  color-scheme: dark;
  --navy: #061725;
  --navy-soft: #0b2536;
  --gold: #e8c887;
  --cream: #fff8e9;
  --turquoise: #32c8cf;
  --panel: rgba(5, 22, 34, 0.95);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--cream);
  background: var(--navy);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button { font: inherit; }

.topbar {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto 0;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 10px 28px;
  background: linear-gradient(180deg, rgba(4, 17, 27, 0.98), rgba(4, 17, 27, 0.78));
  border-bottom: 1px solid rgba(232, 200, 135, 0.35);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.18em;
  font-family: Georgia, serif;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-size: 1.15rem;
}

nav { display: flex; gap: 8px; }

.nav-link {
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 10px 12px;
  color: rgba(255, 248, 233, 0.72);
  background: transparent;
  cursor: pointer;
}

.nav-link.active { color: var(--gold); border-bottom-color: var(--gold); }
.nav-link:not(:disabled):hover, .nav-link:not(:disabled):focus-visible { color: var(--gold); }
.nav-link:disabled { cursor: default; opacity: 0.48; }

.explorer { min-height: 100vh; padding-top: 68px; }

.map-stage {
  height: calc(100vh - 68px);
  position: relative;
  overflow: hidden;
  background: #04121d;
}

.map-toolbar {
  position: absolute;
  z-index: 5;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid rgba(232, 200, 135, 0.45);
  border-radius: 999px;
  background: rgba(4, 17, 27, 0.84);
  backdrop-filter: blur(10px);
}

.map-toolbar p { margin: 0; font-size: 0.95rem; }
.map-toolbar { max-width: calc(100% - 24px); width: max-content; flex-wrap: wrap; justify-content: center; }
.map-toolbar button { min-height: 32px; font-size: 0.95rem; }

.reset-button {
  border: 0;
  color: var(--gold);
  background: transparent;
  cursor: pointer;
}

.map-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100%, calc((100vh - 68px) * 1.5));
  aspect-ratio: 3 / 2;
  transform-origin: 65% 18%;
  transform: translate(-50%, -50%);
  transition: transform 900ms cubic-bezier(.22,.8,.23,1), filter 400ms ease;
}

.map-canvas > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #04121d;
}

.map-canvas.focus-botanical { transform: translate(-50%, -50%) scale(1.62); }
.map-canvas.focus-lagoon {
  transform-origin: 68% 43%;
  transform: translate(-50%, -50%) scale(1.56);
}
.map-canvas.focus-atlas {
  transform-origin: 29% 13%;
  transform: translate(-50%, -50%) scale(1.62);
}
.map-canvas.focus-aurora {
  transform-origin: 31% 76%;
  transform: translate(-50%, -50%) scale(1.5);
}

.hotspot {
  position: absolute;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0;
  color: transparent;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.hotspot:hover, .hotspot:focus-visible {
  border-color: rgba(255, 248, 233, .8);
  background: rgba(137, 188, 76, .16);
  box-shadow: 0 0 0 4px rgba(114, 164, 63, .16), 0 0 24px rgba(168, 220, 92, .48);
}

.hotspot > .hotspot-label,
.hotspot:not(.atlas-plaque) > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hotspot.botanical {
  left: 68.1%;
  top: 7.7%;
  width: 10.2%;
  height: 3.3%;
}
.hotspot.lagoon {
  left: 74.6%;
  top: 29.8%;
  width: 10.9%;
  height: 3.4%;
}
.hotspot.aurora {
  left: 25.7%;
  top: 73.8%;
  width: 10.8%;
  height: 3.5%;
}
.hotspot.lagoon:hover, .hotspot.lagoon:focus-visible {
  background: rgba(41, 169, 186, .18);
  box-shadow: 0 0 0 4px rgba(41, 169, 186, .16), 0 0 24px rgba(71, 215, 226, .48);
}
.hotspot.atlas:hover, .hotspot.atlas:focus-visible {
  border-color: rgba(255, 248, 233, .95);
  background: #eee1bf;
  box-shadow: 0 0 0 4px rgba(46, 145, 190, .16), 0 0 24px rgba(83, 185, 232, .48);
}
.hotspot.aurora:hover, .hotspot.aurora:focus-visible {
  background: rgba(201, 111, 33, .2);
  box-shadow: 0 0 0 4px rgba(201, 111, 33, .16), 0 0 24px rgba(239, 148, 61, .5);
}
[hidden] { display: none !important; }

.region-panel {
  position: fixed;
  z-index: 15;
  top: 68px;
  right: 0;
  width: min(430px, 38vw);
  height: calc(100vh - 68px);
  overflow-y: auto;
  padding: 38px 30px;
  background: var(--panel);
  border-left: 1px solid rgba(232, 200, 135, 0.4);
  box-shadow: -24px 0 70px rgba(0,0,0,.45);
  transform: translateX(104%);
  transition: transform 480ms cubic-bezier(.22,.8,.23,1);
  backdrop-filter: blur(18px);
}

.region-panel.open { transform: translateX(0); }

.close-panel {
  float: right;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(232, 200, 135, 0.45);
  border-radius: 50%;
  color: var(--gold);
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
}

.eyebrow {
  margin: 8px 0 8px;
  color: var(--turquoise);
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .78rem;
}

h1, h2 {
  margin: 0;
  color: var(--gold);
  font-family: Georgia, serif;
  font-weight: 500;
}

h3 {
  margin: 0;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 500;
}

h1 { font-size: clamp(2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 4vw, 2.7rem); }

.region-intro, .gallery-intro {
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 248, 233, 0.78);
}

.region-cover {
  margin: 25px 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(232, 200, 135, 0.36);
}

.region-cover img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center 46%;
}

.collections { display: grid; gap: 12px; }

.collection-card {
  width: 100%;
  padding: 19px;
  display: grid;
  gap: 7px;
  text-align: left;
  color: var(--cream);
  background: linear-gradient(135deg, rgba(50, 200, 207, .12), rgba(232, 200, 135, .08));
  border: 1px solid rgba(232, 200, 135, .42);
  border-radius: 16px;
  cursor: pointer;
}

.collection-card strong { color: var(--gold); font-family: Georgia, serif; font-size: 1.18rem; }
.collection-card span:last-child { color: rgba(255, 248, 233, 0.68); }
.collection-kicker { color: var(--turquoise); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; }

.gallery-dialog {
  width: min(1080px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 26px;
  color: var(--cream);
  background: #071d2b;
  border: 1px solid rgba(232, 200, 135, .55);
  border-radius: 22px;
  overscroll-behavior: contain;
}

.gallery-dialog::backdrop { background: rgba(0, 9, 15, .92); }
.gallery-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.reel-features {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.reel-feature {
  display: grid;
  grid-template-columns: minmax(190px, 280px) 1fr;
  align-items: center;
  gap: 28px;
  margin-top: 0;
  padding: 18px;
  border: 1px solid rgba(50, 200, 207, .3);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(50, 200, 207, .1), rgba(232, 200, 135, .07));
}

.reel-frame {
  overflow: hidden;
  border: 1px solid rgba(232, 200, 135, .38);
  border-radius: 14px;
  background: #020b12;
}

.reel-frame video {
  width: 100%;
  max-height: 56vh;
  display: block;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #020b12;
  transform: translateZ(0);
}

.reel-copy p:last-child {
  max-width: 34rem;
  margin: 12px 0 0;
  color: rgba(255, 248, 233, .72);
  font-size: 1rem;
  line-height: 1.6;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
  contain: layout paint;
}
.gallery-item {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(232, 200, 135, .25);
  border-radius: 12px;
  background: transparent;
  cursor: zoom-in;
  content-visibility: auto;
  contain-intrinsic-size: 270px 338px;
}

.gallery-grid img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 260ms ease;
}

.gallery-sprite {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  background-repeat: no-repeat;
  transition: transform 260ms ease;
}

.gallery-item:hover img,
.gallery-item:focus-visible img,
.gallery-item:hover .gallery-sprite,
.gallery-item:focus-visible .gallery-sprite { transform: scale(1.025); }

.lightbox-dialog {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 24px 74px;
  color: var(--cream);
  border: 0;
  background: rgba(2, 11, 18, .97);
}

.lightbox-dialog::backdrop { background: #020b12; }
.lightbox-dialog figure { height: 100%; margin: 0; display: grid; place-items: center; grid-template-rows: 1fr auto; gap: 10px; }
.lightbox-dialog img { min-height: 0; max-width: 100%; max-height: calc(100vh - 76px); object-fit: contain; }
.lightbox-dialog figcaption { color: rgba(255,248,233,.68); font-size: .9rem; }

.lightbox-close, .lightbox-nav {
  position: fixed;
  z-index: 2;
  border: 1px solid rgba(232,200,135,.5);
  color: var(--gold);
  background: rgba(4,17,27,.75);
  cursor: pointer;
}

.lightbox-close { top: 20px; right: 22px; width: 44px; height: 44px; border-radius: 50%; font-size: 1.7rem; }
.lightbox-nav { top: 50%; width: 48px; height: 72px; transform: translateY(-50%); border-radius: 999px; font-size: 2rem; }
.lightbox-nav.previous { left: 16px; }
.lightbox-nav.next { right: 16px; }

@media (max-width: 760px) {
  body { overflow: auto; }
  .topbar { min-height: 62px; padding: 8px 14px; }
  .brand span:last-child { display: none; }
  nav { gap: 0; overflow-x: auto; }
  .nav-link { padding: 9px 8px; font-size: .88rem; }
  .explorer { padding-top: 62px; }
  .map-stage { height: calc(100svh - 62px); }
  .map-canvas { width: 100%; }
  .map-canvas.focus-botanical { transform: translate(-50%, -50%) scale(1.85); }
  .map-canvas.focus-lagoon {
    transform-origin: 73% 42%;
    transform: translate(-50%, -50%) scale(1.85);
  }
  .map-canvas.focus-atlas {
    transform-origin: 28% 13%;
    transform: translate(-50%, -50%) scale(1.85);
  }
  .map-canvas.focus-aurora {
    transform-origin: 29% 76%;
    transform: translate(-50%, -50%) scale(1.78);
  }
  .hotspot.botanical {
    left: 65.7%;
    top: 5.1%;
    width: 15.1%;
    height: 8.4%;
  }
  .hotspot.lagoon {
    left: 72.2%;
    top: 27.2%;
    width: 15.7%;
    height: 8.6%;
  }
  .hotspot.atlas {
    left: 23.05%;
    top: 7.35%;
    width: 10.35%;
    height: 11.9%;
  }
  .hotspot.aurora {
    left: 23.2%;
    top: 71.4%;
    width: 15.8%;
    height: 8.4%;
  }
  .region-panel {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(68svh, 620px);
    padding: 26px 20px;
    border-left: 0;
    border-top: 1px solid rgba(232, 200, 135, 0.4);
    border-radius: 24px 24px 0 0;
    transform: translateY(104%);
  }
  .region-panel.open { transform: translateY(0); }
  .region-cover img { aspect-ratio: 16 / 8; }
  .reel-feature { grid-template-columns: 1fr; gap: 18px; }
  .reel-frame { width: min(72vw, 330px); margin: 0 auto; }
  .reel-copy { text-align: center; }
  .reel-copy p:last-child { margin-inline: auto; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .lightbox-dialog { padding: 18px 48px; }
  .lightbox-nav { width: 38px; height: 60px; }
  .lightbox-nav.previous { left: 6px; }
  .lightbox-nav.next { right: 6px; }
}

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

/* Labels remain attached to the illustration, including while zooming. */
.map-canvas { container-type: inline-size; }
.hotspot.map-plaque { border-radius: 5px; border: 1px solid #cbb988; background: #eee1bf; color: #172b35; overflow: hidden; text-align: left; display: flex; flex-direction: column; justify-content: flex-start; }
.hotspot.map-plaque:hover, .hotspot.map-plaque:focus-visible { background: #f5e9ca; }
.hotspot.map-plaque > span { position: static; width: auto; height: auto; clip-path: none; white-space: normal; overflow: visible; }
.map-plaque .plaque-title { display: block; flex-shrink: 0; padding: .45cqw .4cqw; background: var(--region-color); color: #fff5db; font: bold .85cqw/1.15 Georgia, serif; text-transform: uppercase; }
.map-plaque .plaque-items { display: grid; gap: .22cqw; padding: .4cqw; font: 600 .68cqw/1.25 Arial, sans-serif; }
.plaque-items span { display: block; }
.hotspot.map-plaque.atlas { --region-color: #14394e; left: 23.25%; top: 7.5%; width: 10.6%; height: 12%; }
.hotspot.map-plaque.botanical { --region-color: #446623; left: 66.7%; top: 7.5%; width: 12.1%; height: 10.3%; }
.hotspot.map-plaque.lagoon { --region-color: #146878; left: 74.7%; top: 29.5%; width: 11.4%; height: 12.4%; }
.hotspot.map-plaque.aurora { --region-color: #965017; left: 24.9%; top: 73%; width: 13%; height: 16.2%; }
.hotspot.lumina { left: 18%; top: 29.5%; width: 7.6%; height: 2.8%; }
.hotspot.nova-map { left: 54.5%; top: 55.7%; width: 8.3%; height: 2.8%; }
.region-picker { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.region-picker select { max-width: 230px; min-height: 40px; color: var(--gold); background: #071d29; border: 1px solid #7c755a; border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 16px; }
.region-panel { overscroll-behavior: contain; }
.gallery-dialog { overscroll-behavior: contain; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
@media (max-width: 760px) {
  .map-toolbar { gap: 6px 10px; border-radius: 16px; }
  .region-picker { flex-wrap: wrap; justify-content: center; }
  .region-picker select { max-width: 220px; }
}
