:root {
  color-scheme: dark;
  --ink: #f5f7fb;
  --muted: #aab6ca;
  --space: #030814;
  --panel: rgba(9, 18, 36, 0.94);
  --line: rgba(171, 205, 255, 0.58);
  --blue: #68caff;
  --gold: #e4b36b;
  --green: #75e7bd;
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--space);
  color: var(--ink);
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--space);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 10%, rgba(47, 87, 156, 0.15), transparent 30rem),
    var(--space);
}

a {
  color: inherit;
}

.site-header {
  width: min(100% - 40px, 1400px);
  margin: 0 auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand {
  display: block;
  line-height: 0;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: clamp(205px, 26vw, 300px);
  height: auto;
}

.contact-link {
  padding: 10px 0;
  color: #c9d5e7;
  font-size: 0.86rem;
  letter-spacing: 0.035em;
  text-decoration-color: rgba(104, 202, 255, 0.45);
  text-underline-offset: 5px;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  color: white;
  text-decoration-color: var(--blue);
}

.intro {
  width: min(100% - 40px, 1400px);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 112px) 0 clamp(36px, 5vw, 66px);
}

.eyebrow,
.destination-kicker {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.45rem, 5.5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.intro-copy {
  max-width: 590px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  line-height: 1.7;
}

.constellation-map {
  position: relative;
  width: min(100% - 24px, 1500px);
  margin: 0 auto;
  padding-bottom: 70px;
  isolation: isolate;
}

.galaxy {
  position: relative;
  z-index: 1;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(188, 215, 255, 0.18);
  border-radius: 28px;
  background: #020611 url("assets/milky-way-hub.webp") center / cover no-repeat;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.galaxy::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(3, 8, 20, 0.05) 50%, rgba(3, 8, 20, 0.58) 100%),
    linear-gradient(to right, rgba(3, 8, 20, 0.28), transparent 20%, transparent 80%, rgba(3, 8, 20, 0.2));
}

.world {
  --accent: var(--blue);
  position: absolute;
  z-index: 3;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  text-decoration: none;
  outline: none;
}

.world-emc2 {
  left: 17.3%;
  top: 21.5%;
  --accent: var(--blue);
}

.world-poa {
  left: 33.1%;
  top: 65.1%;
  --accent: var(--gold);
}

.world-gaea {
  left: 84%;
  top: 68.4%;
  --accent: var(--green);
}

.world-ring {
  position: absolute;
  inset: 5px;
  border: 1px solid var(--accent);
  border-radius: inherit;
  opacity: 0.68;
  box-shadow: 0 0 15px color-mix(in srgb, var(--accent) 52%, transparent);
  transition: inset 180ms ease, opacity 180ms ease, border-width 180ms ease;
}

.world-ring::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-radius: inherit;
  animation: pulse 3.2s ease-in-out infinite;
}

.world-label {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  display: flex;
  flex-direction: column;
  width: max-content;
  max-width: 180px;
  padding: 7px 9px;
  transform: translateY(-50%);
  border-left: 1px solid var(--accent);
  background: rgba(3, 8, 20, 0.62);
  backdrop-filter: blur(5px);
  text-shadow: 0 2px 7px #000;
}

.world-label b {
  color: white;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.world-label small {
  margin-top: 2px;
  color: #cbd6e7;
  font-size: 0.66rem;
}

.world:hover .world-ring,
.world:focus-visible .world-ring {
  inset: 0;
  border-width: 2px;
  opacity: 1;
}

.world:focus-visible .world-label {
  outline: 2px solid white;
  outline-offset: 3px;
}

@keyframes pulse {
  0%, 100% { transform: scale(0.85); opacity: 0.18; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

.route-lines {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.route-lines path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.2;
  stroke-dasharray: 3 7;
  filter: url(#line-glow);
}

.route-lines path[data-line="poa"] { stroke: rgba(228, 179, 107, 0.64); }
.route-lines path[data-line="gaea"] { stroke: rgba(117, 231, 189, 0.57); }

.destinations {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 130px;
}

.destination {
  min-height: 350px;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3vw, 44px);
  border: 1px solid rgba(179, 204, 240, 0.16);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 55%),
    var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  scroll-margin-top: 24px;
  transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.destination:target {
  transform: translateY(-7px);
  border-color: rgba(135, 215, 255, 0.68);
  box-shadow: 0 24px 74px rgba(66, 152, 234, 0.19);
}

.destination-poa:target { border-color: rgba(228, 179, 107, 0.7); }
.destination-gaea:target { border-color: rgba(117, 231, 189, 0.68); }

.destination-number {
  align-self: flex-end;
  color: rgba(200, 217, 239, 0.38);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
}

.destination h2 {
  margin: 0 0 18px;
  font-size: clamp(1.55rem, 2.2vw, 2.15rem);
  line-height: 1.08;
}

.destination > p:not(.destination-kicker) {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.destination-poa .destination-kicker { color: var(--gold); }
.destination-gaea .destination-kicker { color: var(--green); }

.visit-link {
  width: fit-content;
  margin-top: auto;
  padding-top: 28px;
  color: #eef6ff;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.visit-link::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: 8px;
  background: currentColor;
  transform: scaleX(0.25);
  transform-origin: left;
  opacity: 0.55;
  transition: transform 180ms ease;
}

.visit-link:hover::after,
.visit-link:focus-visible::after {
  transform: scaleX(1);
}

.visit-link:focus-visible {
  outline: 2px solid white;
  outline-offset: 5px;
}

footer {
  width: min(100% - 40px, 1400px);
  margin: 0 auto;
  padding: 28px 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #78859a;
  font-size: 0.8rem;
}

footer p { margin: 0; }

footer a {
  color: #93a3ba;
  text-underline-offset: 4px;
}

footer a:hover,
footer a:focus-visible { color: white; }

@media (max-width: 860px) {
  .galaxy {
    aspect-ratio: 4 / 3;
    background-position: center;
    border-radius: 20px;
  }

  .world-emc2 { left: 16%; top: 24%; }
  .world-poa { left: 34%; top: 65%; }
  .world-gaea { left: 83%; top: 70%; }

  .world {
    width: 52px;
    height: 52px;
  }

  .world-label small { display: none; }

  .destinations {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 92px;
  }

  .destination {
    min-height: 290px;
  }
}

@media (max-width: 560px) {
  .site-header,
  .intro {
    width: min(100% - 28px, 1400px);
  }

  .site-header {
    min-height: 0;
    padding: 14px 0;
    flex-wrap: wrap;
    gap: 4px 18px;
  }

  .brand-logo { width: 190px; }
  .contact-link { font-size: 0.78rem; }

  .intro { padding-top: 48px; }
  .intro-copy { margin-top: 22px; }

  .constellation-map { width: calc(100% - 16px); }
  .galaxy { aspect-ratio: 1 / 1; }

  .world {
    width: 46px;
    height: 46px;
  }

  .world-label {
    left: 50%;
    top: calc(100% + 5px);
    transform: translateX(-50%);
    border-left: 0;
    border-top: 1px solid var(--accent);
  }

  .world-emc2 { left: 19%; top: 27%; }
  .world-poa { left: 34%; top: 67%; }
  .world-gaea { left: 83%; top: 69%; }

  .destinations { margin-top: 76px; }

  .destination {
    min-height: 0;
    padding: 28px 24px 30px;
  }

  .visit-link { margin-top: 18px; }

  .route-lines path {
    stroke-width: 1;
    stroke-dasharray: 2 8;
    opacity: 0.64;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .world-ring::after { animation: none; }
  .destination,
  .world-ring,
  .visit-link::after { transition: none; }
}
