/* ConvertingLead — Design Tokens */
:root {
  /* Dark theme (default) */
  --bg: #0a0b0d;
  --bg-elev: #0f1115;
  --surface: #14171c;
  --surface-2: #1a1e25;
  --border: #1f232b;
  --border-strong: #2a2f38;
  --text: #f4f4ee;
  --text-dim: #b6bac2;
  --muted: #7d828c;
  --muted-2: #565a64;

  --accent: #10b981;
  --accent-2: #34d399;
  --accent-glow: rgba(16, 185, 129, 0.18);
  --accent-soft: rgba(16, 185, 129, 0.08);
  --warning: #f59e0b;
  --danger: #ef4444;

  --display: "Instrument Serif", "Newsreader", Georgia, serif;
  --sans: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --max: 1240px;
  --pad: 28px;

  --d-pad-y: 96px; /* density */
  --d-gap: 24px;
}

[data-theme="light"] {
  --bg: #f7f6f1;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0eee6;
  --border: #e3e1d6;
  --border-strong: #c9c6b6;
  --text: #0e1013;
  --text-dim: #353941;
  --muted: #6e7280;
  --muted-2: #9aa0a8;
  --accent-glow: rgba(16, 185, 129, 0.15);
  --accent-soft: rgba(16, 185, 129, 0.06);
}

[data-density="compact"] { --d-pad-y: 64px; --d-gap: 18px; }
[data-density="roomy"] { --d-pad-y: 128px; --d-gap: 32px; }

/* Type swap variants */
[data-type="editorial"] { --display: "Instrument Serif", Georgia, serif; --sans: "Geist", system-ui, sans-serif; }
[data-type="modern"] { --display: "Geist", system-ui, sans-serif; --sans: "Geist", system-ui, sans-serif; }
[data-type="luxe"] { --display: "Newsreader", "Instrument Serif", Georgia, serif; --sans: "Geist", system-ui, sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark; }
[data-theme="light"] html, html[data-theme="light"] { color-scheme: light; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font-family: inherit; cursor: pointer; }

/* Typographic primitives */
.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
}
[data-type="modern"] .display { font-weight: 600; letter-spacing: -0.04em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.h1 { font-size: clamp(48px, 7vw, 96px); }
.h2 { font-size: clamp(36px, 4.6vw, 64px); }
.h3 { font-size: clamp(24px, 2.4vw, 32px); }

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: var(--d-pad-y) 0; position: relative; }
.section-tight { padding: calc(var(--d-pad-y) * 0.6) 0; }

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

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #04130c;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow), 0 8px 28px -10px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-2); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--text-dim); }
.btn-link {
  background: transparent;
  color: var(--text);
  border: none;
  padding: 0;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px;
}
.btn-link .arr { transition: transform .15s ease; }
.btn-link:hover { color: var(--accent); }
.btn-link:hover .arr { transform: translateX(3px); }
.btn-sm { padding: 10px 16px; font-size: 13px; }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.card:hover { border-color: var(--border-strong); }
.card-flat {
  background: transparent;
  border: 1px solid var(--border);
}

/* Pill / chip */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-dim);
  font-family: var(--mono);
  letter-spacing: 0.02em;
}
.chip.accent { background: var(--accent-soft); border-color: var(--accent-glow); color: var(--accent); }
.chip-dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); display: inline-block;
}

/* Grid helpers */
.grid { display: grid; gap: var(--d-gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}
@media (max-width: 1040px) and (min-width: 760px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* Hairline numeric label */
.numlabel {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

/* Marquee scroll */
@keyframes scroll-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee { display: flex; overflow: hidden; gap: 0; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 64px; flex-shrink: 0; padding-right: 64px; animation: scroll-x 40s linear infinite; }

/* Subtle grid bg */
.grid-bg {
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: -1px -1px;
  opacity: 0.4;
}

/* Spotlight glow */
.spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(60% 50% at 50% 0%, var(--accent-glow), transparent 70%);
  opacity: 0.6;
  z-index: 0;
}

/* Header / nav */
.header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 75%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0;
}
.brand {
  display: inline-flex; align-items: center; gap: 0;
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: 16px;
  background: none !important;
  text-decoration: none;
}
.brand img {
  height: 48px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  display: block;
}
[data-theme="light"] .brand img {
  /* On light bg use the light logo */
  filter: none;
}
/* .brand-mark replaced by real logo image */
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-dim);
  position: relative;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: ""; position: absolute; bottom: -1px; left: 14px; right: 14px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.dropdown {
  position: absolute; top: calc(100% + 4px);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  min-width: 280px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.6);
  display: flex; flex-direction: column;
}
.dropdown-item {
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 14px;
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer;
}
.dropdown-item:hover { background: var(--surface); color: var(--text); }
.dropdown-item .desc { display: block; font-size: 12px; color: var(--muted); }

/* Mobile menu */
.menu-btn {
  display: none;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
}
@media (max-width: 1080px) {
  .nav.desktop { display: none; }
  .menu-btn { display: inline-flex; }
  .header-cta { display: none; }
}

.mobile-sheet {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  padding: 24px;
  overflow-y: auto;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 80px 0 40px;
  background: var(--bg-elev);
  margin-top: 80px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h5 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: var(--text-dim); font-size: 14px; }
.footer a:hover { color: var(--accent); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--muted); font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.input, .textarea, .select {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}

/* Remove browser blue select arrow — replace with green chevron */
.select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 42px;
  cursor: pointer;
}

/* Kill browser blue focus ring on ALL interactive elements */
*:focus { outline: none; }
*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* accent-color for checkboxes, radios, range inputs */
input[type="checkbox"],
input[type="radio"],
input[type="range"] {
  accent-color: var(--accent);
}
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); background: var(--surface); }
.input.error, .textarea.error, .select.error { border-color: var(--danger); }
.help-error { font-size: 12px; color: var(--danger); }

/* Misc utilities */
.mute { color: var(--muted); }
.dim { color: var(--text-dim); }
.accent { color: var(--accent); }
.tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* Subtle entry animation */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.reveal { animation: fadeUp .5s ease both; }
.reveal-d1 { animation-delay: .08s; }
.reveal-d2 { animation-delay: .16s; }
.reveal-d3 { animation-delay: .24s; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted-2); }

/* SVG chart strokes follow accent */
.stroke-accent { stroke: var(--accent); }
.fill-accent { fill: var(--accent); }
.stroke-muted { stroke: var(--border-strong); }

/* Specific helpers */
.kbd {
  display: inline-flex; align-items: center;
  padding: 2px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

/* Bento number panel */
.metric {
  display: flex; flex-direction: column; gap: 6px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.metric .num {
  font-family: var(--display);
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}
.metric .num .unit { color: var(--accent); }
.metric .label { font-size: 13px; color: var(--muted); }

/* Bullet list with check */
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text-dim); }
.checklist li::before {
  content: ""; flex: 0 0 18px;
  width: 18px; height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M2.5 6.5L5 9L9.5 3' stroke='%2310b981' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-position: center; background-repeat: no-repeat;
}

/* Bordered inline tag for industries */
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  background: var(--surface);
}

/* Big number display */
.big-num {
  font-family: var(--display);
  font-size: clamp(60px, 9vw, 132px);
  line-height: 0.9;
  letter-spacing: -0.03em;
}

/* ════════════════════════════════════════════════════════════════
   MOBILE — ConvertingLead v4 (clean rewrite)
   ════════════════════════════════════════════════════════════════ */

/* ── Prevent ALL horizontal overflow ───────────────────────────── */
html { overflow-x: hidden; }
body { overflow-x: hidden; max-width: 100%; }
* { box-sizing: border-box; min-width: 0; }
img, video, svg { max-width: 100%; }
.wrap { overflow: visible; }

/* ── Mobile menu portal ─────────────────────────────────────────── */
.mobile-sheet {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  background: var(--bg) !important;
  overflow-y: auto !important;
}

/* ── Header stacking ────────────────────────────────────────────── */
.header { z-index: 100; }
.header-cta { display: flex; gap: 8px; align-items: center; }

/* ════════════════════════════════════════════════════════════════
   TABLET  ≤ 1080px  — hide desktop nav, show hamburger
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1080px) {
  .nav.desktop  { display: none !important; }
  .menu-btn     { display: inline-flex !important; }
  /* header-cta has no inline display so this works */
  .header-cta   { display: none !important; }
}

/* ════════════════════════════════════════════════════════════════
   MOBILE  ≤ 768px
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Tokens ─────────────────────────────────────── */
  :root {
    --pad:     16px;
    --d-pad-y: 40px;
    --d-gap:   14px;
  }

  /* ── All sections ───────────────────────────────── */
  .section       { padding: 36px 0 !important; }
  .section-tight { padding: 18px 0 !important; }

  /* ── Typography ─────────────────────────────────── */
  .h1 { font-size: clamp(28px, 8.5vw, 42px) !important; line-height: 1.05 !important; }
  .h2 { font-size: clamp(22px, 6.5vw, 32px) !important; line-height: 1.1  !important; }
  .h3 { font-size: clamp(17px, 5vw,   22px) !important; }
  .big-num { font-size: clamp(36px, 9vw, 56px) !important; }

  /* ── Header ─────────────────────────────────────── */
  .header-inner { padding: 10px 0; }
  .brand img    { height: 40px; max-width: 200px; }

  /* ── Cards ──────────────────────────────────────── */
  .card { padding: 16px !important; }

  /* ── Metric panels ──────────────────────────────── */
  .metric       { padding: 14px !important; }
  .metric .num  { font-size: 28px !important; }
  .metric .label{ font-size: 11px; }

  /* ── Buttons ────────────────────────────────────── */
  .btn    { font-size: 13px; padding: 11px 18px; }
  .btn-sm { font-size: 12px; padding: 8px 13px;  }

  /* ── Footer ─────────────────────────────────────── */
  .footer { padding: 36px 0 20px !important; margin-top: 36px !important; }
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }
  .footer h5 { font-size: 10px; margin-bottom: 10px; }
  .footer a  { font-size: 13px; }
  .footer ul { gap: 8px; }

  /* ── Tags / chips / eyebrow ─────────────────────── */
  .tag-row { flex-wrap: wrap; gap: 6px; }
  .tag     { font-size: 12px; padding: 5px 9px; }
  .chip    { font-size: 11px; padding: 4px 9px; }
  .eyebrow { font-size: 10px; letter-spacing: 0.12em; }

  /* ── Lists ──────────────────────────────────────── */
  .checklist li { font-size: 14px; gap: 10px; }
  .checklist li::before { flex: 0 0 16px; width: 16px; height: 16px; }

  /* ── Marquee ─────────────────────────────────────── */
  .marquee-track { gap: 24px; }
  .marquee { mask-image: linear-gradient(90deg,transparent,#000 5%,#000 95%,transparent); }

  /* ── Forms ───────────────────────────────────────── */
  .input, .textarea, .select { font-size: 16px !important; }
}

/* ════════════════════════════════════════════════════════════════
   SMALL  ≤ 480px
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  :root { --pad: 14px; --d-pad-y: 32px; }

  .section       { padding: 28px 0 !important; }
  .card          { padding: 14px !important; }
  .metric        { padding: 12px !important; }
  .metric .num   { font-size: 24px !important; }
  .footer-grid   { grid-template-columns: 1fr !important; }
  .h1 { font-size: clamp(26px, 8vw, 36px) !important; }
}
