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

:root {
  --bg: #0a0a0a;
  --surface: #0a0a0a;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.18);
  --text: #ffffff;
  --text-secondary: rgba(255,255,255,0.5);
  --text-muted: rgba(255,255,255,0.3);
  --accent: #4a9eff;
  --green: #34d399;
  --yellow: #fbbf24;
  --red: #f87171;
  --gray: rgba(255,255,255,0.4);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Progress bar (top of page) ── */
#refresh-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  width: 0%;
  z-index: 9999;
  transition: width 1s linear;
  opacity: 0.6;
}

/* ── Wrapper ── */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 16px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
}
.logo-light { font-weight: 200; }
.logo-bold { font-weight: 500; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-link {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: opacity 0.2s;
}
.nav-link:hover { opacity: 1; color: var(--text); }

.last-updated {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ── Intelligence Ticker ── */
.intel-bar {
  background: rgba(74,158,255,0.06);
  border-bottom: 1px solid rgba(74,158,255,0.12);
  padding: 0 24px;
  overflow: hidden;
}
.intel-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 36px;
  gap: 16px;
}
.intel-tag {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}
.intel-ticker {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}
.intel-ticker-track {
  display: flex;
  gap: 48px;
  animation: ticker 40s linear infinite;
  white-space: nowrap;
  width: max-content;
}
.intel-ticker-track:hover { animation-play-state: paused; }
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.intel-item {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}
.intel-item span {
  color: var(--text);
  font-weight: 400;
}

/* ── Section titles ── */
.section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  margin-top: 64px;
}

/* ── Hero / Next Launch ── */
.hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.hero-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.hero-title {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 16px;
  color: var(--text);
}
.hero-subtitle {
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-sep {
  color: var(--text-muted);
}

/* Mission description */
.hero-mission-desc {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
  max-width: 600px;
}

/* Mission meta pills */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.meta-pill {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  padding: 4px 10px;
}
.meta-pill-accent {
  color: var(--accent);
  border-color: rgba(74,158,255,0.2);
  background: rgba(74,158,255,0.06);
}
.meta-pill-green {
  color: var(--green);
  border-color: rgba(52,211,153,0.2);
  background: rgba(52,211,153,0.06);
}

/* Timezone display */
.hero-timezone {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  margin-bottom: 40px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border-left: 2px solid rgba(74,158,255,0.3);
  display: inline-block;
}

/* Countdown */
.countdown {
  display: flex;
  gap: 4px;
  align-items: baseline;
}
.cd-block {
  text-align: center;
}
.cd-value {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}
.cd-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
}
.cd-sep {
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 200;
  color: var(--text-muted);
  padding: 0 8px;
}

/* ── Loading / Error ── */
.skeleton {
  background: rgba(255,255,255,0.04);
  border-radius: 2px;
  animation: shimmer 1.8s infinite;
}
@keyframes shimmer {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}
.error-msg {
  font-size: 12px;
  font-weight: 300;
  color: var(--red);
  border: 1px solid rgba(248,113,113,0.15);
  padding: 14px 20px;
  margin-bottom: 16px;
}

/* ── Flight Cards ── */
.flights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.flight-card {
  background: var(--bg);
  padding: 28px;
  transition: background 0.2s;
}
.flight-card:hover {
  background: rgba(255,255,255,0.02);
}
.flight-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}
.flight-num {
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.flight-name {
  font-size: 18px;
  font-weight: 300;
  letter-spacing: -0.01em;
}
/* Status: dot + text */
.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  white-space: nowrap;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green { background: var(--green); }
.dot-yellow { background: var(--yellow); }
.dot-red { background: var(--red); }
.dot-gray { background: var(--gray); }
.dot-blue { background: var(--accent); }

/* Mission description in card */
.flight-mission-desc {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mission meta in card */
.flight-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.flight-meta-tag {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: 3px 8px;
}

/* Hardware rows in cards */
.hw-rows { display: flex; flex-direction: column; gap: 8px; }
.hw-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
}
.hw-icon-char {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  min-width: 18px;
  text-transform: uppercase;
}
.hw-serial {
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
}
.hw-note {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
  margin-left: auto;
}
.hw-version {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.flight-date-row {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.flight-date-row strong {
  color: var(--text-secondary);
  font-weight: 400;
}

/* Launch window bar */
.launch-window {
  margin-top: 8px;
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ── Pipeline ── */
.pipeline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
.pipeline-col h3 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.pipeline-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.pipeline-item:last-child { border-bottom: none; }
.pipe-serial {
  font-family: 'Roboto Mono', monospace;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  min-width: 48px;
}
.pipe-info {
  flex: 1;
}
.pipe-status-text {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-muted);
}
.pipe-version {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pipe-flight {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
}

/* Progress bar in pipeline */
.pipe-progress {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin-top: 6px;
  overflow: hidden;
}
.pipe-progress-fill {
  height: 100%;
  background: var(--text-secondary);
  transition: width 0.6s ease;
}

/* ── Community Feed ── */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.community-card {
  background: var(--bg);
  padding: 24px;
  transition: background 0.2s;
}
.community-card:hover { background: rgba(255,255,255,0.02); }
.community-card-source {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.community-card-source::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}
.community-card-title {
  font-size: 14px;
  font-weight: 300;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.5;
}
.community-card-desc {
  font-size: 12px;
  font-weight: 300;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.community-card-link {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}
.community-card-link:hover { opacity: 0.7; }
.community-card-date {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ── Footer ── */
footer {
  margin-top: 80px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-text {
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.footer-attr {
  font-size: 10px;
  font-weight: 300;
  color: var(--text-muted);
  margin-top: 8px;
}
.footer-attr a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: border-color 0.2s;
}
.footer-attr a:hover { border-color: var(--text-secondary); }

/* ── Skeletons ── */
.skel-hero-title { height: 64px; width: 400px; max-width: 80%; margin-bottom: 16px; }
.skel-hero-sub   { height: 16px; width: 300px; max-width: 60%; margin-bottom: 48px; }
.skel-hero-cd    { height: 56px; width: 320px; max-width: 70%; }
.skel-card       { height: 200px; }
.skel-pipe       { height: 50px; margin-bottom: 1px; }

/* ── Hero two-column layout ── */
.hero-inner {
  display: flex;
  gap: 48px;
  align-items: flex-start;
}
.hero-left {
  flex: 1 1 0;
  min-width: 0;
}
.hero-right {
  flex: 0 0 420px;
  max-width: 420px;
}

/* Video section label */
.video-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.video-label-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.live-dot {
  width: 6px;
  height: 6px;
  background: #f87171;
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 1.5s infinite;
}
.live-dot-gray {
  background: var(--text-muted);
  animation: none;
}
.video-source-link {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.video-source-link:hover { color: var(--text-secondary); }
.video-title-display {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
  margin-bottom: 10px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 420px;
}

/* 16:9 responsive embed */
.embed-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
}
.embed-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255,255,255,0.1);
  display: block;
}
.embed-placeholder {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
}
.embed-placeholder-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.embed-placeholder-text {
  font-size: 11px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-align: center;
}
.watch-btn {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid rgba(74,158,255,0.3);
  padding: 8px 16px;
  transition: background 0.2s;
}
.watch-btn:hover { background: rgba(74,158,255,0.08); }

/* Volume indicator */
.muted-notice {
  margin-top: 8px;
  font-size: 10px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-align: center;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-inner { flex-direction: column; gap: 40px; }
  .hero-right { flex: 1 1 auto; max-width: 100%; width: 100%; }
  .video-title-display { max-width: 100%; }
}
@media (max-width: 768px) {
  .wrapper { padding: 0 16px 60px; }
  .hero { padding: 48px 0 40px; }
  .pipeline { grid-template-columns: 1fr; gap: 48px; }
  .flights-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .nav-link { display: none; }
  .countdown { gap: 2px; }
  .cd-sep { padding: 0 4px; }
  .hero-subtitle { flex-direction: column; gap: 4px; }
  .hero-sep { display: none; }
  .intel-bar { display: none; }
}
