/* KPsphere — AI Signal Intelligence Website */

:root {
  --primary: #0A1628;
  --primary-dark: #060D18;
  --secondary: #1E3A5F;
  --accent: #00D4AA;
  --accent-dark: #00B892;
  --accent-glow: rgba(0, 212, 170, 0.15);
  --text: #E8ECF1;
  --text-muted: #7B8FA3;
  --card-bg: #0F2035;
  --border: #1A3550;
  --white: #FFFFFF;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--primary-dark);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* NAVBAR */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(6, 13, 24, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.5px;
}

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

.logo-link { display: flex; align-items: center; text-decoration: none; }
.logo-img { height: 36px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 20px; flex-wrap: nowrap; white-space: nowrap; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--accent); }

/* Progressive tightening so 10 items fit across all desktop sizes */
@media (max-width: 1280px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 13px; }
}

@media (max-width: 1100px) {
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 12.5px; }
}

.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.mobile-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: 0.3s; }

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-sm { padding: 8px 20px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 15px; }

.btn-accent {
  background: var(--accent);
  color: var(--primary);
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: var(--accent-glow); }

/* ═══════════════════════════════════════════
   ABOUT SECTION — Cinematic video graphic
   ═══════════════════════════════════════════ */
.about-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(0, 212, 170, 0.15);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.about-video-wrap::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 26px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.6), transparent 40%, rgba(0, 212, 170, 0.4) 80%, transparent);
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: aboutBorderShift 5s linear infinite;
}

@keyframes aboutBorderShift {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 200%; }
}

.about-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.about-video-frame {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, transparent 50%, rgba(6,13,24,0.75) 100%);
  z-index: 1;
  pointer-events: none;
}

/* Floating stat chips overlay */
.about-video-stats {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  z-index: 2;
}

.about-stat {
  flex: 1;
  padding: 14px 18px;
  background: rgba(15, 32, 53, 0.75);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: 14px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s;
}

.about-stat:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.about-stat-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
  font-feature-settings: "tnum";
}

.about-stat-label {
  font-size: 10px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

@media (max-width: 768px) {
  .about-video-wrap { aspect-ratio: 4 / 3; }
  .about-video-stats { bottom: 16px; left: 16px; right: 16px; }
  .about-stat-num { font-size: 22px; }
}

/* ═══════════════════════════════════════════
   LOADING SKELETONS — premium shimmer while content loads
   ═══════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, rgba(26,53,80,0.3) 0%, rgba(26,53,80,0.5) 50%, rgba(26,53,80,0.3) 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}
.skeleton-line {
  height: 14px;
  margin-bottom: 12px;
  background: linear-gradient(90deg, rgba(26,53,80,0.3) 0%, rgba(26,53,80,0.5) 50%, rgba(26,53,80,0.3) 100%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
}
.skeleton-line.title { height: 18px; width: 70%; margin-bottom: 16px; }
.skeleton-line.short { width: 45%; }
.skeleton-line.medium { width: 80%; }
.skeleton-line.long { width: 100%; }
.skeleton-badge {
  display: inline-block;
  height: 20px;
  width: 80px;
  background: rgba(26,53,80,0.5);
  border-radius: 10px;
  margin-bottom: 12px;
  animation: skeletonShimmer 1.4s ease-in-out infinite;
}

/* ═══════════════════════════════════════════
   TABLE OF CONTENTS — floating on report pages
   ═══════════════════════════════════════════ */
.report-toc {
  position: fixed;
  top: 120px;
  right: 24px;
  width: 240px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  z-index: 50;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s, transform 0.4s, width 0.3s, padding 0.3s, background 0.3s;
  pointer-events: none;
}
.report-toc.visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
}
.report-toc h5 {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 0;
  font-weight: 700;
}
.toc-toggle {
  background: var(--primary);
  border: 1px solid var(--border);
  color: var(--accent);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  font-weight: 700;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  flex-shrink: 0;
}
.toc-toggle:hover {
  background: var(--accent);
  color: var(--primary);
  border-color: var(--accent);
}
.toc-links {
  transition: max-height 0.3s, opacity 0.3s;
}

/* COLLAPSED state — minimal tab on the right edge */
.report-toc.collapsed {
  width: auto;
  padding: 8px 12px;
  cursor: pointer;
}
.report-toc.collapsed .toc-links {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.report-toc.collapsed .toc-header {
  margin-bottom: 0;
}
.report-toc.collapsed h5 {
  font-size: 10px;
  color: var(--text-muted);
}
.report-toc.collapsed:hover {
  border-color: var(--accent);
}
.report-toc.collapsed:hover h5 {
  color: var(--accent);
}
.report-toc a {
  display: block;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -10px;
  transition: all 0.2s;
  line-height: 1.4;
}
.report-toc a:hover {
  color: var(--accent);
  background: rgba(0, 212, 170, 0.05);
}
.report-toc a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(0, 212, 170, 0.08);
}
.report-toc a.sub { padding-left: 24px; font-size: 12px; }

@media (max-width: 1280px) { .report-toc { display: none; } }

/* ═══════════════════════════════════════════
   COPY LINK BUTTON
   ═══════════════════════════════════════════ */
.copy-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.copy-link-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 212, 170, 0.05);
}
.copy-link-btn.copied {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(0, 212, 170, 0.12);
}

/* ═══════════════════════════════════════════
   SCROLL-TO-TOP FLOATING BUTTON
   ═══════════════════════════════════════════ */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 212, 170, 0.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, box-shadow 0.3s;
}
.scroll-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  box-shadow: 0 12px 32px rgba(0, 212, 170, 0.6);
  transform: translateY(-4px);
}

/* ═══════════════════════════════════════════
   QUICK SEARCH ⌘K — Command palette overlay
   ═══════════════════════════════════════════ */
.quick-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(6, 13, 24, 0.85);
  backdrop-filter: blur(12px);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 0;
  transition: opacity 0.2s;
}
.quick-search-overlay.active {
  display: flex;
  opacity: 1;
}
.quick-search-modal {
  width: 100%;
  max-width: 640px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 212, 170, 0.2);
  overflow: hidden;
  animation: qsSlideIn 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
@keyframes qsSlideIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.quick-search-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.quick-search-header svg { color: var(--accent); flex-shrink: 0; }
.quick-search-header input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-size: 16px;
  font-family: inherit;
}
.quick-search-header input::placeholder { color: var(--text-muted); }
.quick-search-close {
  background: var(--primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10px;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
}
.quick-search-results {
  max-height: 480px;
  overflow-y: auto;
}
.qs-result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  border-bottom: 1px solid rgba(26, 53, 80, 0.3);
}
.qs-result:hover, .qs-result.selected {
  background: rgba(0, 212, 170, 0.08);
}
.qs-icon { font-size: 20px; flex-shrink: 0; }
.qs-content { flex: 1; min-width: 0; }
.qs-title {
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qs-meta {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.qs-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
}
.quick-search-footer {
  display: flex;
  gap: 20px;
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}
.quick-search-footer kbd {
  background: var(--primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-family: inherit;
  font-size: 10px;
  margin-right: 4px;
}

/* Search button in navbar — visible trigger for non-power-users */
.nav-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(15, 32, 53, 0.6);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  font-family: inherit;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.nav-search-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(0, 212, 170, 0.08);
}
.nav-search-btn svg { flex-shrink: 0; }
.nav-search-btn kbd {
  background: var(--primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 10px;
  font-family: inherit;
  color: var(--text-muted);
}
.nav-search-btn:hover kbd { border-color: var(--accent); color: var(--accent); }

@media (max-width: 1100px) {
  .nav-search-label { display: none; }
  .nav-search-btn kbd { display: none; }
  .nav-search-btn { padding: 7px 10px; }
}

/* Search trigger hint in nav (visual only) */
.nav-search-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(15, 32, 53, 0.6);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}
.nav-search-hint:hover { border-color: var(--accent); color: var(--accent); }
.nav-search-hint kbd {
  background: var(--primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
  font-family: inherit;
}

/* ═══════════════════════════════════════════
   READING PROGRESS BAR — appears on report pages
   ═══════════════════════════════════════════ */
.reading-progress {
  position: fixed;
  top: 72px;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent), #00AAFF);
  z-index: 99;
  box-shadow: 0 0 12px rgba(0, 212, 170, 0.6);
  transition: width 0.1s ease-out;
}

/* ═══════════════════════════════════════════
   TRUST BADGE ROW
   ═══════════════════════════════════════════ */
.trust-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15,32,53,0.3) 0%, rgba(10,22,40,0.3) 100%);
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 12px;
}
.trust-badge::before {
  content: '•';
  color: var(--accent);
  font-size: 20px;
  line-height: 0;
}
.trust-badge strong {
  color: var(--white);
  font-weight: 700;
}

/* ═══════════════════════════════════════════
   RELATED REPORTS (smart recommendations section)
   ═══════════════════════════════════════════ */
.smart-recs-title {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
  font-weight: 700;
}

/* ═══════════════════════════════════════════
   NEWSLETTER PREVIEW MODAL
   ═══════════════════════════════════════════ */
.preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(6, 13, 24, 0.85);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  opacity: 0;
  transition: opacity 0.2s;
}
.preview-overlay.active { display: flex; opacity: 1; }
.preview-modal {
  width: 100%;
  max-width: 760px;
  max-height: 85vh;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: qsSlideIn 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
}
.preview-header h3 {
  color: var(--white);
  font-size: 18px;
  margin: 0;
}
.preview-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}
.preview-close:hover { color: var(--accent); }
.preview-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  color: var(--text);
}
.preview-body iframe, .preview-body img { max-width: 100%; border-radius: 8px; }
.preview-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Preview button */
.preview-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(0, 212, 170, 0.4);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  text-decoration: none;
  margin-top: 12px;
}
.preview-btn:hover {
  background: rgba(0, 212, 170, 0.08);
  border-color: var(--accent);
}

/* ═══════════════════════════════════════════
   STATS PAGE — Compact stats + side-by-side charts + timeline-as-hero
   ═══════════════════════════════════════════ */

/* Smaller hero when stats page IS the timeline page */
.page-hero-compact {
  padding: 100px 0 30px !important;
}
.page-hero-compact h1 {
  font-size: clamp(28px, 4vw, 42px) !important;
  margin: 12px 0 10px !important;
}
.page-hero-compact .page-hero-sub {
  font-size: 15px !important;
  margin-bottom: 0 !important;
}

/* Compact stats strip — single row at the top */
.stats-strip-section {
  padding: 20px 0;
  background: linear-gradient(180deg, rgba(10,22,40,0.3), rgba(6,13,24,0.3));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto;
}
.stat-mini {
  padding: 14px 8px;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.3s, transform 0.3s;
}
.stat-mini:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.stat-mini-hl {
  background: linear-gradient(135deg, rgba(0,212,170,0.15), rgba(15,32,53,0.9));
  border-color: rgba(0, 212, 170, 0.4);
}
.sm-icon {
  font-size: 18px;
  line-height: 1;
  margin-bottom: 6px;
}
.sm-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
  font-feature-settings: "tnum";
}
.stat-mini-hl .sm-value {
  background: linear-gradient(135deg, var(--accent), #fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sm-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Side-by-side charts */
.stats-charts-section {
  background: var(--primary-dark);
}
.stats-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}
.stats-chart-card {
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.chart-header {
  margin-bottom: 20px;
}
.chart-header h3 {
  color: var(--white);
  font-size: 18px;
  margin: 8px 0 0;
  font-weight: 700;
}
.stats-chart-card .sector-bars {
  max-width: 100%;
  gap: 10px;
}
.stats-chart-card .sector-bar-row {
  grid-template-columns: 120px 1fr 32px;
  gap: 10px;
}
.stats-chart-card .sector-bar-label {
  font-size: 12px;
}
.stats-chart-card .sector-bar-track {
  height: 22px;
}
.stats-chart-card .sector-bar-count {
  font-size: 15px;
}
.stats-chart-card .recent-activity-grid {
  height: 200px;
  max-width: 100%;
}
.stats-chart-card .activity-count {
  font-size: 13px;
}
.stats-chart-card .activity-label {
  font-size: 9px;
}

/* Timeline as main attraction */
.timeline-main {
  padding: 50px 0 20px !important;
}
.timeline-main .section-header {
  margin-bottom: 20px;
}
.timeline-main h2 {
  font-size: clamp(28px, 4vw, 40px) !important;
}

/* Mobile layout */
@media (max-width: 900px) {
  .stats-strip { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .stats-charts-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 480px) {
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .sm-value { font-size: 18px; }
  .stats-chart-card { padding: 18px; }
  .stats-chart-card .sector-bar-row { grid-template-columns: 80px 1fr 28px; gap: 8px; }
  .stats-chart-card .sector-bar-label { font-size: 11px; }
}

/* ═══════════════════════════════════════════
   TIMELINE V2 — Compact cards, filters, pagination
   ═══════════════════════════════════════════ */
.timeline-controls-wrap {
  position: sticky;
  top: 72px;
  z-index: 30;
  background: rgba(6,13,24,0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.timeline-controls {
  max-width: 1100px;
  margin: 0 auto;
}
.timeline-stats-row {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 18px;
}
.tl-stat {
  text-align: center;
}
.tl-stat strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  font-feature-settings: "tnum";
}
.tl-stat span {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 4px;
}
.timeline-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.tl-search-input {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  padding: 10px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--white);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.tl-search-input:focus { border-color: var(--accent); }
.tl-search-input::placeholder { color: var(--text-muted); }
.tl-chip-group {
  display: flex;
  gap: 6px;
}
.tl-chip {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.tl-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tl-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--primary);
}
.tl-select {
  padding: 10px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--white);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  outline: none;
}
.tl-select:focus { border-color: var(--accent); }
.tl-view-toggle {
  display: inline-flex;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
}
.tl-view-btn {
  padding: 6px 14px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}
.tl-view-btn.active {
  background: var(--accent);
  color: var(--primary);
}

/* Month/year divider between groups */
.timeline-divider {
  position: relative;
  text-align: center;
  margin: 28px 0 12px;
  grid-column: 1 / -1;
}
.timeline-divider span {
  display: inline-block;
  background: var(--primary-dark);
  padding: 6px 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: 20px;
  position: relative;
  z-index: 2;
}

/* Zigzag view — compact cards */
.timeline-v2 {
  position: relative;
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}
.timeline-v2 .timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--accent) 10%, var(--accent) 90%, transparent);
  transform: translateX(-50%);
  opacity: 0.3;
}
.timeline-item-v2 {
  position: relative;
  width: 50%;
  padding: 10px 32px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(10px);
  animation: timelineItemIn 0.4s ease-out forwards;
}
@keyframes timelineItemIn {
  to { opacity: 1; transform: translateY(0); }
}
.timeline-item-v2:nth-child(odd) { left: 0; padding-right: 40px; }
.timeline-item-v2:nth-child(even) { left: 50%; padding-left: 40px; }
.timeline-item-v2 .timeline-dot {
  position: absolute;
  top: 22px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--primary-dark);
  box-shadow: 0 0 16px rgba(0, 212, 170, 0.6);
}
.timeline-item-v2:nth-child(odd) .timeline-dot { right: -6px; }
.timeline-item-v2:nth-child(even) .timeline-dot { left: -6px; }

.timeline-card-v2 {
  display: block;
  padding: 14px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.timeline-card-v2:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 212, 170, 0.15);
}
.tl-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}
.tl-card-type {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 10px;
  border: 1px solid;
}
.tl-card-date {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.timeline-card-v2 h4 {
  font-size: 13px;
  color: var(--white);
  margin: 0 0 6px;
  line-height: 1.35;
  font-weight: 600;
}
.tl-card-cat {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* COMPACT LIST VIEW */
.timeline-list {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
}
.timeline-list .timeline-line { display: none; }
.timeline-list-row {
  display: grid;
  grid-template-columns: 70px 24px 1fr auto 20px;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  margin-bottom: 4px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  animation: timelineItemIn 0.3s ease-out forwards;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}
.timeline-list-row:hover {
  border-color: var(--accent);
  transform: translateX(4px);
  background: rgba(0, 212, 170, 0.03);
}
.tl-row-date {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.tl-row-type {
  font-size: 16px;
}
.tl-row-title {
  font-size: 13px;
  color: var(--white);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-row-cat {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-row-arrow {
  color: var(--accent);
  font-size: 14px;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
}
.timeline-list-row:hover .tl-row-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* Mobile timeline optimizations */
@media (max-width: 768px) {
  .timeline-controls-wrap {
    position: relative;
    top: 0;
    padding: 16px 0;
  }
  .timeline-stats-row { gap: 14px; margin-bottom: 14px; }
  .tl-stat strong { font-size: 18px; }
  .timeline-filter-bar { justify-content: flex-start; }
  .tl-search-input { min-width: 100%; max-width: 100%; }
  .tl-chip-group { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .tl-chip { font-size: 11px; padding: 6px 10px; }
  .tl-view-toggle, .tl-select { flex: 1; }

  /* Zigzag becomes left-aligned single column on mobile */
  .timeline-v2 { margin: 20px auto; }
  .timeline-v2 .timeline-line { left: 14px; }
  .timeline-item-v2 {
    width: 100% !important;
    left: 0 !important;
    padding: 8px 0 8px 36px !important;
  }
  .timeline-item-v2 .timeline-dot {
    left: 8px !important;
    right: auto !important;
  }
  .timeline-list-row {
    grid-template-columns: 60px 20px 1fr 16px;
  }
  .tl-row-cat { display: none; }
}

/* ═══════════════════════════════════════════
   TIMELINE PAGE (legacy — kept for back-compat)
   ═══════════════════════════════════════════ */
.timeline-container {
  position: relative;
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;
}
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--accent), transparent);
  transform: translateX(-50%);
}
.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  box-sizing: border-box;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}
.timeline-item.visible { opacity: 1; transform: translateY(0); }
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-dot {
  position: absolute;
  top: 28px;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  border: 3px solid var(--primary);
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.6);
}
.timeline-item:nth-child(odd) .timeline-dot { right: -7px; }
.timeline-item:nth-child(even) .timeline-dot { left: -7px; }
.timeline-card {
  display: block;
  padding: 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s, border-color 0.3s;
}
.timeline-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.timeline-date {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  font-weight: 700;
}
.timeline-card h4 {
  font-size: 15px;
  color: var(--white);
  margin: 0 0 6px;
  line-height: 1.4;
}
.timeline-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

@media (max-width: 768px) {
  .timeline-line { left: 20px; }
  .timeline-item { width: 100%; left: 0 !important; padding-left: 50px; text-align: left !important; }
  .timeline-item .timeline-dot { left: 13px !important; right: auto !important; }
}

/* ═══════════════════════════════════════════
   SECTION CTA — Instructional prompt under headings
   ═══════════════════════════════════════════ */
.section-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px !important;
  padding: 10px 22px;
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.25);
  border-radius: 30px;
  font-size: 14px !important;
  color: var(--text) !important;
  max-width: fit-content;
  transition: transform 0.3s, background 0.3s;
}

.section-cta strong {
  color: var(--accent);
  font-weight: 700;
}

.section-cta .cta-arrow {
  display: inline-block;
  animation: ctaArrowBounce 2s ease-in-out infinite;
}

@keyframes ctaArrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ═══════════════════════════════════════════
   SECTION VIDEO BACKGROUNDS (reusable)
   ═══════════════════════════════════════════ */
.section-video-bg {
  position: relative;
  overflow: hidden;
}

.section-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
}

.section-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,13,24,0.35) 0%, rgba(6,13,24,0.7) 100%);
  z-index: 1;
  pointer-events: none;
}

.section-video-bg > .container {
  position: relative;
  z-index: 2;
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  .section-bg-video, .bento-bg-video, .hero-video {
    display: none;
  }
}

/* ═══════════════════════════════════════════
   UNIFIED MOBILE OPTIMIZATIONS — performance + layout fixes
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Performance: hide all heavy background videos + canvas animations */
  .bento-bg-video,
  .section-bg-video,
  .hero-video,
  .category-bg-video,
  .about-video,
  .footer-constellation {
    display: none !important;
  }

  /* Premium gradient backgrounds replace the videos */
  .section-video-bg { background: linear-gradient(180deg, rgba(15,32,53,0.6), rgba(10,22,40,0.4)); }
  .bento-has-video { background: linear-gradient(135deg, rgba(15,32,53,0.9), rgba(10,22,40,0.9)) !important; }
  .about-video-wrap { background: linear-gradient(135deg, var(--primary), var(--secondary)); }

  /* Disable heavy animations for smooth scrolling */
  .hero-particles, .orbital-pulse, .hero-bg { animation: none !important; }
  .hero-bg { opacity: 0.5; }

  /* Hero section — more compact on mobile */
  .hero { min-height: auto; padding: 100px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
  .hero-left { margin: 0 auto; max-width: 100%; }
  .hero-headline { font-size: 32px; line-height: 1.15; letter-spacing: -1px; }
  .hero-sub { font-size: 14px; margin: 0 auto 24px; }
  .hero-actions { flex-direction: column; gap: 10px; align-items: center; margin-bottom: 32px; }
  .hero-actions .btn { width: 100%; max-width: 280px; justify-content: center; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 12px; padding-top: 24px; }
  .hero-stats .stat-number { font-size: 20px; }
  .hero-stats .stat-label { font-size: 9px; letter-spacing: 0.5px; }

  /* Orbital view — smaller and contained on mobile */
  .hero-right { height: 340px; margin-top: 20px; }
  .orbital-container { transform: scale(0.55); }
  .orbital-core { width: 100px; height: 100px; }

  /* Scroll hint hidden on mobile */
  .scroll-hint { display: none !important; }

  /* Trust badges wrap cleanly */
  .trust-row { gap: 8px; padding: 14px 10px; }
  .trust-badge { font-size: 10px; padding: 3px 8px; }
  .trust-badge strong { font-size: 11px; }

  /* Commercial section — stack properly */
  .commercial-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .commercial-video-wrap iframe { height: 240px; }
  .commercial-content { text-align: center; }

  /* Bento grid — stack everything */
  .bento-grid { grid-template-columns: 1fr !important; grid-template-rows: auto !important; gap: 12px !important; }
  .bento-tile { padding: 20px !important; min-height: auto !important; }
  .bento-hero { grid-column: auto !important; grid-row: auto !important; min-height: 280px !important; }
  .bento-opensource { grid-column: auto !important; }
  .bento-tile h3 { font-size: 20px !important; }
  .bento-tile p { font-size: 13px !important; }

  /* Pipeline — vertical stack, smaller */
  .pipeline { grid-template-columns: 1fr; gap: 20px; }
  .pipeline-connector { width: 2px !important; height: 30px !important; margin: 0 auto !important; }
  .pipeline-stage { padding: 20px !important; }

  /* Signal Pulse cards — 1 column on mobile */
  .pulse-grid { grid-template-columns: 1fr; gap: 12px; }
  .pulse-card { padding: 16px; }
  .pulse-topic { font-size: 14px; }

  /* Tech sectors grid — 2 columns on mobile */
  .tech-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
  .tech-card { padding: 20px 12px !important; }
  .tech-icon { font-size: 28px !important; }
  .tech-card h4 { font-size: 13px !important; }
  .tech-card p { font-size: 11px !important; }

  /* Section CTA — smaller pill, better wrapping */
  .section-cta {
    font-size: 12px !important;
    padding: 8px 14px;
    max-width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
  }

  /* Data source cards — 1 column on mobile */
  .sources-grid { grid-template-columns: 1fr !important; gap: 10px !important; }

  /* About section — stack */
  .about-layout { grid-template-columns: 1fr !important; gap: 24px !important; }
  .about-graphic { max-width: 360px; margin: 0 auto; }
  .about-video-wrap { aspect-ratio: 16/10; }

  /* Services grid */
  .services-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
  .service-card { padding: 24px 20px !important; }

  /* Subscribe form — bigger tap targets */
  .form-row { flex-direction: column !important; gap: 10px !important; }
  .subscribe-form input, .subscribe-form select { font-size: 16px !important; padding: 14px 16px !important; }
  .subscribe-box { padding: 28px 20px !important; }

  /* Nav — hamburger menu */
  .nav-links {
    display: none !important;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6, 13, 24, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column !important;
    padding: 32px 24px !important;
    gap: 16px !important;
    z-index: 99;
    overflow-y: auto;
    align-items: stretch !important;
  }
  .nav-links.mobile-open {
    display: flex !important;
  }
  .nav-links a, .nav-links .btn {
    font-size: 16px !important;
    padding: 14px 0 !important;
    border-bottom: 1px solid rgba(26, 53, 80, 0.5);
    width: 100%;
  }
  .nav-links a:last-child, .nav-links .btn:last-child { border-bottom: none; }
  .nav-search-btn { justify-content: center; }
  .nav-search-btn .nav-search-label { display: inline !important; }

  .mobile-toggle { display: block; }
  .nav-container { height: 60px; }

  /* Hamburger animates to X when open */
  .mobile-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-toggle.is-open span:nth-child(2) { opacity: 0; }
  .mobile-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Prevent body scroll when menu is open */
  body.menu-open { overflow: hidden; }

  /* Section padding tighter */
  .section { padding: 48px 0 !important; }
  .section h2 { font-size: 24px !important; }
  .section-sub, .section-header p { font-size: 14px !important; }

  /* Footer cleaner */
  .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 24px !important; }
  .footer-links h5 { font-size: 14px !important; }
  .footer-links a { font-size: 13px !important; }

  /* Archive grids 1-column on mobile */
  .archive-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .archive-card { padding: 20px !important; }
  .archive-title { font-size: 15px !important; }

  /* Stats page — more compact */
  .stats-showcase { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .stat-big { padding: 20px 12px !important; }
  .stat-value { font-size: 28px !important; }
  .stat-big.stat-highlight .stat-value { font-size: 32px !important; }
  .stat-title { font-size: 12px !important; }
  .stat-meta { font-size: 9px !important; }

  /* Sector breakdown bars */
  .sector-bar-row { grid-template-columns: 80px 1fr 30px !important; gap: 8px !important; }
  .sector-bar-label { font-size: 11px !important; }
  .sector-bar-count { font-size: 14px !important; }

  /* Recent activity — smaller */
  .recent-activity-grid { height: 140px !important; gap: 4px !important; }
  .activity-count { font-size: 12px !important; }
  .activity-label { font-size: 8px !important; }

  /* Related reports — 1 column */
  .related-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .related-card { padding: 18px !important; }
  .related-card h4 { font-size: 14px !important; }

  /* Quick search — full screen on mobile */
  .quick-search-overlay { padding-top: 0; align-items: flex-start; }
  .quick-search-modal { max-width: 100% !important; height: 100vh !important; border-radius: 0 !important; }
  .quick-search-footer { display: none; }

  /* Preview modal — more space */
  .preview-modal { max-height: 90vh; }
  .preview-body { padding: 20px; }

  /* Section badge, smaller */
  .section-badge { font-size: 10px !important; letter-spacing: 1px !important; padding: 5px 12px !important; }

  /* Commercial section video */
  .commercial-video-wrap { box-shadow: 0 12px 30px rgba(0,0,0,0.4); }

  /* Ensure no horizontal scroll */
  body, html { overflow-x: hidden; max-width: 100vw; }
  .container { padding: 0 16px; }

  /* Links should be clearly tappable, minimum 44x44 touch area */
  .nav-links a, .bento-link, .tech-card, .archive-card { min-height: 44px; }

  /* Disable cursor glow on mobile (already scoped but force it) */
  .cursor-glow, .cursor-dot { display: none !important; }
}

/* Ultra-small phones (iPhone SE etc) */
@media (max-width: 400px) {
  .hero-headline { font-size: 28px; }
  .hero-right { height: 260px; }
  .orbital-container { transform: scale(0.42); }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats .stat:nth-child(3) { grid-column: span 2; }
  .tech-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr !important; }
}

/* ═══════════════════════════════════════════
   BENTO TILE BACKGROUND VIDEOS
   ═══════════════════════════════════════════ */
.bento-has-video {
  isolation: isolate;
}

.bento-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
}

.bento-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,32,53,0.7) 0%, rgba(10,22,40,0.8) 100%);
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  transition: opacity 0.4s;
}

.bento-has-video:hover .bento-bg-video {
  opacity: 0.5;
}

.bento-has-video:hover .bento-video-overlay {
  opacity: 0.7;
}

/* Subtle variant for content-heavy sections like sources & sectors */
.section-bg-subtle {
  opacity: 0.4 !important;
}

.bento-has-video .bento-content-wrap {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bento-has-video .bento-visual,
.bento-has-video .bento-viz-play {
  z-index: 2;
}

/* ═══════════════════════════════════════════
   CATEGORY HERO VIDEO
   ═══════════════════════════════════════════ */
.category-bg-video {
  opacity: 0.6;
}

/* ═══════════════════════════════════════════
   FOOTER CONSTELLATION CANVAS
   ═══════════════════════════════════════════ */
.footer {
  position: relative;
  overflow: hidden;
}

.footer-constellation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.4;
  pointer-events: none;
}

.footer > .container {
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════
   SECTION DIVIDER — Animated thin gradient line
   ═══════════════════════════════════════════ */
.section-divider {
  position: relative;
  height: 1px;
  width: 100%;
  background: transparent;
  overflow: hidden;
}

.section-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 212, 170, 0.5) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: dividerShimmer 6s linear infinite;
}

@keyframes dividerShimmer {
  0% { background-position: 200% 0%; }
  100% { background-position: -200% 0%; }
}

/* ═══════════════════════════════════════════
   KPSPHERE COMMERCIAL — Two-column trailer section
   ═══════════════════════════════════════════ */
.commercial-section {
  padding: 80px 0;
}

.commercial-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.commercial-video-wrap {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(0, 212, 170, 0.1);
  background: var(--primary);
  transition: transform 0.4s, box-shadow 0.4s;
}

.commercial-video-wrap::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  padding: 2px;
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.5), transparent 50%, rgba(0, 212, 170, 0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.6;
  transition: opacity 0.4s;
}

.commercial-video-wrap:hover {
  transform: translateY(-4px);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.5),
    0 0 60px rgba(0, 212, 170, 0.25);
}

.commercial-video-wrap:hover::before {
  opacity: 1;
}

.commercial-video-wrap iframe {
  display: block;
  border-radius: 18px;
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}

.commercial-content h2 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  color: var(--white);
  margin: 16px 0 16px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.commercial-content p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 500px;
}

.commercial-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.commercial-actions .btn {
  font-size: 14px;
}

@media (max-width: 968px) {
  .commercial-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .commercial-content {
    text-align: center;
  }
  .commercial-content p {
    margin-left: auto;
    margin-right: auto;
  }
  .commercial-actions {
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════
   FORMAT BADGES — Video vs Full Report distinction
   ═══════════════════════════════════════════ */
.format-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 5px 12px;
  border-radius: 20px;
  margin: 12px 0 10px;
  text-transform: uppercase;
  border: 1px solid;
  transition: transform 0.3s, box-shadow 0.3s;
}

/* VIDEO format — accent teal, same family as KPsphere theme */
.format-video {
  background: linear-gradient(135deg, rgba(0, 212, 170, 0.18) 0%, rgba(0, 180, 255, 0.14) 100%);
  color: #00D4AA;
  border-color: rgba(0, 212, 170, 0.5);
  box-shadow: 0 0 14px rgba(0, 212, 170, 0.2);
}

/* FULL REPORT format — warm gold, distinct from video */
.format-full {
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.15) 0%, rgba(255, 140, 0, 0.1) 100%);
  color: #FFB800;
  border-color: rgba(255, 184, 0, 0.5);
  box-shadow: 0 0 14px rgba(255, 184, 0, 0.15);
}

/* Subtle hover feedback */
.archive-card:hover .format-video {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.35);
}
.archive-card:hover .format-full {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(255, 184, 0, 0.3);
}

/* ═══════════════════════════════════════════
   NEW BADGES + READ TIME on archive cards
   ═══════════════════════════════════════════ */
.archive-card {
  position: relative;
}

.new-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #FF3B6B 0%, #FF6B3B 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(255, 59, 107, 0.4);
  animation: newBadgePulse 2s ease-in-out infinite;
  z-index: 2;
}

@keyframes newBadgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(255, 59, 107, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 6px 20px rgba(255, 59, 107, 0.6); }
}

.archive-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.read-time {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.read-time::before {
  content: '⏱';
  font-size: 11px;
}

/* ═══════════════════════════════════════════
   STATS PAGE — Intelligence showcase
   ═══════════════════════════════════════════ */
.stats-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.stat-big {
  padding: 32px 24px;
  background: linear-gradient(135deg, rgba(15,32,53,0.9) 0%, rgba(10,22,40,0.9) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  text-align: center;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.stat-big:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(0, 212, 170, 0.2);
}

.stat-big.stat-highlight {
  background: linear-gradient(135deg, rgba(0,212,170,0.15) 0%, rgba(15,32,53,0.9) 100%);
  border-color: rgba(0, 212, 170, 0.4);
}

.stat-icon {
  font-size: 40px;
  margin-bottom: 14px;
  line-height: 1;
}

.stat-value {
  font-size: 48px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -2px;
  font-feature-settings: "tnum";
}

.stat-big.stat-highlight .stat-value {
  font-size: 56px;
  background: linear-gradient(135deg, var(--accent) 0%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-title {
  font-size: 14px;
  color: var(--white);
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-meta {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Sector breakdown bars */
.sector-bars {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sector-bar-row {
  display: grid;
  grid-template-columns: 200px 1fr 60px;
  align-items: center;
  gap: 16px;
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}

.sector-bar-label {
  font-size: 14px;
  color: var(--white);
  font-weight: 600;
}

.sector-bar-track {
  height: 32px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

.sector-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
  border-radius: 20px;
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.4);
  animation: barFill 1.5s cubic-bezier(0.25, 1, 0.5, 1);
  width: 0;
  animation-fill-mode: forwards;
}

@keyframes barFill {
  from { width: 0; }
  to { width: var(--target, 100%); }
}

.sector-bar-count {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  text-align: right;
  font-feature-settings: "tnum";
}

/* Recent activity (7-day bars) */
.recent-activity-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
  height: 280px;
  align-items: end;
}

.activity-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 8px;
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}

.activity-bar {
  width: 80%;
  max-width: 80px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: 10px 10px 2px 2px;
  min-height: 6px;
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.3);
  transition: all 0.4s;
}

.activity-col:hover .activity-bar {
  box-shadow: 0 0 30px rgba(0, 212, 170, 0.6);
  transform: scaleY(1.05);
  transform-origin: bottom;
}

.activity-count {
  font-size: 16px;
  font-weight: 800;
  color: var(--white);
}

.activity-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

/* ═══════════════════════════════════════════
   CATEGORY PAGE
   ═══════════════════════════════════════════ */
.category-hero {
  text-align: center;
  padding: 140px 0 60px;
  position: relative;
  overflow: hidden;
}

.category-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(0, 212, 170, 0.1) 0%, transparent 60%);
  pointer-events: none;
}

.category-hero .back-link {
  display: inline-block;
  margin-bottom: 20px;
}

.category-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 900;
  color: var(--white);
  margin: 16px 0 20px;
  letter-spacing: -1px;
}

.category-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

.category-stats .stat {
  text-align: center;
}

/* Mobile responsive for stats + sector bars */
@media (max-width: 768px) {
  .sector-bar-row { grid-template-columns: 120px 1fr 40px; gap: 10px; }
  .sector-bar-label { font-size: 12px; }
  .recent-activity-grid { height: 200px; gap: 6px; }
  .activity-label { font-size: 9px; }
  .stat-big { padding: 24px 16px; }
  .stat-value { font-size: 36px; }
  .stat-big.stat-highlight .stat-value { font-size: 44px; }
}

/* ═══════════════════════════════════════════
   RELATED REPORTS WIDGET
   ═══════════════════════════════════════════ */
.related-reports {
  max-width: 1200px;
  margin: 80px auto 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.related-reports h3 {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  margin: 8px 0 32px;
  letter-spacing: -0.5px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.related-card {
  display: block;
  padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-decoration: none;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0, 212, 170, 0.15);
}

.related-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 10px;
}

.related-type {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.related-date {
  color: var(--text-muted);
}

.related-cat {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.related-card h4 {
  font-size: 16px;
  color: var(--white);
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.4;
}

.related-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.related-arrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s;
}

.related-card:hover .related-arrow {
  gap: 12px;
}

/* ═══════════════════════════════════════════
   DAILY PULSE — Live intelligence ticker
   ═══════════════════════════════════════════ */
.pulse-section { padding: 80px 0; }

.pulse-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
}

.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #00D4AA;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.6);
  animation: pulseDot 1.5s ease-out infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(0, 212, 170, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(0, 212, 170, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 212, 170, 0); }
}

.pulse-ticker {
  max-width: 1200px;
  margin: 0 auto;
}

.pulse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.pulse-card {
  padding: 20px;
  background: linear-gradient(135deg, rgba(15,32,53,0.8) 0%, rgba(10,22,40,0.8) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  opacity: 0;
  animation: pulseCardIn 0.6s ease-out forwards;
  position: relative;
  overflow: hidden;
  display: block;
  text-decoration: none !important;
  color: inherit;
}

.pulse-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scanLine 3s linear infinite;
}

/* Static (unlinked) pulse cards — no clickable look, no hover, not highlightable */
.pulse-static {
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  transition: none;
}

/* Linked pulse cards — clickable with hover lift */
.pulse-linked {
  cursor: pointer;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.pulse-linked:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0, 212, 170, 0.15);
}

.pulse-link-hint {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 0.7;
  transition: opacity 0.3s, gap 0.3s;
}

.pulse-linked:hover .pulse-link-hint {
  opacity: 1;
}

@keyframes scanLine {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes pulseCardIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.pulse-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.pulse-indicator {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
  animation: pulseDot 1.5s ease-out infinite;
}

.pulse-when {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.pulse-cat {
  font-size: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  margin-bottom: 6px;
}

.pulse-topic {
  font-size: 15px;
  color: var(--white);
  font-weight: 600;
  line-height: 1.4;
}

.pulse-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ═══════════════════════════════════════════
   ARCHIVE SEARCH BAR
   ═══════════════════════════════════════════ */
.archive-search-wrap {
  max-width: 800px;
  margin: 0 auto 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.archive-search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0 20px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.archive-search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.15);
}

.archive-search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.archive-search-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 16px 14px;
  color: var(--white);
  font-size: 15px;
  font-family: inherit;
}

.archive-search-box input::placeholder {
  color: var(--text-muted);
}

.archive-count {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: right;
}

.archive-empty-filter {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   PHASE 3 — PREMIUM POLISH
   ═══════════════════════════════════════════ */

/* Custom cursor glow — subtle trailing teal light */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 400px;
  height: 400px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 212, 170, 0.12) 0%, transparent 60%);
  transition: transform 0.1s ease-out;
  mix-blend-mode: screen;
  will-change: transform;
}

/* Cursor dot — follows cursor exactly */
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(0, 212, 170, 0.6);
  transition: width 0.3s, height 0.3s;
  will-change: transform;
}

.cursor-dot.hovering {
  width: 40px;
  height: 40px;
  background: transparent;
  border: 2px solid var(--accent);
  box-shadow: 0 0 20px rgba(0, 212, 170, 0.8);
}

@media (max-width: 968px) {
  .cursor-glow, .cursor-dot { display: none; }
}

/* Gradient-shift borders on cards */
.bento-tile,
.process-card,
.source-card,
.pipeline {
  position: relative;
}

/* Gradient-shift border — only on clickable/interactive tiles */
.bento-tile::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(0, 212, 170, 0) 30%,
    rgba(0, 212, 170, 0.6) 50%,
    rgba(0, 212, 170, 0) 70%,
    transparent 100%
  );
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  animation: gradientShift 3s linear infinite;
}

.bento-tile:hover::after {
  opacity: 1;
}

@keyframes gradientShift {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 200%; }
}

/* Animated glowing underline for H2s */
.section-header h2 {
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 200% 100%;
  border-radius: 2px;
  animation: underlineShimmer 3s ease-in-out infinite;
}

@keyframes underlineShimmer {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 200% 0%; }
}

/* Subtle floating particles across sections */
.section {
  position: relative;
  overflow: hidden;
}

.section-dark::before,
.section-darker::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0, 212, 170, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(0, 180, 255, 0.03) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.section > * {
  position: relative;
  z-index: 1;
}

/* Magnetic button effect */
.btn-accent {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
}

.btn-accent::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  pointer-events: none;
}

.btn-accent:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 212, 170, 0.4);
}

.btn-accent:hover::before {
  width: 400px;
  height: 400px;
}

/* Gradient animated text for special emphasis */
.hero-headline .line-2 {
  background: linear-gradient(90deg, var(--white) 0%, var(--accent) 50%, var(--white) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShine 5s ease-in-out infinite;
}

@keyframes textShine {
  0%, 100% { background-position: 0% 0%; }
  50% { background-position: 200% 0%; }
}

/* Smooth scroll enhancement — momentum */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

/* Anchor targets — ensures anchor links scroll to the content header, not the raw section top */
.anchor-target,
section[id] {
  scroll-margin-top: 100px;
}

/* Extra breathing room for sections with video/visual backgrounds */
.section-video-bg[id],
.section-video-bg .anchor-target {
  scroll-margin-top: 80px;
}

/* Link hover — animated underline */
.nav-links a:not(.btn) {
  position: relative;
  transition: color 0.3s;
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:not(.btn):hover::after {
  width: 100%;
}

/* Navbar backdrop intensity on scroll */
.navbar.scrolled {
  background: rgba(6, 13, 24, 0.95);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* Report/card cover images — AI-generated thumbnails */
.archive-card-image {
  position: relative;
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  margin: -28px -28px 16px -28px;
  width: calc(100% + 56px);
}

.archive-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.archive-card:hover .archive-card-image img {
  transform: scale(1.06);
}

.archive-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 22, 40, 0.9) 100%);
  z-index: 1;
  pointer-events: none;
}

.archive-card-image.shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 212, 170, 0.1),
    transparent
  );
  animation: cardShimmer 2.5s ease-in-out infinite;
}

@keyframes cardShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Subtle gradient on all section headings */
.section-badge {
  background: linear-gradient(135deg, var(--accent-glow) 0%, rgba(0, 180, 255, 0.1) 100%);
  border: 1px solid rgba(0, 212, 170, 0.3);
  backdrop-filter: blur(10px);
}

/* ═══════════════════════════════════════════
   SCROLL-TRIGGERED REVEAL ANIMATIONS
   ═══════════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════
   ANIMATED PIPELINE
   ═══════════════════════════════════════════ */
.pipeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto 80px;
  padding: 48px 32px;
  background: linear-gradient(135deg, rgba(15,32,53,0.6) 0%, rgba(10,22,40,0.6) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.pipeline::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(0, 212, 170, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.pipeline-stage {
  text-align: center;
  position: relative;
  z-index: 1;
}

.pipeline-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: 0 8px 32px rgba(0, 212, 170, 0.25);
  transition: transform 0.3s, box-shadow 0.3s;
}

.pipeline-stage:hover .pipeline-icon {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 40px rgba(0, 212, 170, 0.4);
}

.pipeline-count {
  font-size: 32px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}

.pipeline-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
}

.pipeline-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.pipeline-connector {
  position: relative;
  height: 3px;
  width: 100%;
  background: rgba(0, 212, 170, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.pipeline-flow {
  position: absolute;
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  border-radius: 2px;
  animation: pipelineFlow 3s linear infinite;
}

@keyframes pipelineFlow {
  0% { left: -30%; }
  100% { left: 100%; }
}

/* ═══════════════════════════════════════════
   BENTO GRID — What We Do
   ═══════════════════════════════════════════ */
.bento-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 210px 210px auto;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.bento-tile {
  position: relative;
  padding: 24px;
  background: linear-gradient(135deg, rgba(15,32,53,0.9) 0%, rgba(10,22,40,0.9) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(0, 212, 170, 0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.bento-tile:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(0, 212, 170, 0.2);
}

.bento-tile:hover::before {
  opacity: 1;
}

/* Large hero tile — spans 2 rows, 2 columns */
.bento-hero {
  grid-row: span 2;
  grid-column: span 2;
  background:
    radial-gradient(circle at 100% 100%, rgba(0, 212, 170, 0.1) 0%, transparent 60%),
    linear-gradient(135deg, rgba(15,32,53,0.95) 0%, rgba(10,22,40,0.95) 100%);
  min-height: 436px;
}

.bento-hero h3 {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  margin: 20px 0 16px;
  letter-spacing: -1px;
}

.bento-hero p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 500px;
  margin-bottom: 24px;
}

/* Standard tiles */
.bento-tile:not(.bento-hero):not(.bento-opensource) h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin: 16px 0 10px;
}

.bento-tile:not(.bento-hero):not(.bento-opensource) p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

/* Wide bottom tile */
.bento-opensource {
  grid-column: span 3;
  padding: 32px;
  background: linear-gradient(135deg, rgba(0,212,170,0.08) 0%, rgba(15,32,53,0.9) 100%);
}

.bento-opensource h3 {
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  margin: 16px 0 12px;
  letter-spacing: -0.5px;
}

.bento-opensource p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 700px;
  margin-bottom: 16px;
}

.bento-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 6px 14px;
  background: var(--accent-glow);
  border: 1px solid rgba(0, 212, 170, 0.3);
  border-radius: 20px;
  align-self: flex-start;
}

.bento-link {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s;
}

.bento-link:hover { gap: 14px; }

.bento-link .arrow { transition: transform 0.3s; }

.bento-tile:hover .bento-link .arrow { transform: translateX(4px); }

/* Decorative visuals inside tiles */
.bento-visual {
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 280px;
  height: 280px;
  opacity: 0.5;
  pointer-events: none;
}

.bento-viz-report {
  position: relative;
  width: 100%;
  height: 100%;
}

.viz-bar {
  position: absolute;
  bottom: 80px;
  background: linear-gradient(180deg, var(--accent), transparent);
  border-radius: 4px 4px 0 0;
  animation: vizPulse 3s ease-in-out infinite;
}

.viz-bar:nth-child(1) { left: 20px; width: 30px; height: 80px; animation-delay: 0s; }
.viz-bar:nth-child(2) { left: 60px; width: 30px; height: 140px; animation-delay: 0.3s; }
.viz-bar:nth-child(3) { left: 100px; width: 30px; height: 100px; animation-delay: 0.6s; }

.viz-chart {
  position: absolute;
  top: 40px;
  right: 40px;
  width: 120px;
  height: 120px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  border-right-color: transparent;
  border-bottom-color: transparent;
  animation: vizSpin 8s linear infinite;
}

@keyframes vizPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50% { opacity: 0.8; transform: scaleY(1.1); }
}

@keyframes vizSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.bento-viz-play {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  color: var(--accent);
  opacity: 0.3;
  transition: opacity 0.3s, transform 0.3s;
}

.bento-tile:hover .bento-viz-play {
  opacity: 0.9;
  transform: scale(1.15);
}

/* Bento responsive */
@media (max-width: 968px) {
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .bento-hero { grid-column: span 2; grid-row: auto; min-height: 320px; }
  .bento-opensource { grid-column: span 2; }
  .pipeline {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .pipeline-connector {
    height: 40px;
    width: 3px;
    margin: 0 auto;
  }
  .pipeline-flow {
    width: 100%;
    height: 30%;
    animation: pipelineFlowVertical 3s linear infinite;
  }
  @keyframes pipelineFlowVertical {
    0% { top: -30%; }
    100% { top: 100%; }
  }
}

@media (max-width: 640px) {
  .bento-grid { grid-template-columns: 1fr; }
  .bento-hero, .bento-opensource { grid-column: auto; }
  .bento-hero h3 { font-size: 28px; }
}

/* ═══════════════════════════════════════════
   HERO — PREMIUM REDESIGN (Apple-style)
   ═══════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 212, 170, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 15% 80%, rgba(0, 180, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 50%, rgba(0, 212, 170, 0.1) 0%, transparent 60%);
  animation: bgShift 20s ease-in-out infinite;
}

@keyframes bgShift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(2deg); }
}

/* Cinematic video background (optional - gracefully degrades if missing) */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
  z-index: 0;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,13,24,0.2) 0%, rgba(6,13,24,0.55) 100%);
  z-index: 0;
}

/* Floating particle layer */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.hero-particles span {
  position: absolute;
  display: block;
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  box-shadow: 0 0 12px var(--accent);
  animation: particleRise 15s linear infinite;
}
.hero-particles span:nth-child(1) { left: 5%; animation-delay: 0s; animation-duration: 18s; }
.hero-particles span:nth-child(2) { left: 12%; animation-delay: 2s; animation-duration: 14s; }
.hero-particles span:nth-child(3) { left: 20%; animation-delay: 4s; animation-duration: 20s; }
.hero-particles span:nth-child(4) { left: 28%; animation-delay: 1s; animation-duration: 16s; }
.hero-particles span:nth-child(5) { left: 35%; animation-delay: 6s; animation-duration: 22s; }
.hero-particles span:nth-child(6) { left: 42%; animation-delay: 3s; animation-duration: 15s; }
.hero-particles span:nth-child(7) { left: 50%; animation-delay: 5s; animation-duration: 19s; }
.hero-particles span:nth-child(8) { left: 58%; animation-delay: 7s; animation-duration: 17s; }
.hero-particles span:nth-child(9) { left: 65%; animation-delay: 2.5s; animation-duration: 21s; }
.hero-particles span:nth-child(10) { left: 72%; animation-delay: 4.5s; animation-duration: 13s; }
.hero-particles span:nth-child(11) { left: 80%; animation-delay: 6.5s; animation-duration: 18s; }
.hero-particles span:nth-child(12) { left: 88%; animation-delay: 1.5s; animation-duration: 20s; }
.hero-particles span:nth-child(13) { left: 95%; animation-delay: 3.5s; animation-duration: 16s; }
.hero-particles span:nth-child(14) { left: 15%; animation-delay: 8s; animation-duration: 14s; }
.hero-particles span:nth-child(15) { left: 75%; animation-delay: 9s; animation-duration: 17s; }

@keyframes particleRise {
  0% { bottom: -5%; opacity: 0; transform: translateX(0); }
  10% { opacity: 0.6; }
  90% { opacity: 0.6; }
  100% { bottom: 105%; opacity: 0; transform: translateX(40px); }
}

/* Two-column grid layout */
.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero-left { max-width: 600px; }

.hero-badge {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 24px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 28px;
  border: 1px solid rgba(0, 212, 170, 0.3);
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.8s ease-out;
}

.hero-headline {
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: -2px;
}

.hero-headline .line-1,
.hero-headline .line-2 {
  display: inline-block;
  animation: fadeInUp 0.9s ease-out 0.2s backwards;
}

.hero-headline .line-2 {
  animation-delay: 0.4s;
}

/* Typewriter effect for accent word */
.typewriter {
  display: inline-block;
  position: relative;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.9s forwards;
}

.typewriter::after {
  content: '|';
  position: absolute;
  right: -8px;
  color: var(--accent);
  animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

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

.hero-sub {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 0 36px;
  animation: fadeInUp 0.9s ease-out 0.6s backwards;
}

.hero-sub strong { color: var(--accent); }

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 56px;
  animation: fadeInUp 0.9s ease-out 0.8s backwards;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  animation: fadeInUp 0.9s ease-out 1s backwards;
}

.stat-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
  font-feature-settings: "tnum";
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════
   ORBITAL EXPLODED VIEW — Apple Vision Pro style
   ═══════════════════════════════════════════ */
.hero-right {
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbital-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 600px;
  animation: containerFloat 6s ease-in-out infinite;
}

@keyframes containerFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

/* Central KPsphere logo */
.orbital-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 140px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.orbital-logo {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 30px rgba(0, 212, 170, 0.6));
  animation: logoSpin 30s linear infinite;
}

@keyframes logoSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Pulsing rings from core */
.orbital-pulse {
  position: absolute;
  inset: 0;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: pulseRing 3s ease-out infinite;
}

.orbital-pulse-2 {
  animation-delay: 1.5s;
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(4); opacity: 0; }
}

/* Orbit rings */
.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px dashed rgba(0, 212, 170, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-1 { width: 280px; height: 280px; animation: orbitRotate1 40s linear infinite; }
.orbit-2 { width: 420px; height: 420px; animation: orbitRotate2 60s linear infinite reverse; }
.orbit-3 { width: 560px; height: 560px; animation: orbitRotate3 80s linear infinite; }

@keyframes orbitRotate1 {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes orbitRotate2 {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}
@keyframes orbitRotate3 {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Data source "planets" orbiting the core */
.orbit-item {
  position: absolute;
  top: 50%;
  left: 50%;
  transform-origin: 0 0;
  --orbit-size: 140px;
  transform:
    translate(-50%, -50%)
    rotate(var(--angle))
    translateX(var(--orbit-size))
    rotate(calc(-1 * var(--angle)));
  background: rgba(15, 32, 53, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 212, 170, 0.3);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.orbit-item[style*="--orbit:1"] { --orbit-size: 140px; animation: counterRotate 40s linear infinite; }
.orbit-item[style*="--orbit:2"] { --orbit-size: 210px; animation: counterRotate 60s linear infinite reverse; }
.orbit-item[style*="--orbit:3"] { --orbit-size: 280px; animation: counterRotate 80s linear infinite; }

.orbit-item:hover {
  background: var(--accent);
  color: var(--primary);
  transform:
    translate(-50%, -50%)
    rotate(var(--angle))
    translateX(var(--orbit-size))
    rotate(calc(-1 * var(--angle)))
    scale(1.15);
  box-shadow: 0 0 30px rgba(0, 212, 170, 0.6);
}

@keyframes counterRotate {
  from { transform: translate(-50%, -50%) rotate(var(--angle)) translateX(var(--orbit-size)) rotate(calc(-1 * var(--angle))); }
  to { transform: translate(-50%, -50%) rotate(calc(var(--angle) + 360deg)) translateX(var(--orbit-size)) rotate(calc(-1 * (var(--angle) + 360deg))); }
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: fadeInUp 1s ease-out 1.5s backwards, scrollBounce 2s ease-in-out infinite;
}

.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--accent));
}

@keyframes scrollBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* RESPONSIVE — stack on mobile */
@media (max-width: 968px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-left { margin: 0 auto; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-right { height: 500px; }
  .orbital-container { transform: scale(0.75); }
}

@media (max-width: 640px) {
  .hero-headline { font-size: 40px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .stat-number { font-size: 24px; }
  .stat-label { font-size: 10px; }
  .hero-right { height: 400px; }
  .orbital-container { transform: scale(0.55); }
  .scroll-hint { display: none; }
}

/* SECTIONS */
.section { padding: 100px 0; }
.section-dark { background: var(--primary); }
.section-darker { background: var(--primary-dark); }

.section-header { text-align: center; max-width: 700px; margin: 0 auto 60px; }

.section-badge {
  display: inline-block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}

.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* PROCESS GRID */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.process-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 24px;
  position: relative;
  transition: border-color 0.3s, transform 0.3s;
}

.process-card:hover { border-color: var(--accent); transform: translateY(-4px); }

.process-number {
  font-size: 48px;
  font-weight: 900;
  color: rgba(0, 212, 170, 0.08);
  position: absolute;
  top: 16px;
  right: 20px;
}

.process-icon { color: var(--accent); margin-bottom: 20px; }

.process-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.process-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* SOURCES GRID */
.sources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.source-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  cursor: default;
  user-select: text;
  -webkit-tap-highlight-color: transparent;
}

/* Informational cards — no hover lift, no border glow, no clickable feel */
.source-card:hover { border-color: var(--border); transform: none; }

.source-type {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  margin-bottom: 8px;
}

.source-card h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.source-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* TECH GRID */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.tech-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
  display: block;
  text-decoration: none !important;
  color: inherit;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.tech-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 212, 170, 0.15);
}

.tech-card:focus { outline: none; }

.tech-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.tech-icon {
  font-size: 36px;
  margin-bottom: 14px;
  display: block;
  line-height: 1;
}

.tech-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: #E8ECF1 !important;
  margin-bottom: 10px;
  text-decoration: none !important;
  letter-spacing: -0.2px;
}

.tech-card p {
  font-size: 12px;
  color: #8FA4BA !important;
  line-height: 1.55;
  text-decoration: none !important;
  margin: 0;
}

.tech-card:hover h4 { color: var(--accent) !important; }

/* PRODUCTS GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
}

.product-card:hover { border-color: var(--accent); transform: translateY(-4px); }

.product-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(0, 212, 170, 0.08);
}

.product-badge {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.product-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.product-card > p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.product-features {
  list-style: none;
  padding: 0;
}

.product-features li {
  font-size: 13px;
  color: var(--text);
  padding: 8px 0;
  border-top: 1px solid var(--border);
  padding-left: 20px;
  position: relative;
}

.product-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* SUBSCRIBE */
.subscribe-box {
  background: linear-gradient(135deg, var(--secondary), var(--card-bg));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 60px;
  text-align: center;
}

.subscribe-content { max-width: 600px; margin: 0 auto; }
.subscribe-content h2 { font-size: 32px; font-weight: 800; color: var(--white); margin-bottom: 16px; }
.subscribe-content > p { font-size: 15px; color: var(--text-muted); margin-bottom: 32px; line-height: 1.6; }

.subscribe-form { display: flex; flex-direction: column; gap: 12px; }

.form-row { display: flex; gap: 12px; }

.subscribe-form input,
.subscribe-form select {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--primary);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.subscribe-form input:focus,
.subscribe-form select:focus { border-color: var(--accent); }

.subscribe-form input::placeholder { color: var(--text-muted); }

.subscribe-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* FOOTER */
.footer {
  background: var(--primary-dark);
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 12px;
  max-width: 300px;
}

.footer-links h5 {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s;
}

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

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }

  .hero { padding: 100px 0 60px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .hero-actions { flex-direction: column; align-items: center; }

  .section { padding: 60px 0; }

  .process-grid,
  .sources-grid,
  .products-grid { grid-template-columns: 1fr; }

  .tech-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-grid { grid-template-columns: 1fr 1fr; }

  .subscribe-box { padding: 32px 24px; }
  .form-row { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 32px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .tech-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════ */
/* FEATURED VIDEO                             */
/* ═══════════════════════════════════════════ */

.featured-video-container {
  max-width: 900px;
  margin: 0 auto;
}

.featured-video-placeholder {
  background: var(--card-bg);
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 80px 40px;
  text-align: center;
}

.featured-video-placeholder svg { margin-bottom: 16px; opacity: 0.5; }
.featured-video-placeholder p { color: var(--text-muted); font-size: 15px; }

.featured-video-wrapper { text-align: center; }

.featured-video-meta {
  margin-top: 16px;
  text-align: center;
}

.featured-video-meta h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.featured-video-meta span {
  font-size: 13px;
  color: var(--text-muted);
}

.featured-video-actions {
  text-align: center;
  margin-top: 28px;
}

/* Video Grid (archive page) */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.video-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.video-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.video-thumbnail { width: 100%; }

.video-info {
  padding: 20px;
}

.video-info .archive-title {
  font-size: 16px;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .video-grid { grid-template-columns: 1fr; }
  .featured-video-container iframe { height: 300px !important; }
}

/* ═══════════════════════════════════════════ */
/* ABOUT SECTION                              */
/* ═══════════════════════════════════════════ */

.about-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.about-text .section-badge { text-align: left; }

.about-text h2 {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.about-lead {
  font-size: 17px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
  font-weight: 500;
}

.about-text p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 28px;
}

.about-value {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
}

.about-value span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.about-graphic {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-graphic img {
  width: 100%;
  max-width: 400px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════ */
/* SERVICES SECTION                           */
/* ═══════════════════════════════════════════ */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
}

.service-card:hover { border-color: var(--accent); transform: translateY(-4px); }

.service-featured {
  grid-column: 1 / -1;
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(0, 212, 170, 0.03) 100%);
  box-shadow: 0 0 40px rgba(0, 212, 170, 0.05);
}

.service-icon { color: var(--accent); margin-bottom: 20px; }

.service-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.service-features {
  list-style: none;
  padding: 0;
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.service-features li {
  font-size: 13px;
  color: var(--text);
  padding: 8px 0 8px 20px;
  position: relative;
}

.service-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ═══════════════════════════════════════════ */
/* CONTACT SECTION                            */
/* ═══════════════════════════════════════════ */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 32px;
  align-items: start;
}

.contact-info-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.3s;
}

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

.contact-icon { flex-shrink: 0; }

.contact-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 2px;
}

.contact-form-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
}

.contact-form-box h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--primary);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form textarea { resize: vertical; min-height: 100px; }

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { border-color: var(--accent); }

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }

/* ═══════════════════════════════════════════ */
/* SUBSCRIBE UPDATES                          */
/* ═══════════════════════════════════════════ */

.btn-full { width: 100%; }

.subscribe-status {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  min-height: 20px;
}

.subscribe-status.success { color: var(--accent); }
.subscribe-status.error { color: #FF6B6B; }

.subscribe-includes {
  margin-top: 28px;
  text-align: left;
  background: rgba(0, 212, 170, 0.05);
  border: 1px solid rgba(0, 212, 170, 0.15);
  border-radius: 10px;
  padding: 20px 24px;
}

.subscribe-includes-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.subscribe-include-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.subscribe-include-item span {
  font-size: 13px;
  color: var(--text);
}

/* ═══════════════════════════════════════════ */
/* RESPONSIVE - NEW SECTIONS                  */
/* ═══════════════════════════════════════════ */

@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .service-featured { grid-column: 1 / -1; }
  .service-features { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .about-layout { grid-template-columns: 1fr; gap: 32px; }
  .about-graphic { order: -1; }
  .about-values { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════ */
/* ARCHIVE & REPORT PAGES                     */
/* ═══════════════════════════════════════════ */

.nav-links a.active { color: var(--accent); }

/* Page Hero (archive pages) */
.page-hero {
  padding: 120px 0 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-bottom: 1px solid var(--border);
}

.page-hero h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.page-hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 640px;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); color: var(--primary); border-color: var(--accent); }

/* Archive Grid */
.archive-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.archive-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  text-decoration: none;
  transition: border-color 0.3s, transform 0.3s;
  display: block;
}

.archive-card:hover { border-color: var(--accent); transform: translateY(-3px); }

.archive-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.archive-type-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 3px 10px;
  border: 1px solid;
  border-radius: 12px;
}

.archive-date {
  font-size: 12px;
  color: var(--text-muted);
}

.archive-category {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.archive-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
  line-height: 1.3;
}

.archive-summary {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

.archive-read-more {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

.archive-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.archive-empty {
  text-align: center;
  padding: 80px 0;
}

.archive-empty p {
  color: var(--text-muted);
  font-size: 15px;
}

/* Report Viewer */
.report-viewer {
  background: transparent;
  border: none !important;
  border-radius: 0;
  padding: 0;
  margin-top: 20px;
}

/* ── Kill ALL double borders from email HTML templates ── */

/* Remove outer wrapper borders */
.report-viewer > table,
.report-viewer > div > table {
  max-width: 100% !important;
  width: 100% !important;
  border: none !important;
  border-collapse: collapse !important;
}

/* Remove borders from ALL layout tables (not data tables) */
.report-viewer table {
  border: none !important;
  border-collapse: collapse !important;
}

/* Layout table cells — no borders at all */
.report-viewer > table td,
.report-viewer > table > tbody > tr > td,
.report-viewer > div > table td,
.report-viewer table[width="100%"] > tbody > tr > td {
  border: none !important;
}

/* Section dividers — use subtle spacing instead of border lines */
.report-viewer td[style*="border-top"] {
  border-top: none !important;
  padding-top: 8px !important;
}

/* Header and footer — clean, no borders */
.report-viewer td[style*="border-radius:12px"] {
  border: none !important;
}
.report-viewer td[style*="border-radius:0 0 12px 12px"] {
  border: none !important;
  border-top: none !important;
}

/* Keep left accent borders on callout sections — those look good */
.report-viewer td[style*="border-left:4px"],
.report-viewer div[style*="border-left:3px"] {
  border-top: none !important;
  border-right: none !important;
  border-bottom: none !important;
}

/* Data tables INSIDE reports — keep clean minimal borders */
.report-viewer .report-body table,
.report-viewer td[style*="padding:28px"] table,
.report-viewer td[style*="padding: 28px"] table {
  border: none !important;
  border-collapse: collapse !important;
  margin: 12px 0 !important;
}

.report-viewer .report-body table td,
.report-viewer .report-body table th,
.report-viewer td[style*="padding:28px"] table td,
.report-viewer td[style*="padding:28px"] table th {
  border: none !important;
  border-bottom: 1px solid rgba(26, 53, 80, 0.5) !important;
  padding: 8px 12px !important;
}

/* Data table headers — subtle bottom border only */
.report-viewer .report-body table th,
.report-viewer td[style*="padding:28px"] table th {
  border-bottom: 2px solid var(--accent) !important;
}

/* Remove the h2 bottom border — use spacing instead */
.report-viewer h2 {
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 12px;
  padding-bottom: 0;
  border-bottom: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Section spacing — clean gaps instead of border lines */
.report-viewer h2 + * { margin-top: 8px; }

/* Override email backgrounds */
.report-viewer > body,
.report-viewer table[style*="background-color:#060D18"],
.report-viewer table[style*="background-color:#f5f5f5"],
.report-viewer table[style*="background-color: #f5f5f5"],
.report-viewer table[style*="background-color:#ffffff"],
.report-viewer table[style*="background-color: #ffffff"] {
  background-color: transparent !important;
}

.report-viewer table[style*="max-width:680px"],
.report-viewer table[style*="max-width:700px"],
.report-viewer table[style*="max-width:720px"],
.report-viewer table[style*="max-width: 680px"],
.report-viewer table[style*="max-width: 700px"],
.report-viewer table[style*="max-width: 720px"] {
  max-width: 100% !important;
  width: 100% !important;
}

/* ── Clean typography ── */
.report-viewer h3 { color: var(--white); font-size: 16px; font-weight: 600; margin: 20px 0 8px; }
.report-viewer p { color: var(--text); font-size: 14px; line-height: 1.8; margin-bottom: 12px; }
.report-viewer ul { color: var(--text); font-size: 14px; line-height: 1.8; padding-left: 20px; }
.report-viewer li { margin-bottom: 6px; }
.report-viewer strong { color: var(--accent); }
.report-viewer em { color: var(--text-muted); }

/* Tighter spacing between sections */
.report-viewer tr + tr > td { padding-top: 4px !important; }

.back-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  transition: opacity 0.2s;
}
.back-link:hover { opacity: 0.8; }

/* Archive responsive */
@media (max-width: 768px) {
  .archive-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 100px 0 36px; }
  .page-hero h1 { font-size: 28px; }
  .report-viewer { padding: 24px 16px; }
}

/* ═══════════════════════════════════════════ */
/* SOCIAL SHARING                             */
/* ═══════════════════════════════════════════ */

.share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.share-btn {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.share-btn:hover { opacity: 0.8; }
