/* ============================================================
   UNIVURSYL — Premium Space Science Media
   Apple meets National Geographic meets Scientific American
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&display=swap');

:root {
  --deep-space:    #06070A;
  --midnight:      #0D1117;
  --card-bg:       #0D1520;
  --border:        rgba(255,255,255,0.06);
  --border-hover:  rgba(255,255,255,0.14);
  --nebula:        #5B4CFF;
  --gold:          #D8B45C;
  --white:         #FFFFFF;
  --off-white:     #E8EAF0;
  --muted:         #6B7A99;
  --font-display:  'Space Grotesk', sans-serif;
  --font-body:     'IBM Plex Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--deep-space);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── UTILITY ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

.section-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--nebula);
}

.tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--nebula);
  border: 1px solid rgba(91,76,255,0.3);
  border-radius: 2px;
  padding: 3px 8px;
}

.tag.gold-tag {
  color: var(--gold);
  border-color: rgba(216,180,92,0.3);
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(6,7,10,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

nav.scrolled {
  background: rgba(6,7,10,0.98);
  border-bottom-color: rgba(255,255,255,0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-svg { width: 32px; height: 32px; }

.logo-wordmark {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
}

.logo-wordmark span { color: var(--nebula); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--white); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-search {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.nav-search:hover { color: var(--white); }

.btn-subscribe {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--deep-space);
  background: var(--white);
  border: none;
  border-radius: 2px;
  padding: 9px 20px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-subscribe:hover { background: var(--gold); }

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 1.2s ease;
  will-change: opacity;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6,7,10,0.85) 0%, rgba(6,7,10,0.4) 60%, rgba(6,7,10,0.1) 100%),
    linear-gradient(180deg, rgba(6,7,10,0.3) 0%, rgba(6,7,10,0) 30%, rgba(6,7,10,0) 60%, rgba(6,7,10,0.9) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding-top: 64px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--nebula);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 92px);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  color: var(--white);
}

.hero-sub {
  font-size: 18px;
  font-weight: 300;
  color: rgba(255,255,255,0.65);
  max-width: 480px;
  margin-bottom: 40px;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-primary {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--nebula);
  border: none;
  border-radius: 2px;
  padding: 14px 28px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  display: inline-block;
}

.btn-primary:hover {
  background: #6b5dff;
  transform: translateY(-1px);
}

.btn-ghost {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

.btn-ghost:hover { color: var(--white); }

/* Hero image indicators */
.hero-indicators {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.hero-dot-ind {
  width: 24px;
  height: 2px;
  background: rgba(255,255,255,0.25);
  border-radius: 1px;
  cursor: pointer;
  transition: background 0.3s, width 0.3s;
}

.hero-dot-ind.active {
  background: var(--white);
  width: 40px;
}

/* ── TICKER ── */
.ticker {
  background: var(--midnight);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  height: 40px;
}

.ticker-inner {
  display: flex;
  align-items: center;
  height: 100%;
}

.ticker-label {
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--deep-space);
  background: var(--nebula);
  padding: 0 18px;
  height: 100%;
  display: flex;
  align-items: center;
}

.ticker-track {
  display: flex;
  gap: 56px;
  animation: ticker 50s linear infinite;
  white-space: nowrap;
  padding-left: 32px;
}

.ticker-track span {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ticker-track span::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--nebula);
  flex-shrink: 0;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── SECTIONS ── */
.section { padding: 96px 0; }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 8px;
  color: var(--white);
}

.view-all {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s, gap 0.2s;
  padding-bottom: 2px;
}

.view-all:hover { color: var(--white); gap: 12px; }

/* ── FEATURE GRID ── */
.feature-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.feature-card {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.feature-card:first-child { grid-row: span 2; }

.feature-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 280px;
}

.feature-card:first-child .feature-card-inner { min-height: 560px; }

.feature-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
  filter: brightness(0.55);
}

.feature-card:hover .feature-img {
  transform: scale(1.04);
  filter: brightness(0.7);
}

.feature-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(6,7,10,0.97) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}

.feature-overlay h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 30px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 10px 0 8px;
  color: var(--white);
}

.feature-overlay h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 10px 0 0;
  color: var(--white);
}

.feature-overlay p {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  margin-top: 8px;
}

.feature-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ── ARTICLE CARDS ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.card {
  background: var(--card-bg);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  padding: 28px;
  transition: background 0.2s;
}

.card:hover { background: #111827; }

.card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  margin: 12px 0 10px;
  color: var(--white);
}

.card p {
  font-size: 13px;
  color: var(--muted);
  flex: 1;
  line-height: 1.65;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* ── APOD ── */
.apod-section {
  background: var(--midnight);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 96px 0;
}

.apod-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.apod-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 12px 0 18px;
  color: var(--white);
}

.apod-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.6);
  line-height: 1.75;
  margin-bottom: 28px;
}

.apod-image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: var(--card-bg);
}

.apod-credit {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--muted);
  margin-top: 12px;
  letter-spacing: 0.04em;
}

/* ── TOPIC GRID ── */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.topic-card {
  background: var(--card-bg);
  padding: 36px 28px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 180px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}

.topic-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--nebula);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.topic-card:hover { background: #0f1a2e; }
.topic-card:hover::before { transform: scaleX(1); }

.topic-number {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.12);
}

.topic-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: var(--white);
  transition: color 0.2s;
}

.topic-card:hover h3 { color: var(--white); }

.topic-card p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.topic-arrow {
  position: absolute;
  bottom: 24px;
  right: 24px;
  font-size: 16px;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s, color 0.2s;
}

.topic-card:hover .topic-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--nebula);
}

/* ── LAUNCH COUNTDOWN ── */
.launch-section { padding: 0 0 96px; }

.launch-bar {
  border: 1px solid var(--border);
  border-left: 3px solid var(--nebula);
  background: var(--midnight);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.launch-info { flex: 1; }

.launch-mission {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 6px 0 8px;
  color: var(--white);
}

.launch-details {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.countdown {
  display: flex;
  gap: 2px;
}

.countdown-unit {
  text-align: center;
  background: var(--card-bg);
  padding: 16px 20px;
  min-width: 72px;
}

.countdown-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1;
  display: block;
  letter-spacing: -0.04em;
  color: var(--white);
}

.countdown-label {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-top: 6px;
}

/* ── FOOTER ── */
footer {
  background: var(--midnight);
  border-top: 1px solid var(--border);
  padding: 72px 0 36px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border);
}

.footer-brand p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  margin: 14px 0 24px;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  transition: border-color 0.2s, color 0.2s;
}

.footer-social a:hover {
  border-color: var(--nebula);
  color: var(--white);
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 12px; }

.footer-col a {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.footer-tagline {
  font-style: italic;
  color: rgba(255,255,255,0.2);
}

/* ── DIVIDER ── */
.section-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
  margin: 0 auto;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
  .apod-inner { grid-template-columns: 1fr; gap: 48px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card:first-child { grid-row: span 1; }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .section { padding: 64px 0; }
  .card-grid { grid-template-columns: 1fr; }
  .topic-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr; gap: 32px; }
  .nav-links { display: none; }
  .launch-bar { flex-direction: column; align-items: flex-start; }
  .countdown { width: 100%; justify-content: space-between; }
  .hero h1 { font-size: clamp(40px, 10vw, 64px); }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
