/* Theme tokens mirror web/src/index.css so landing matches the dashboard. */
:root {
  --bg-primary: #f5f3ee;
  --bg-secondary: #ede9df;
  --bg-card: #ffffff;
  --bg-card-hover: #faf8f2;
  --bg-elevated: #ffffff;
  --bg-input: #f0ece2;

  --border: #e2dccd;
  --border-hover: #c9c1ad;
  --border-active: #a89e85;

  --text-primary: #1a1812;
  --text-secondary: #4a463c;
  --text-muted: #8a8272;
  --text-dim: #c4bba4;

  --accent: #c85a00;
  --accent-hover: #e06e10;

  --green: #2e7d32;
  --red: #c62828;
  --cyan: #006064;
  --blue: #00796b;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 10px;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
}

[data-theme="dark"] {
  --bg-primary: #0a0c10;
  --bg-secondary: #0e1116;
  --bg-card: #12151c;
  --bg-card-hover: #171b23;
  --bg-elevated: #1a1e27;
  --bg-input: #0c0f15;

  --border: #1d222c;
  --border-hover: #2a3140;
  --border-active: #3a4458;

  --text-primary: #eef1f7;
  --text-secondary: #9ba6b8;
  --text-muted: #5d6778;
  --text-dim: #3a4150;

  --accent: #f5a524;
  --accent-hover: #ffb93a;

  --green: #7dd37a;
  --red: #ff6b6b;
  --cyan: #00e5ff;
  --blue: #4ecdc4;
}

/* Reset / base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-feature-settings: 'ss03', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.mono { font-family: var(--font-mono); }
.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg-primary) 80%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.brand {
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text-primary); }

.theme-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color 0.15s, border-color 0.15s;
}
.theme-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

/* Hero */
.hero { padding: 96px 0 64px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 32px;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

h1 {
  font-size: clamp(36px, 5.6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 24px;
  max-width: 16ch;
}
.lede {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 56ch;
  margin: 0 0 40px;
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
  margin-bottom: 16px;
}
.form-row { display: flex; gap: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Gate (Turnstile pre-page check) */
body.gated { overflow: hidden; }
.gate {
  position: fixed; inset: 0;
  background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 240ms ease;
}
.gate.passed { opacity: 0; pointer-events: none; }
.gate-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 40px 32px; max-width: 360px; text-align: center;
}
.gate-card .brand-mark { width: 28px; height: 28px; }
.gate-brand {
  font-weight: 700; letter-spacing: 6px; font-size: 14px;
  color: var(--text-primary);
}
.gate-msg { color: var(--text-secondary); font-size: 14px; margin: 0 0 4px; }
.gate-foot {
  color: var(--text-secondary);
  font-size: 11px; letter-spacing: 0.5px; margin: 8px 0 0; opacity: 0.7;
}
.cf-turnstile { min-height: 65px; }
.form input[type="email"] {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.form input[type="email"]:focus {
  border-color: var(--accent);
  background: var(--bg-card);
}
.form input[type="email"]::placeholder { color: var(--text-dim); }

.form button {
  background: var(--accent);
  color: #1a1408;
  border: 0;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.form button:hover { background: var(--accent-hover); }
.form button:active { transform: scale(0.98); }
.form button:disabled { opacity: 0.55; cursor: not-allowed; }

.form-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.form-meta .count {
  color: var(--text-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.form-meta .sep { color: var(--text-dim); }

/* Demo section */
.demo { padding: 32px 0 96px; }
.demo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .demo-grid { grid-template-columns: 1.45fr 1fr; }
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  transition: border-color 0.2s, background 0.2s;
}
.panel:hover { border-color: var(--border-hover); }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.live-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 18%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}

/* Activity feed */
.feed {
  font-family: var(--font-mono);
  font-size: 12.5px;
  max-height: 280px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent);
          mask-image: linear-gradient(to bottom, black 75%, transparent);
}
.feed-row {
  display: grid;
  grid-template-columns: 64px 80px 1fr auto;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.feed-row .ts  { color: var(--text-dim); }
.feed-row .src { color: var(--text-muted); }
.feed-row .msg { color: var(--text-primary); }
.feed-row .tag { font-size: 11px; color: var(--text-muted); }
.feed-row .tag.ok   { color: var(--green); }
.feed-row .tag.warn { color: var(--accent); }
.feed-row .tag.err  { color: var(--red); }
.feed-row .tag.info { color: var(--blue); }

/* Stats */
.stats {
  list-style: none;
  margin: 0;
  padding: 0;
}
.stat {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.stat:last-child { border-bottom: 0; }
.stat-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.stat-value .unit {
  color: var(--text-muted);
  font-size: 16px;
  margin-left: 4px;
}
.health-bar {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}
.health-bar span {
  flex: 1;
  height: 6px;
  border-radius: 2px;
  background: var(--border-active);
  transition: background 0.4s ease;
}
.health-bar span.on { background: var(--green); }

.sparkline {
  display: block;
  width: 100%;
  height: 28px;
  margin-top: 10px;
  color: var(--accent);
  overflow: visible;
}

/* Keyboard hint */
.kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}
kbd {
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--text-secondary);
  line-height: 1;
}

/* Ring on the focused input when triggered by keyboard */
.form input[type="email"].kbd-flash {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Section base */
section.bordered { border-top: 1px solid var(--border); padding: 80px 0; }
h2 {
  font-size: clamp(24px, 4vw, 36px);
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 12px;
}
.section-lede {
  color: var(--text-secondary);
  font-size: 16px;
  max-width: 56ch;
  margin: 0 0 48px;
}

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
@media (min-width: 768px) {
  .pillars { grid-template-columns: repeat(3, 1fr); }
}
.pillar {
  background: var(--bg-card);
  padding: 28px;
  transition: background 0.15s;
}
.pillar:hover { background: var(--bg-card-hover); }
.pillar-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.pillar h3 {
  font-size: 16px;
  margin: 0 0 6px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.pillar p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Trust / read-only section */
.trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.trust-item {
  background: var(--bg-card);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  align-items: start;
  transition: background 0.15s;
}
.trust-item:hover { background: var(--bg-card-hover); }
.trust-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  margin-top: 2px;
}
.trust-item h3 {
  font-size: 16px;
  margin: 6px 0 6px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.trust-item p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
}
.trust-item code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

@media (max-width: 600px) {
  .trust-item { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
}

/* Founder quote */
.quote {
  max-width: 64ch;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-primary);
  margin: 0 0 24px;
}
.quote::before {
  content: "";
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
  margin-bottom: 24px;
}
.signature {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

/* CTA */
.cta { text-align: center; padding: 96px 0; }
.cta h2 { margin-bottom: 8px; }
.cta p { color: var(--text-secondary); margin: 0 0 32px; }
.cta .form { margin: 0 auto; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 32px;
  font-size: 13px;
  color: var(--text-muted);
}
.foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: 0.04em;
  font-size: 13px;
  color: var(--text-secondary);
}
.foot-brand sup {
  font-size: 9px;
  margin-left: 1px;
  color: var(--text-muted);
}
.foot-links a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-left: 24px;
  transition: color 0.15s;
}
.foot-links a:first-child { margin-left: 0; }
.foot-links a:hover { color: var(--text-primary); }
.foot-legal {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.6;
}
.foot-legal p {
  margin: 0;
  max-width: 72ch;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 40px));
  background: var(--bg-elevated);
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.2s ease;
  z-index: 60;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 600px) {
  .container { padding: 0 32px; }
  .form-row { flex-direction: column; }
  .nav-links a { display: none; }
  .nav-links .theme-btn { display: grid; }
  .hero { padding: 64px 0 48px; }
  section.bordered, .cta { padding: 56px 0; }
  .feed-row { grid-template-columns: 52px 64px 1fr auto; gap: 8px; font-size: 11.5px; }
  .panel { padding: 16px; }
  .foot { flex-direction: column; text-align: center; gap: 12px; }
  .foot-links a { margin-left: 16px; }
  .foot-links a:first-child { margin-left: 0; }
  .section-lede { margin: 0 0 32px; }
  .pillar { padding: 24px 20px; }
  .legal { padding-top: 48px; padding-bottom: 64px; }
  .legal h1 { margin-bottom: 6px; }
  .legal h2 { margin: 28px 0 10px; }
  .legal-note { margin-top: 36px; padding: 14px 16px; }
}

@media (max-width: 480px) {
  .container { padding: 0 24px; }
  .feed-row { grid-template-columns: 64px 1fr auto; }
  .feed-row .ts { display: none; }
  .stat-value { font-size: 24px; }
  .legal { padding-top: 36px; padding-bottom: 48px; }
  .legal h2 { font-size: 18px; margin: 24px 0 8px; }
  .legal p, .legal li { font-size: 14px; }
  .legal ul { padding-left: 16px; }
}

/* Legal pages (privacy / terms) */
.legal {
  padding-top: 64px;
  padding-bottom: 96px;
  max-width: 720px;
  margin: 0 auto;
}
.legal h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 8px;
  max-width: none;
}
.legal .updated {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 40px;
}
.legal h2 {
  font-size: 20px;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
}
.legal h3 {
  font-size: 15px;
  margin: 24px 0 8px;
  color: var(--text-primary);
}
.legal p,
.legal li {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}
.legal ul {
  padding-left: 20px;
  margin: 12px 0;
}
.legal li { margin-bottom: 6px; }
.legal a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  transition: border-color 0.15s;
}
.legal a:hover { border-bottom-color: var(--accent); }
.legal-note {
  margin-top: 48px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
}