/* ============================================
   Open Data Cube v2 — Clean Government + OSS
   ============================================ */

:root {
  --navy: #0B2545;
  --navy-light: #134074;
  --blue: #13678A;
  --teal: #1E8A7E;
  --sky: #45C4B0;
  --white: #FFFFFF;
  --off-white: #F7F9FC;
  --gray-50: #F0F4F8;
  --gray-100: #E2E8F0;
  --gray-200: #CBD5E1;
  --gray-300: #94A3B8;
  --gray-500: #64748B;
  --gray-700: #334155;
  --gray-900: #0F172A;
  --accent: #13678A;
  --accent-light: rgba(19, 103, 138, 0.08);
  --success: #059669;
  --border: #E2E8F0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --transition: all 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--white);
  color: var(--gray-700);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--navy-light); }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4, h5, h6 { color: var(--navy); font-weight: 700; line-height: 1.3; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.625rem, 3vw, 2.25rem); letter-spacing: -0.01em; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
p { font-size: 1.0625rem; color: var(--gray-500); }

/* Utility */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.text-navy { color: var(--navy); }
.bg-off-white { background: var(--off-white); }
.bg-navy { background: var(--navy); color: var(--white); }
.bg-navy h2, .bg-navy h3, .bg-navy h4 { color: var(--white); }
.bg-navy p { color: rgba(255,255,255,0.7); }
.bg-navy .section-label { background: rgba(255,255,255,0.1); color: var(--sky); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; font-size: 0.9375rem; font-weight: 600;
  font-family: var(--font); border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer;
  transition: var(--transition); text-decoration: none;
}
.btn-primary {
  background: var(--navy); color: var(--white); border-color: var(--navy);
}
.btn-primary:hover {
  background: var(--navy-light); border-color: var(--navy-light); color: var(--white);
  transform: translateY(-1px); box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent; color: var(--navy); border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--navy); background: var(--accent-light);
}
.btn-white {
  background: var(--white); color: var(--navy); border-color: var(--white);
}
.btn-white:hover { background: var(--gray-50); transform: translateY(-1px); }

/* Top Banner */
.top-banner {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  font-size: 0.8125rem;
  padding: 8px 0;
  text-align: center;
}
.top-banner a { color: var(--sky); font-weight: 600; }
.top-banner a:hover { color: #fff; }

/* Navbar */
.navbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  padding: 0;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1140px; margin: 0 auto; padding: 0 24px; height: 64px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.125rem; font-weight: 700; color: var(--navy);
}
.nav-logo:hover { color: var(--navy); }
.nav-logo svg { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--gray-500); font-size: 0.875rem; font-weight: 500;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--navy); }
.nav-links a.active { color: var(--navy); border-bottom-color: var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-github {
  display: flex; align-items: center; gap: 6px;
  color: var(--gray-500); font-size: 0.8125rem; font-weight: 600;
  padding: 6px 14px; border: 1px solid var(--border); border-radius: var(--radius);
}
.nav-github:hover { border-color: var(--gray-300); color: var(--navy); }
.nav-github svg { width: 18px; height: 18px; }
.mobile-toggle {
  display: none; background: none; border: none; color: var(--navy); cursor: pointer; padding: 8px;
}
.mobile-toggle svg { width: 24px; height: 24px; }
.mobile-nav {
  display: none; position: fixed; inset: 0; background: var(--white); z-index: 999;
  flex-direction: column; align-items: center; justify-content: center; gap: 24px;
}
.mobile-nav.active { display: flex; }
.mobile-nav a { font-size: 1.25rem; font-weight: 600; color: var(--navy); }
.mobile-close {
  position: absolute; top: 16px; right: 24px; background: none; border: none; cursor: pointer; color: var(--navy);
}

/* Hero */
.hero {
  position: relative; overflow: hidden;
  padding: 80px 0 60px;
}
.hero-image-bg {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, var(--blue) 100%);
}
.hero-image-bg img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.15; mix-blend-mode: luminosity;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.hero-content { color: var(--white); }
.hero-content h1 { color: var(--white); margin-bottom: 20px; font-size: clamp(2rem, 4vw, 3rem); }
.hero-content p { color: rgba(255,255,255,0.8); font-size: 1.125rem; margin-bottom: 32px; max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  display: flex; gap: 32px; margin-top: 48px; padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero-meta-item strong { display: block; font-size: 1.5rem; color: var(--white); }
.hero-meta-item span { font-size: 0.8125rem; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 0.05em; }
.hero-visual {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg); overflow: hidden;
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-sat-placeholder {
  aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, rgba(19,103,138,0.3), rgba(11,37,69,0.5));
  color: rgba(255,255,255,0.3); font-size: 0.875rem; text-align: center; padding: 40px;
}

/* Sections */
section { padding: 80px 0; }
.section-header { max-width: 640px; margin-bottom: 48px; }
.section-header.centered { text-align: center; margin-left: auto; margin-right: auto; }
.section-header p { margin-top: 12px; }

/* Feature cards */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px 28px; transition: var(--transition);
}
.feature-card:hover { box-shadow: var(--shadow-lg); border-color: var(--gray-200); transform: translateY(-2px); }
.feature-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  background: var(--accent-light); display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; color: var(--accent);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h4 { margin-bottom: 8px; }
.feature-card p { font-size: 0.9375rem; }

/* Satellite imagery showcase */
.sat-showcase {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.sat-card {
  border-radius: var(--radius-lg); overflow: hidden; position: relative;
  aspect-ratio: 1; background: var(--gray-100);
}
.sat-card img { width: 100%; height: 100%; object-fit: cover; }
.sat-card-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(11,37,69,0.85));
  padding: 16px; color: var(--white);
}
.sat-card-overlay h4 { color: var(--white); font-size: 0.875rem; margin-bottom: 2px; }
.sat-card-overlay p { color: rgba(255,255,255,0.7); font-size: 0.75rem; }

/* Stats band */
.stats-band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 48px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stat-item strong { display: block; font-size: 2rem; color: var(--navy); font-weight: 800; }
.stat-item span { font-size: 0.875rem; color: var(--gray-500); }

/* Code block */
.code-section-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.code-block {
  background: var(--gray-900); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.code-header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.08);
}
.code-dot { width: 10px; height: 10px; border-radius: 50%; }
.code-dot:nth-child(1) { background: #ff5f57; }
.code-dot:nth-child(2) { background: #ffbd2e; }
.code-dot:nth-child(3) { background: #28ca42; }
.code-header span { margin-left: 10px; font-size: 0.75rem; color: rgba(255,255,255,0.4); font-family: var(--font-mono); }
.code-body {
  padding: 20px; font-family: var(--font-mono); font-size: 0.8125rem; line-height: 1.9;
  color: #E2E8F0; overflow-x: auto;
}
.code-body .kw { color: #C792EA; }
.code-body .str { color: #C3E88D; }
.code-body .fn { color: #82AAFF; }
.code-body .cm { color: #546E7A; font-style: italic; }
.code-body .num { color: #F78C6C; }

/* Two-col content */
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.content-grid ul { list-style: none; margin-top: 16px; }
.content-grid ul li {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 12px; font-size: 1rem; color: var(--gray-700);
}
.content-grid ul li svg { width: 20px; height: 20px; color: var(--success); flex-shrink: 0; margin-top: 2px; }

/* Use case cards */
.use-cases-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.use-case-card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; transition: var(--transition);
}
.use-case-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.use-case-img {
  height: 180px; background: var(--gray-100);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.use-case-img img { width: 100%; height: 100%; object-fit: cover; }
.use-case-body { padding: 24px; }
.use-case-body h4 { margin-bottom: 8px; }
.use-case-body p { font-size: 0.9375rem; }

/* CTA */
.cta-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: 80px 0; text-align: center; color: var(--white); position: relative; overflow: hidden;
}
.cta-section::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.cta-section .container { position: relative; z-index: 1; }
.cta-section h2 { color: var(--white); margin-bottom: 12px; }
.cta-section p { color: rgba(255,255,255,0.8); max-width: 560px; margin: 0 auto 32px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.footer {
  background: var(--navy); color: rgba(255,255,255,0.6); padding: 64px 0 32px;
  border-top: 4px solid var(--accent);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand .nav-logo { margin-bottom: 12px; }
.footer-brand .nav-logo span { color: var(--white); }
.footer-brand p { font-size: 0.875rem; max-width: 280px; }
.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.5); transition: var(--transition);
}
.footer-social a:hover { border-color: var(--sky); color: var(--sky); }
.footer-social a svg { width: 16px; height: 16px; }
.footer-col h5 {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4); margin-bottom: 16px; font-weight: 600;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a { color: rgba(255,255,255,0.6); font-size: 0.875rem; }
.footer-col ul a:hover { color: var(--white); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8125rem;
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--white); }

/* Animations */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* Page header (subpages) */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 120px 0 60px; position: relative; overflow: hidden;
}
.page-header::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-header .container { position: relative; z-index: 1; }
.page-header h1 { color: var(--white); margin-bottom: 12px; }
.page-header p { color: rgba(255,255,255,0.7); max-width: 560px; }
.page-header .section-label { background: rgba(255,255,255,0.1); color: var(--sky); }

/* Timeline */
.timeline { position: relative; padding-left: 32px; }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--border); border-radius: 2px; }
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item::before {
  content: ''; position: absolute; left: -38px; top: 4px;
  width: 14px; height: 14px; border-radius: 50%; background: var(--accent);
  border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--accent);
}
.timeline-item .year { font-size: 0.8125rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.timeline-item h4 { margin: 4px 0 8px; }
.timeline-item p { font-size: 0.9375rem; }

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .use-cases-grid { grid-template-columns: 1fr; }
  .code-section-grid { grid-template-columns: 1fr; }
  .content-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .sat-showcase { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav-links, .nav-github { display: none; }
  .mobile-toggle { display: block; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  section { padding: 60px 0; }
  .hero { padding: 60px 0 48px; }
  .hero-meta { flex-wrap: wrap; gap: 20px; }
  .sat-showcase { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
