/* MetricFlow — marketing site styles */
:root {
  --purple-900: #4c1d95;
  --purple-700: #6d28d9;
  --purple-600: #7c3aed;
  --purple-500: #8b5cf6;
  --purple-400: #a78bfa;
  --ink: #0b0b12;
  --ink-2: #16121f;
  --slate-900: #111827;
  --slate-700: #374151;
  --slate-600: #4b5563;
  --slate-500: #6b7280;
  --slate-300: #d1d5db;
  --slate-200: #e5e7eb;
  --slate-100: #f3f4f6;
  --paper: #ffffff;
  --tint: #f6f3fe;
  --green: #16a34a;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(17, 12, 34, 0.08);
  --shadow-lg: 0 24px 60px rgba(76, 29, 149, 0.18);
  --maxw: 1120px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--slate-900);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--purple-700); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 560px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--purple-700); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 200;
}
.skip-link:focus { left: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; font-weight: 600; font-size: .98rem;
  padding: .8rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none; font-family: inherit;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: .55rem 1rem; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, var(--purple-500), var(--purple-700)); color: #fff; box-shadow: 0 8px 20px rgba(109, 40, 217, .28); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(109, 40, 217, .38); }
.btn-ghost { background: transparent; color: var(--purple-700); border-color: var(--slate-200); }
.btn-ghost:hover { background: var(--tint); }
.btn-outline { background: #fff; color: var(--purple-700); border-color: var(--purple-400); }
.btn-outline:hover { background: var(--tint); }
.btn-light { background: #fff; color: var(--purple-700); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--slate-200);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; color: var(--slate-900); }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 1.15rem; letter-spacing: -0.03em; }
.brand-mark { display: block; }

.primary-nav { display: flex; align-items: center; gap: 1.5rem; }
.primary-nav a { color: var(--slate-700); font-weight: 500; font-size: .96rem; }
.primary-nav a:hover { color: var(--purple-700); text-decoration: none; }
.nav-signin { font-weight: 600 !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--slate-900); border-radius: 2px; transition: .2s; }

/* Hero */
.hero { padding: 72px 0 48px; background: radial-gradient(1200px 500px at 80% -10%, rgba(139, 92, 246, .16), transparent 60%), var(--paper); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--purple-700); margin-bottom: 1rem; }
.lede { font-size: 1.2rem; color: var(--slate-600); max-width: 34ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 1.6rem 0 1rem; }
.hero-note { font-size: .88rem; color: var(--slate-500); }

.hero-panel { background: linear-gradient(160deg, var(--ink), var(--ink-2)); border-radius: 20px; padding: 20px; box-shadow: var(--shadow-lg); color: #fff; }
.panel-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.dot { width: 11px; height: 11px; border-radius: 50%; }
.d1 { background: #f87171; } .d2 { background: #fbbf24; } .d3 { background: #34d399; }
.panel-title { margin-left: auto; font-size: .82rem; color: #c4b5fd; font-weight: 600; }
.chart { background: rgba(255,255,255,.03); border: 1px solid rgba(167,139,250,.18); border-radius: 12px; padding: 10px; }
.chart-svg { width: 100%; height: 160px; display: block; }
.chart-svg .grid { stroke: rgba(255,255,255,.08); stroke-width: 1; }
.panel-stats { display: flex; justify-content: space-between; margin-top: 16px; gap: 8px; }
.panel-stats > div { display: flex; flex-direction: column; }
.stat-num { font-size: 1.35rem; font-weight: 700; }
.stat-num.up { color: #34d399; }
.stat-lbl { font-size: .72rem; color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; }

.logo-strip { margin-top: 56px; text-align: center; }
.logo-strip > span { display: block; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--slate-500); margin-bottom: 14px; }
.logo-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px; }
.wordmark { font-weight: 700; font-size: 1.15rem; color: var(--slate-500); letter-spacing: -0.02em; opacity: .8; }

/* Sections */
.section { padding: 80px 0; }
.section-dark { background: linear-gradient(180deg, var(--ink), #131022); color: #e5e7eb; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .section-head p { color: #b9b3cf; }
.section-tint { background: var(--tint); }
.section-head { max-width: 620px; margin: 0 auto 48px; text-align: center; }
.section-head p { color: var(--slate-600); font-size: 1.08rem; }

/* Cards */
.card { background: #fff; border: 1px solid var(--slate-200); border-radius: var(--radius); box-shadow: var(--shadow); }
.section-dark .card { background: rgba(255,255,255,.04); border-color: rgba(167,139,250,.16); color: #e5e7eb; }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.feature { padding: 28px 24px; }
.feature-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: var(--purple-700); background: var(--tint); margin-bottom: 16px; }
.feature p { color: var(--slate-600); margin: 0; font-size: .96rem; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { padding: 30px 26px; position: relative; }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--purple-500), var(--purple-700)); color: #fff; font-weight: 700; margin-bottom: 16px; }
.step p { color: #b9b3cf; margin: 0; font-size: .96rem; }

/* Integrations */
.integrations-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.integ { display: flex; align-items: center; gap: 14px; padding: 20px 22px; font-weight: 600; color: var(--slate-700); }
.integ svg { flex: none; }

/* Pricing */
.billing-toggle { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 40px; }
.bt-label { font-weight: 600; color: var(--slate-500); font-size: .98rem; }
.bt-label[data-active="true"] { color: var(--slate-900); }
.bt-label em { font-style: normal; font-size: .78rem; color: var(--purple-700); background: #fff; border: 1px solid var(--purple-400); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.switch { width: 52px; height: 28px; border-radius: 999px; border: 0; background: var(--slate-300); position: relative; cursor: pointer; transition: background .2s; padding: 0; }
.switch[aria-checked="true"] { background: var(--purple-700); }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch[aria-checked="true"] .knob { transform: translateX(24px); }

.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.price { padding: 32px 28px; position: relative; }
.price-desc { color: var(--slate-600); font-size: .95rem; min-height: 3em; }
.price-amt { font-size: 1rem; color: var(--slate-500); margin: 8px 0 20px; display: flex; align-items: baseline; }
.price-amt .cur { font-size: 1.4rem; color: var(--slate-900); font-weight: 700; }
.price-amt .num { font-size: 2.8rem; color: var(--slate-900); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 0 2px; }
.price-amt .per { font-size: .95rem; }
.price-feats { list-style: none; padding: 0; margin: 0 0 24px; }
.price-feats li { padding: 8px 0 8px 26px; position: relative; color: var(--slate-700); font-size: .95rem; border-bottom: 1px solid var(--slate-100); }
.price-feats li::before { content: ""; position: absolute; left: 0; top: 14px; width: 14px; height: 8px; border-left: 2px solid var(--purple-600); border-bottom: 2px solid var(--purple-600); transform: rotate(-45deg); }
.price-featured { border-color: var(--purple-500); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, var(--purple-500), var(--purple-700)); color: #fff; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 5px 14px; border-radius: 999px; }

/* Testimonials */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.testi { padding: 28px 26px; margin: 0; }
.testi blockquote { margin: 0 0 20px; font-size: 1.02rem; color: var(--slate-700); }
.testi figcaption { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--slate-600); }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--purple-400), var(--purple-700)); color: #fff; font-weight: 700; font-size: .85rem; flex: none; }

/* Auth form */
.auth-form { padding: 32px 30px; }
.field { margin-bottom: 18px; text-align: left; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; color: #e5e7eb; }
.section:not(.section-dark) .field label { color: var(--slate-700); }
.field input, .field textarea {
  width: 100%; padding: .8rem .9rem; border-radius: var(--radius-sm);
  border: 1px solid var(--slate-300); font-family: inherit; font-size: 1rem;
  background: #fff; color: var(--slate-900); transition: border .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--purple-500); box-shadow: 0 0 0 3px rgba(139,92,246,.2); }
.field input.invalid, .field textarea.invalid { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.15); }
.field textarea { resize: vertical; }
.form-msg { min-height: 1.2em; font-size: .9rem; margin: -4px 0 12px; }
.form-msg.error { color: #f87171; }
.section:not(.section-dark) .form-msg.error { color: #dc2626; }
.form-msg.success { color: var(--green); }
.auth-alt { text-align: center; font-size: .9rem; color: var(--slate-500); margin: 16px 0 0; }
.section-dark .auth-alt { color: #b9b3cf; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--purple-700), var(--purple-900)); color: #fff; padding: 60px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin-bottom: .3em; }
.cta-band p { color: #e9d5ff; margin: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-copy p { color: var(--slate-600); font-size: 1.05rem; }
.contact-facts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-facts li { font-size: .95rem; color: var(--slate-600); }
.contact-facts strong { color: var(--slate-900); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
.contact-form { padding: 30px 28px; }

/* Footer */
.site-footer { background: var(--ink); color: #9ca3af; padding: 56px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin-top: 12px; font-size: .92rem; max-width: 30ch; }
.footer-col h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer-col a { display: block; color: #9ca3af; font-size: .95rem; padding: 5px 0; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); font-size: .85rem; }
.legal-line { color: #6b7280; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--slate-900); color: #fff; padding: 14px 22px; border-radius: 12px;
  box-shadow: var(--shadow-lg); font-weight: 500; font-size: .95rem; z-index: 300;
  opacity: 0; transition: transform .3s ease, opacity .3s ease; max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: #065f46; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .feature-grid, .integrations-grid { grid-template-columns: repeat(2, 1fr); }
  .steps, .pricing-grid, .testi-grid { grid-template-columns: 1fr; }
  .price-featured { transform: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: #fff; border-bottom: 1px solid var(--slate-200);
    padding: 14px 24px 20px; box-shadow: var(--shadow);
    display: none;
  }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: 10px 0; }
  .primary-nav .btn { margin-top: 6px; }
  .feature-grid, .integrations-grid, .contact-facts { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
