@import url('https://fonts.googleapis.com/css2?family=Gilda+Display&family=Mulish:ital,wght@0,200;0,300;0,400;0,600;0,700;1,300&display=swap');

:root {
  --night: #02030a;
  --deep: #04060f;
  --milky: #080c1a;
  --arm: #0e1428;
  --gold: #d4a830;
  --gold-bright: #f0cc60;
  --gold-pale: #f8e8b0;
  --cream: #e8dcc0;
  --dust: #c8a870;
  --star-white: #f0f0ff;
  --text: #6a5a40;
  --text-bright: #c0a060;
  --text-muted: #2a1e10;
  --border: rgba(212,168,48,0.18);
  --glow: rgba(212,168,48,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Mulish', sans-serif;
  background: var(--night);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

#mw-canvas { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 40% at 50% 60%, rgba(212,168,48,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 60% 60% at 70% 40%, rgba(100,80,200,0.03) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

.wrap {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px 90px;
}

/* ── HERO ── */
.hero {
  padding: 72px 0 58px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 50px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 60px;
}

.hero-tag {
  font-size: 0.6rem;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.6;
  margin-bottom: 16px;
  font-weight: 300;
}

.hero h1 {
  font-family: 'Gilda Display', serif;
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 400;
  line-height: 0.9;
  color: var(--star-white);
  letter-spacing: -1px;
}

.hero h1 span {
  display: block;
  font-size: 0.55em;
  color: var(--gold);
  letter-spacing: 2px;
  margin-top: 8px;
}

.hero-desc {
  font-size: 0.97rem;
  line-height: 1.88;
  color: var(--text);
  font-weight: 300;
  font-style: italic;
  margin-top: 20px;
}

/* ── Milky Way illustration ── */
#mw-vis {
  width: 300px;
  height: 300px;
  position: relative;
  flex-shrink: 0;
}

/* ── Key facts strip ── */
.facts-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 60px;
}

.fact {
  padding: 20px 14px;
  background: var(--deep);
  border-right: 1px solid var(--border);
  transition: background 0.2s;
}

.fact:last-child { border-right: none; }
.fact:hover { background: var(--glow); }

.f-label {
  font-size: 0.55rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.55;
  margin-bottom: 8px;
  font-weight: 600;
}

.f-value {
  font-family: 'Gilda Display', serif;
  font-size: 1.25rem;
  color: var(--gold-pale);
  line-height: 1.1;
}

.f-unit { font-size: 0.62rem; color: var(--text-muted); font-family: 'Mulish', sans-serif; }

/* ── Sections ── */
.section {
  margin-bottom: 58px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section.visible { opacity: 1; transform: none; }

.section-tag {
  font-size: 0.58rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.5;
  margin-bottom: 10px;
  font-weight: 600;
}

.section h2 {
  font-family: 'Gilda Display', serif;
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--star-white);
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

p {
  font-size: 0.96rem;
  line-height: 1.88;
  color: var(--text);
  font-weight: 300;
  margin-bottom: 14px;
}

strong { color: var(--text-bright); font-weight: 600; }

/* ── Spiral arms ── */
.arms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.arm-card {
  background: var(--deep);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 3px;
  padding: 18px;
  transition: background 0.2s, border-left-color 0.2s;
}

.arm-card:hover {
  background: var(--glow);
  border-left-color: var(--gold-bright);
}

.arm-card h3 {
  font-family: 'Gilda Display', serif;
  font-size: 1rem;
  color: var(--gold-pale);
  margin-bottom: 5px;
}

.arm-card .arm-dist {
  font-size: 0.62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.55;
  margin-bottom: 8px;
  font-weight: 600;
}

.arm-card p { font-size: 0.82rem; margin: 0; line-height: 1.55; }

/* ── Structure layers ── */
.structure-list { margin-top: 18px; }

.str-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.str-row:last-child { border-bottom: none; }

.str-name {
  font-family: 'Gilda Display', serif;
  font-size: 0.95rem;
  color: var(--cream);
  padding-top: 2px;
}

.str-desc { font-size: 0.86rem; line-height: 1.65; color: var(--text); }

/* ── Gaia callout ── */
.gaia-box {
  background: linear-gradient(135deg, var(--deep), var(--milky));
  border: 1px solid rgba(212,168,48,0.25);
  border-left: 3px solid var(--gold-bright);
  border-radius: 6px;
  padding: 26px 28px;
  margin-top: 20px;
}

.gaia-box h3 {
  font-family: 'Gilda Display', serif;
  font-size: 1.1rem;
  color: var(--gold-pale);
  margin-bottom: 12px;
}

.gaia-box p { margin: 0 0 12px; }
.gaia-box p:last-child { margin: 0; }

/* ── Timeline of discovery ── */
.disc-timeline {
  border-left: 1px solid var(--border);
  padding-left: 24px;
  margin-top: 18px;
}

.dt-item {
  position: relative;
  margin-bottom: 22px;
}

.dt-item::before {
  content: '';
  position: absolute;
  left: -29px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.dt-year {
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 3px;
}

.dt-item h4 {
  font-size: 0.92rem;
  color: var(--cream);
  font-weight: 600;
  margin-bottom: 4px;
}

.dt-item p { margin: 0; font-size: 0.83rem; }

/* ── Sun position canvas ── */
.sun-pos-wrap {
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 20px;
  margin-top: 20px;
  text-align: center;
}

#sunpos-canvas { display: block; margin: 0 auto 10px; }

.canvas-caption {
  font-size: 0.62rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(212,168,48,0.3);
  font-family: 'Mulish', sans-serif;
}

/* ── Footer ── */
.footer-band {
  margin-top: 70px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-band span {
  font-size: 0.58rem;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

@media (max-width: 640px) {
  .hero { grid-template-columns: 1fr; }
  #mw-vis { width: 220px; height: 220px; margin: 0 auto; }
  .str-row { grid-template-columns: 1fr; gap: 4px; }
}
