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

:root {
  --ink: #0a0a0a;
  --paper: #fafaf9;
  --amber: #f59e0b;
  --amber-dark: #d97706;
  --amber-glow: rgba(245, 158, 11, 0.12);
  --slate: #57534e;
  --stone: #a8a29e;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --border: rgba(168, 162, 158, 0.15);
  --green: #22c55e;
  --red: #ef4444;
  --blue: #3b82f6;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--ink);
  color: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; }

/* Grain overlay */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
}

/* ═══ Navigation ═══ */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--amber);
}

.logo span { color: var(--stone); font-weight: 400; }

.nav-actions { display: flex; align-items: center; gap: 16px; }

.nav-tag {
  font-size: 0.75rem;
  color: var(--stone);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ═══ Buttons ═══ */
.btn {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--amber);
  color: var(--ink);
  padding: 12px 24px;
  font-size: 0.95rem;
}

.btn-primary:hover { background: var(--amber-dark); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost {
  background: transparent;
  color: var(--stone);
  border: 1px solid var(--border);
  padding: 12px 24px;
  font-size: 0.95rem;
}

.btn-ghost:hover { color: var(--paper); border-color: var(--stone); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

/* ═══ Page Management ═══ */
.page { display: none; }
.page.active { display: block; }

/* ═══ Hero ═══ */
.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 48px 40px;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--amber);
  background: var(--amber-glow);
  padding: 8px 20px;
  border-radius: 100px;
  margin-bottom: 32px;
  letter-spacing: 0.03em;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.text-amber { color: var(--amber); }

.hero-sub {
  font-size: 1.15rem;
  color: var(--stone);
  max-width: 650px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 60px;
}

/* ═══ Demo Section ═══ */
.hero-demo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  text-align: left;
  max-width: 700px;
  margin: 0 auto;
}

.demo-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.demo-label {
  font-size: 0.7rem;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.demo-text {
  color: var(--paper);
  font-style: italic;
  font-size: 0.95rem;
}

.demo-arrow {
  text-align: center;
  color: var(--amber);
  font-size: 1.5rem;
  margin: 8px 0;
}

.demo-results { display: flex; flex-direction: column; gap: 12px; }

.demo-prospect {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
}

.demo-prospect-name { font-weight: 600; font-size: 1rem; }
.demo-prospect-role { color: var(--stone); font-size: 0.85rem; margin-bottom: 8px; }

.demo-prospect-line {
  color: var(--amber);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 6px;
  padding-left: 12px;
  border-left: 2px solid var(--amber-glow);
}

.demo-prospect-email { font-size: 0.8rem; color: var(--slate); }
.demo-prospect-email .verified { color: var(--green); font-size: 0.75rem; }

.demo-prospect.dim {
  opacity: 0.5;
  text-align: center;
  border-style: dashed;
}

/* ═══ Sections ═══ */
.section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 80px 48px;
}

.section-dark { background: var(--surface); border-radius: 0; max-width: 100%; }
.section-dark > * { max-width: 1000px; margin: 0 auto; }

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
  text-align: center;
}

/* ═══ Steps ═══ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}

.step-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: var(--amber);
  opacity: 0.6;
  margin-bottom: 12px;
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.step p {
  color: var(--stone);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ═══ Comparison ═══ */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.comp-card {
  border-radius: 12px;
  padding: 32px;
  border: 1px solid var(--border);
}

.comp-card h3 { margin-bottom: 16px; font-size: 1.1rem; }

.comp-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comp-card li {
  font-size: 0.9rem;
  color: var(--stone);
  padding-left: 20px;
  position: relative;
}

.comp-old li::before { content: '✕'; position: absolute; left: 0; color: var(--red); opacity: 0.7; }
.comp-new li::before { content: '✓'; position: absolute; left: 0; color: var(--green); }
.comp-new { border-color: rgba(245, 158, 11, 0.3); background: var(--amber-glow); }

/* ═══ Footer ═══ */
.footer {
  text-align: center;
  padding: 48px;
  border-top: 1px solid var(--border);
}

.footer p { color: var(--stone); font-size: 0.85rem; margin-top: 8px; }

/* ═══ APP STYLES ═══ */
.app-nav { border-bottom: 1px solid var(--border); }

.app-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 48px;
}

.app-section { margin-bottom: 48px; }
.app-section h2 { font-size: 1.5rem; margin-bottom: 8px; }

.text-muted { color: var(--stone); font-size: 0.9rem; }

/* ICP Form */
.icp-form { margin-top: 20px; }

.icp-textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  color: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.icp-textarea:focus { border-color: var(--amber); }

.icp-textarea::placeholder { color: var(--slate); }

.icp-form-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
}

.input:focus { border-color: var(--amber); }
.input::placeholder { color: var(--slate); }

.select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--paper);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
}

/* Search Status */
.search-status {
  margin-top: 16px;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  background: var(--amber-glow);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--amber);
}

.search-status.error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--red);
}

.search-status.success {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
  color: var(--green);
}

/* ═══ Results ═══ */
.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.results-actions { display: flex; gap: 12px; align-items: center; }

/* Prospect Cards */
.prospects-list { display: flex; flex-direction: column; gap: 12px; }

.prospect-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  transition: border-color 0.2s;
}

.prospect-card:hover { border-color: rgba(245, 158, 11, 0.3); }

.prospect-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.prospect-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
}

.prospect-badge {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.badge-discovered { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.badge-personalized { background: var(--amber-glow); color: var(--amber); }
.badge-verified { background: rgba(34, 197, 94, 0.15); color: var(--green); }

.prospect-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.prospect-meta span {
  font-size: 0.85rem;
  color: var(--stone);
}

.prospect-meta .company { color: var(--paper); font-weight: 500; }

.prospect-email {
  font-size: 0.85rem;
  color: var(--slate);
  margin-bottom: 8px;
}

.prospect-email .verified { color: var(--green); font-size: 0.75rem; margin-left: 6px; }
.prospect-email .unverified { color: var(--stone); font-size: 0.75rem; margin-left: 6px; }

.prospect-firstline {
  color: var(--amber);
  font-size: 0.9rem;
  font-style: italic;
  padding: 10px 14px;
  background: var(--amber-glow);
  border-radius: 8px;
  border-left: 3px solid var(--amber);
  margin-top: 10px;
}

.prospect-research {
  font-size: 0.85rem;
  color: var(--slate);
  margin-top: 8px;
  line-height: 1.5;
}

.prospect-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn-action {
  font-size: 0.78rem;
  padding: 6px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--stone);
  border-radius: 6px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all 0.2s;
}

.btn-action:hover { color: var(--paper); border-color: var(--stone); }
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-action-danger:hover { color: var(--red); border-color: rgba(239, 68, 68, 0.3); }

/* ═══ Stats Bar ═══ */
.stats-bar {
  display: flex;
  gap: 24px;
  padding: 16px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 24px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 80px;
}

.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--amber);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ═══ Empty State ═══ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--stone);
}

.empty-icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { color: var(--paper); margin-bottom: 8px; }

/* ═══ Search History ═══ */
.search-history { display: flex; flex-direction: column; gap: 8px; }

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
}

.history-item .queries { color: var(--stone); font-size: 0.8rem; }
.history-item .count { color: var(--amber); font-weight: 600; }

/* ═══ Spinner ═══ */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(10, 10, 10, 0.3);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

/* ═══ Responsive ═══ */
@media (max-width: 768px) {
  .nav { padding: 16px 24px; }
  .hero { padding: 40px 24px 20px; }
  .hero h1 { font-size: 2.2rem; }
  .hero-actions { flex-direction: column; }
  .steps-grid { grid-template-columns: 1fr; }
  .comparison { grid-template-columns: 1fr; }
  .section { padding: 48px 24px; }
  .app-container { padding: 24px; }
  .icp-form-row { flex-direction: column; }
  .results-header { flex-direction: column; gap: 12px; }
  .prospect-meta { flex-direction: column; gap: 4px; }
}
