/*
Theme Name: JPL Corporate
Theme URI: https://example.com/jpl-corporate
Author: Claude / Anthropic
Author URI: https://anthropic.com
Description: A bold, space-inspired corporate WordPress theme modeled after NASA JPL. Features a fullscreen hero with video support, dynamic news grid, stat counters, dark navigation, and a responsive layout built for research and technology organizations.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jpl-corporate
Tags: full-width-template, custom-menu, featured-images, post-thumbnails, responsive-layout, translation-ready

*/

/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
  /* Colors */
  --color-space:       #0b0c10;
  --color-deep:        #12151c;
  --color-panel:       #1a1e28;
  --color-surface:     #232837;
  --color-border:      #2e3344;
  --color-accent:      #ba0c2f;       /* NASA red */
  --color-accent-dim:  rgba(186,12,47,0.15);
  --color-highlight:   #4d9fff;       /* link/data blue */
  --color-text:        #e8eaf0;
  --color-muted:       #8c92a4;
  --color-white:       #ffffff;
  --color-overlay:     rgba(11,12,16,0.65);

  /* Typography */
  --font-display: 'Barlow Condensed', 'Arial Narrow', Arial, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Scale */
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;
  --text-5xl:  4rem;
  --text-hero: clamp(3rem, 8vw, 7rem);

  /* Spacing */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-24: 6rem;
  --sp-32: 8rem;

  /* Layout */
  --max-w:       1280px;
  --max-w-prose: 720px;
  --header-h:    72px;
  --radius:      4px;
  --radius-lg:   8px;

  /* Transitions */
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --dur:  240ms;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--color-space);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }

a { color: var(--color-highlight); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--color-white); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--color-white);
}

p { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: var(--sp-6); }

::selection { background: var(--color-accent); color: var(--color-white); }

:focus-visible {
  outline: 2px solid var(--color-highlight);
  outline-offset: 3px;
}

/* =============================================
   LAYOUT UTILITIES
   ============================================= */
.container {
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--sp-6);
  padding-right: var(--sp-6);
}

.section { padding-top: var(--sp-24); padding-bottom: var(--sp-24); }
.section--sm { padding-top: var(--sp-16); padding-bottom: var(--sp-16); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; gap: var(--sp-4); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =============================================
   HEADER & NAVIGATION
   ============================================= */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(11,12,16,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

#site-header.scrolled {
  border-bottom-color: var(--color-border);
  background: rgba(11,12,16,0.98);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-8);
}

/* Utility bar above main nav */
.header-util {
  background: var(--color-deep);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-xs);
  padding: var(--sp-2) 0;
}

.header-util .container {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-6);
}

.header-util a {
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  font-weight: 500;
}

.header-util a:hover { color: var(--color-white); }

/* Site Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  color: var(--color-white);
  flex-shrink: 0;
}

.site-logo img {
  height: 36px;
  width: auto;
}

.site-logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-white);
  line-height: 1;
}

.site-logo-text span {
  display: block;
  color: var(--color-accent);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  margin-top: 2px;
}

/* Primary Nav */
#primary-navigation {
  display: flex;
  align-items: center;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color var(--dur) var(--ease);
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
  color: var(--color-white);
}

.nav-menu > li > a::after {
  content: '';
  position: absolute;
  bottom: 0; left: var(--sp-4); right: var(--sp-4);
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transition: transform var(--dur) var(--ease);
}

.nav-menu > li:hover > a::after,
.nav-menu > li.current-menu-item > a::after {
  transform: scaleX(1);
}

/* Dropdown */
.nav-menu .sub-menu {
  list-style: none;
  padding: var(--sp-2) 0;
  margin: 0;
  position: absolute;
  top: 100%; left: 0;
  min-width: 220px;
  background: var(--color-panel);
  border: 1px solid var(--color-border);
  border-top: 2px solid var(--color-accent);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  z-index: 100;
}

.nav-menu li:hover > .sub-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-menu .sub-menu li a {
  display: block;
  padding: var(--sp-2) var(--sp-4);
  color: var(--color-muted);
  font-size: var(--text-sm);
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.nav-menu .sub-menu li a:hover {
  color: var(--color-white);
  background: var(--color-surface);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: var(--sp-2) var(--sp-3);
  cursor: pointer;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  line-height: 1;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-top: var(--header-h);
  overflow: hidden;
  background: var(--color-space);
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video-wrap video,
.hero-video-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(11,12,16,0.95) 0%,
    rgba(11,12,16,0.5) 50%,
    rgba(11,12,16,0.2) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: var(--sp-24);
  width: 100%;
}

.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--sp-4);
  border-left: 2px solid var(--color-accent);
  padding-left: var(--sp-3);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 0.95;
  color: var(--color-white);
  max-width: 820px;
  margin-bottom: var(--sp-6);
}

.hero-subtitle-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-8);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.hero-subtitle-list li {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  cursor: pointer;
  transition: color var(--dur) var(--ease);
}

.hero-subtitle-list li::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 1px;
  background: var(--color-border);
  transition: background var(--dur) var(--ease), width var(--dur) var(--ease);
  flex-shrink: 0;
}

.hero-subtitle-list li.active,
.hero-subtitle-list li:hover {
  color: var(--color-white);
}

.hero-subtitle-list li.active::before {
  background: var(--color-accent);
  width: 36px;
}

.hero-cta-group {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

/* Hero Scroll Indicator */
.hero-scroll {
  position: absolute;
  bottom: var(--sp-8);
  right: var(--sp-6);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  color: var(--color-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-scroll::after {
  content: '';
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--color-muted), transparent);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  text-decoration: none;
  border-radius: var(--radius);
  line-height: 1;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background: #9a0a27;
  color: var(--color-white);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-white);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--color-white);
  background: rgba(255,255,255,0.05);
  color: var(--color-white);
}

.btn-ghost {
  background: transparent;
  color: var(--color-highlight);
  padding-left: 0;
}

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

.btn-ghost::after {
  content: ' →';
}

/* =============================================
   STATS / COUNTER BAR
   ============================================= */
.stats-bar {
  background: var(--color-deep);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--sp-6) 0;
}

.stats-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.stat-item {
  padding: var(--sp-4) var(--sp-6);
  border-right: 1px solid var(--color-border);
  text-align: center;
}

.stat-item:last-child { border-right: none; }
.stat-item:first-child { padding-left: 0; text-align: left; }

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-number .accent { color: var(--color-accent); }

.stat-label {
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: var(--sp-2);
  font-family: var(--font-display);
  font-weight: 600;
}

.stat-sub {
  font-size: var(--text-xs);
  color: var(--color-highlight);
  margin-top: var(--sp-1);
  font-family: var(--font-mono);
}

/* =============================================
   SECTION HEADERS
   ============================================= */
.section-header {
  margin-bottom: var(--sp-12);
}

.section-eyebrow {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--sp-3);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.section-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--color-accent);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--color-white);
}

.section-header--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-8);
}

/* =============================================
   NEWS / CARDS GRID
   ============================================= */
.news-section {
  background: var(--color-deep);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-1);
}

/* Featured card spans 2 cols */
.news-card {
  position: relative;
  background: var(--color-panel);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur) var(--ease);
}

.news-card:hover { transform: translateY(-3px); }

.news-card:hover .card-img img {
  transform: scale(1.04);
}

.news-card--featured {
  grid-column: span 2;
  grid-row: span 2;
}

.card-img {
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--color-surface);
  flex-shrink: 0;
}

.news-card--featured .card-img { aspect-ratio: 16/10; }

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}

.card-body {
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-topic {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--sp-2);
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: var(--sp-3);
}

.news-card--featured .card-title { font-size: var(--text-3xl); }

.card-excerpt {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: 1.55;
  flex: 1;
  margin-bottom: var(--sp-4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--color-border);
}

.card-date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.card-link {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-highlight);
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.card-link::after { content: ' →'; }

/* =============================================
   MISSION EXPLORER
   ============================================= */
.missions-section {
  background: var(--color-space);
}

.missions-planet-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-1);
  margin-top: var(--sp-8);
}

.planet-card {
  background: var(--color-panel);
  padding: var(--sp-5) var(--sp-4);
  border: 1px solid var(--color-border);
  border-top: 2px solid transparent;
  text-align: center;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
  position: relative;
  overflow: hidden;
}

.planet-card::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 0;
  background: var(--color-accent-dim);
  transition: height var(--dur) var(--ease);
}

.planet-card:hover {
  border-color: var(--color-border);
  border-top-color: var(--color-accent);
}

.planet-card:hover::before { height: 100%; }

.planet-icon {
  font-size: 2.5rem;
  margin-bottom: var(--sp-3);
  line-height: 1;
}

.planet-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-white);
  margin-bottom: var(--sp-2);
}

.planet-stat {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-muted);
  line-height: 1.4;
}

.planet-stat strong {
  color: var(--color-highlight);
  display: block;
  font-size: var(--text-2xl);
  font-family: var(--font-display);
  font-weight: 800;
}

/* =============================================
   ABOUT / INTRO STRIP
   ============================================= */
.about-strip {
  background: var(--color-panel);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.about-strip .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}

.about-image {
  position: relative;
  min-height: 400px;
  overflow: hidden;
}

.about-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.about-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 60%, var(--color-panel));
}

.about-text {
  padding: var(--sp-16) var(--sp-12);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-text p {
  color: var(--color-muted);
  font-size: var(--text-lg);
  line-height: 1.7;
  margin-bottom: var(--sp-6);
}

/* =============================================
   DATA TICKER / LIVE WIDGET
   ============================================= */
.live-widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--radius);
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.live-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse 1.5s ease-in-out infinite;
}

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

.live-label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-white);
}

.live-value {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-highlight);
  margin-top: var(--sp-1);
}

/* =============================================
   TICKER / MARQUEE (scrolling roles)
   ============================================= */
.ticker-section {
  background: var(--color-accent);
  overflow: hidden;
  padding: var(--sp-4) 0;
  border-top: 1px solid rgba(255,255,255,0.15);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.ticker-track {
  display: flex;
  gap: var(--sp-8);
  animation: ticker 30s linear infinite;
  width: max-content;
}

.ticker-item {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: var(--sp-8);
}

.ticker-item::after {
  content: '✦';
  font-size: 0.5em;
  color: rgba(255,255,255,0.5);
}

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

/* =============================================
   FOOTER
   ============================================= */
#site-footer {
  background: var(--color-deep);
  border-top: 1px solid var(--color-border);
  padding-top: var(--sp-16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}

.footer-brand p {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
  margin-top: var(--sp-4);
  max-width: 320px;
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--color-border);
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer-menu a {
  color: var(--color-muted);
  font-size: var(--text-sm);
  transition: color var(--dur) var(--ease);
}

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

.footer-social {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}

.social-link {
  width: 36px; height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 700;
  font-family: var(--font-display);
  transition: all var(--dur) var(--ease);
}

.social-link:hover {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: var(--sp-6) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
}

.footer-legal {
  font-size: var(--text-xs);
  color: var(--color-muted);
  font-family: var(--font-mono);
}

.footer-legal-links {
  display: flex;
  gap: var(--sp-4);
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-legal-links a {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

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

/* =============================================
   WORDPRESS CORE ELEMENTS
   ============================================= */
.wp-block-image, .alignleft, .alignright, .aligncenter { margin: var(--sp-6) 0; }
.alignleft { float: left; margin-right: var(--sp-6); }
.alignright { float: right; margin-left: var(--sp-6); }
.aligncenter { text-align: center; }

.entry-content h2 { font-size: var(--text-3xl); margin: var(--sp-8) 0 var(--sp-4); }
.entry-content h3 { font-size: var(--text-2xl); margin: var(--sp-6) 0 var(--sp-3); }
.entry-content p  { margin-bottom: var(--sp-4); color: var(--color-muted); }
.entry-content a  { color: var(--color-highlight); }
.entry-content ul, .entry-content ol { margin-bottom: var(--sp-4); color: var(--color-muted); }

.wp-caption-text {
  font-size: var(--text-xs);
  color: var(--color-muted);
  text-align: center;
  margin-top: var(--sp-2);
  font-family: var(--font-mono);
}

/* Pagination */
.pagination { display: flex; gap: var(--sp-2); justify-content: center; margin: var(--sp-12) 0; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: all var(--dur) var(--ease);
  border-radius: var(--radius);
}
.pagination a:hover, .pagination .current {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
}

/* Comments */
.comments-area {
  max-width: var(--max-w-prose);
  margin: 0 auto;
  padding: var(--sp-16) var(--sp-6);
}

.comment-respond .comment-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

input, textarea, select {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color var(--dur) var(--ease);
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--color-highlight);
}

/* =============================================
   SINGLE POST / PAGE LAYOUT
   ============================================= */
.single-hero {
  padding-top: calc(var(--header-h) + var(--sp-12));
  padding-bottom: var(--sp-12);
  background: var(--color-deep);
  border-bottom: 1px solid var(--color-border);
}

.single-hero .post-category {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--sp-4);
}

.single-hero h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  max-width: 900px;
  margin-bottom: var(--sp-4);
}

.single-hero .post-meta {
  display: flex;
  gap: var(--sp-6);
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-family: var(--font-mono);
}

.single-content {
  max-width: var(--max-w-prose);
  margin: 0 auto;
  padding: var(--sp-16) var(--sp-6);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .missions-planet-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .stats-bar .container { grid-template-columns: repeat(2, 1fr); }
  .stat-item { border-right: none; border-bottom: 1px solid var(--color-border); }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--color-border); }
  .stat-item:last-child, .stat-item:nth-last-child(2):nth-child(odd) { border-bottom: none; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .menu-toggle { display: block; }

  #primary-navigation {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--color-deep);
    border-bottom: 1px solid var(--color-border);
    padding: var(--sp-4);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
    flex-direction: column;
    align-items: flex-start;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  #primary-navigation.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-menu { flex-direction: column; width: 100%; gap: 0; }
  .nav-menu > li > a { padding: var(--sp-3) var(--sp-2); }
  .nav-menu > li > a::after { display: none; }
  .nav-menu .sub-menu {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    border: none;
    border-top: none;
    background: var(--color-surface);
    padding-left: var(--sp-4);
    margin-top: 0;
  }

  .news-grid { grid-template-columns: 1fr; }
  .news-card--featured { grid-column: span 1; grid-row: span 1; }
  .missions-planet-grid { grid-template-columns: repeat(2, 1fr); }
  .about-strip .container { grid-template-columns: 1fr; }
  .about-image { min-height: 280px; }
  .about-text { padding: var(--sp-8) var(--sp-4); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .footer-bottom { flex-direction: column; text-align: center; }
  .stats-bar .container { grid-template-columns: 1fr 1fr; }

  .hero-title { font-size: clamp(2.5rem, 10vw, 5rem); }
  .hero-subtitle-list li { font-size: var(--text-base); }
  .section-title { font-size: var(--text-3xl); }

  .section-header--split { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { padding-left: var(--sp-4); padding-right: var(--sp-4); }
  .missions-planet-grid { grid-template-columns: 1fr; }
  .stats-bar .container { grid-template-columns: 1fr; }
  .stat-item { border-right: none; }
  .stat-item:nth-child(odd) { border-right: none; }
}

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