/* Lead Generation — a PrimeLayer Solutions build.
   Bright growth-analytics theme: light surfaces, azure + cyan data series.
   Every chart CSS custom property the SVG library reads is defined in :root. */

@font-face{
  font-family:"Manrope";
  src:url("/assets/fonts/manrope-latin.woff2") format("woff2");
  font-weight:100 900;
  font-display:swap;
}

:root {
  /* surfaces */
  --surface-1: #ffffff;
  --page: #f6f8fc;

  /* ink + text */
  --text-primary: #0f1b2d;
  --text-secondary: #334155;
  --muted: #64748b;

  /* structure */
  --gridline: #eef2f9;
  --baseline: #cbd5e1;
  --border: #e6ecf5;
  --shadow: 0 1px 2px rgba(15,27,45,.05), 0 12px 30px -14px rgba(30,58,95,.18);
  --shadow-hover: 0 2px 4px rgba(15,27,45,.06), 0 20px 42px -16px rgba(30,58,95,.26);

  /* status semantics */
  --good: #16a34a;
  --bad: #dc2626;

  /* data-viz series — azure/cyan led, colorblind-conscious */
  --s1: #3b82f6; /* azure  (primary) */
  --s2: #06b6d4; /* cyan   (secondary) */
  --s3: #6366f1; /* indigo */
  --s4: #16a34a; /* green  */
  --s5: #8b5cf6; /* violet */
  --s6: #f59e0b; /* amber  */
  --s7: #ec4899; /* pink   */
  --s8: #0ea5e9; /* sky    */

  --st-good: #16a34a; --st-warn: #f59e0b; --st-serious: #f97316; --st-crit: #dc2626;

  --radius: 18px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background:
    radial-gradient(1200px 420px at 80% -8%, rgba(6,182,212,.06), transparent 60%),
    radial-gradient(1100px 460px at 0% -6%, rgba(59,130,246,.07), transparent 62%),
    var(--page);
  background-attachment: fixed;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

/* The shared PrimeLayer chrome removes this demo's in-page topbar,
   but keep sane styling in case it renders standalone. */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-1);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.02em; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px;
  background: linear-gradient(135deg, var(--s1), var(--s2));
}
.brand .sub { color: var(--muted); font-weight: 600; font-size: 13px; }
.topbar .spacer { flex: 1; }
.nav { display: flex; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--text-secondary); font-size: 13px; font-weight: 600;
  padding: 6px 12px; border-radius: 9px;
}
.nav a:hover { background: var(--page); color: var(--text-primary); }
.nav a.active { background: var(--s1); color: #fff; }
.updated { color: var(--muted); font-size: 12.5px; }

/* ---- Layout ---- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 34px 28px 72px; }
.page-head { margin: 2px 0 26px; }
.page-head h1 {
  margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.03em;
  background: linear-gradient(96deg, var(--s1) 0%, var(--s2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  width: fit-content;
}
.page-head p { margin: 8px 0 0; color: var(--text-secondary); font-size: 15px; max-width: 720px; }

.grid { display: grid; gap: 18px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 18px; }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 880px) { .cards-2, .cards-3 { grid-template-columns: 1fr; } }

/* ---- Cards ---- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  box-shadow: var(--shadow);
  min-width: 0;
  transition: transform .22s cubic-bezier(.2,.7,.3,1), box-shadow .22s ease, border-color .22s ease;
  animation: rise .5s cubic-bezier(.2,.7,.3,1) both;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: #d6e2f4; }
.card h3 { margin: 0 0 3px; font-size: 15px; font-weight: 700; letter-spacing: -.015em; }
.card .hint { margin: 0 0 14px; color: var(--muted); font-size: 12.5px; }
.card.span-2 { grid-column: span 2; }
@media (max-width: 880px) { .card.span-2 { grid-column: span 1; } }

/* staggered entrance */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.kpis .card:nth-child(2) { animation-delay: .04s; }
.kpis .card:nth-child(3) { animation-delay: .08s; }
.kpis .card:nth-child(4) { animation-delay: .12s; }
.kpis .card:nth-child(5) { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }

/* ---- KPI tile ---- */
.kpi { display: flex; flex-direction: column; gap: 7px; position: relative; overflow: hidden; }
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--s1), var(--s2)); opacity: .9;
}
.kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.kpi .value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; color: var(--text-primary); }
.kpi .foot { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.delta {
  font-weight: 700; display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; border-radius: 999px; font-size: 11.5px;
}
.delta.up { color: var(--good); background: rgba(22,163,74,.10); }
.delta.down { color: var(--bad); background: rgba(220,38,38,.10); }
.kpi .spark { margin-top: 4px; }

/* ---- Table ---- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr { transition: background .15s ease; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f2f7ff; }

/* ---- Pills / status ---- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: #f4f7fc; border: 1px solid var(--border);
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(59,130,246,.10); }

/* ---- Chart chrome ---- */
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.axis text { fill: var(--muted); font-size: 11px; }
.axis line, .grid line { stroke: var(--gridline); stroke-width: 1; }
.baseline { stroke: var(--baseline); stroke-width: 1; }
.bar-val { fill: var(--text-secondary); font-size: 11px; font-variant-numeric: tabular-nums; }

/* legend */
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; }
.legend .item { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-secondary); font-weight: 600; }
.legend .swatch { width: 11px; height: 11px; border-radius: 4px; }

/* tooltip */
.viz-tip {
  position: fixed; pointer-events: none; z-index: 50;
  background: var(--surface-1); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 34px -10px rgba(30,58,95,.35); padding: 10px 12px; font-size: 12.5px;
  min-width: 128px; opacity: 0; transform: translateY(2px); transition: opacity .1s;
}
.viz-tip .t-title { font-weight: 700; margin-bottom: 6px; }
.viz-tip .t-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.viz-tip .t-row .k { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); }
.viz-tip .t-row .v { font-variant-numeric: tabular-nums; font-weight: 700; }
.viz-tip .swatch { width: 9px; height: 9px; border-radius: 3px; }

.foot-note { color: var(--muted); font-size: 12.5px; margin-top: 36px; text-align: center; }
