/* ─── Constellation Marketing Site ─── */

:root {
  --bg: #050508;
  --surface: #0a0a10;
  --surface-2: #111118;
  --border: rgba(255,255,255,0.06);
  --border-bright: rgba(255,255,255,0.12);
  --text: #e8e8ed;
  --text-dim: #a8a8b8;
  --text-muted: #55556a;
  --accent: #34d399;
  --accent-dim: rgba(52,211,153,0.15);
  --accent-glow: rgba(52,211,153,0.3);
  --live-red: #ef4444;
  --live-red-dim: rgba(239,68,68,0.3);
  --warning: #f59e0b;
  --font: 'Outfit', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
  min-height: 100vh;
}

/* ─── NAV BAR (mirrors app header) ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 52px;
  background: rgba(5,5,8,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-logo {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--accent);
  text-decoration: none;
}

.nav-live {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-live:hover { color: var(--text); }

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live-red);
  position: relative;
}
.pulse-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--live-red-dim);
  animation: pulse-ring 2s ease-out infinite;
}
@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  font-size: 0.78rem;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }

.nav-cta {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all 0.2s;
}
.nav-cta:hover {
  background: #4eeab5;
  box-shadow: 0 0 20px var(--accent-dim);
}

/* ─── HERO ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 40% 45%, rgba(52,211,153,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 70% 60%, rgba(99,102,241,0.03) 0%, transparent 60%),
    url('hero.png') center center / cover no-repeat,
    var(--bg);
}

/* Subtle star field */
.hero-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 40% 35% at 50% 42%, rgba(255,255,255,0.012) 0%, transparent 60%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 0 2rem;
  margin-top: -5vh;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fade-up 0.8s 0.3s forwards;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fade-up 0.8s 0.5s forwards;
}
.hero-title em {
  font-style: normal;
  color: var(--accent);
  font-weight: 400;
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-dim);
  font-weight: 300;
  max-width: 560px;
  margin: 0 auto 2.5rem;
  opacity: 0;
  animation: fade-up 0.8s 0.7s forwards;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  opacity: 0;
  animation: fade-up 0.8s 0.9s forwards;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.01em;
}
.btn-primary:hover {
  background: #4eeab5;
  box-shadow: 0 0 30px var(--accent-dim), 0 4px 20px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 400;
  border: 1px solid var(--border-bright);
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-secondary:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.03);
}

.btn-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live-red);
  animation: blink 2s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── SECTION SHARED ─── */
section {
  padding: 6rem 2rem;
}

.section-inner {
  max-width: 960px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.section-heading {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.section-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-dim);
  font-weight: 300;
  max-width: 600px;
}

.divider {
  height: 1px;
  background: var(--border);
  max-width: 960px;
  margin: 0 auto;
}

/* ─── THE QUESTION ─── */
.question {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.question .section-heading {
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  max-width: 640px;
}

.question .section-heading em {
  font-style: normal;
  color: var(--accent);
  font-weight: 400;
}

.question-body {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.question-text {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-dim);
  font-weight: 300;
}

.question-text p + p {
  margin-top: 1rem;
}

/* ─── RESULTS ─── */
.results-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.result-card {
  background: var(--surface);
  padding: 2rem;
  text-align: center;
}

.result-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.result-value {
  font-size: 2rem;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: -0.02em;
}

.result-value.highlight { color: var(--accent); }
.result-value.warning { color: var(--warning); }

.result-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 300;
}

.results-insight {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border-left: 2px solid var(--accent);
  background: var(--accent-dim);
  border-radius: 0 6px 6px 0;
}

.results-insight p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text);
  font-weight: 400;
}

.results-insight strong {
  color: var(--accent);
  font-weight: 600;
}

/* ─── LIVE PREVIEW ─── */
.preview {
  background: var(--bg);
}

.preview-frame {
  margin-top: 2.5rem;
  border-radius: 10px;
  border: 1px solid var(--border-bright);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 80px rgba(52,211,153,0.03);
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.preview-toolbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.preview-dots {
  display: flex;
  gap: 6px;
}
.preview-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.preview-url {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
}

.preview-live-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  font-weight: 500;
}

.preview-content {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(ellipse 40% 35% at 45% 40%, rgba(52,211,153,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 30% 25% at 75% 65%, rgba(236,72,153,0.04) 0%, transparent 60%),
    var(--surface);
}

/* Stylised galaxy preview */
.galaxy-node {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: center;
}

.galaxy-node.hub {
  width: 18px; height: 18px;
  background: rgba(52,211,153,0.3);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-dim);
}
.galaxy-node.healthy {
  width: 10px; height: 10px;
  background: rgba(99,102,241,0.3);
  border-color: rgba(99,102,241,0.6);
}
.galaxy-node.warning {
  width: 10px; height: 10px;
  background: rgba(245,158,11,0.3);
  border-color: rgba(245,158,11,0.6);
}
.galaxy-node.critical {
  width: 10px; height: 10px;
  background: rgba(239,68,68,0.3);
  border-color: rgba(239,68,68,0.6);
  animation: critical-pulse 1.5s infinite;
}
@keyframes critical-pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(239,68,68,0.3); }
  50% { box-shadow: 0 0 10px rgba(239,68,68,0.5); }
}

/* Agent dots */
.galaxy-agent {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}
.galaxy-agent.moving {
  animation: agent-drift 8s ease-in-out infinite alternate;
}
@keyframes agent-drift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(15px, -8px); }
  50% { transform: translate(30px, 5px); }
  75% { transform: translate(12px, 12px); }
  100% { transform: translate(-5px, 3px); }
}

/* Lane lines */
.galaxy-lane {
  position: absolute;
  height: 1px;
  background: rgba(255,255,255,0.06);
  transform-origin: left center;
}

.preview-stats {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  display: flex;
  gap: 1.5rem;
}

.preview-stat {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}
.preview-stat span {
  color: var(--text-dim);
  font-weight: 500;
}

.preview-legend {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6rem;
  color: var(--text-muted);
  font-weight: 400;
}

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* ─── WHAT'S COMING (BYOB) ─── */
.coming {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.coming-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.coming-card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.01);
  transition: all 0.3s;
}
.coming-card:hover {
  border-color: var(--border-bright);
  background: rgba(255,255,255,0.02);
}

.coming-card.featured {
  grid-column: 1 / -1;
  border-color: var(--accent);
  border-width: 1px;
  background: var(--accent-dim);
}

.coming-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.coming-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.coming-card p {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-dim);
  font-weight: 300;
}

.coming-card.featured h3 {
  color: var(--accent);
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.tag.soon { background: rgba(52,211,153,0.15); color: var(--accent); }
.tag.live { background: rgba(239,68,68,0.15); color: var(--live-red); }
.tag.planned { background: rgba(99,102,241,0.15); color: #818cf8; }

/* ─── REGISTER CTA ─── */
.register {
  text-align: center;
  padding: 8rem 2rem;
  position: relative;
}

.register-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(52,211,153,0.05) 0%, transparent 70%);
}

.register .section-inner {
  position: relative;
  z-index: 2;
}

.register .section-heading {
  max-width: 500px;
  margin: 0 auto 1rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.register .section-text {
  max-width: 480px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.register-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  max-width: 440px;
  margin: 0 auto;
}

.register-input {
  flex: 1;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-bright);
  border-radius: 5px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s;
}
.register-input::placeholder {
  color: var(--text-muted);
}
.register-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.register-btn {
  padding: 0.8rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}
.register-btn:hover {
  background: #4eeab5;
  box-shadow: 0 0 25px var(--accent-dim);
}

.register-note {
  margin-top: 1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ─── FOOTER ─── */
.footer {
  padding: 2rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 300;
}
.footer-left a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-left a:hover { color: var(--text); }

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-link {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-link:hover { color: var(--text); }

.footer-link svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .nav { padding: 0 1rem; }
  .nav-right .nav-link { display: none; }

  section { padding: 4rem 1.25rem; }

  .question-body { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
  .coming-grid { grid-template-columns: 1fr; }

  .hero-content { margin-top: 0; }
  .hero-actions { flex-direction: column; }

  .register-form { max-width: 100%; }

  .footer-inner { flex-direction: column; gap: 1.5rem; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }

  .preview-content { aspect-ratio: 4 / 3; }
}

@media (max-width: 480px) {
  .nav-status { display: none; }
}
