/* ── Variables ────────────────────────────────── */
:root {
  --bg:         #0A0A0F;
  --surface:    #13131A;
  --surface-2:  #1C1C26;
  --border:     rgba(255,255,255,0.06);
  --fg:         #F5F0EB;
  --fg-muted:   rgba(245,240,235,0.55);
  --accent:     #FF4F44;
  --accent-dim: rgba(255,79,68,0.12);
  --sent-bubble: #833AB4;
  --sent-end:    #F56040;
  --font-head:   'Syne', sans-serif;
  --font-body:   'DM Sans', sans-serif;
}

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

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ── Layout helpers ─────────────────────────────── */
.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 64px;
}

/* ── Hero ──────────────────────────────────────── */
.hero {
  padding: 120px 40px 100px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(255,79,68,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -100px;
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(131,58,180,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

/* Eyebrow */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  width: fit-content;
}

.eyebrow-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; }
}

/* Title */
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(44px, 5.5vw, 76px);
  font-weight: 800;
  line-height: 1.0;
  color: var(--fg);
  margin-bottom: 28px;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
  position: relative;
}

.hero-lede {
  font-size: 18px;
  color: var(--fg-muted);
  max-width: 440px;
  margin-bottom: 48px;
  line-height: 1.7;
}

/* Stats */
.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.stat-value {
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
  min-width: 80px;
}

.stat-label {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.4;
}

/* ── DM Widget ──────────────────────────────────── */
.hero-widget {
  position: relative;
}

.dm-frame {
  background: #0D0D13;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,79,68,0.08);
}

.dm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: #111118;
}

.dm-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dm-avatar { flex-shrink: 0; }

.dm-header-info { display: flex; flex-direction: column; }

.dm-handle {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  font-family: var(--font-body);
}

.dm-active {
  font-size: 11px;
  color: #4CAF50;
  font-family: var(--font-body);
}

/* Thread */
.dm-thread {
  padding: 20px 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 360px;
  overflow-y: auto;
}

.dm-date-label {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  text-align: center;
  margin: 12px 0 8px;
  font-family: var(--font-body);
}

.dm-scene-label {
  display: flex;
  justify-content: flex-start;
  margin: 6px 0 4px;
}

.scene-badge {
  font-size: 9px;
  padding: 3px 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 100px;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scene-badge-dark { background: rgba(255,79,68,0.1); border-color: rgba(255,79,68,0.2); color: rgba(255,79,68,0.7); }

.dm-message { display: flex; margin: 2px 0; }
.dm-message.sent { justify-content: flex-end; }
.dm-message.received { justify-content: flex-start; }

.dm-bubble-wrap {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.5;
  font-family: var(--font-body);
}

.received-wrap {
  background: #1C1C26;
  color: var(--fg);
  border-bottom-left-radius: 4px;
}

.sent-wrap {
  background: linear-gradient(135deg, var(--sent-bubble) 0%, var(--sent-end) 100%);
  color: white;
  border-bottom-right-radius: 4px;
}

.dm-link { text-decoration: underline; text-underline-offset: 2px; }

.dm-seen {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  text-align: right;
  margin: 2px 0 8px;
  padding-right: 4px;
  font-family: var(--font-body);
}

/* Automation strip */
.dm-automation-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  margin: 4px 0;
}

.strip-line {
  flex: 1;
  height: 1px;
  background: rgba(255,79,68,0.2);
}

.strip-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(255,79,68,0.2);
  padding: 3px 8px;
  border-radius: 100px;
  font-family: var(--font-body);
  white-space: nowrap;
}

/* Input bar */
.dm-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  background: #0D0D13;
}

.input-hint {
  flex: 1;
  font-size: 13px;
  color: rgba(255,255,255,0.2);
  font-family: var(--font-body);
}

.input-send {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,79,68,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Trigger pills */
.trigger-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.trigger-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-family: var(--font-body);
}

.trigger-pill.trigger-comment { border-color: rgba(255,79,68,0.2); color: rgba(255,79,68,0.7); }
.trigger-pill.trigger-story { border-color: rgba(131,58,180,0.3); color: rgba(180,100,255,0.8); }
.trigger-pill.trigger-dm { border-color: rgba(0,200,150,0.2); color: rgba(0,200,150,0.7); }

.pill-icon { font-size: 12px; }

/* ── Proof / Trust bar ─────────────────────────── */
.proof { padding: 0 40px 80px; }
.proof-inner { max-width: 1200px; margin: 0 auto; }

.proof-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.proof-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.proof-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,79,68,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.proof-item strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-body);
}

.proof-item p {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.5;
  font-family: var(--font-body);
}

/* ── Features ───────────────────────────────────── */
.features { padding: 80px 40px; }
.features-inner { max-width: 1200px; margin: 0 auto; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.feature-card {
  padding: 48px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  position: relative;
  transition: background 0.2s;
}

.feature-card:first-child { border-radius: 16px 0 0 0; }
.feature-card:nth-child(2) { border-radius: 0 16px 0 0; }
.feature-card:nth-child(3) { border-radius: 0 0 0 16px; }
.feature-card:last-child { border-radius: 0 0 16px 0; }

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

.feature-number {
  font-family: var(--font-head);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.65;
  margin-bottom: 24px;
}

.feature-example {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
}

.example-trig {
  color: var(--accent);
  font-weight: 600;
  font-family: monospace;
}

.example-resp {
  color: var(--fg-muted);
  font-family: var(--font-body);
}

/* ── How it works ───────────────────────────────── */
.how { padding: 80px 40px; background: var(--surface); }
.how-inner { max-width: 1200px; margin: 0 auto; }

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

.step {
  flex: 1;
  padding: 32px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.step-num {
  font-family: var(--font-head);
  font-size: 48px;
  font-weight: 800;
  color: var(--accent-dim);
  margin-bottom: 16px;
  line-height: 1;
}

.step h4 {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 10px;
}

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

.step-arrow {
  flex-shrink: 0;
  padding: 0 16px;
  color: rgba(255,255,255,0.1);
}

/* ── Open source section ────────────────────────── */
.open { padding: 100px 40px; }
.open-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.open-title {
  font-family: var(--font-head);
  font-size: clamp(30px, 3.5vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--fg);
  margin-bottom: 24px;
}

.open-body {
  font-size: 16px;
  color: var(--fg-muted);
  line-height: 1.75;
}

.open-code-block {
  background: #0D0D13;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
}

.code-label {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  padding: 12px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-family: monospace;
}

.code-block {
  padding: 28px 24px;
  font-size: 14px;
  line-height: 1.8;
  font-family: 'Courier New', monospace;
  color: rgba(255,255,255,0.75);
  overflow-x: auto;
}

.code-keyword { color: #C792EA; }
.code-string  { color: #A6E22E; }
.code-prop    { color: #66D9EF; }
.code-num     { color: #FD971F; }

/* ── Closing ────────────────────────────────────── */
.closing {
  padding: 120px 40px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(255,79,68,0.04) 100%);
}

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

.closing-title {
  font-family: var(--font-head);
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 28px;
}

.closing-body {
  font-size: 18px;
  color: var(--fg-muted);
  line-height: 1.75;
  margin-bottom: 32px;
}

.closing-tagline {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}

/* ── Footer ─────────────────────────────────────── */
footer {
  padding: 40px;
  border-top: 1px solid var(--border);
}

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

.footer-name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  color: var(--fg);
  display: block;
}

.footer-tagline {
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 4px;
}

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

.footer-links a {
  font-size: 13px;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

.footer-legal {
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  text-align: right;
}

/* ── Responsive ────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner,
  .open-inner { grid-template-columns: 1fr; gap: 48px; }

  .proof-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card:first-child { border-radius: 16px 16px 0 0; }
  .feature-card:nth-child(2) { border-radius: 0; }
  .feature-card:nth-child(3) { border-radius: 0; }
  .feature-card:last-child { border-radius: 0 0 16px 16px; }

  .steps { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-legal { text-align: center; }

  .hero { padding: 80px 24px 60px; }
  .proof { padding: 0 24px 60px; }
  .features { padding: 60px 24px; }
  .how { padding: 60px 24px; }
  .open { padding: 60px 24px; }
  .closing { padding: 80px 24px; }
}

@media (max-width: 600px) {
  .proof-stat-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .stat { flex-direction: column; gap: 4px; }
}