/* ============================================
   CLIQUE — SF Light Design System
   ============================================
   White-first. Black ink on white paper.
   The cleanest read in any boardroom.
   ============================================ */

:root {
  --bg-primary: #FFFFFF;
  --bg-secondary: #F4F4F5;
  --bg-tertiary: #E4E4E7;
  --bg-card: #FAFAFA;
  --bg-card-hover: #F4F4F5;

  --text-primary: #09090B;
  --text-secondary: #52525B;
  --text-tertiary: #A1A1AA;

  --accent: #18181B;
  --accent-light: #3F3F46;
  --accent-dim: rgba(9, 9, 11, 0.06);
  --accent-glow: rgba(9, 9, 11, 0.03);

  --border: rgba(9, 9, 11, 0.1);
  --border-hover: rgba(9, 9, 11, 0.2);

  --success: #16a34a;
  --danger: #dc2626;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
}

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

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

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

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

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

/* --- Scroll Progress Bar --- */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 10001;
  transition: width 0.1s linear;
}

/* --- Loader --- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loader-svg {
  width: 80px;
  height: 80px;
}

.loader-node {
  fill: var(--accent);
  animation: loaderPulse 1.5s ease-in-out infinite;
}

.loader-node.n1 { animation-delay: 0s; }
.loader-node.n2 { animation-delay: 0.15s; }
.loader-node.n3 { animation-delay: 0.3s; }
.loader-node.n4 { animation-delay: 0.45s; }
.loader-node.n5 { animation-delay: 0.6s; }

.loader-edge {
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.3;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: loaderEdge 2s ease-in-out infinite;
}

.loader-edge.e5 { animation-delay: 0.3s; }
.loader-edge.e6 { animation-delay: 0.6s; }

@keyframes loaderPulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

@keyframes loaderEdge {
  0% { stroke-dashoffset: 60; opacity: 0.1; }
  50% { stroke-dashoffset: 0; opacity: 0.5; }
  100% { stroke-dashoffset: -60; opacity: 0.1; }
}

.loader-text {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--text-primary);
  opacity: 0.8;
}

.loader-bar {
  width: 160px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  animation: loaderFill 2s ease-out forwards;
}

@keyframes loaderFill {
  to { width: 100%; }
}

/* --- Navigation --- */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 48px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all var(--transition);
  transform: translateY(-100%);
  opacity: 0;
}

#navbar.visible {
  transform: translateY(0);
  opacity: 1;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.nav-wordmark {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 36px;
}

.nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  transition: color var(--transition);
  position: relative;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text-primary);
  transition: all var(--transition);
}

.nav-hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 5px);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -5px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-link {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.mobile-link:hover {
  color: var(--text-primary);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-primary);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  letter-spacing: 0.02em;
}

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

.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px var(--accent-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

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

.btn-nav {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-hover);
  padding: 8px 20px;
  font-size: 13px;
}

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

.btn-mobile {
  background: var(--accent);
  color: var(--bg-primary);
  padding: 16px 40px;
  font-size: 16px;
  border: none;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
  justify-content: center;
  padding: 16px 28px;
  font-size: 15px;
  font-weight: 600;
}

.btn-arrow {
  transition: transform var(--transition);
}

.btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* --- Three.js Canvas --- */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* --- Sections --- */
main {
  position: relative;
  z-index: 1;
}

.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 48px;
  background: var(--bg-primary);
}

.section-hero {
  background: transparent;
}

.section-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.section-container-narrow {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 0 48px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.section-label span {
  font-size: 11px;
  color: var(--text-tertiary);
}

.section-title {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 56px;
}

/* --- Hero Section --- */
.section-hero {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding-bottom: 60px;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: var(--accent-dim);
  border: 1px solid var(--border);
  border-radius: 100px;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(20px);
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.tag-text {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
}

.hero-title {
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
}

.title-line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  filter: blur(8px);
}

.text-accent {
  color: var(--text-primary);
  position: relative;
}

.text-accent::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--accent-dim);
  border-radius: 2px;
  z-index: -1;
}

.hero-sub {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 64px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(20px);
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: block;
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

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

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
}

.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--text-tertiary);
  text-transform: uppercase;
}

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

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- Section Progress Index (right side) --- */
.section-progress {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.section-progress.visible {
  opacity: 1;
}

.progress-dot {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.progress-dot span {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  transition: all var(--transition);
}

.progress-dot::before {
  content: '';
  position: absolute;
  left: -8px;
  width: 2px;
  height: 100%;
  background: var(--border);
  transition: background var(--transition);
}

.progress-dot:first-child::before {
  display: none;
}

.progress-dot.active span {
  color: var(--accent);
  font-weight: 600;
}

.progress-dot.active::before {
  background: var(--accent);
}

/* --- Problem Section --- */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.problem-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

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

.problem-card:hover::before {
  opacity: 1;
}

.problem-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.problem-icon svg {
  width: 40px;
  height: 40px;
}

.problem-stat {
  font-family: var(--font-mono);
  font-size: 36px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.problem-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

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

/* --- Insight Section --- */
.section-insight {
  min-height: auto;
  padding: 80px 48px;
  background: var(--bg-secondary);
}

.insight {
  text-align: center;
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary);
  border: none;
  margin: 0;
  padding: 0;
}

.insight strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* --- Product Graph --- */
.section-product {
  padding-top: 100px;
  padding-bottom: 100px;
}

.product-graph {
  position: relative;
  width: 100%;
  max-width: 1000px;
  height: 700px;
  margin: 20px auto 0;
}

.graph-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.wire {
  stroke-dasharray: 8 4;
  animation: wireDash 20s linear infinite;
}

@keyframes wireDash {
  to { stroke-dashoffset: -240; }
}

.wire-particle {
  opacity: 0.4;
}

.graph-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.center-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 32px;
  background: var(--bg-primary);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  box-shadow: 0 0 60px var(--accent-dim), 0 4px 20px rgba(0,0,0,0.06);
  position: relative;
  z-index: 2;
}

.center-pulse {
  position: absolute;
  inset: -20px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  opacity: 0;
  animation: nodePulse 3s ease-out infinite;
  z-index: 1;
}

@keyframes nodePulse {
  0% { transform: scale(0.8); opacity: 0.3; }
  100% { transform: scale(1.3); opacity: 0; }
}

.orbit-node {
  position: absolute;
  z-index: 2;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: default;
  max-width: 200px;
}

.orbit-node:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  box-shadow: 0 4px 20px var(--accent-dim);
  transform: translateY(-2px);
}

.node-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.node-desc {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
}

/* Position orbit nodes — properly spaced around center */
.orbit-node.n1 { left: 2%; top: 10%; }
.orbit-node.n2 { left: 38%; top: 2%; }
.orbit-node.n3 { right: 2%; top: 10%; }
.orbit-node.n4 { left: 0%; bottom: 12%; }
.orbit-node.n5 { left: 25%; bottom: 2%; }
.orbit-node.n6 { right: 2%; bottom: 18%; }
.orbit-node.n7 { right: 22%; bottom: 2%; }

/* --- Control Plane / Dashboard --- */
.section-control-plane {
  background: var(--bg-secondary);
}

.dashboard {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.06);
}

.dash-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

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

.dash-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
}

.dash-dots span:first-child { background: #fca5a5; border-color: #fca5a5; }
.dash-dots span:nth-child(2) { background: #fcd34d; border-color: #fcd34d; }
.dash-dots span:nth-child(3) { background: #86efac; border-color: #86efac; }

.dash-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  letter-spacing: 0.04em;
}

.dash-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 340px;
}

.dash-sidebar {
  padding: 16px 0;
  border-right: 1px solid var(--border);
  background: var(--bg-card);
}

.dash-nav-item {
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition);
  border-left: 2px solid transparent;
}

.dash-nav-item:hover {
  color: var(--text-secondary);
  background: var(--accent-dim);
}

.dash-nav-item.active {
  color: var(--text-primary);
  background: var(--accent-dim);
  border-left-color: var(--accent);
  font-weight: 500;
}

.dash-main {
  padding: 24px;
}

.dash-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.dash-metric-card {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.dash-metric-label {
  display: block;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.dash-metric-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.dash-bar {
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  overflow: hidden;
}

.dash-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 1s ease;
}

.dash-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.dash-table-header,
.dash-table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1fr;
  padding: 10px 16px;
  font-size: 12px;
  gap: 8px;
  align-items: center;
}

.dash-table-header {
  background: var(--bg-secondary);
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
}

.dash-table-row {
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}

.dash-table-row:hover {
  background: var(--accent-dim);
}

.priority-high {
  color: var(--danger);
  font-weight: 600;
  font-size: 11px;
}

.priority-med {
  color: #d97706;
  font-weight: 500;
  font-size: 11px;
}

.priority-low {
  color: var(--text-tertiary);
  font-size: 11px;
}

.status-running {
  color: var(--success);
  font-weight: 500;
  font-size: 11px;
}

.status-queued {
  color: var(--text-tertiary);
  font-size: 11px;
}

.control-plane-citation {
  text-align: center;
  font-size: 16px;
  font-style: italic;
  color: var(--text-tertiary);
  max-width: 640px;
  margin: 40px auto 0;
  line-height: 1.7;
}

/* --- How It Works --- */
.how-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

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

.timeline-line {
  position: absolute;
  left: 32px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--bg-tertiary);
}

.timeline-line-fill {
  width: 100%;
  height: 0%;
  background: var(--accent);
  transition: height 0.15s linear;
  border-radius: 1px;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding: 28px 0;
  position: relative;
  opacity: 0.4;
  transition: opacity 0.5s ease;
}

.timeline-step.active {
  opacity: 1;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-tertiary);
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--bg-primary);
  position: relative;
  z-index: 2;
  transition: all var(--transition);
}

.timeline-step.active .step-number {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 20px var(--accent-dim);
}

.step-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.step-content p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 400px;
}

/* Terminal Demo */
.terminal-demo {
  position: sticky;
  top: 120px;
  background: #0C0C0C;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.08);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: #1A1A1A;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

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

.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dots span:first-child { background: #ff5f57; }
.terminal-dots span:nth-child(2) { background: #febc2e; }
.terminal-dots span:nth-child(3) { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.04em;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
  min-height: 420px;
}

.terminal-line {
  display: flex;
  gap: 8px;
  color: rgba(255,255,255,0.7);
}

.t-prompt {
  color: #28c840;
  font-weight: 600;
  user-select: none;
}

.t-cmd {
  color: #FFFFFF;
  font-weight: 500;
}

.t-output {
  color: rgba(255,255,255,0.5);
}

.t-success {
  color: #28c840;
}

.t-info {
  color: rgba(255,255,255,0.35);
}

.t-highlight {
  color: #28c840;
  font-weight: 600;
}

.t-space {
  height: 12px;
}

.terminal-cursor {
  display: inline-block;
  width: 7px;
  height: 14px;
  background: #28c840;
  animation: blink 1s step-end infinite;
  margin-top: 4px;
}

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

/* --- ROI Section --- */
.section-roi {
  background: var(--bg-primary);
}

.roi-subtitle {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--danger);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: -40px;
  margin-bottom: 40px;
}

.roi-table-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}

.roi-table-card {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.roi-table-highlight {
  border-color: var(--accent);
  background: var(--bg-primary);
  box-shadow: 0 4px 20px var(--accent-dim);
}

.roi-table-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.roi-freq {
  font-weight: 400;
  font-size: 14px;
  color: var(--text-tertiary);
}

.roi-line-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}

.roi-line-item:last-child {
  border-bottom: none;
}

.roi-amount {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 15px;
}

.roi-total {
  padding-top: 16px;
  margin-top: 4px;
  border-top: 2px solid var(--border);
  border-bottom: none;
  font-weight: 700;
}

.roi-total span:first-child {
  font-weight: 700;
  color: var(--text-primary);
}

.roi-total-red {
  color: var(--danger) !important;
  font-size: 18px !important;
}

.roi-total-green {
  color: var(--success) !important;
  font-size: 18px !important;
}

.roi-bottom-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 32px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.roi-metric {
  text-align: center;
}

.roi-metric-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.roi-metric-grow {
  font-size: 22px;
}

.roi-metric-label {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 6px;
}

.roi-metric-dot {
  font-size: 24px;
  color: var(--text-tertiary);
  line-height: 1;
}

/* --- Compliance Bar --- */
.section-compliance {
  padding: 60px 48px;
  background: var(--bg-primary);
  text-align: center;
}

.compliance-label {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 20px;
  letter-spacing: 0.06em;
}

.compliance-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.compliance-tags span {
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  letter-spacing: 0.06em;
}

/* --- Dashboard Tabs --- */
.dash-tab {
  display: none;
}

.dash-tab.active {
  display: block;
  animation: tabFadeIn 0.3s ease;
}

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

.dash-settings {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dash-setting-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.dash-setting-group:last-child {
  border-bottom: none;
}

.dash-setting-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.dash-setting-value {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
  background: var(--bg-secondary);
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* --- Converging Finale Canvas --- */
.converge-finale {
  padding: 40px 0;
  background: var(--bg-primary);
  position: relative;
  height: 400px;
  overflow: hidden;
}

#converge-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- CTA Section --- */
.section-cta {
  min-height: auto;
  padding: 100px 48px 80px;
  background: var(--bg-primary);
}

.cta-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.cta-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}

.cta-glass {
  position: relative;
}

.cta-glass-inner {
  background: rgba(244, 244, 245, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.04);
}

.cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.cta-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  color: #16a34a;
  font-family: var(--font-primary);
  font-size: 15px;
  font-weight: 500;
}

.form-success-icon {
  font-size: 18px;
  font-weight: 700;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group input,
.form-group select {
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-primary);
  font-size: 14px;
  transition: all var(--transition);
  outline: none;
  width: 100%;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' stroke='%23A1A1AA' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-group input::placeholder {
  color: var(--text-tertiary);
}

/* --- Footer --- */
.footer {
  padding: 24px 48px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-tertiary);
  transition: color var(--transition);
}

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

/* --- Reveal Animations --- */
.reveal-text {
  opacity: 0;
  transform: translateY(30px);
}

.reveal-text.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-up {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Staggered delays */
.reveal-up[data-delay="1"].revealed,
.reveal-scale[data-delay="1"].revealed { transition-delay: 0.1s; }
.reveal-up[data-delay="2"].revealed,
.reveal-scale[data-delay="2"].revealed { transition-delay: 0.2s; }
.reveal-up[data-delay="3"].revealed,
.reveal-scale[data-delay="3"].revealed { transition-delay: 0.3s; }
.reveal-up[data-delay="4"].revealed,
.reveal-scale[data-delay="4"].revealed { transition-delay: 0.4s; }
.reveal-up[data-delay="5"].revealed,
.reveal-scale[data-delay="5"].revealed { transition-delay: 0.5s; }
.reveal-up[data-delay="6"].revealed,
.reveal-scale[data-delay="6"].revealed { transition-delay: 0.6s; }
.reveal-up[data-delay="7"].revealed,
.reveal-scale[data-delay="7"].revealed { transition-delay: 0.7s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .section {
    padding: 80px 32px;
  }

  .problem-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .how-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .terminal-demo {
    position: relative;
    top: auto;
  }

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

  .roi-metrics {
    flex-wrap: wrap;
    gap: 24px;
    padding: 32px;
  }

  .roi-metric-divider {
    display: none;
  }

  .section-progress {
    display: none;
  }

  .roi-table-grid {
    grid-template-columns: 1fr;
  }

  .roi-bottom-metrics {
    flex-wrap: wrap;
    gap: 20px;
  }

  .roi-metric-dot {
    display: none;
  }

  .product-graph {
    height: auto;
    min-height: 700px;
  }

  .dash-body {
    grid-template-columns: 1fr;
  }

  .dash-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    display: flex;
    overflow-x: auto;
    padding: 0;
  }

  .dash-nav-item {
    border-left: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    padding: 12px 16px;
  }

  .dash-nav-item.active {
    border-bottom-color: var(--accent);
    border-left-color: transparent;
  }
}

@media (max-width: 768px) {
  #navbar {
    padding: 0 24px;
  }

  .nav-links,
  .nav-actions {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .section {
    padding: 80px 20px;
  }

  .section-container-narrow {
    padding: 0 20px;
  }

  .hero-title {
    font-size: clamp(32px, 8vw, 52px);
  }

  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }

  .stat-divider {
    width: 48px;
    height: 1px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .dash-row {
    grid-template-columns: 1fr;
  }

  .footer {
    padding: 24px 20px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .product-graph {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 20px 0;
  }

  .graph-wires {
    display: none;
  }

  .graph-center {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    order: -1;
    margin-bottom: 12px;
  }

  .orbit-node {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 320px;
  }

  .center-node {
    flex-direction: row;
    padding: 16px 24px;
  }

  .converge-finale {
    display: none;
  }

  .section-compliance {
    padding: 40px 20px;
  }

  .compliance-tags {
    gap: 8px;
  }

  .timeline-step {
    gap: 20px;
  }

  .step-number {
    width: 48px;
    height: 48px;
    font-size: 12px;
  }

  .timeline-line {
    left: 24px;
  }

  .section-insight {
    padding: 60px 20px;
  }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}
