
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; color: #fff; background: #000; }

.index-stage { min-height: 100dvh; display: grid; place-items: start center; padding: 5vh 3vw; }

.index-figure {
  position: relative;
  width: min(70vw, 1200px);
  aspect-ratio: 864/432;
  background-image: url('assets/index.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.55);
}

.hotmap { position: absolute; inset: 0; z-index: 2; }

.hotspot {
  position: absolute; display: block; border-radius: 9999px;
  background: transparent; outline: 1px solid transparent;
  transition: background-color 120ms ease, outline-color 120ms ease, transform 120ms ease;
}
.hotspot:hover, .hotspot:focus { background: rgba(255,255,255,0.08); outline-color: rgba(255,255,255,0.6); transform: translateY(-1px); }

#hs-art { left: 15.0000%; top: 22.9444%; width: 7.0000%; height: 8.0000%; }
#hs-science { left: 22.8888%; top: 22.9444%; width: 12.3333%; height: 8.0000%; }
#hs-attractions { left: 36.7500%; top: 22.9444%; width: 19.5556%; height: 8.0000%; }
#hs-mission { left: 57.9723%; top: 22.9444%; width: 11.2222%; height: 8.0000%; }
#hs-support { left: 72.2500%; top: 22.9444%; width: 14.0000%; height: 8.0000%; }

nav.top { width: 100%; position: sticky; top: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px); padding: 0.4rem 1rem; display: flex; justify-content: center; z-index: 10; }
nav.top a { margin: 0 0.5rem; color: #fff; border: 1px solid rgba(255,255,255,0.6); padding: 0.45rem 0.7rem; border-radius: 9999px; font-weight: 600; font-size: clamp(0.8rem, 1.4vw, 1.05rem); line-height: 1; }
nav.top a:hover, nav.top a:focus { background-color: rgba(255,255,255,0.08); text-decoration: underline; }

.main { min-height: auto; display: grid; align-content: start; justify-items: center; padding: 1.5vh 3vw; }
.page-image { width: min(70vw, 1200px); margin: 0.75rem auto 1rem; display: block; height: auto; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }

.skip-link { position: absolute; left: -9999px; top: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: #111; padding: 0.5rem 1rem; border-radius: 0.25rem; outline: 2px solid #888; }

/* ---- NAV FIX: keep links on one line and make them smaller ---- */
nav.top .nav-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: nowrap;           /* prevent wrapping to a new line */
  white-space: nowrap;         /* keep anchors on one line */
  overflow: hidden;            /* avoid layout shifts */
}
nav.top a {
  margin: 0;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.5);
  padding: 0.35rem 0.6rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: clamp(0.72rem, 1.05vw, 0.95rem); /* smaller overall */
  line-height: 1;
  text-decoration: none;       /* no underline by default */
}
nav.top a:hover, nav.top a:focus {
  background-color: rgba(255,255,255,0.08);
  text-decoration: none;       /* keep underline off on hover */
}

/* Slightly reduce container padding to give more room on narrow screens */
nav.top {
  padding: 0.35rem 0.8rem;
}

/* Extra safeguard for very small widths: shrink links a bit more */
@media (max-width: 720px) {
  nav.top a {
    font-size: clamp(0.68rem, 2.5vw, 0.86rem);
    padding: 0.3rem 0.5rem;
  }
  nav.top .nav-bar { gap: 0.3rem; }
}

/* For ultra-small widths, allow gentle horizontal scroll rather than wrapping */
@media (max-width: 500px) {
  nav.top { overflow-x: auto; }
  nav.top .nav-bar { justify-content: flex-start; }
}

/* ---- NAV FIX 2: make links even smaller ---- */
nav.top a {
  margin: 0;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.5);
  padding: 0.25rem 0.45rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: clamp(0.65rem, 0.9vw, 0.85rem); /* smaller base size */
  line-height: 1;
  text-decoration: none;
}
nav.top a:hover, nav.top a:focus {
  background-color: rgba(255,255,255,0.08);
  text-decoration: none;
}

/* Adjust gap smaller */
nav.top .nav-bar { gap: 0.25rem; }

/* Extra small screens */
@media (max-width: 720px) {
  nav.top a {
    font-size: clamp(0.6rem, 2vw, 0.75rem);
    padding: 0.2rem 0.4rem;
  }
  nav.top .nav-bar { gap: 0.2rem; }
}


/* Centered call-to-action under images */
.cta-center { display: flex; justify-content: center; margin: 1rem 0 0.5rem; }
.pill-link {
  display:inline-block;
  appearance:none;
  -webkit-appearance:none;
  background:transparent;
  border:1px solid rgba(255,255,255,0.6);
  border-radius:9999px;
  padding:0.35rem 0.6rem;
  text-decoration:none;
  color:#fff;
  line-height:1;
  font-size:inherit;
}
.pill-link:hover, .pill-link:focus {
  background-color: rgba(255,255,255,0.08);
  outline: none;
  text-decoration: none;
}

button.pill-link:focus-visible { outline: 2px solid rgba(255,255,255,0.5); outline-offset: 2px; }
