:root {
  --bg: #05010d;
  --ink: #f4f0ff;
  --muted: #a79abc;
  --gold: #e8c872;
  --gold-soft: #f0d789;
  --line: rgba(232, 200, 114, 0.28);
  --glass: rgba(10, 6, 24, 0.78);
  --font-serif: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
  --font-sans: "Outfit", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  overflow: hidden;
  height: 100%;
}

#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.nebula, .vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.nebula {
  background:
    radial-gradient(ellipse 80% 50% at 20% 80%, rgba(88, 40, 140, 0.18), transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 20%, rgba(40, 60, 140, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(180, 90, 40, 0.08), transparent 50%);
}
.vignette {
  background: radial-gradient(ellipse at center, transparent 45%, rgba(5, 1, 13, 0.55) 100%);
}

.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 7vh 24px 0;
  max-width: 40rem;
  margin: 0 auto;
  pointer-events: none;
}
.hero > * { pointer-events: auto; }

.eyebrow {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
  margin: 0 0 0.85rem;
  font-weight: 500;
}

h1 {
  font-family: var(--font-serif);
  font-weight: 480;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 0.9rem;
  text-shadow: 0 0 40px rgba(232, 200, 114, 0.18);
}

.lede {
  color: var(--muted);
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0 auto 1.6rem;
  max-width: 28rem;
}

#launch-btn, .share-btn, #submit-btn {
  appearance: none;
  border: 1px solid var(--gold);
  background: linear-gradient(180deg, rgba(232, 200, 114, 0.18), rgba(232, 200, 114, 0.05));
  color: var(--gold-soft);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow: 0 0 24px rgba(232, 200, 114, 0.12);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
#launch-btn:hover, .share-btn:hover, #submit-btn:hover {
  background: linear-gradient(180deg, rgba(232, 200, 114, 0.32), rgba(232, 200, 114, 0.1));
  box-shadow: 0 0 32px rgba(232, 200, 114, 0.28);
  transform: translateY(-1px);
}
#launch-btn:focus-visible, .share-btn:focus-visible, #submit-btn:focus-visible, .ghost:focus-visible, .close:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.count {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 300;
}

footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  z-index: 2;
  pointer-events: none;
}
footer a {
  pointer-events: auto;
  color: rgba(167, 154, 188, 0.85);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}
footer a:hover { color: var(--gold-soft); }

.tooltip {
  position: fixed;
  z-index: 4;
  min-width: 200px;
  max-width: 260px;
  padding: 0.9rem 1rem 1rem;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}
.tip-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 0 0 0.3rem;
}
.tip-desc, .tip-meta {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
  font-weight: 300;
}
.tip-link, .tip-share {
  display: inline-block;
  margin-top: 0.35rem;
  margin-right: 0.75rem;
  color: var(--gold-soft);
  font-size: 0.8rem;
  text-decoration: none;
}
.tip-link:hover, .tip-share:hover { text-decoration: underline; }

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 1, 12, 0.45);
  z-index: 5;
}

.panel {
  position: fixed;
  z-index: 6;
  right: 24px;
  bottom: 24px;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.6rem 1.5rem 1.5rem;
  backdrop-filter: blur(22px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}
.panel[hidden], .overlay[hidden], .tooltip[hidden], [hidden] { display: none !important; }

.panel-kicker {
  color: var(--gold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
  margin: 0 0 0.4rem;
}
.panel h2 {
  font-family: var(--font-serif);
  font-weight: 480;
  font-size: 1.7rem;
  margin: 0 0 0.6rem;
  letter-spacing: -0.02em;
}
.panel-copy, .fineprint, .link-note {
  color: var(--muted);
  font-weight: 300;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0 0 1.1rem;
}
.fineprint, .link-note { font-size: 0.8rem; }
.link-note { color: var(--gold-soft); }

.close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.close:hover { color: var(--ink); }

form label {
  display: block;
  font-size: 0.8rem;
  margin: 0 0 0.85rem;
  color: var(--ink);
}
.optional {
  color: var(--muted);
  font-weight: 300;
  font-size: 0.72rem;
  margin-left: 0.4rem;
}
input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(232, 200, 114, 0.18);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.65rem 0.75rem;
}
input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(232, 200, 114, 0.15);
}
#submit-btn, .share-btn { width: 100%; text-align: center; margin-top: 0.3rem; }
.form-error { color: #ffb4b4; font-size: 0.85rem; margin: 0 0 0.8rem; }
.ghost {
  display: block;
  width: 100%;
  margin-top: 0.7rem;
  background: none;
  border: 0;
  color: var(--muted);
  font-family: var(--font-sans);
  cursor: pointer;
  font-size: 0.85rem;
}
.ghost:hover { color: var(--ink); }

.honey {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

body.panel-open { overflow: hidden; }

@media (max-width: 640px) {
  .hero { padding-top: 5vh; }
  h1 { font-size: 2.3rem; }
  .lede { font-size: 0.95rem; }
  .panel {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 88vh;
    border-radius: 22px 22px 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  #launch-btn, .share-btn, #submit-btn { transition: none; }
}
