/* ============================================================
   ASTRONOMINAL — NASA Deep Space Design System
   High-Precision Orrery & Cosmic Telemetry Aesthetic
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Soothing, high-comfort deep slate background (Eliminates eye strain) */
  --bg:           #080d1a;
  --bg-deep:      #050811;
  --surface:      rgba(15, 23, 42, 0.88);
  --surface-2:    rgba(20, 30, 55, 0.94);
  --surface-3:    rgba(26, 38, 70, 0.98);
  --surface-hud:  rgba(11, 18, 36, 0.96);

  /* Calibrated, Non-glaring NASA Accents */
  --cyan:         #38bdf8;
  --cyan-bright:  #0ea5e9;
  --cyan-dim:     rgba(56, 189, 248, 0.12);
  --cyan-glow:    rgba(56, 189, 248, 0.25);

  --sun-gold:     #f59e0b;
  --sun-core:     #fef3c7;
  --sun-glow:     rgba(245, 158, 11, 0.3);

  --earth-blue:   #3b82f6;
  --mars-rust:    #ef4444;
  --jupiter-sand: #f97316;
  --saturn-gold:  #eab308;
  --uranus-ice:   #06b6d4;
  --neptune-deep: #3b82f6;

  --green:        #10b981;
  --green-dim:    rgba(16, 185, 129, 0.12);
  --rose:         #f43f5e;
  --rose-dim:     rgba(244, 63, 94, 0.12);
  --violet:       #8b5cf6;
  --violet-dim:   rgba(139, 92, 246, 0.12);

  /* High-Contrast, Eye-Friendly Typography */
  --text:         #f8fafc;         /* Crisp, pure off-white (zero glare) */
  --text-2:       #e2e8f0;         /* 90% slate for comfortable reading */
  --text-3:       #cbd5e1;         /* 80% slate for supporting text */
  --muted:        #94a3b8;         /* 65% clear readable muted text */
  --muted-2:      #64748b;

  /* Clean, Non-distracting Borders */
  --line:         rgba(148, 163, 184, 0.18);
  --line-2:       rgba(148, 163, 184, 0.08);
  --line-cyan:    rgba(56, 189, 248, 0.28);
  --line-orbit:   rgba(148, 163, 184, 0.16);

  /* Glass & Shadows */
  --shadow-sm:    0 4px 16px rgba(0, 0, 0, 0.6);
  --shadow-md:    0 12px 40px rgba(0, 0, 0, 0.75);
  --shadow-lg:    0 24px 80px rgba(0, 0, 0, 0.88);
  --blur:         blur(18px);

  /* Radii */
  --r-sm: 0.375rem;
  --r-md: 0.625rem;
  --r-lg: 1rem;

  /* Transitions */
  --t-fast: 150ms ease;
  --t-med:  250ms cubic-bezier(0.16, 1, 0.3, 1);
  --t-slow: 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 19px; /* Increased by +3px across the entire application */
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  background: var(--bg);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img, svg, canvas { display: block; }
ul { list-style: none; padding: 0; }

/* ── Deep Space Background Layers ──────────────────────────── */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
  background: radial-gradient(circle at 50% 45%, #050814 0%, #020408 60%, #000103 100%);
}

.aurora {
  position: fixed;
  inset: -15%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 75% 25%, rgba(56, 189, 248, 0.035), transparent 45%),
    radial-gradient(ellipse at 25% 75%, rgba(139, 92, 246, 0.025), transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(255, 200, 59, 0.015), transparent 60%);
  filter: blur(80px);
  animation: cosmosDrift 30s ease-in-out infinite alternate;
}

/* ── Typography & Headings ─────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.5rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p { color: var(--text-2); line-height: 1.7; }

/* ── Telemetry / HUD Eyebrows ──────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--cyan);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.35rem;
  height: 1.5px;
  background: var(--cyan);
  opacity: 0.85;
}

/* ── Header / Navigation ───────────────────────────────────── */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
  height: 4.5rem;
  background: rgba(2, 4, 8, 0.85);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 2rem;
  height: 2rem;
  position: relative;
  flex-shrink: 0;
}
.brand-icon svg { width: 100%; height: 100%; }

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.desktop-nav a {
  padding: 0.5rem 0.95rem;
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--t-fast), background var(--t-fast);
}
.desktop-nav a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.desktop-nav a.active { color: var(--cyan); background: var(--cyan-dim); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.35rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: nowrap;
  user-select: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #01060e;
  font-weight: 700;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.28);
}
.btn-primary:hover { box-shadow: 0 0 32px rgba(56, 189, 248, 0.45); }

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
  color: var(--text-2);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.16); color: var(--text); }

.btn-ghost {
  background: transparent;
  border-color: var(--line-cyan);
  color: var(--cyan);
}
.btn-ghost:hover { background: var(--cyan-dim); }

.btn-gold {
  background: linear-gradient(135deg, #ffc83b 0%, #d97706 100%);
  color: #0d0600;
  font-weight: 700;
  box-shadow: 0 0 24px rgba(255, 200, 59, 0.25);
}
.btn-gold:hover { box-shadow: 0 0 32px rgba(255, 200, 59, 0.4); }

.btn-lg { height: 3rem; padding: 0 1.75rem; font-size: 0.95rem; }
.btn-sm { height: 2rem; padding: 0 0.75rem; font-size: 0.78rem; }
.btn-full { width: 100%; }

/* ── NASA Glass Panels ──────────────────────────────────────── */
.glass {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  backdrop-filter: var(--blur);
}
.glass-strong {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  backdrop-filter: var(--blur);
}

/* ── Section Layout ─────────────────────────────────────────── */
.section {
  padding: clamp(3.5rem, 7vw, 6rem) clamp(1.25rem, 5vw, 5rem);
}
.section-header { max-width: 52rem; margin-bottom: 3rem; }
.section-header h2 { margin-bottom: 0.75rem; }
.section-header p { font-size: 1.05rem; color: var(--text-2); }

/* ── Scientific Ticker ──────────────────────────────────────── */
.ticker-bar {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(2, 6, 14, 0.6);
  backdrop-filter: blur(8px);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: tickerMove 36s linear infinite;
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 2rem;
  color: var(--text-2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  white-space: nowrap;
}
.ticker-item .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  flex-shrink: 0;
}

/* ── HUD Tags ───────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 1.45rem;
  padding: 0 0.55rem;
  border-radius: var(--r-sm);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tag-cyan  { background: var(--cyan-dim);   color: var(--cyan);   border: 1px solid rgba(56, 189, 248, 0.25); }
.tag-gold  { background: rgba(255, 200, 59, 0.12); color: var(--sun-gold); border: 1px solid rgba(255, 200, 59, 0.25); }
.tag-green { background: var(--green-dim);  color: var(--green);  border: 1px solid rgba(16, 185, 129, 0.25); }
.tag-rose  { background: var(--rose-dim);   color: var(--rose);   border: 1px solid rgba(244, 63, 94, 0.25); }

/* ── Telemetry Numbers ──────────────────────────────────────── */
.hud-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--cyan);
}

/* ── Mobile Nav ─────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 1rem;
  height: 1.5px;
  background: var(--text);
  transition: transform var(--t-med), opacity var(--t-fast);
}
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset-block-start: 3.85rem;
  inset-inline: 0.75rem;
  z-index: 99;
  display: none;
  padding: 0.75rem;
  background: rgba(4, 7, 14, 0.98);
  border: 1px solid var(--line-cyan);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
}
body.menu-open .mobile-menu { display: block; }
.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.9rem;
}
.mobile-menu a:hover { background: rgba(56, 189, 248, 0.1); color: var(--cyan); }

@media (max-width: 900px) {
  .desktop-nav,
  .header-actions {
    display: none !important;
  }
  .nav-toggle {
    display: flex !important;
  }
  .site-header {
    padding: 0 1rem !important;
    height: 3.85rem !important;
  }
  .brand {
    font-size: 1.15rem !important;
  }
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.75rem clamp(1.25rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  background: rgba(1, 2, 4, 0.9);
}
.site-footer .brand { font-size: 1rem; }

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes cosmosDrift {
  from { transform: scale(1) rotate(0deg); }
  to   { transform: scale(1.05) rotate(4deg); }
}
@keyframes tickerMove { to { transform: translateX(-50%); } }
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4); }
  70%  { box-shadow: 0 0 0 10px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .desktop-nav { display: none; }
  .nav-toggle  { display: flex; }
}
@media (max-width: 560px) {
  .site-header { height: 3.75rem; }
  .mobile-menu { inset-block-start: 3.75rem; }
  .site-footer { grid-template-columns: 1fr; }
}
