/* ============================================================
   AstroLAB design system
   Clean cosmic foundation for all new pages.
   ============================================================ */

:root {
  --bg:        #0a0f1a;
  --bg-2:      #0d1521;
  --panel:     rgba(255,255,255,.045);
  --panel-2:   rgba(255,255,255,.07);
  --border:    rgba(255,255,255,.11);
  --border-2:  rgba(255,255,255,.18);
  --text:      rgba(255,255,255,.95);
  --muted:     rgba(255,255,255,.60);
  --faint:     rgba(255,255,255,.38);
  --accent:    #8b5cf6;
  --accent-2:  #a78bfa;
  --cool:      #38bdf8;
  --warm:      #fb923c;
  --good:      #34d399;
  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1180px;
  --shadow:    0 10px 40px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ---- Starfield backdrop ---- */
body {
  background:
    radial-gradient(1200px 700px at 75% -10%, rgba(139,92,246,.18), transparent 60%),
    radial-gradient(900px 600px at 10% 0%, rgba(56,189,248,.10), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 40%);
  min-height: 100vh;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(255,255,255,.9), transparent),
    radial-gradient(1.5px 1.5px at 130px 80px, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 220px 160px, rgba(255,255,255,.8), transparent),
    radial-gradient(1.5px 1.5px at 320px 40px, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 400px 220px, rgba(255,255,255,.75), transparent),
    radial-gradient(1px 1px at 90px 250px, rgba(255,255,255,.6), transparent);
  background-repeat: repeat;
  background-size: 450px 300px;
  opacity: .5;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

/* ============================================================
   Topbar
   ============================================================ */
.astro-topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,15,26,.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.astro-topbar .wrap { display: flex; align-items: center; gap: 18px; height: 62px; }

.astro-brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: .5px; font-size: 19px; }
.astro-brand .dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #c4b5fd, var(--accent) 55%, #4c1d95);
  box-shadow: 0 0 14px rgba(139,92,246,.8);
}
.astro-brand b { background: linear-gradient(90deg, #fff, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.astro-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.astro-nav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--muted); transition: .15s; white-space: nowrap;
}
.astro-nav a .ico { font-size: 15px; }
.astro-nav a:hover { color: var(--text); background: var(--panel-2); }
.astro-nav a.active { color: #fff; background: linear-gradient(90deg, rgba(139,92,246,.30), rgba(56,189,248,.18)); border: 1px solid var(--border-2); }
.astro-nav a .soon { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; color: var(--accent-2); border: 1px solid var(--border-2); border-radius: 6px; padding: 1px 4px; }

.astro-burger { display: none; margin-left: auto; background: none; border: 1px solid var(--border); border-radius: 10px; width: 40px; height: 38px; cursor: pointer; flex-direction: column; gap: 4px; align-items: center; justify-content: center; }
.astro-burger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

@media (max-width: 820px) {
  .astro-burger { display: flex; }
  .astro-nav {
    position: absolute; top: 62px; left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 10px 20px 16px;
    background: rgba(10,15,26,.96); border-bottom: 1px solid var(--border);
    display: none;
  }
  .astro-nav.open { display: flex; }
  .astro-nav a { width: 100%; justify-content: flex-start; padding: 12px 14px; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero { padding: 64px 0 30px; text-align: center; }
.hero .eyebrow { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent-2); font-weight: 700; }
.hero h1 { font-size: clamp(38px, 7vw, 72px); margin: 14px 0 10px; line-height: 1.02; font-weight: 800;
  background: linear-gradient(180deg, #fff, #c7d2fe 70%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lede { font-size: clamp(16px, 2.2vw, 20px); color: var(--muted); max-width: 620px; margin: 0 auto; }

.tonight-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 28px auto 0; max-width: 760px;
}
.tonight-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 16px; font-size: 14px; color: var(--text);
}
.tonight-chip .k { color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.tonight-chip .v { font-weight: 700; }

/* ============================================================
   Sections + cards
   ============================================================ */
.section { margin: 46px 0; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 18px; }
.section-head h2 { font-size: 22px; margin: 0; font-weight: 750; }
.section-head .meta { font-size: 12.5px; color: var(--faint); margin-left: auto; }
.section-head .all { font-size: 13px; color: var(--accent-2); font-weight: 600; }

.grid { display: grid; gap: 14px; }
.grid.cards-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid.cards-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

.card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; transition: .16s; position: relative; overflow: hidden;
}
.card.link { cursor: pointer; }
.card.link:hover { transform: translateY(-3px); border-color: var(--border-2); background: var(--panel-2); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 6px; font-size: 15.5px; line-height: 1.3; font-weight: 650; }
.card .sub { font-size: 12.5px; color: var(--muted); }
.card .desc { font-size: 13px; color: var(--muted); margin-top: 8px; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .3px; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }
.pill.go   { background: rgba(52,211,153,.16); color: var(--good); }
.pill.tbd  { background: rgba(251,146,60,.16); color: var(--warm); }
.pill.cool { background: rgba(56,189,248,.16); color: var(--cool); }
.pill.accent { background: rgba(139,92,246,.18); color: var(--accent-2); }

.card .countdown { font-variant-numeric: tabular-nums; font-weight: 750; color: #fff; }

/* event type accent stripe */
.card.evt::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.card.evt.eclipse::before { background: linear-gradient(var(--accent), var(--cool)); }
.card.evt.meteor::before  { background: linear-gradient(var(--warm), #ef4444); }
.card.evt.planet::before  { background: linear-gradient(var(--good), var(--cool)); }
.card.evt { padding-left: 20px; }

.launch-row { display: flex; gap: 13px; align-items: flex-start; }
.launch-thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; flex: 0 0 auto; background: var(--panel-2); border: 1px solid var(--border); }

/* ============================================================
   Calendar
   ============================================================ */
.cal { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--faint); padding-bottom: 4px; }
.cal-cell { min-height: 88px; border-radius: 9px; border: 1px solid transparent; padding: 6px; font-size: 12px; color: var(--muted); position: relative; display: flex; flex-direction: column; }
.cal-cell.in { border-color: var(--border); background: rgba(255,255,255,.02); }
.cal-cell.today { border-color: var(--accent); background: rgba(139,92,246,.12); color: #fff; }
.cal-cell .num { font-weight: 600; }
.cal-evts { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; }
.cal-evt { display: block; font-size: 10px; line-height: 1.3; padding: 2px 5px; border-radius: 5px; background: rgba(139,92,246,.18); border: 1px solid var(--border); color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-evt:hover { background: rgba(139,92,246,.34); }
.cal-evt.meteor { background: rgba(251,146,60,.18); }
.cal-evt.eclipse { background: rgba(139,92,246,.22); }
.cal-evt.planet { background: rgba(52,211,153,.18); }
.cal-evt.external { background: rgba(56,189,248,.16); }
.cal-evt.more { background: transparent; border: none; color: var(--faint); font-weight: 600; padding: 1px 5px; }
@media (max-width: 560px) { .cal-cell { min-height: 60px; font-size: 10px; padding: 4px; } .cal-evt { font-size: 9px; } }

/* ============================================================
   States
   ============================================================ */
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; padding: 18px; grid-column: 1 / -1; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--border-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { color: var(--faint); font-size: 14px; padding: 18px; grid-column: 1 / -1; }

/* ============================================================
   Footer
   ============================================================ */
.astro-footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 28px 0 40px; }
.astro-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; color: var(--faint); font-size: 13px; }
.astro-footer a { color: var(--muted); }
.astro-footer a:hover { color: var(--text); }
.astro-footer .links { display: flex; gap: 16px; flex-wrap: wrap; }

/* page stub */
.stub { text-align: center; padding: 80px 0; }
.stub .big { font-size: 64px; }
.stub h1 { font-size: 34px; margin: 16px 0 8px; }
.stub p { color: var(--muted); max-width: 520px; margin: 0 auto; }

/* prose / legal pages */
.page-title { padding: 44px 0 4px; }
.page-title h1 { font-size: 34px; margin: 0 0 6px; font-weight: 800; }
.page-title .sub { color: var(--faint); font-size: 13px; }
.legal { margin: 18px 0; }
.legal h2 { font-size: 18px; margin: 24px 0 6px; font-weight: 700; }
.legal h2:first-child { margin-top: 4px; }
.legal p { color: var(--muted); font-size: 14.5px; margin: 0; }
.legal a { color: var(--accent-2); }
