/* ========================================================================
   LeadGen AI Suite — Static Design System
   Lead Generation Consulting
   ======================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,700&family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink: #0a0a0b;
  --ink-2: #111114;
  --ink-3: #1a1a1f;
  --paper: #ffffff;
  --paper-dim: #e8e8ea;
  --muted: #8a8a92;
  --line: #25252b;
  --line-soft: #1f1f24;
  --blue: #00A8FF;
  --blue-dim: #0086cc;
  --blue-wash: rgba(0, 168, 255, 0.08);
  --blue-glow: rgba(0, 168, 255, 0.25);
  --warn: #ffb547;
  --ok: #4ade80;
  --bad: #ff5470;

  --display: 'Fraunces', Georgia, serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;
}

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

html, body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

body {
  background-image:
    url('/assets/img/bg.png'),
    radial-gradient(800px circle at 12% -8%, var(--blue-wash), transparent 55%),
    radial-gradient(600px circle at 95% 8%, rgba(0, 168, 255, 0.04), transparent 60%);
  background-attachment: fixed;
  background-size: cover, auto, auto;
  background-position: center;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }

::selection { background: var(--blue); color: var(--ink); }

/* ---------- Layout ---------- */
.shell { max-width: 1280px; margin: 0 auto; padding: 0 32px; }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line-soft);
  position: sticky; top: 0;
  background: rgba(10, 10, 11, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 50;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-size: 19px;
}
.brand img { height: 32px; width: auto; display: block; }
.brand small {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}

.nav-links {
  display: flex; gap: 28px;
  font-size: 14px;
  color: var(--paper-dim);
}
.nav-links a {
  position: relative;
  transition: color .2s ease;
  padding: 6px 0;
}
.nav-links a:hover { color: var(--blue); }
.nav-links a.active { color: var(--paper); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -19px;
  height: 2px;
  background: var(--blue);
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all .18s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--blue);
  color: var(--ink);
  font-weight: 600;
}
.btn-primary:hover {
  background: #1ab4ff;
  box-shadow: 0 0 0 4px var(--blue-glow);
  transform: translateY(-1px);
}
.btn-ghost {
  border-color: var(--line);
  color: var(--paper-dim);
}
.btn-ghost:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.btn-block { width: 100%; justify-content: center; padding: 14px; }

/* ---------- Hero (index) ---------- */
.hero {
  padding: 110px 0 90px;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 28px;
}
.hero-eyebrow::before {
  content: '';
  width: 28px; height: 1px; background: var(--blue);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 400;
  max-width: 14ch;
  margin-bottom: 28px;
}
.hero h1 em {
  font-style: italic;
  color: var(--blue);
  font-weight: 300;
}
.hero p.lead {
  font-size: 19px;
  color: var(--paper-dim);
  max-width: 52ch;
  margin-bottom: 40px;
  line-height: 1.5;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-meta {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--line-soft);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.hero-meta .stat {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero-meta .stat strong {
  display: block;
  font-family: var(--display);
  font-size: 36px;
  font-weight: 400;
  color: var(--paper);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  text-transform: none;
}

/* ---------- Sections ---------- */
.section { padding: 100px 0; border-top: 1px solid var(--line-soft); }
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}
.section h2 {
  font-family: var(--display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.025em;
  max-width: 18ch;
  margin-bottom: 60px;
  line-height: 1.05;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.feature {
  background: var(--ink);
  padding: 40px 32px;
  transition: background .25s ease;
}
.feature:hover { background: var(--ink-2); }
.feature-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--blue);
  letter-spacing: 0.15em;
  margin-bottom: 22px;
}
.feature h3 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.feature p { color: var(--muted); font-size: 14px; line-height: 1.6; }

/* ---------- Login ---------- */
.auth-wrap {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-side {
  padding: 80px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line-soft);
  position: relative;
  overflow: hidden;
}
.auth-side::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(135deg, transparent 0%, var(--blue-wash) 100%);
  pointer-events: none;
}
.auth-side-content { position: relative; z-index: 1; max-width: 460px; }
.auth-quote {
  font-family: var(--display);
  font-size: 34px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin-bottom: 24px;
}
.auth-quote em { color: var(--blue); font-style: italic; }
.auth-attribution {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.auth-form-wrap {
  padding: 80px 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-form { width: 100%; max-width: 380px; }
.auth-form h1 {
  font-family: var(--display);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}
.auth-form .sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 40px;
}

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 14px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--paper);
  font-size: 14px;
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: var(--ink-3);
  box-shadow: 0 0 0 3px var(--blue-wash);
}
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }

.auth-foot {
  margin-top: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.auth-foot a { color: var(--blue); }

.divider {
  display: flex; align-items: center; gap: 14px;
  margin: 24px 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}
.divider::before, .divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line-soft);
}

/* ---------- Dashboard layout ---------- */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 78px);
}
.sidebar {
  border-right: 1px solid var(--line-soft);
  padding: 32px 20px;
  background: rgba(10, 10, 11, 0.6);
}
.sidebar-group { margin-bottom: 28px; }
.sidebar-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 12px;
  margin-bottom: 8px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--paper-dim);
  transition: all .15s ease;
  margin-bottom: 2px;
}
.sidebar-link:hover { background: var(--ink-2); color: var(--paper); }
.sidebar-link.active {
  background: var(--blue-wash);
  color: var(--blue);
}
.sidebar-link .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
}
.sidebar-link.active .dot { background: var(--blue); }

.main { padding: 40px 48px; }
.main-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 36px;
  gap: 24px;
}
.main-head h1 {
  font-family: var(--display);
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
}
.main-head .crumbs {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.main-head .crumbs span { color: var(--blue); }

/* ---------- KPI cards ---------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.kpi {
  padding: 22px;
  background: var(--ink-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.kpi-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.kpi-value {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 10px;
}
.kpi-delta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ok);
}
.kpi-delta.bad { color: var(--bad); }
.kpi-spark {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-30%);
  opacity: 0.5;
}

/* ---------- Panel ---------- */
.panel {
  background: var(--ink-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 28px;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-soft);
}
.panel-head h3 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.panel-head .panel-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.panel-body { padding: 24px; }

/* ---------- Tables ---------- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 24px;
  border-bottom: 1px solid var(--line-soft);
  font-weight: 500;
}
.table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--paper-dim);
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--ink-3); }

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pill.hot { background: rgba(255, 84, 112, 0.15); color: var(--bad); }
.pill.warm { background: rgba(255, 181, 71, 0.15); color: var(--warn); }
.pill.cold { background: rgba(138, 138, 146, 0.18); color: var(--muted); }
.pill.new { background: var(--blue-wash); color: var(--blue); }

.score-bar {
  display: inline-flex; align-items: center; gap: 8px;
}
.score-bar-track {
  width: 60px; height: 4px;
  background: var(--line-soft);
  border-radius: 2px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  background: var(--blue);
}
.score-bar span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--paper);
}

/* ---------- Chart placeholder ---------- */
.chart {
  height: 240px;
  width: 100%;
  position: relative;
}
.chart svg { width: 100%; height: 100%; display: block; }

/* ---------- Settings ---------- */
.settings-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
}
.settings-nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--paper-dim);
  margin-bottom: 2px;
  transition: all .15s ease;
}
.settings-nav-link:hover { background: var(--ink-2); }
.settings-nav-link.active { color: var(--blue); background: var(--blue-wash); }

.toggle {
  display: inline-flex; align-items: center;
  position: relative;
  width: 38px; height: 22px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
  position: absolute; inset: 0;
  background: var(--line);
  border-radius: 22px;
  transition: .2s;
}
.toggle .slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 3px;
  width: 16px; height: 16px;
  background: var(--paper);
  border-radius: 50%;
  transition: .2s;
}
.toggle input:checked + .slider { background: var(--blue); }
.toggle input:checked + .slider::before { transform: translateX(16px); }

/* ---------- Footer ---------- */
.foot {
  border-top: 1px solid var(--line-soft);
  padding: 40px 32px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .7s ease both; }
.fade-up:nth-child(2) { animation-delay: .08s; }
.fade-up:nth-child(3) { animation-delay: .16s; }
.fade-up:nth-child(4) { animation-delay: .24s; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hero { padding: 64px 0 48px; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .feature-grid { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .app-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 28px 20px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .shell { padding: 0 20px; }
}
