@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;600;700;900&family=Share+Tech+Mono&family=Rajdhani:wght@300;400;600&display=swap');

/* ─── Variables ───────────────────────────────────────────── */
:root {
  --space:        #020610;
  --space-mid:    #060d1f;
  --panel:        #0b1530;
  --panel-edge:   #16274d;
  --fire-hot:     #FF4500;
  --fire-mid:     #FF8C00;
  --fire-cool:    #FFD700;
  --exhaust:      rgba(255,140,0,.15);
  --sky-dawn:     #0D3B6E;
  --steel:        #8BA3C1;
  --steel-bright: #C8DCF5;
  --white:        #F0F6FF;
  --green-go:     #00FF88;
  --green-dim:    rgba(0,255,136,.12);
  --red-abort:    #FF2244;
  --radius:       16px;
  --font-hud:     'Orbitron', sans-serif;
  --font-mono:    'Share Tech Mono', monospace;
  --font-body:    'Rajdhani', sans-serif;
}

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

/* ─── Body & starfield ────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background: var(--space);
  color: var(--steel);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Three layers of stars via box-shadow */
.stars-1, .stars-2, .stars-3 {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.stars-1 { width: 1px; height: 1px; background: transparent; animation: twinkle 4s ease-in-out infinite alternate; }
.stars-2 { width: 2px; height: 2px; background: transparent; animation: twinkle 6s ease-in-out infinite alternate; }
.stars-3 { width: 1px; height: 1px; background: transparent; animation: twinkle 8s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .4; } to { opacity: 1; } }

/* Horizon glow at bottom */
body::after {
  content: '';
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to top, rgba(255,69,0,.08), transparent);
  pointer-events: none;
  z-index: 0;
}

/* ─── Wrap ────────────────────────────────────────────────── */
.wrap {
  max-width: 1050px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  position: relative;
  z-index: 1;
}

/* ─── Hero ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, #0D3B6E 0%, #040C22 60%, #0a0014 100%);
  border-radius: var(--radius);
  padding: 48px 40px 40px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--panel-edge);
  box-shadow: 0 0 60px rgba(255,69,0,.12), 0 16px 48px rgba(0,0,0,.5);
  animation: heroIn .8s cubic-bezier(.22,1,.36,1) both;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Rocket silhouette */
.hero::after {
  content: '🚀';
  position: absolute;
  right: 40px; bottom: 20px;
  font-size: 6rem;
  opacity: .12;
  transform: rotate(-45deg);
  filter: drop-shadow(0 0 20px var(--fire-hot));
  animation: rocketFloat 6s ease-in-out infinite;
}
@keyframes rocketFloat {
  0%, 100% { transform: rotate(-45deg) translateY(0); }
  50%       { transform: rotate(-45deg) translateY(-12px); }
}

/* Launch pad arc */
.hero::before {
  content: '';
  position: absolute;
  bottom: -40px; left: 50%;
  width: 600px; height: 80px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255,140,0,.15) 0%, transparent 70%);
  border-radius: 50%;
}

/* Mission badge */
.mission-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--fire-cool);
  background: rgba(255,215,0,.08);
  border: 1px solid rgba(255,215,0,.25);
  padding: 5px 14px;
  border-radius: 4px;
  letter-spacing: 2px;
  margin-bottom: 18px;
}
.mission-badge::before { content: '▶'; color: var(--green-go); font-size: .6rem; }

h1 {
  font-family: var(--font-hud);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--white);
  letter-spacing: 3px;
  text-transform: uppercase;
  text-shadow: 0 0 30px rgba(255,140,0,.6), 0 0 80px rgba(255,69,0,.3);
  margin-bottom: 14px;
}

.hero p {
  color: rgba(200,220,245,.75);
  font-size: 1rem;
  font-weight: 300;
  max-width: 60ch;
}

/* ─── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: cardIn .55s cubic-bezier(.22,1,.36,1) forwards;
  transition: border-color .3s, box-shadow .3s, transform .3s;
}
.card:hover {
  border-color: rgba(255,140,0,.4);
  box-shadow: 0 0 0 1px rgba(255,140,0,.15), 0 8px 32px rgba(255,69,0,.1), inset 0 0 40px var(--exhaust);
  transform: translateX(4px);
}

/* Section number tab */
.card-num {
  position: absolute;
  top: 0; right: 0;
  font-family: var(--font-hud);
  font-size: .65rem;
  color: var(--fire-mid);
  background: rgba(255,140,0,.08);
  border-bottom-left-radius: 10px;
  padding: 5px 14px;
  letter-spacing: 2px;
}

/* Bottom flame line on hover */
.card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--fire-hot), var(--fire-cool), transparent);
  opacity: 0;
  transition: opacity .3s;
}
.card:hover::before { opacity: 1; }

/* Stagger */
.card:nth-child(1){animation-delay:.05s} .card:nth-child(2){animation-delay:.12s}
.card:nth-child(3){animation-delay:.18s} .card:nth-child(4){animation-delay:.24s}
.card:nth-child(5){animation-delay:.30s} .card:nth-child(6){animation-delay:.36s}
.card:nth-child(7){animation-delay:.42s} .card:nth-child(8){animation-delay:.48s}
.card:nth-child(9){animation-delay:.54s}

@keyframes cardIn {
  from { opacity:0; transform:translateX(-16px); }
  to   { opacity:1; transform:translateX(0); }
}

/* ─── HUD chip (JS-injected) ──────────────────────────────── */
.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--green-go);
  background: var(--green-dim);
  border: 1px solid rgba(0,255,136,.2);
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 1.5px;
  margin-bottom: 12px;
}
.hud-chip::before { content: '◉'; font-size: .6rem; animation: blink .9s step-end infinite; }
@keyframes blink { 50% { opacity:0; } }

/* ─── Headings ────────────────────────────────────────────── */
h2 {
  font-family: var(--font-hud);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fire-mid);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

p  { font-weight: 300; color: var(--steel); margin-bottom: 10px; }
p:last-child { margin-bottom: 0; }

/* ─── Lists ───────────────────────────────────────────────── */
ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }

li {
  position: relative;
  padding-left: 22px;
  font-weight: 400;
  font-size: .97rem;
}
li::before {
  content: '—';
  position: absolute; left: 0;
  color: var(--fire-hot);
  font-family: var(--font-mono);
}

/* ─── Thrust meter (JS-driven) ───────────────────────────── */
.thrust-wrap {
  margin-top: 18px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}
.thrust-label {
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--steel);
  letter-spacing: 1px;
}
.thrust-bar {
  height: 4px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: visible;
  position: relative;
}
.thrust-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--fire-hot), var(--fire-mid), var(--fire-cool));
  box-shadow: 0 0 10px var(--fire-hot), 0 0 24px rgba(255,69,0,.4);
  transition: width 1.4s cubic-bezier(.22,1,.36,1);
  position: relative;
}
/* Flame tip */
.thrust-fill::after {
  content: '▸';
  position: absolute;
  right: -8px; top: 50%;
  transform: translateY(-50%);
  color: var(--fire-cool);
  font-size: .7rem;
  opacity: 0;
  transition: opacity .3s .8s;
}
.thrust-fill.lit::after { opacity: 1; }
.thrust-pct {
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--fire-cool);
  min-width: 36px;
  text-align: right;
}

/* ─── Countdown (JS-injected) ─────────────────────────────── */
#countdown-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--steel);
  letter-spacing: 1px;
}
#countdown-timer {
  color: var(--fire-cool);
  font-size: 1rem;
  font-weight: bold;
  min-width: 60px;
  text-align: right;
}

/* ─── Scroll-to-top ───────────────────────────────────────── */
#back-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 48px; height: 48px;
  background: var(--panel);
  border: 1px solid rgba(255,140,0,.4);
  border-radius: 8px;
  color: var(--fire-mid);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(255,69,0,.2);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s, box-shadow .3s;
  z-index: 100;
  font-family: var(--font-hud);
}
#back-top.visible { opacity: 1; pointer-events: auto; }
#back-top:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 32px rgba(255,69,0,.4), 0 0 0 1px rgba(255,140,0,.5);
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero { padding: 32px 22px 36px; }
  .hero::after { font-size: 4rem; right: 16px; }
  h2 { font-size: .85rem; }
}
