/* =====================
   TOKENS & RESET
   ===================== */
:root {
  --bg: #0A0A0F;
  --bg-2: #0E0E18;
  --surface: #13131F;
  --surface-2: #1A1A2E;
  --border: #1E1E30;
  --border-2: #2A2A40;
  --fg: #E8E8F0;
  --fg-2: #9090A8;
  --fg-3: #606080;
  --cyan: #00E5C8;
  --cyan-dim: #00B89C;
  --amber: #FFB800;
  --red: #FF4D6A;
  --radius: 4px;
  --radius-lg: 8px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  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)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

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

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 3px; }

/* =====================
   TYPOGRAPHY
   ===================== */
h1, h2, h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* =====================
   LAYOUT
   ===================== */
.dark-theme > * { position: relative; z-index: 1; }

/* =====================
   HERO
   ===================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px clamp(24px, 8vw, 120px);
  padding-top: 120px;
  max-width: 1400px;
  margin: 0 auto;
  gap: 48px;
}

.hero-eyebrow { display: flex; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius);
}

.badge svg { flex-shrink: 0; }

.hero-headline {
  font-size: clamp(48px, 9vw, 112px);
  font-weight: 800;
  line-height: 1.0;
  color: var(--fg);
  max-width: 14ch;
}

.hero-headline br { display: block; }

.hero-sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--fg-2);
  max-width: 44ch;
  line-height: 1.65;
  font-weight: 400;
}

.hero-actions { display: flex; flex-direction: column; gap: 8px; }
.action-note { font-size: 13px; color: var(--fg-3); }

/* Hero Visual - Flow Editor */
.hero-visual {
  width: 100%;
  max-width: 580px;
}

.flow-editor {
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0, 229, 200, 0.05), 0 32px 64px rgba(0,0,0,0.4);
}

.fe-header {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.fe-dots { display: flex; gap: 6px; }
.fe-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-2);
}
.fe-dots span:nth-child(1) { background: #FF5F57; }
.fe-dots span:nth-child(2) { background: #FFBD2E; }
.fe-dots span:nth-child(3) { background: #28CA42; }

.fe-title { font-size: 11px; color: var(--fg-3); font-family: 'DM Sans', sans-serif; }

.fe-body { padding: 24px; display: flex; flex-direction: column; gap: 0; }

.fe-node {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}

.fe-node-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  flex-shrink: 0;
  margin-top: 4px;
  box-shadow: 0 0 6px var(--cyan);
}

.condition-node .fe-node-dot { box-shadow: 0 0 6px var(--amber); }

.fe-node-label { display: flex; flex-direction: column; gap: 2px; }

.node-type {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cyan);
}

.condition-node .node-type { color: var(--amber); }

.node-name { font-size: 14px; font-weight: 600; color: var(--fg); font-family: 'Syne', sans-serif; }

.fe-node-detail { font-size: 11px; color: var(--fg-3); margin-top: 2px; }

.fe-connector {
  display: flex;
  align-items: center;
  padding: 8px 0 8px 26px;
}

.connector-line {
  width: 1px;
  height: 20px;
  background: var(--border-2);
}

.connector-arrow { margin-left: -4px; }

.fe-footer {
  border-top: 1px solid var(--border);
  padding: 10px 16px;
}

.fe-status { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--fg-3); }

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

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

/* Hero Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--fg); }
.stat-label { font-size: 12px; color: var(--fg-3); }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* =====================
   SECTION SHARED
   ===================== */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 40px;
}

/* =====================
   HOW IT WORKS
   ===================== */
.how-it-works {
  padding: 100px clamp(24px, 8vw, 120px);
  max-width: 1400px;
  margin: 0 auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 0;
}

.step { max-width: 280px; }

.step-number {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.step-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 12px;
  line-height: 1.2;
}

.step-body { font-size: 14px; color: var(--fg-2); line-height: 1.65; }

.step-connector { display: flex; align-items: center; padding: 0 24px; }

/* =====================
   FEATURES
   ===================== */
.features {
  padding: 80px clamp(24px, 8vw, 120px);
  background: var(--bg-2);
}

.features .section-label { padding-top: 0; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: 1400px;
  margin: 0 auto;
}

.feature-card {
  background: var(--surface);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.feature-card:hover {
  border-color: var(--border-2);
  background: var(--surface-2);
}

.feature-large { grid-column: span 1; }
.feature-wide { grid-column: span 2; }

.feature-card.feature-accent .fc-icon { color: var(--amber); }
.feature-card.feature-accent .node-type { color: var(--amber); }

.fc-icon {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 229, 200, 0.06);
  border-radius: var(--radius);
  color: var(--cyan);
}

.fc-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  font-family: 'Syne', sans-serif;
}

.fc-body { font-size: 13px; color: var(--fg-2); line-height: 1.65; }

/* =====================
   PLATFORM
   ===================== */
.platform-section {
  padding: 80px clamp(24px, 8vw, 120px);
  max-width: 1400px;
  margin: 0 auto;
}

.platform-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.platform-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--fg-2);
  transition: color 0.2s ease;
}

.platform-item:hover { color: var(--fg); }

.platform-note { text-align: center; font-size: 13px; color: var(--fg-3); }

/* =====================
   CLOSING
   ===================== */
.closing {
  padding: 100px clamp(24px, 8vw, 120px);
  max-width: 1400px;
  margin: 0 auto;
}

.closing-inner { max-width: 800px; }

.closing-rule {
  width: 48px;
  height: 2px;
  background: var(--cyan);
  margin-bottom: 40px;
}

.closing-headline {
  font-size: clamp(28px, 5vw, 56px);
  color: var(--fg);
  line-height: 1.15;
  margin-bottom: 40px;
}

.closing-sub { font-size: 16px; color: var(--fg-2); line-height: 1.7; max-width: 52ch; }

/* =====================
   FOOTER
   ===================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px clamp(24px, 8vw, 120px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-name {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--fg);
}
.footer-tagline { font-size: 12px; color: var(--fg-3); }
.footer-meta { font-size: 12px; color: var(--fg-3); }

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 900px) {
  .hero { padding-top: 80px; gap: 36px; }
  .hero-stats { gap: 20px; }
  .steps-grid { grid-template-columns: 1fr; gap: 40px; }
  .step-connector { display: none; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feature-wide { grid-column: span 2; }
  .feature-large { grid-column: span 1; }
}

@media (max-width: 640px) {
  .hero-headline { font-size: 48px; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-wide, .feature-large { grid-column: span 1; }
  .hero-stats { flex-direction: column; align-items: flex-start; gap: 20px; }
  .stat-divider { display: none; }
  .footer { flex-direction: column; gap: 16px; align-items: flex-start; }
}