/* Voxiberate marketing site */

:root {
  --ink: #0e0e1a;
  --ink-2: #2a2a3a;
  --muted: #6b6b7a;
  --line: #e6e4dc;
  --line-2: #d8d6cc;
  --paper: #fafaf7;
  --paper-2: #f3f1e8;
  --white: #ffffff;
  --brand: #5b4cf5;
  --brand-deep: #3d2fd0;
  --brand-soft: #ece9ff;
  --brand-ink: #1a0f7a;
  --coral: oklch(0.72 0.14 30);
  --green: oklch(0.68 0.12 150);
  --gold: oklch(0.78 0.13 75);
  --rose: oklch(0.72 0.14 350);
  --radius: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Layered structure: background swarm canvas at z=1, sections above with translucent
   surfaces so the swarm "breathes" through. Solid blocks (dark, brand) cover it on purpose. */
#root { position: relative; z-index: 2; }
section { position: relative; z-index: 2; }
header { z-index: 100; }

/* Backgrounds — slightly translucent so swarm peeks through on light surfaces */
section.bg-paper2 { background: rgba(243, 241, 232, 0.78); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }

/* Consensus progress pill (fixed) */
.consensus-pill {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  z-index: 101;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 10px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(20,15,70,0.08);
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.consensus-pill .bar {
  width: 80px; height: 4px;
  background: rgba(91,76,245,0.15);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.consensus-pill .bar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #5b4cf5, #b14ee0);
  width: 0%;
  transition: width 0.15s ease-out;
}
.consensus-pill .pct { color: var(--ink); font-weight: 500; min-width: 28px; text-align: right; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }

.serif {
  font-family: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  font-weight: 400;
  font-style: normal;
  letter-spacing: -0.01em;
}
.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Layout */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 980px; margin: 0 auto; padding: 0 32px; }

/* Eyebrow */
.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 999px; background: var(--brand);
  display: inline-block;
}
.eyebrow.on-dark { color: rgba(255,255,255,0.7); }
.eyebrow.on-dark .dot { background: #fff; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--brand); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--brand-deep); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--paper-2); }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }
.btn-ghost-light:hover { background: #fff; color: var(--brand-deep); border-color: #fff; }
.btn .arrow { display: inline-block; transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* Section spacing */
section { padding: 96px 0; }
section.compact { padding: 56px 0; }
section.tight { padding: 72px 0; }

/* Headings */
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.05; }
.h-display { font-size: clamp(48px, 7.2vw, 104px); line-height: 1.18; letter-spacing: -0.025em; padding-bottom: 0.18em; }

/* ===== Hero scrollytelling layout ===== */
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: auto auto;
  column-gap: 64px;
  row-gap: 0;
}
.hero-text { grid-column: 1; grid-row: 1; }
.hero-dial-col {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: relative;
  /* Extra room past the last beat so the dial pins long enough to finish
     converging visibly (sticky needs this runway). */
  padding-bottom: 200px;
}
.hero-dial-sticky { position: sticky; top: 96px; }
.hero-track { grid-column: 1; grid-row: 2; }

/* ============ RESPONSIVE / MOBILE ============ */
@media (max-width: 880px) {
  /* --- Global rhythm & gutters --- */
  .wrap, .wrap-narrow { padding: 0 20px !important; }
  section { padding: 64px 0 !important; }
  section.compact { padding: 36px 0 !important; }
  section.tight { padding: 48px 0 !important; }

  /* --- Hero: flatten grid, sticky dial above scrolling beats --- */
  .hero-grid { display: block; }
  .hero-text, .hero-dial-col, .hero-track { display: block; width: 100%; }
  .hero-dial-col {
    position: sticky;
    top: 60px;
    z-index: 5;
    margin: 24px 0 0;
    /* Soft paper backdrop so beats scrolling underneath don't bleed through */
    background: linear-gradient(to bottom, var(--paper) 78%, rgba(250,250,247,0));
    padding-bottom: 6px;
  }
  .hero-dial-sticky { position: static; }
  /* Compact dial on mobile so it doesn't dominate the viewport */
  .hero-dial-sticky [data-live-consensus-card] {
    padding: 12px !important;
    border-radius: 16px !important;
    box-shadow: 0 14px 30px -22px rgba(20,15,70,0.28) !important;
  }
  .hero-dial-sticky [data-live-consensus-card] svg {
    height: auto !important;
    max-height: 150px !important;
  }
  .hero-dial-sticky [data-live-consensus-card] .scroll-hint { display: none !important; }
  .hero-track { padding-top: 28px !important; }
  .hero-beat { min-height: 60vh !important; padding-top: 24px !important; margin-top: 16px !important; }
  .hero-beat:first-child { padding-top: 4px !important; margin-top: 4px !important; border-top: none !important; }

  /* --- Stack all multi-column section grids --- */
  .grid-2col-intro,
  .grid-2col-vs,
  .grid-2col-faq {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }
  .grid-2col-intro > p { padding-top: 0 !important; }
  .grid-step-4 { grid-template-columns: 1fr 1fr !important; }
  .grid-cases-2 { grid-template-columns: 1fr !important; }
  .grid-quotes-3 { grid-template-columns: 1fr !important; }

  /* --- FAQ: kill sticky on mobile so the heading doesn't lock up --- */
  .faq-side { position: static !important; }

  /* --- Comparison table: stack each row vertically (no sideways scroll) --- */
  .vs-table { overflow: visible !important; }
  /* Hide the column-header row; we re-label each cell inline below */
  .vs-table > div:first-child { display: none !important; }
  /* Every data row collapses to a single column */
  .vs-table > div:not(:first-child) {
    grid-template-columns: 1fr !important;
    padding: 16px 18px !important;
    gap: 10px !important;
  }
  /* Row label gets a soft divider underneath */
  .vs-table > div:not(:first-child) > div:first-child {
    padding-bottom: 6px;
    border-bottom: 1px solid #25253a;
    margin-bottom: 2px;
  }
  /* Prefix the chat cell with a "Group chat" mini-label */
  .vs-table > div:not(:first-child) > div:nth-child(2)::before {
    content: 'Group chat';
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
  }
  /* Prefix the Voxiberate cell with its own mini-label */
  .vs-table > div:not(:first-child) > div:nth-child(3)::before {
    content: 'Voxiberate';
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #a89cff;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
  }

  /* --- Contact form: stack first/last name on mobile --- */
  .contact-name-row { grid-template-columns: 1fr !important; }

  /* --- App preview mocks (Dashboard / Deliberation) --- */
  .mock-frame { width: 100% !important; }
  /* Stack sidebar above main on narrow screens */
  .mock-dash-body { flex-direction: column !important; min-height: 0 !important; }
  .mock-dash-sidebar {
    width: 100% !important;
    border-right: 0 !important;
    border-bottom: 1px solid #ececea !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    align-items: center !important;
    padding: 10px 12px !important;
  }
  .mock-dash-sidebar > div:first-child { width: 100% !important; margin-bottom: 6px !important; }
  .mock-dash-sidebar > div { margin-bottom: 0 !important; padding: 5px 9px !important; font-size: 10px !important; }
  .mock-dash-main { padding: 14px !important; }
  /* Stack header label + CTA */
  .mock-dash-header { flex-direction: column !important; align-items: stretch !important; }
  .mock-dash-cta { align-self: flex-start !important; }
  /* Stat cards: 1 column, full width */
  .mock-dash-stats { flex-direction: column !important; gap: 8px !important; }
  /* Hide budget column and View button in ask rows on mobile */
  .mock-dash-budget, .mock-dash-view { display: none !important; }
}

@media (max-width: 560px) {
  .grid-step-4 { grid-template-columns: 1fr !important; }
  .grid-step-4 > div { padding: 24px 22px !important; }
  /* Even tighter dial */
  .hero-dial-sticky [data-live-consensus-card] svg { max-height: 130px !important; }
}
.h-section { font-size: clamp(36px, 4.6vw, 64px); line-height: 1.15; letter-spacing: -0.022em; padding-bottom: 0.12em; }
.h-3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; letter-spacing: -0.015em; font-weight: 500; }

p { margin: 0; }
.lede { font-size: clamp(17px, 1.4vw, 19px); line-height: 1.55; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--muted); }

/* Card */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

/* Tweaks panel */
.tweaks {
  position: fixed;
  bottom: 20px; right: 20px;
  width: 280px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  z-index: 9999;
  font-size: 13px;
  display: none;
}
.tweaks.open { display: block; }
.tweaks h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 12px; color: var(--muted); font-weight: 500; }
.tweaks .row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.tweaks label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.tweaks .seg { display: flex; gap: 4px; background: var(--paper); border-radius: 10px; padding: 3px; border: 1px solid var(--line); }
.tweaks .seg button { flex: 1; padding: 7px 10px; border-radius: 7px; font-size: 12px; color: var(--muted); }
.tweaks .seg button.active { background: var(--ink); color: #fff; }

/* Audience toggle (in nav + hero) */
.aud-switch {
  display: inline-flex;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.aud-switch button {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: -0.005em;
}
.aud-switch button.active {
  background: var(--ink);
  color: #fff;
}
.aud-switch.on-brand button.active { background: #fff; color: var(--brand-deep); }
.aud-switch.on-brand { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.2); }
.aud-switch.on-brand button { color: rgba(255,255,255,0.75); }

/* Hide alt audience content */
[data-aud]:not(.aud-active) { display: none !important; }
h1 [data-aud], h2 [data-aud], h3 [data-aud] { display: block; }
h1 [data-aud]:not(.aud-active), h2 [data-aud]:not(.aud-active), h3 [data-aud]:not(.aud-active) { display: none !important; }

/* Density variations */
body.dense section { padding: 64px 0; }
body.dense .h-display { font-size: clamp(40px, 6vw, 84px); }

/* Theme variant */
body.theme-dark { background: #0a0a14; color: #e6e6f0; }
body.theme-dark .card { background: #15151f; border-color: #25253a; }

/* Util */
.row { display: flex; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.center { display: flex; align-items: center; justify-content: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.col { display: flex; flex-direction: column; }
