/* ============================================
   THREATSPHERE LANDING PAGE
   Aesthetic: Mission Control / Cyber Operations
   ============================================ */

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

:root {
  /* Core palette */
  --bg-deep: #060a14;
  --bg-surface: #0a0e1a;
  --bg-card: rgba(255, 255, 255, 0.025);
  --bg-card-hover: rgba(255, 255, 255, 0.045);

  /* Accent colors */
  --accent-primary: #3b82f6;
  --accent-primary-dim: rgba(59, 130, 246, 0.15);
  --accent-primary-glow: rgba(59, 130, 246, 0.4);
  --accent-threat: #ef4444;
  --accent-threat-dim: rgba(239, 68, 68, 0.15);
  --accent-threat-glow: rgba(239, 68, 68, 0.4);
  --accent-defend: #06b6d4;
  --accent-defend-dim: rgba(6, 182, 212, 0.15);
  --accent-defend-glow: rgba(6, 182, 212, 0.4);
  --accent-success: #10b981;
  --accent-warning: #f59e0b;

  /* Text */
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --text-accent: var(--accent-primary);

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-accent: rgba(59, 130, 246, 0.3);

  /* Spacing */
  --section-pad: clamp(4rem, 10vh, 8rem);
  --container-max: 1200px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.4s;

  /* Canvas */
  --canvas-bg-inner: rgba(15, 23, 42, 0.3);
  --canvas-bg-outer: rgba(6, 10, 20, 0);
}

/* ============ LIGHT THEME ============ */
[data-theme="light"] {
  --bg-deep: #f1f5f9;
  --bg-surface: #e2e8f0;
  --bg-card: rgba(0, 0, 0, 0.025);
  --bg-card-hover: rgba(0, 0, 0, 0.05);

  --accent-primary: #2563eb;
  --accent-primary-dim: rgba(37, 99, 235, 0.1);
  --accent-primary-glow: rgba(37, 99, 235, 0.25);
  --accent-threat: #dc2626;
  --accent-threat-dim: rgba(220, 38, 38, 0.1);
  --accent-threat-glow: rgba(220, 38, 38, 0.25);
  --accent-defend: #0891b2;
  --accent-defend-dim: rgba(8, 145, 178, 0.1);
  --accent-defend-glow: rgba(8, 145, 178, 0.25);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.15);
  --border-accent: rgba(37, 99, 235, 0.3);

  --canvas-bg-inner: rgba(226, 232, 240, 0.5);
  --canvas-bg-outer: rgba(241, 245, 249, 0);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Canvas & Overlays --- */
#particle-network {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#constellation-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#satellite-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.scanline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* --- Container --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* --- Section Shared --- */
.section {
  position: relative;
  z-index: 2;
  padding: var(--section-pad) 0;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(3rem, 6vh, 5rem);
}

.section-tag {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============ NAVBAR ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  transition: background var(--duration) var(--ease-out),
              backdrop-filter var(--duration) var(--ease-out),
              border-color var(--duration) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(6, 10, 20, 0.85);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom-color: var(--border);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(241, 245, 249, 0.88);
}

.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0;
}

.logo-icon {
  color: var(--accent-primary);
  display: flex;
  flex-shrink: 0;
}

.nav-logo-image {
  width: 180px;
  height: 76px;
  display: block;
  object-fit: contain;
  object-position: left center;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

[data-theme="light"] .nav-logo-image {
  filter: none;
}

/* Satellite logo */
.logo-satellite-wrap {
  position: relative;
  width: 36px;
  height: 36px;
}

.logo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}

.logo-ring-outer {
  inset: 0;
  opacity: 0.8;
  animation: spin-logo 8s linear infinite;
}

.logo-ring-inner {
  inset: 5px;
  opacity: 0.65;
  animation: spin-logo 4s linear infinite reverse;
}

.logo-satellite-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.15);
  border-radius: 50%;
}

.logo-orbit-dot-wrap {
  position: absolute;
  inset: 0;
  animation: spin-logo 8s linear infinite;
}

.logo-orbit-dot {
  position: absolute;
  top: -2.5px;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--accent-success, #10b981);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.9);
}

@keyframes spin-logo {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.logo-subtext {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  transition: color 0.25s;
}

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

.nav-links .nav-cta {
  color: var(--accent-primary);
  padding: 0.45rem 1.2rem;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  transition: all 0.25s;
}

.nav-links .nav-cta:hover {
  background: var(--accent-primary-dim);
  color: var(--accent-primary);
}

/* Mobile nav */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-mobile-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-secondary);
  transition: all 0.3s;
}

.nav-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 0;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-bottom: 1rem;
}

.nav-mobile-menu a {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.25s;
}

.nav-mobile-menu a:hover {
  color: var(--text-primary);
}

.nav-mobile-menu.open {
  display: flex;
}

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

/* ============ HERO ============ */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 3rem;
}

.hero-content {
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--accent-defend);
  margin-bottom: 2.5rem;
  padding: 6px 16px;
  border: 1px solid var(--accent-defend-dim);
  border-radius: 100px;
  background: rgba(6, 182, 212, 0.05);
  animation: fadeInDown 0.8s var(--ease-out) both;
}

.badge-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-defend);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.15s both;
}

.title-line {
  display: inline;
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.title-line + .title-line::before {
  content: ' ';
}

.title-accent {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-defend));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-tagline {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.3s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.45s both;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  position: relative;
  overflow: hidden;
  border: none;
}

.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  border: 1px solid var(--accent-primary);
}

.btn-primary:hover {
  background: #2563eb;
  box-shadow: 0 0 30px var(--accent-primary-glow), 0 0 60px rgba(59, 130, 246, 0.15);
  transform: translateY(-1px);
}

.btn-primary .btn-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}

.btn-primary:hover .btn-glow {
  opacity: 1;
}

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

.btn-ghost:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 0.88rem;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  animation: fadeInUp 0.8s var(--ease-out) 0.6s both;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.stat-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* Scroll Indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: fadeInUp 1s var(--ease-out) 1s both;
}

.hero-scroll-indicator span {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent-primary), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

/* ============ PRODUCTS ============ */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.product-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 10%, var(--accent-primary-dim), transparent 45%),
    linear-gradient(180deg, var(--bg-card-hover), var(--bg-card));
  padding: clamp(1.5rem, 3vw, 2.25rem);
  overflow: hidden;
  transition: all var(--duration) var(--ease-out);
}

.product-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.product-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.product-eyebrow {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.product-card h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.product-status {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--accent-success);
  border: 1px solid rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.08);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  white-space: nowrap;
}

.product-description {
  color: var(--text-secondary);
  max-width: 72ch;
  margin-bottom: 1.15rem;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.product-tags span {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}

[data-theme="light"] .product-tags span {
  background: rgba(0, 0, 0, 0.02);
}

.product-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .product-card-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============ FEATURES ============ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
}

.feature-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem 1.75rem;
  transition: all var(--duration) var(--ease-out);
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--accent-primary);
  transition: height var(--duration) var(--ease-out);
  border-radius: 0 0 2px 0;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

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

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--accent-primary-dim);
  color: var(--accent-primary);
  margin-bottom: 1.25rem;
}

.feature-number {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.feature-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============ FRAMEWORKS ============ */
.frameworks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .frameworks-grid { grid-template-columns: 1fr; }
}

.framework-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  transition: all var(--duration) var(--ease-out);
  overflow: hidden;
}

.framework-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
  opacity: 0;
  transition: opacity var(--duration);
}

.framework-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
}

.framework-card:hover::after {
  opacity: 1;
}

.framework-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.framework-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
}

.framework-icon.stride {
  background: var(--accent-primary-dim);
  color: var(--accent-primary);
}

.framework-icon.mitre {
  background: var(--accent-threat-dim);
  color: var(--accent-threat);
}

.framework-icon.sparta {
  background: var(--accent-defend-dim);
  color: var(--accent-defend);
}

.framework-badge {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.framework-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.framework-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.framework-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.framework-tags span {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.25s;
}

.framework-card:hover .framework-tags span {
  border-color: var(--border-hover);
}

/* Connector */
.frameworks-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 2.5rem;
}

.connector-line {
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
}

.connector-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 8px var(--accent-primary-glow);
}

.connector-label {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

/* ============ HOW IT WORKS ============ */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline-track {
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-progress {
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--accent-primary), var(--accent-defend));
  transition: height 0.1s linear;
  border-radius: 1px;
}

.timeline-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem 0;
  position: relative;
}

.step-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  min-width: 56px;
}

.step-number {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border-hover);
  background: var(--bg-deep);
  position: relative;
  z-index: 1;
  transition: all 0.4s var(--ease-out);
}

.timeline-step.is-visible .step-dot {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  box-shadow: 0 0 12px var(--accent-primary-glow);
}

.step-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.step-content p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 600px) {
  .timeline-track { left: 20px; }
  .step-marker { min-width: 40px; }
  .timeline-step { gap: 1.25rem; }
}

/* ============ CTA SECTION ============ */
.cta-section {
  padding-bottom: 3rem;
}

.cta-box {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(3rem, 6vh, 5rem) clamp(2rem, 4vw, 4rem);
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(6, 182, 212, 0.04));
}

.cta-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ FOOTER ============ */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.footer-brand .logo-text {
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  display: block;
}

.footer-brand p {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  transition: color 0.25s;
}

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

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

@media (max-width: 600px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  .footer-links { gap: 1.25rem; }
}

/* ============ ANIMATIONS ============ */

/* Reveal on scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.features-grid [data-reveal]:nth-child(1) { transition-delay: 0s; }
.features-grid [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.features-grid [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.features-grid [data-reveal]:nth-child(4) { transition-delay: 0.24s; }
.features-grid [data-reveal]:nth-child(5) { transition-delay: 0.32s; }
.features-grid [data-reveal]:nth-child(6) { transition-delay: 0.4s; }

.frameworks-grid [data-reveal]:nth-child(1) { transition-delay: 0s; }
.frameworks-grid [data-reveal]:nth-child(2) { transition-delay: 0.1s; }
.frameworks-grid [data-reveal]:nth-child(3) { transition-delay: 0.2s; }

.timeline-steps [data-reveal]:nth-child(1) { transition-delay: 0s; }
.timeline-steps [data-reveal]:nth-child(2) { transition-delay: 0.1s; }
.timeline-steps [data-reveal]:nth-child(3) { transition-delay: 0.2s; }
.timeline-steps [data-reveal]:nth-child(4) { transition-delay: 0.3s; }
.timeline-steps [data-reveal]:nth-child(5) { transition-delay: 0.4s; }

/* Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(6, 182, 212, 0); }
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

/* ============ THEME TOGGLE ============ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  transition: opacity 0.25s, transform 0.35s var(--ease-out);
}

/* In dark mode: show sun icon (to switch to light) */
.theme-toggle .icon-sun { display: block; }
.theme-toggle .icon-moon { display: none; }

/* In light mode: show moon icon (to switch to dark) */
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Light theme scanline + grain adjustments */
[data-theme="light"] .scanline-overlay {
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.015) 2px,
    rgba(0, 0, 0, 0.015) 4px
  );
}

[data-theme="light"] .cta-bg-grid {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

[data-theme="light"] .cta-box {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04), rgba(8, 145, 178, 0.04));
}

[data-theme="light"] .framework-tags span {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .btn-ghost:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .hero-badge {
  background: rgba(8, 145, 178, 0.06);
}

/* Light theme font smoothing */
[data-theme="light"] body {
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
}

[data-theme="light"] .step-dot {
  background: var(--bg-deep);
}

/* ============ GLITCH EFFECT ============ */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.glitch::before {
  color: var(--accent-threat);
  animation: glitch-1 4s infinite linear alternate-reverse;
  clip-path: inset(0 0 80% 0);
  opacity: 0.6;
}

.glitch::after {
  color: var(--accent-defend);
  animation: glitch-2 4s infinite linear alternate-reverse;
  clip-path: inset(80% 0 0 0);
  opacity: 0.6;
}

/* Only glitch on hover for subtlety */
.hero-title .glitch::before,
.hero-title .glitch::after {
  opacity: 0;
  transition: opacity 0.2s;
}

.hero-title:hover .glitch::before,
.hero-title:hover .glitch::after {
  opacity: 0.6;
}

/* Also trigger a brief glitch on page load */
.hero-title .glitch {
  animation: fadeInUp 0.8s var(--ease-out) 0.15s both, glitch-flash 0.15s 1.2s 3;
}

@keyframes glitch-1 {
  0% { transform: translate(0); }
  20% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, 1px); }
  80% { transform: translate(1px, -2px); }
  100% { transform: translate(0); }
}

@keyframes glitch-2 {
  0% { transform: translate(0); }
  20% { transform: translate(2px, -2px); }
  40% { transform: translate(-2px, 1px); }
  60% { transform: translate(1px, -1px); }
  80% { transform: translate(-1px, 2px); }
  100% { transform: translate(0); }
}

@keyframes glitch-flash {
  0% { text-shadow: 2px 0 var(--accent-threat), -2px 0 var(--accent-defend); transform: translate(0); }
  33% { text-shadow: -2px 0 var(--accent-threat), 2px 0 var(--accent-defend); transform: translate(2px, -1px); }
  66% { text-shadow: 1px 0 var(--accent-threat), -1px 0 var(--accent-defend); transform: translate(-1px, 1px); }
  100% { text-shadow: none; transform: translate(0); }
}

/* ============ SCREENSHOTS & DEMO ============ */
.screenshots {
  overflow: hidden;
}

/* Browser mockup */
.showcase-browser {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  transition: all var(--duration) var(--ease-out);
}

.showcase-browser:hover {
  border-color: var(--border-hover);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .browser-bar {
  background: rgba(0, 0, 0, 0.04);
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.browser-url {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

[data-theme="light"] .browser-url {
  background: rgba(0, 0, 0, 0.03);
}

.browser-content {
  padding: 0;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

/* ---- Dashboard mockup ---- */
.mock-dashboard {
  display: flex;
  min-height: 380px;
}

.mock-sidebar {
  width: 52px;
  border-right: 1px solid var(--border);
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.mock-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent-primary-dim);
  border: 1px solid var(--accent-primary);
  margin-bottom: 8px;
}

.mock-nav-item {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: all 0.3s;
}

[data-theme="light"] .mock-nav-item {
  background: rgba(0, 0, 0, 0.04);
}

.mock-nav-item.active {
  background: var(--accent-primary-dim);
  border-color: var(--accent-primary);
}

.mock-main {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mock-title-bar {
  width: 140px;
  height: 14px;
  border-radius: 4px;
  background: var(--text-muted);
  opacity: 0.3;
}

.mock-actions-bar {
  width: 80px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent-primary-dim);
  border: 1px solid var(--accent-primary);
  opacity: 0.6;
}

.mock-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 12px;
  flex: 1;
}

.mock-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

[data-theme="light"] .mock-card {
  background: rgba(0, 0, 0, 0.02);
}

.mock-card-wide {
  grid-column: 1;
  grid-row: 1 / 3;
}

.mock-card-header {
  width: 60%;
  height: 10px;
  border-radius: 3px;
  background: var(--text-muted);
  opacity: 0.25;
}

/* Animated bar chart */
.mock-chart {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-top: 8px;
}

.mock-bar {
  flex: 1;
  height: var(--h);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(to top, var(--accent-primary), var(--accent-defend));
  opacity: 0.7;
  animation: bar-grow 1.5s var(--ease-out) both;
  transform-origin: bottom;
}

.mock-bar:nth-child(1) { animation-delay: 0.8s; }
.mock-bar:nth-child(2) { animation-delay: 0.9s; }
.mock-bar:nth-child(3) { animation-delay: 1.0s; }
.mock-bar:nth-child(4) { animation-delay: 1.1s; }
.mock-bar:nth-child(5) { animation-delay: 1.2s; }
.mock-bar:nth-child(6) { animation-delay: 1.3s; }
.mock-bar:nth-child(7) { animation-delay: 1.4s; }
.mock-bar:nth-child(8) { animation-delay: 1.5s; }

@keyframes bar-grow {
  from { transform: scaleY(0); opacity: 0; }
  to { transform: scaleY(1); opacity: 0.7; }
}

/* List items */
.mock-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.mock-list-item {
  height: 28px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 10px;
  gap: 8px;
  animation: list-slide 0.5s var(--ease-out) both;
}

[data-theme="light"] .mock-list-item {
  background: rgba(0, 0, 0, 0.02);
}

.mock-list-item:nth-child(1) { animation-delay: 1.0s; }
.mock-list-item:nth-child(2) { animation-delay: 1.1s; }
.mock-list-item:nth-child(3) { animation-delay: 1.2s; }
.mock-list-item:nth-child(4) { animation-delay: 1.3s; }
.mock-list-item:nth-child(5) { animation-delay: 1.4s; }

.mock-list-item::after {
  content: '';
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--text-muted);
  opacity: 0.15;
}

@keyframes list-slide {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.mock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mock-dot.threat { background: var(--accent-threat); box-shadow: 0 0 6px var(--accent-threat-glow); }
.mock-dot.defend { background: var(--accent-defend); box-shadow: 0 0 6px var(--accent-defend-glow); }
.mock-dot.warning { background: var(--accent-warning); }

/* Donut chart */
.mock-donut {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-donut svg {
  width: 90px;
  height: 90px;
}

.donut-segment {
  animation: donut-draw 1.5s var(--ease-out) 1s both;
  transform-origin: center;
}

@keyframes donut-draw {
  from { stroke-dasharray: 0 239; }
}

/* ---- Screenshot grid (smaller items) ---- */
.screenshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .screenshot-grid { grid-template-columns: 1fr; }
  .mock-dashboard { min-height: 280px; }
  .mock-grid { grid-template-columns: 1fr; }
  .mock-card-wide { grid-column: 1; grid-row: auto; }
}

.screenshot-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.showcase-browser.small .browser-content {
  min-height: 200px;
}

.screenshot-label h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.screenshot-label p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- Diagram mockup ---- */
.mock-diagram {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.diagram-svg {
  width: 100%;
  max-width: 300px;
}

/* ---- Terminal mockup ---- */
.mock-terminal {
  padding: 20px;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.72rem;
  line-height: 1.9;
  min-height: 200px;
}

.terminal-line {
  opacity: 0;
  animation: terminal-type 0.3s var(--ease-out) forwards;
  animation-delay: var(--delay, 0s);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

@keyframes terminal-type {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.t-prompt {
  color: var(--accent-primary);
  font-weight: 500;
}

.t-cmd { color: var(--text-secondary); }
.t-threat { color: var(--accent-threat); font-weight: 500; }
.t-info { color: var(--accent-defend); font-weight: 500; }
.t-text { color: var(--text-secondary); }
.t-success { color: var(--accent-success); font-weight: 500; }
.t-critical {
  color: var(--accent-threat);
  font-weight: 700;
  animation: blink-critical 1s step-end infinite;
}

.t-cursor {
  color: var(--accent-primary);
  animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes blink-critical {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============ GRAIN OVERLAY ============ */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}
