/* =============================================
   Acme Inc — main.css
   Owns: all visual styles for the landing page.
   Does NOT own: JS behavior, server logic.
   ============================================= */

/* ---- Design tokens ---- */
:root {
  --bg:         #0d0d0d;
  --bg-2:       #111111;
  --bg-3:       #161616;
  --border:     #222222;
  --border-2:   #2a2a2a;
  --text:       #e8e8e4;
  --text-muted: #888880;
  --text-dim:   #555550;
  --accent:     #f59e0b;
  --accent-dim: rgba(245, 158, 11, 0.15);
  --accent-glow:rgba(245, 158, 11, 0.08);
  --font-head:  'Instrument Serif', Georgia, serif;
  --font-body:  'Satoshi', 'DM Sans', system-ui, sans-serif;
  --max-w:      1100px;
  --radius:     4px;
  --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Satoshi via Fontshare CDN */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,700&display=swap');

a { color: inherit; text-decoration: none; }

/* ---- NAV ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-head);
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: opacity var(--transition);
}
.logo:hover { opacity: 0.7; }
.logo-dot { color: var(--accent); }

.nav-cta {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--bg);
  background: var(--accent);
  padding: 6px 16px;
  border-radius: var(--radius);
  transition: opacity var(--transition), transform var(--transition);
}
.nav-cta:hover { opacity: 0.85; transform: translateY(-1px); }

/* ---- HERO ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 24px 80px;
  text-align: center;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 0 auto;
}
.hero-glow {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 28px;
}
.hero-badge::before {
  content: '';
  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; }
}

.hero-heading {
  font-family: var(--font-head);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 20px;
}
.hero-heading em {
  font-style: italic;
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 40px;
}

.hero-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 0 auto 12px;
}

.hero-input {
  flex: 1;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 11px 16px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hero-input::placeholder { color: var(--text-dim); }
.hero-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.hero-btn {
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 11px 22px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--transition), transform var(--transition);
}
.hero-btn:hover:not(:disabled) { opacity: 0.85; transform: translateY(-1px); }
.hero-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.hero-form-note, .capture-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  min-height: 20px;
}
.form-success {
  color: #10b981;
  font-size: 0.9375rem;
}

/* ---- WIDGET DEMO ---- */
.demo {
  padding: 100px 24px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.demo-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.demo-header {
  text-align: center;
  margin-bottom: 56px;
}
.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.demo-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s ease-in-out infinite;
}
.demo-heading {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.demo-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
}

/* Two-pane layout */
.demo-panes {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
  margin-bottom: 32px;
}

/* Preview pane */
.demo-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.demo-preview-label,
.demo-config-label,
.demo-snippet-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.demo-preview {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 48px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

/* The embeddable widget itself */
.widget-shell {
  --widget-accent: #f59e0b;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 28px 28px 24px;
  width: 100%;
  max-width: 380px;
  transition: all 0.25s ease;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.03);
}
.widget-shell.widget-sm {
  padding: 20px 20px 16px;
  max-width: 300px;
}
.widget-shell.widget-lg {
  padding: 36px 36px 28px;
  max-width: 480px;
}

.widget-logo {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 16px;
  opacity: 0.8;
}
.widget-dot { color: var(--widget-accent); }

.widget-copy {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  transition: color 0.2s;
}
.widget-shell.widget-sm .widget-copy { font-size: 0.875rem; margin-bottom: 14px; }
.widget-shell.widget-lg .widget-copy { font-size: 1rem; margin-bottom: 24px; }

.widget-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.widget-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 10px 14px;
  border-radius: 6px;
  outline: none;
  cursor: default;
}
.widget-input::placeholder { color: var(--text-dim); opacity: 0.7; }

.widget-btn {
  background: var(--widget-accent);
  color: #000;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  padding: 11px 18px;
  border: none;
  border-radius: 6px;
  cursor: default;
  transition: background 0.25s ease;
  text-align: center;
}
.widget-shell.widget-sm .widget-btn { padding: 9px 14px; font-size: 0.875rem; }
.widget-shell.widget-lg .widget-btn { padding: 13px 20px; font-size: 1rem; }

.widget-legal {
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.4;
}
.widget-link {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Config panel */
.demo-config {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  padding: 24px;
}
.config-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.config-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.config-input {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 9px 12px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.config-input::placeholder { color: var(--text-dim); }
.config-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* Color swatches */
.config-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  outline: none;
  position: relative;
}
.swatch:hover { transform: scale(1.15); }
.swatch.active {
  border-color: var(--text);
  transform: scale(1.1);
}
.swatch.active::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  color: rgba(0,0,0,0.8);
  font-weight: 700;
}

/* Segmented control */
.config-seg {
  display: flex;
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.seg-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 8px 0;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.seg-btn:not(:last-child) { border-right: 1px solid var(--border-2); }
.seg-btn.active {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}
.seg-btn:hover:not(.active) { background: var(--bg-2); color: var(--text); }

/* Embed snippet */
.demo-snippet-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.demo-snippet {
  position: relative;
  background: #0a0a0a;
  border: 1px solid var(--border-2);
  border-radius: 8px;
  overflow: hidden;
}
.snippet-code {
  display: block;
  font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #d4d4aa;
  padding: 20px 56px 20px 20px;
  white-space: pre;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.snippet-copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-2);
  border: 1px solid var(--border-2);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.snippet-copy-btn:hover {
  background: var(--bg-3);
  color: var(--text);
  border-color: var(--border);
}
.snippet-copy-btn.copied {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #10b981;
}

/* ---- STATS ---- */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 40px 24px;
}
.stats-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat {
  flex: 1;
  min-width: 200px;
  text-align: center;
  padding: 16px 32px;
}
.stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: 2.5rem;
  line-height: 1.1;
  color: var(--accent);
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border-2);
}

/* ---- PILLARS ---- */
.pillars {
  padding: 100px 24px;
}
.pillars-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.pillars-header {
  text-align: center;
  margin-bottom: 64px;
}
.pillars-heading {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.pillars-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.pillar {
  background: var(--bg-2);
  padding: 36px 32px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, background var(--transition);
}
.pillar.visible {
  opacity: 1;
  transform: translateY(0);
}
.pillar:nth-child(2) { transition-delay: 0.1s; }
.pillar:nth-child(3) { transition-delay: 0.2s; }
.pillar:hover { background: var(--bg-3); }

.pillar-num {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--accent);
  opacity: 0.6;
  margin-bottom: 16px;
  font-style: italic;
}
.pillar-title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 12px;
  color: var(--text);
}
.pillar-body {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ---- CAPTURE ---- */
.capture {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 24px;
}
.capture-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.capture-heading {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.capture-sub {
  font-size: 1.0625rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.capture-fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.capture-input {
  background: var(--bg-3);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 11px 16px;
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.capture-input::placeholder { color: var(--text-dim); }
.capture-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.capture-btn {
  width: 100%;
  background: transparent;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 11px 22px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  margin-bottom: 8px;
}
.capture-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-1px);
}
.capture-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- FOOTER ---- */
.footer {
  padding: 28px 24px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-logo {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--text);
}
.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .demo { padding: 64px 20px; }

  .demo-panes {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  /* Stack config below preview on mobile */
  .demo-preview { min-height: 260px; padding: 32px 16px; }

  .widget-shell { max-width: 100% !important; }

  .snippet-code { font-size: 0.75rem; }

  .hero { padding: 64px 20px 56px; }

  .hero-form {
    flex-direction: column;
    gap: 8px;
  }
  .hero-btn { width: 100%; }

  .stats-inner { flex-direction: column; gap: 0; }
  .stat-divider { width: 48px; height: 1px; margin: 0 auto; }

  .pillars-grid {
    grid-template-columns: 1fr;
  }
  .pillar:nth-child(2),
  .pillar:nth-child(3) { transition-delay: 0s; }

  .capture-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .footer-inner { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .nav-inner { padding: 0 16px; }
  .pillars { padding: 64px 16px; }
  .pillar { padding: 28px 24px; }
  .capture { padding: 56px 16px; }
}
