:root {
  --bg: #F5F0EB;
  --fg: #1C1C1E;
  --accent: #C85A2B;
  --accent-light: #E8B4A0;
  --muted: #7A7268;
  --card: #FFFFFF;
  --border: rgba(28,28,30,0.1);
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

/* === NAVBAR === */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 48px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.badge {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
}

/* === HERO === */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 85vh;
  overflow: hidden;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 64px 80px 48px;
}

.hero-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 28px;
}

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

.hero-tagline {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 300;
  font-style: italic;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 16px;
}

/* Hero Visual */
.hero-visual {
  position: relative;
  background: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
  width: 100%;
  height: 100%;
  padding: 24px;
}

.grid-cell {
  background: var(--accent);
  border-radius: 2px;
  position: relative;
}

.cell-1 { background: #C85A2B; }
.cell-2 { background: #E8B4A0; }
.cell-3 { background: #A34A1E; }
.cell-4 { background: #D4916F; }
.cell-5 { background: #1C1C1E; }
.cell-6 { background: #C85A2B; opacity: 0.6; }
.cell-7 { background: #E8B4A0; }
.cell-8 { background: #A34A1E; opacity: 0.8; }
.cell-9 { background: #D4916F; }

.visual-label {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

/* === STATS BAR === */
.stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 48px;
  gap: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 48px;
  text-align: center;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

/* === TIERS === */
.tiers {
  padding: 100px 48px;
}

.tiers-header {
  max-width: 600px;
  margin-bottom: 64px;
}

.tiers-header h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin-bottom: 16px;
  line-height: 1.15;
}

.tiers-header p {
  color: var(--muted);
  font-size: 1.05rem;
}

.tier-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tier-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 36px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tier-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(28,28,30,0.08);
}

.tier-card--main {
  border-color: var(--accent);
  border-width: 2px;
}

.tier-icon {
  margin-bottom: 20px;
}

.tier-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 4px;
}

.tier-sub {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 16px;
}

.tier-desc {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.tier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.7rem;
  font-weight: 500;
  background: var(--bg);
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}

/* === PROOF === */
.proof {
  background: var(--fg);
  padding: 100px 48px;
}

.proof-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 16px;
}

.proof h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: #F5F0EB;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  line-height: 1.15;
}

.proof-sub {
  color: rgba(245,240,235,0.55);
  font-size: 1rem;
  max-width: 520px;
  margin-bottom: 60px;
  line-height: 1.7;
}

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

.proof-item {
  padding: 32px;
  border: 1px solid rgba(245,240,235,0.08);
  transition: background 0.2s;
}

.proof-item:hover {
  background: rgba(245,240,235,0.04);
}

.proof-value {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.proof-desc {
  color: rgba(245,240,235,0.5);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* === MANIFESTO === */
.manifesto {
  padding: 100px 48px;
  background: linear-gradient(160deg, var(--bg) 0%, #EDE7DF 100%);
}

.manifesto-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.manifesto blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--fg);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.manifesto-attr {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 48px;
}

.manifesto-text {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* === FOOTER === */
.footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 40px 48px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--fg);
  display: block;
  margin-bottom: 4px;
}

.footer-tagline {
  font-size: 0.8rem;
  color: var(--muted);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-visual {
    height: 280px;
  }
  .tier-cards {
    grid-template-columns: 1fr;
  }
  .proof-grid {
    grid-template-columns: 1fr;
  }
  .stats-bar {
    flex-wrap: wrap;
    gap: 24px;
  }
  .stat-divider {
    display: none;
  }
  .navbar,
  .tiers,
  .manifesto {
    padding-left: 24px;
    padding-right: 24px;
  }
  .proof,
  .footer {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 480px) {
  .navbar {
    padding: 16px 20px;
  }
  .hero-content {
    padding: 48px 20px;
  }
  .hero-headline {
    font-size: 2.4rem;
  }
  .stats-bar {
    padding: 32px 20px;
  }
  .stat {
    padding: 0 20px;
  }
  .tiers {
    padding: 64px 20px;
  }
  .proof {
    padding: 64px 20px;
  }
  .manifesto {
    padding: 64px 20px;
  }
  .footer-inner {
    flex-direction: column;
    gap: 16px;
  }
  .footer-meta {
    align-items: flex-start;
  }
}

/* ===== Signup page ===== */
.signup-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 40px 20px;
}

.signup-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 48px;
  width: 100%;
  max-width: 480px;
}

.signup-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 8px;
}

.signup-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 28px;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-signup {
  padding: 14px 24px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s;
  text-align: center;
  text-decoration: none;
}

.btn-signup:hover {
  background: #8b1a1a;
}

.btn-signup:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-error {
  color: #c0392b;
  font-size: 0.85rem;
}

.back-link {
  display: block;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.back-link:hover {
  color: var(--fg);
}

.plan-cards {
  display: flex;
  gap: 16px;
  margin: 24px 0;
}

.plan-card {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
}

.plan-card--featured {
  border-color: var(--accent);
}

.plan-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.plan-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--fg);
}

.plan-price span {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--muted);
}

.btn-plan {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.btn-plan--primary {
  background: var(--fg);
}

/* ===== Lead Pipeline ===== */
.leads-page {
  padding: 0 0 60px;
}

.leads-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 48px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.leads-header h1 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fg);
}

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

.btn-add-lead {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s;
  text-decoration: none;
}

.btn-add-lead:hover { background: #8b1a1a; }

.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  min-height: calc(100vh - 160px);
  padding: 0;
}

.kanban-col {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.kanban-col:last-child { border-right: none; }

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 60px;
  z-index: 10;
}

.kanban-col-header h2 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.lead-count {
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg);
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.lead-list {
  flex: 1;
  padding: 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.lead-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
  position: relative;
}

.lead-card:hover {
  box-shadow: 0 4px 16px rgba(28,28,30,0.1);
  transform: translateY(-1px);
}

.lead-card-entity {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 6px;
}

.lead-card-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 4px;
}

.lead-card-project {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.lead-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lead-card-status {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-new    { background: #e8f4fd; color: #0969da; }
.status-studied { background: #fff8e6; color: #9a6700; }
.status-quoted  { background: #e8f0fe; color: #6540d8; }
.status-won     { background: #dafbe1; color: #1a7f37; }
.status-lost    { background: #ffebe9; color: #cf222e; }

.lead-card-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s;
}

.lead-card:hover .lead-card-actions { opacity: 1; }

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 4px 6px;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--muted);
  transition: all 0.15s;
}

.btn-icon:hover {
  background: var(--bg);
  color: var(--fg);
  border-color: var(--fg);
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,28,30,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--card);
  border-radius: 8px;
  padding: 36px;
  width: 100%;
  max-width: 480px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(28,28,30,0.2);
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 24px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group select {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237A7268' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

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

.btn-modal-primary {
  flex: 1;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s;
}

.btn-modal-primary:hover { background: #8b1a1a; }

.btn-modal-secondary {
  padding: 12px 20px;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.2s;
}

.btn-modal-secondary:hover { background: var(--fg); color: #fff; }

.empty-col {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.empty-col-icon {
  font-size: 2rem;
  margin-bottom: 8px;
  opacity: 0.4;
}

@media (max-width: 768px) {
  .kanban-board { grid-template-columns: 1fr; }
  .kanban-col { border-right: none; border-bottom: 1px solid var(--border); }
  .kanban-col:last-child { border-bottom: none; }
  .leads-header { padding: 16px 20px; }
  .kanban-col-header { position: relative; top: 0; }
}