/* ══════════════════════════════════════════════════════════════
   Sentinel8004 — Shared Design System
   ══════════════════════════════════════════════════════════════ */

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

/* ── Tokens ── */
:root {
  /* Backgrounds */
  --bg-base: #0c0f0e;
  --bg-surface: #141916;
  --bg-elevated: #1c211e;
  --bg-hover: #242a26;

  /* Text */
  --text-primary: #eef1ef;
  --text-secondary: #a3a8a5;
  --text-muted: #6b706d;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;

  /* Accent — Celo green */
  --celo: #35D07F;
  --celo-bright: #3BE8A0;
  --celo-dim: rgba(53, 208, 127, 0.15);
  --celo-glow: rgba(53, 208, 127, 0.10);

  /* Semantic */
  --red: #ef4444;
  --red-dim: rgba(239, 68, 68, 0.12);
  --yellow: #f59e0b;
  --yellow-dim: rgba(245, 158, 11, 0.12);
  --blue: #6B8AFF;
  --blue-dim: rgba(107, 138, 255, 0.10);

  /* Border */
  --border: rgba(238, 241, 239, 0.07);
  --border-hover: rgba(238, 241, 239, 0.15);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.10);

  /* Typography */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Layout */
  --max-width: 1080px;
  --nav-height: 56px;
}

/* ── Base ── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Noise Overlay (disabled for clean look) ── */
body::after {
  display: none;
}

/* ── Skip Link ── */
.skip-link {
  position: absolute;
  left: var(--space-4);
  background: var(--celo);
  color: var(--bg-base);
  padding: 8px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  z-index: 200;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
  width: 1px;
  height: 1px;
}
.skip-link:focus {
  clip: auto;
  clip-path: none;
  overflow: visible;
  width: auto;
  height: auto;
  top: 0;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-8);
  z-index: 100;
  background: rgba(12, 15, 14, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-left {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.nav-wordmark {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  gap: var(--space-1);
}
.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  transition: color var(--duration-fast) ease, background var(--duration-fast) ease;
}
.nav-link:hover {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
}
.nav-link:focus-visible {
  outline: 2px solid var(--celo);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.nav-link.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.nav-meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-muted);
}
.nav-cta {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--celo);
  background: transparent;
  padding: 8px 16px;
  border: 1px solid rgba(53, 208, 127, 0.2);
  border-radius: 6px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease;
}
.nav-cta:hover {
  background: rgba(53, 208, 127, 0.06);
  border-color: rgba(53, 208, 127, 0.35);
}
.nav-cta:focus-visible {
  outline: 2px solid var(--celo);
  outline-offset: 2px;
}

/* ── Mobile Nav Toggle (#34) ── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-secondary);
  line-height: 0;
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle:focus-visible {
  outline: 2px solid var(--celo);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(12, 15, 14, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: var(--space-2) var(--space-4);
    z-index: 99;
  }
  .nav-links.open {
    display: flex;
  }
  .nav-link {
    padding: 12px 14px;
    font-size: 14px;
  }
}

/* ── Layout ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-8);
}
.page-top { padding-top: calc(var(--nav-height) + var(--space-16)); }

/* ── Section Atmospheres ── */
.section {
  position: relative;
  padding: var(--space-24) 0;
  overflow: hidden;
}
.section-hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 0;
}

/* ── Section Divider Glow ── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--celo) 50%, transparent 100%);
  opacity: 0.15;
  margin: 0 auto;
  max-width: 600px;
}

/* ── Typography ── */
.mono { font-family: var(--mono); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-celo { color: var(--celo); }
.text-red { color: var(--red); }
.text-yellow { color: var(--yellow); }

.heading-xl {
  font-family: var(--mono);
  font-size: clamp(64px, 12vw, 120px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}
.heading-lg {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.heading-md {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.heading-sm {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.heading-base {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.label {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--text-muted);
}
.body-lg {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.6;
  color: var(--text-secondary);
}
.body-sm {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }
.reveal-d4 { transition-delay: 0.32s; }
.reveal-d5 { transition-delay: 0.40s; }

/* ── Glass Card ── */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: var(--space-6);
  transition: border-color var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
}
.glass-card:hover {
  border-color: rgba(255,255,255,0.14);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.05);
}

/* ── Surface Card ── */
.surface-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-6);
  transition: border-color var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
}
.surface-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

/* ── Glow Accent ── */
.glow-green {
  box-shadow: 0 0 40px rgba(53, 208, 127, 0.08), 0 0 80px rgba(53, 208, 127, 0.04);
}
.glow-line {
  position: relative;
}
.glow-line::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--celo), transparent);
  opacity: 0.3;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 14px;
  font-weight: 500;
  color: var(--bg-base);
  background: var(--celo);
  padding: 10px 24px;
  border-radius: 10px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity var(--duration-fast) ease, transform var(--duration-fast) ease;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:focus-visible {
  outline: 2px solid var(--celo);
  outline-offset: 3px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 8px 20px;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color var(--duration-fast) ease, color var(--duration-fast) ease;
}
.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}
.btn-ghost:focus-visible {
  outline: 2px solid var(--celo);
  outline-offset: 2px;
}

/* ── Divider ── */
.divider {
  width: 48px;
  height: 1px;
  background: var(--border);
  margin: var(--space-6) 0;
}
.divider-center { margin-left: auto; margin-right: auto; }

/* ── Score Colors ── */
.score-high { color: var(--celo); }
.score-mid { color: var(--yellow); }
.score-low { color: var(--red); }
.bar-high { background: var(--celo); }
.bar-mid { background: var(--yellow); }
.bar-low { background: var(--red); }

/* ── Confidence Dot ── */
.conf-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  vertical-align: middle;
}


/* ── Progress Bar ── */
.progress-track {
  width: 100%;
  height: 5px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--celo);
  border-radius: 3px;
  transition: width 1.2s var(--ease-out);
}


/* ── Footer ── */
.site-footer {
  padding: var(--space-12) 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-left {
  font-size: 13px;
  color: var(--text-muted);
}
.footer-links {
  display: flex;
  gap: var(--space-6);
}
.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}
.footer-links a:hover { color: var(--text-secondary); }
.footer-links a:focus-visible {
  outline: 2px solid var(--celo);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ── Shimmer Skeleton ── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-elevated) 50%, var(--bg-surface) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}
.skeleton-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 11px var(--space-4);
  border-bottom: 1px solid var(--border);
}
.skeleton-cell {
  height: 14px;
}
.skeleton-cell-sm { width: 40px; }
.skeleton-cell-md { width: 120px; }
.skeleton-cell-lg { flex: 1; max-width: 200px; }

/* ── Utility ── */
.relative { position: relative; }
.z-1 { z-index: 1; }
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-3 { margin-top: var(--space-3); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }

/* ── Responsive ── */
@media (max-width: 768px) {
  :root { --nav-height: 56px; }
  .nav { padding: 0 var(--space-4); }
  .container { padding: 0 var(--space-4); }
  .section { padding: var(--space-16) 0; }
  .footer-inner { flex-direction: column; gap: var(--space-4); text-align: center; }
}
@media (max-width: 480px) {
  .heading-xl { font-size: 48px; }
  .nav-meta { display: none; }
}
