:root {
  --accent: #0a58bf;
  --accent-rgb: 10, 88, 191;
  --bg: #ffffff;
  --bg-elevated: #f5f5f5;
  --surface: rgba(0, 0, 0, 0.04);
  --border: rgba(0, 0, 0, 0.1);
  --text: #000000;
  --text-muted: rgba(0, 0, 0, 0.5);
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

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

#network {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 20%, transparent 70%);
}

.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.glow-1 {
  width: 600px;
  height: 600px;
  background: rgba(0, 0, 0, 0.03);
  top: -15%;
  right: -10%;
  opacity: 1;
  animation: drift 18s ease-in-out infinite;
}

@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(40px, 30px); }
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 1.25rem 2.5rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92), transparent);
  backdrop-filter: blur(8px);
}

.logo {
  height: 64px;
  width: auto;
  display: block;
  transition: opacity 0.25s;
}

.logo-link:hover .logo {
  opacity: 0.85;
}

.nav {
  display: flex;
  gap: 2rem;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.25s;
}

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

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2.5rem 4rem;
}

.hero-content {
  text-align: center;
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.6);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.85); }
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero h1 .line {
  display: block;
}

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

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* Orbit graphic */
.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(500px, 90vw);
  height: min(500px, 90vw);
  pointer-events: none;
  z-index: -1;
  opacity: 0.3;
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 50%;
}

.ring-1 { animation: spin 30s linear infinite; }
.ring-2 {
  inset: 15%;
  border-color: rgba(0, 0, 0, 0.05);
  animation: spin 22s linear infinite reverse;
}
.ring-3 {
  inset: 30%;
  border-color: rgba(0, 0, 0, 0.1);
  animation: spin 16s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.orbit-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  margin: -6px;
  border-radius: 50%;
  background: #000000;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
  animation: core-pulse 3s ease-in-out infinite;
}

@keyframes core-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 0, 0, 0.15); }
  50% { box-shadow: 0 0 36px rgba(0, 0, 0, 0.25); }
}

.orbit-node {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000000;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.node-1 { top: 5%; left: 50%; margin-left: -4px; animation: orbit-node 8s ease-in-out infinite; }
.node-2 { bottom: 20%; right: 10%; animation: orbit-node 10s ease-in-out infinite 1s; }
.node-3 { bottom: 15%; left: 15%; animation: orbit-node 12s ease-in-out infinite 2s; }
.node-4 { top: 30%; right: 5%; animation: orbit-node 9s ease-in-out infinite 0.5s; }

@keyframes orbit-node {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; }
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

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

@keyframes scroll-line {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); }
}

/* Capabilities */
.capabilities {
  position: relative;
  z-index: 1;
  padding: 6rem 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-label .mono {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.section-label h2 {
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.cap-card {
  position: relative;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.35s, transform 0.35s, box-shadow 0.35s;
  display: flex;
  flex-direction: column;
}

.cap-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.cap-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.cap-card:hover::before {
  opacity: 0.15;
}

.cap-visual {
  position: relative;
  height: 180px;
  background: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.cap-card h3 {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1.25rem 1.5rem 0;
}

.cap-bar {
  margin: 1rem 1.5rem 1.5rem;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
}

/* AI illustration */
.cap-visual--ai,
.cap-card--ai .cap-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-net {
  width: 88%;
  max-width: 300px;
  height: auto;
}

.ai-links line {
  stroke: rgba(0, 0, 0, 0.12);
  stroke-width: 1;
  stroke-dasharray: 4 8;
  animation: ai-flow 3.5s linear infinite;
}

.ai-links line:nth-child(odd) {
  animation-delay: -2.5s;
}

@keyframes ai-flow {
  to { stroke-dashoffset: -24; }
}

.ai-node {
  fill: #ffffff;
  stroke: var(--accent);
  stroke-width: 2;
}

.ai-node.n1, .ai-node.n2, .ai-node.n3 { animation: ai-node-pulse 3.5s ease-in-out infinite; }
.ai-node.n4 { animation: ai-node-pulse 3.5s ease-in-out infinite 0.3s; }
.ai-node.n5 { animation: ai-node-pulse 3.5s ease-in-out infinite 0.6s; }
.ai-node.n6 { animation: ai-node-pulse 3.5s ease-in-out infinite 0.9s; }
.ai-node.n7 { animation: ai-node-pulse 3.5s ease-in-out infinite 1.2s; }
.ai-node.n-out {
  fill: var(--accent);
  stroke: none;
  transform-box: fill-box;
  transform-origin: center;
  animation: ai-out-pulse 3.5s ease-in-out infinite;
}

@keyframes ai-out-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.12); opacity: 1; }
}

@keyframes ai-node-pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.ai-pulse {
  fill: var(--accent);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.ai-pulse--1 { animation: ai-signal-1 3.8s ease-in-out infinite; }
.ai-pulse--2 { animation: ai-signal-2 3.8s ease-in-out infinite 0.7s; }
.ai-pulse--3 { animation: ai-signal-3 3.8s ease-in-out infinite 1.4s; }
.ai-pulse--4 { animation: ai-signal-4 2.6s ease-in-out infinite 0.35s; }
.ai-pulse--5 { animation: ai-signal-5 2.6s ease-in-out infinite 1.05s; }

@keyframes ai-signal-1 {
  0% { transform: translate(0, 0); opacity: 0; }
  8% { opacity: 1; }
  42% { transform: translate(92px, 18px); opacity: 1; }
  78% { transform: translate(220px, 40px); opacity: 0.9; }
  100% { transform: translate(220px, 40px); opacity: 0; }
}

@keyframes ai-signal-2 {
  0% { transform: translate(0, 0); opacity: 0; }
  8% { opacity: 1; }
  42% { transform: translate(92px, -22px); opacity: 1; }
  78% { transform: translate(220px, 0); opacity: 0.9; }
  100% { transform: translate(220px, 0); opacity: 0; }
}

@keyframes ai-signal-3 {
  0% { transform: translate(0, 0); opacity: 0; }
  8% { opacity: 1; }
  42% { transform: translate(92px, -32px); opacity: 1; }
  78% { transform: translate(220px, -40px); opacity: 0.9; }
  100% { transform: translate(220px, -40px); opacity: 0; }
}

@keyframes ai-signal-4 {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  75% { transform: translate(128px, 22px); opacity: 0.95; }
  100% { transform: translate(128px, 22px); opacity: 0; }
}

@keyframes ai-signal-5 {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  75% { transform: translate(128px, -8px); opacity: 0.95; }
  100% { transform: translate(128px, -8px); opacity: 0; }
}

.ai-badge {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.3rem 0.55rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 4px;
}

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

/* Software code illustration */
.code-window {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--mono);
  font-size: 0.68rem;
  line-height: 1.55;
}

.code-titlebar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.55rem 0.75rem;
  background: rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.code-titlebar span:nth-child(1) { width: 8px; height: 8px; border-radius: 50%; background: #ff5f57; }
.code-titlebar span:nth-child(2) { width: 8px; height: 8px; border-radius: 50%; background: #febc2e; }
.code-titlebar span:nth-child(3) { width: 8px; height: 8px; border-radius: 50%; background: #28c840; }

.code-filename {
  margin-left: auto;
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.code-body {
  flex: 1;
  padding: 0.65rem 0;
  overflow: hidden;
}

.code-line {
  display: flex;
  gap: 0.65rem;
  padding: 0 0.75rem;
  min-height: 1.55em;
}

.code-line--typing .code-txt {
  color: rgba(0, 0, 0, 0.75);
}

.code-body.is-clearing {
  opacity: 0.3;
  transition: opacity 0.35s ease;
}

.code-body {
  transition: opacity 0.35s ease;
}

.ln {
  width: 1rem;
  text-align: right;
  color: rgba(0, 0, 0, 0.2);
  user-select: none;
  flex-shrink: 0;
}

.code-txt {
  color: rgba(0, 0, 0, 0.75);
  white-space: nowrap;
}

.c-kw { color: var(--accent); }
.c-fn { color: #000000; }
.c-str { color: rgba(0, 0, 0, 0.45); }

.code-cursor {
  display: inline-block;
  width: 7px;
  height: 0.9em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: cursor-blink 1.2s step-end infinite;
}

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

.cap-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 1px;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.cap-card.visible .cap-bar span {
  width: 100%;
}

/* Ticker */
.ticker-wrap {
  margin-top: 4rem;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.ticker {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  animation: ticker 30s linear infinite;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

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

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* Statement */
.statement {
  position: relative;
  z-index: 1;
  padding: 8rem 2.5rem;
}

.statement-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.statement .label {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.statement blockquote {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}

.statement blockquote em {
  font-style: normal;
  color: var(--accent);
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.stat-num {
  font-size: 2.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--text);
}

.stat-plus {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent);
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.25rem;
}

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

/* Contact */
.contact {
  position: relative;
  z-index: 1;
  padding: 4rem 2.5rem 6rem;
}

.contact-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 3rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  backdrop-filter: blur(12px);
}

.contact h2 {
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.25s, gap 0.25s;
}

.contact-link:hover {
  color: var(--accent);
  gap: 1rem;
}

.contact-link svg {
  color: var(--accent);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  border-top: 1px solid var(--border);
}

.footer-logo {
  height: 56px;
  width: auto;
  opacity: 1;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0s);
}

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

/* Responsive */
@media (max-width: 700px) {
  .cap-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 1rem 1.5rem;
  }

  .logo {
    height: 48px;
  }

  .cap-card h3 {
    padding: 1rem 1.25rem 0;
  }

  .cap-bar {
    margin: 0.85rem 1.25rem 1.25rem;
  }

  .cap-visual {
    height: 160px;
  }

  .code-body {
    font-size: 0.62rem;
  }

  .nav {
    gap: 1.25rem;
  }

  .hero {
    padding: 5rem 1.5rem 3rem;
  }

  .capabilities,
  .statement,
  .contact {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .cap-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cap-card {
    padding: 0;
  }

  .stat-row {
    gap: 1.5rem;
  }

  .stat-num {
    font-size: 2rem;
  }

  .orbit {
    opacity: 0.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
