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

:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --surface: #1e1e1e;
  --text: #f0ede8;
  --text-secondary: #a8a29e;
  --text-muted: #6b6560;
  --accent: #c8b89a;
  --accent-bright: #e8d5b5;
  --accent-dim: #8a7d6b;
  --green: #4a7c5c;
  --green-glow: rgba(74, 124, 92, 0.12);
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* Skip link */
.skip-link {
  position: absolute; top: -100px; left: 16px;
  background: var(--accent); color: var(--bg);
  padding: 8px 16px; border-radius: 6px;
  font-size: 14px; font-weight: 600; z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* Grain overlay */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  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.85' 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: 256px 256px;
}

/* Layout */
.container { max-width: 1400px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 80px); }

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }

/* ─── Nav ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 28px 0;
  transition: all 0.5s var(--ease-out);
}
.nav.scrolled {
  padding: 16px 0;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
}
.nav-brand img { width: 32px; height: 32px; border-radius: 6px; }
.nav-center { display: flex; gap: 40px; align-items: center; }
.nav-center a {
  font-size: 13px; font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
}
.nav-center a::after {
  content: '';
  position: absolute; bottom: -4px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav-center a:hover { color: var(--text); }
.nav-center a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-center a:focus-visible { outline: 1px solid var(--accent); outline-offset: 4px; }
.nav-cta {
  font-size: 13px; font-weight: 500;
  color: var(--bg); background: var(--text);
  padding: 10px 28px; border-radius: 100px;
  letter-spacing: 0.02em;
  transition: all 0.3s var(--ease-out);
}
.nav-cta:hover { background: var(--accent); color: var(--bg); transform: translateY(-1px); }
.nav-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Hamburger */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; width: 40px; height: 40px;
  flex-direction: column; justify-content: center; gap: 6px; align-items: center;
}
.nav-toggle span {
  display: block; width: 24px; height: 1.5px;
  background: var(--text); border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}


/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  overflow: hidden;
  padding: 160px 0 120px;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden;
}
.hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 65% 40%, var(--green-glow), transparent 70%),
              radial-gradient(ellipse 50% 40% at 30% 60%, rgba(200, 184, 154, 0.03), transparent 60%);
}
.hero-rings-bg {
  position: absolute;
  top: 50%; right: -8%;
  transform: translateY(-50%);
  width: 55vw; max-width: 800px; min-width: 400px;
  opacity: 0.05;
  filter: blur(2px);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 32px;
}
.hero-eyebrow::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--accent-dim);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 32px;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero-desc {
  font-size: 17px; line-height: 1.75;
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: 48px;
  font-weight: 300;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.hero-ring-art {
  width: 100%; max-width: 520px;
  opacity: 0.45;
  animation: float 8s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(1.5deg); }
}
.hero-stat-cards { position: absolute; inset: 0; pointer-events: none; }
.hero-stat {
  position: absolute;
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  pointer-events: auto;
  transition: all 0.5s var(--ease-out);
}
.hero-stat:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  background: rgba(20, 20, 20, 0.9);
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 500;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}
.hero-stat-label {
  font-size: 11px; font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hero-stat-1 { top: 8%; right: 5%; }
.hero-stat-2 { bottom: 22%; left: -2%; }
.hero-stat-3 { bottom: 2%; right: 12%; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px; border-radius: 100px;
  font-size: 14px; font-weight: 500;
  border: none; cursor: pointer;
  transition: all 0.4s var(--ease-out);
  letter-spacing: 0.02em;
  font-family: var(--font-body);
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); }
.btn-secondary {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-hover);
}
.btn-secondary:hover { border-color: var(--accent-dim); color: var(--accent); }

/* ─── Marquee ─── */
.marquee-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  overflow: hidden;
}
.marquee-track {
  display: flex; gap: 56px;
  animation: marquee 35s linear infinite;
  width: max-content;
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marquee-item {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex; align-items: center; gap: 12px;
}
.marquee-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--accent-dim);
}

/* ─── Section shared ─── */
.section { padding: clamp(80px, 10vw, 160px) 0; }
.section-label {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.section-label::before {
  content: '';
  width: 24px; height: 1px;
  background: var(--accent-dim);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 64px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.section-title em { font-style: italic; color: var(--accent); }
.section-desc {
  font-size: 17px; color: var(--text-secondary);
  line-height: 1.7; max-width: 520px;
  font-weight: 300;
}

/* ─── Philosophy ─── */
.philosophy { border-top: 1px solid var(--border); }
.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 120px);
  align-items: start;
}
.philosophy-text {
  font-size: 18px; line-height: 1.8;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 24px;
}
.philosophy-text:last-child { margin-bottom: 0; }


/* ─── Pipeline ─── */
.pipeline-section { border-top: 1px solid var(--border); }
.pipeline-section .section-header { margin-bottom: 64px; }
.pipeline-visual {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.pipeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  transition: all 0.5s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.pipeline-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-dim), transparent);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}
.pipeline-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}
.pipeline-card:hover::before { opacity: 1; }
.pipeline-card-num {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  color: var(--accent-dim);
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.pipeline-card-title {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 400;
  margin-bottom: 8px;
  color: var(--text);
}
.pipeline-card-agent {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
.pipeline-card-desc {
  font-size: 14px; line-height: 1.65;
  color: var(--text-muted);
  font-weight: 300;
}

/* Pipeline meta */
.pipeline-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pipeline-meta-card {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: border-color 0.3s ease;
}
.pipeline-meta-card:hover { border-color: var(--border-hover); }
.pipeline-meta-card svg { color: var(--accent); flex-shrink: 0; }
.pipeline-meta-card strong { color: var(--text); font-weight: 500; }

/* ─── Features ─── */
.features-section { border-top: 1px solid var(--border); }
.features-header { margin-bottom: 64px; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-card {
  padding: 40px 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  transition: all 0.5s var(--ease-out);
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(200,184,154,0.04), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.feature-card:hover { border-color: var(--border-hover); }
.feature-card:hover::after { opacity: 1; }
.feature-card-num {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  color: var(--accent-dim);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 400;
  margin-bottom: 12px;
  color: var(--text);
}
.feature-card p {
  font-size: 14px; line-height: 1.7;
  color: var(--text-muted);
  font-weight: 300;
}

/* ─── Agents ─── */
.agents-section {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}
.agents-header { margin-bottom: 64px; }
.agents-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.agent-card {
  position: relative;
  border-radius: 20px;
  padding: 1px;
  background: var(--border);
  transition: all 0.5s var(--ease-out);
  cursor: default;
  --mouse-x: 50%;
  --mouse-y: 50%;
}
.agent-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 20px;
  background: radial-gradient(
    300px circle at var(--mouse-x) var(--mouse-y),
    rgba(200, 184, 154, 0.12),
    transparent 60%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 0;
}
.agent-card:hover::before { opacity: 1; }
.agent-card-inner {
  position: relative; z-index: 1;
  background: var(--bg-card);
  border-radius: 19px;
  padding: 32px 28px;
  height: 100%;
}
.agent-card-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.agent-alias {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.agent-type {
  font-size: 11px; font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
}
.agent-role {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 400;
  margin-bottom: 12px;
  color: var(--text);
}
.agent-desc {
  font-size: 14px; line-height: 1.7;
  color: var(--text-muted);
  font-weight: 300;
}


/* ─── Install ─── */
.install-section { border-top: 1px solid var(--border); }
.install-header { margin-bottom: 48px; }
.install-tabs {
  display: flex; gap: 8px;
  max-width: 600px;
  margin-bottom: 20px;
}
.install-tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  font-family: var(--font-body);
  color: var(--text);
}
.install-tab:hover { border-color: var(--border-hover); }
.install-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.install-tab.active { border-color: var(--accent-dim); background: var(--bg-card-hover); }
.install-tab-name { font-size: 15px; font-weight: 500; }
.install-tab-desc { font-size: 11px; color: var(--text-muted); }
.install-panel { display: none; }
.install-panel.active { display: block; }
.install-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(24px, 3vw, 40px);
  max-width: 600px;
}
.install-steps { display: flex; flex-direction: column; gap: 28px; }
.install-step { display: flex; gap: 16px; }
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-hover);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  color: var(--accent);
  flex-shrink: 0;
}
.step-body h3 {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 400;
  margin-bottom: 6px;
  color: var(--text);
}
.step-body p {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.6; font-weight: 300;
}
.step-body code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
}
.step-hint {
  margin-top: 6px;
  font-size: 12px; color: var(--text-muted);
  font-weight: 300;
}
.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 36px 8px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  overflow-x: auto;
  white-space: nowrap;
  position: relative;
  line-height: 1.4;
}
.code-block code {
  display: inline;
  white-space: nowrap;
}
.code-copy {
  position: absolute; top: 50%; right: 8px;
  transform: translateY(-50%);
  background: none;
  border: none;
  border-radius: 6px;
  padding: 5px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s ease;
  display: flex; align-items: center; justify-content: center;
}
.code-copy:hover { color: var(--accent); }
.code-copy svg { width: 15px; height: 15px; pointer-events: none; }
.code-copy.copied { color: var(--green); }

/* ─── CTA ─── */
.cta-section {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: clamp(100px, 12vw, 200px) 0;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, var(--green-glow), transparent 70%);
  pointer-events: none;
}
.cta-content { position: relative; z-index: 1; }
.cta-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.cta-desc {
  font-size: 18px; color: var(--text-secondary);
  margin-bottom: 40px;
  font-weight: 300;
}
.cta-actions { display: flex; justify-content: center; gap: 16px; }

/* ─── Footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 80px;
  margin-bottom: 60px;
}
.footer-brand .nav-brand {
  font-size: 18px;
  margin-bottom: 12px;
}
.footer-tagline {
  font-size: 14px; color: var(--text-muted);
  line-height: 1.6; font-weight: 300;
}
.footer-links { display: flex; gap: 80px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 {
  font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.footer-col a {
  font-size: 14px; color: var(--text-secondary);
  transition: color 0.2s ease;
  font-weight: 300;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}
.footer-bottom p {
  font-size: 13px; color: var(--text-muted);
  font-weight: 300;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero-visual { max-width: 400px; margin: 0 auto; }
  .pipeline-visual { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .philosophy-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-center {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 16px clamp(20px, 4vw, 80px) 24px;
  }
  .nav-center.nav-open { display: flex; }
  .nav-center a { padding: 12px 0; font-size: 14px; }
  .nav-cta { display: none; }

  .hero { padding: 120px 0 80px; min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 300px; }
  .hero-stat { padding: 14px 18px; }
  .hero-stat-num { font-size: 28px; }

  .pipeline-visual { grid-template-columns: 1fr; }
  .pipeline-meta-row { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .agents-list { grid-template-columns: 1fr; }

  .install-card { padding: 28px; }
  .install-step { flex-direction: column; gap: 16px; }

  .footer-grid { flex-direction: column; gap: 40px; }
  .footer-links { gap: 40px; }
}