/* Discovery Quest — landing. Twilight night-sky meets aged treasure-map.
   Palette pulled straight from Luna: midnight indigo, amber gold, star-cyan. */

:root {
  --ink: #12152a;
  --twilight: #1b2040;
  --twilight-2: #252b54;
  --panel: rgba(40, 47, 92, 0.42);
  --panel-edge: rgba(150, 165, 230, 0.18);
  --gold: #ffb953;
  --gold-bright: #ffe066;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --parchment: #f0e2c2;
  --text: #f4f6ff;
  --muted: #9aa6c9;
  --muted-dim: #6b76a0;
  --maxw: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(120% 90% at 50% -10%, #2a2150 0%, rgba(42, 33, 80, 0) 55%),
    radial-gradient(100% 80% at 110% 10%, rgba(34, 211, 238, 0.10) 0%, rgba(34, 211, 238, 0) 50%),
    linear-gradient(180deg, #161a30 0%, var(--ink) 45%, #0e1124 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* ---- atmosphere layers ---- */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.aurora {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 70vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(40% 60% at 20% 30%, rgba(255, 185, 83, 0.10), transparent 70%),
    radial-gradient(45% 55% at 85% 20%, rgba(118, 92, 230, 0.18), transparent 70%),
    radial-gradient(35% 50% at 60% 60%, rgba(34, 211, 238, 0.10), transparent 70%);
  filter: blur(8px);
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- everything above the atmosphere ---- */
.nav, main, .foot { position: relative; z-index: 1; }

/* ---- nav ---- */
.nav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}
.brand-crest { filter: drop-shadow(0 4px 12px rgba(34, 211, 238, 0.25)); }
.brand-name {
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.2px;
}
.ghost-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 9px 16px;
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.ghost-link:hover {
  color: var(--text);
  border-color: rgba(255, 224, 102, 0.5);
  background: rgba(255, 224, 102, 0.06);
}

/* ---- hero ---- */
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 34px 24px 8px;
  text-align: center;
}
.hero-crest {
  filter: drop-shadow(0 16px 40px rgba(34, 211, 238, 0.28));
  animation: float 6s ease-in-out infinite;
}
.kicker {
  margin: 18px 0 0;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
}
.title {
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: clamp(40px, 8vw, 68px);
  line-height: 1.02;
  margin: 8px 0 14px;
  background: linear-gradient(180deg, #ffffff 0%, #d8def3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.6;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 22px;
}
.lede strong { color: var(--gold-bright); font-weight: 800; }
.scroll-hint {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 4px;
  transition: color 0.2s, transform 0.2s;
}
.scroll-hint:hover { color: var(--text); transform: translateY(2px); }

/* ---- quests ---- */
.quests {
  max-width: var(--maxw);
  margin: 28px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px 24px 24px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  backdrop-filter: blur(10px);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  opacity: 0;
  transform: translateY(22px);
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
  animation-delay: calc(0.15s + var(--i) * 0.12s);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 60% at 50% -10%, rgba(255, 224, 102, 0.10), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}

/* live card — full colour, warm + alive */
.card--live {
  border-color: rgba(255, 185, 83, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 185, 83, 0.08), rgba(40, 47, 92, 0.42) 40%),
    var(--panel);
  box-shadow: 0 20px 50px rgba(8, 10, 25, 0.5), inset 0 0 0 1px rgba(255, 224, 102, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card--live:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 224, 102, 0.7);
  box-shadow: 0 28px 70px rgba(8, 10, 25, 0.6), 0 0 0 1px rgba(255, 224, 102, 0.18);
}
.card--live:hover::before { opacity: 1; }

/* coming-soon cards — desaturated + dimmed + not clickable */
.card--soon {
  filter: grayscale(0.85);
  opacity: 0;
  cursor: not-allowed;
}
.card--soon .card-title,
.card--soon .card-blurb { color: var(--muted-dim); }
.card--soon .card-icon { color: var(--muted-dim); }
/* keep the fade-in but settle dimmed */
.card--soon { animation-name: rise-dim; }

.badge {
  align-self: flex-end;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.badge--live {
  color: #1a1205;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  box-shadow: 0 4px 14px rgba(255, 185, 83, 0.35);
}
.badge--soon {
  color: var(--muted);
  background: rgba(150, 165, 230, 0.10);
  border: 1px solid var(--panel-edge);
}

.card-icon {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  margin: 6px 0 16px;
}
.card-icon--crest img { filter: drop-shadow(0 10px 24px rgba(34, 211, 238, 0.28)); }

.card-title {
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: 25px;
  margin: 0 0 8px;
}
.card-blurb {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 20px;
  flex: 1;
}
.card-blurb em { color: var(--cyan); font-style: normal; font-weight: 700; }

.cta {
  font-weight: 800;
  font-size: 15px;
  padding: 12px 20px;
  border-radius: 13px;
  color: #11160b;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  box-shadow: 0 8px 20px rgba(255, 185, 83, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card--live:hover .cta {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(255, 185, 83, 0.4);
}
.cta--locked {
  color: var(--muted);
  background: rgba(150, 165, 230, 0.08);
  border: 1px solid var(--panel-edge);
  box-shadow: none;
  font-weight: 700;
}

.more-note {
  text-align: center;
  color: var(--muted-dim);
  font-weight: 700;
  font-size: 14px;
  margin: 34px auto 0;
}

/* ---- footer ---- */
.foot {
  max-width: var(--maxw);
  margin: 40px auto 0;
  padding: 24px;
  text-align: center;
  color: var(--muted-dim);
  font-size: 13px;
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--gold-bright); }
.foot .dot { opacity: 0.5; }

/* ---- motion ---- */
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rise-dim {
  to { opacity: 0.82; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-crest, .card, .card--soon { animation: none; opacity: 1; transform: none; }
  .card--soon { opacity: 0.82; }
  html { scroll-behavior: auto; }
}

@media (max-width: 560px) {
  .brand-name { font-size: 18px; }
  .hero { padding-top: 20px; }
  .quests { gap: 16px; }
}
