/* Astrovia — astrovia.net landing page.
   Dark-only on purpose: it is a space game, and a light variant of a starfield
   is not a design, it is an apology. No external fonts, no CDN, no trackers. */

:root {
  --bg:        #05070d;
  --bg-panel:  rgba(16, 22, 36, .58);
  --line:      rgba(120, 150, 200, .16);
  --line-warm: rgba(219, 115, 255, .28);
  --ink:       #dfe6f2;
  --ink-dim:   #8d9ab4;
  --ink-faint: #5c6880;
  --accent:    #2ED1AD;   /* Vantite  */
  --accent-2:  #DB73FF;   /* Xenite   */
  --gold:      #FFD14D;   /* Aurite   */
  --measure:   68ch;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 ui-sans-serif, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The starfield sits behind everything and never intercepts a click. */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

/* A single cold glow off the top-left, so the page has a light source. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(900px 620px at 12% -10%, rgba(46, 209, 173, .10), transparent 62%),
    radial-gradient(760px 520px at 88% 8%,  rgba(219, 115, 255, .09), transparent 60%);
}

/* ------------------------------------------------------------------ layout */

main { max-width: 1080px; margin: 0 auto; padding: 0 24px 40px; }

section { margin: 0 auto clamp(64px, 9vw, 116px); }

main > section:last-of-type { margin-bottom: 48px; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }

p { margin: 0 0 1em; max-width: var(--measure); }

em { font-style: normal; color: var(--gold); }

/* ------------------------------------------------------------------ topbar */

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 26px 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 13px;
  height: 13px;
  transform: rotate(45deg);
  background: var(--accent-2);
  box-shadow: 0 0 16px rgba(219, 115, 255, .75);
}

.brand-word {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .34em;
}

.badge {
  margin-left: auto;
  padding: 5px 12px;
  border: 1px solid var(--line-warm);
  border-radius: 999px;
  color: var(--accent-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* -------------------------------------------------------------------- hero */

.hero { padding-top: clamp(72px, 15vh, 150px); }

.hero h1 {
  font-size: clamp(44px, 8.4vw, 92px);
  font-weight: 700;
  letter-spacing: -.035em;
  background: linear-gradient(168deg, #ffffff 12%, #a9b8d4 62%, #6f7f9e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  margin-top: 30px;
  font-size: clamp(18px, 2.1vw, 21px);
  color: var(--ink-dim);
}

.sub { color: var(--ink-faint); font-size: 15.5px; }

/* ----------------------------------------------------------------- pillars */

.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.pillars article {
  padding: 26px 24px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-panel);
  backdrop-filter: blur(9px);
}

.pillars h2 {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 650;
  color: var(--accent);
}

.pillars p { font-size: 15.5px; color: var(--ink-dim); }

/* --------------------------------------------------------------- materials */

.materials h2 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 650; }

.section-note { margin-top: 16px; color: var(--ink-dim); }

.mat-group { margin-top: 34px; }

.mat-group h3 {
  margin-bottom: 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* One chip per material. The dot carries the tint the game itself renders that
   material with — see ResourceTable._build(); keep them in sync by hand. */
.chips li {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 17, 29, .62);
  font-size: 14.5px;
  white-space: nowrap;
}

.chips i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
  align-self: center;
  flex: none;
}

.chips span {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.aside {
  margin-top: 18px;
  padding-left: 16px;
  border-left: 2px solid var(--line-warm);
  color: var(--ink-faint);
  font-size: 15px;
  font-style: italic;
}

/* ------------------------------------------------------------------ status */

.status h2 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 650; }

.status p { margin-top: 16px; color: var(--ink-dim); }

.ticker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-faint);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex: none;
}

.ticker.live .dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.ticker.live { color: var(--ink-dim); }

/* ------------------------------------------------------------------ footer */

footer {
  border-top: 1px solid var(--line);
  padding: 30px 24px 46px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 14px;
}

footer p { margin: 0 auto; max-width: none; }

.thin { margin-top: 6px; letter-spacing: .24em; font-size: 11.5px; }

/* ------------------------------------------------------------ preferences */

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .badge { font-size: 10.5px; letter-spacing: .12em; }
  .pillars article { padding: 22px 20px 6px; }
}
