:root {
  --bg: #0b0d12;
  --bg-soft: #11141b;
  --surface: #161a23;
  --surface-2: #1d2230;
  --border: #262c3a;
  --text: #e7eaf3;
  --text-dim: #9aa3b8;
  --muted: #6b7388;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #06b6d4;
  --green: #10b981;
  --orange: #f59e0b;
  --red: #ef4444;
  --pink: #ec4899;
  --shadow: 0 10px 40px rgba(0,0,0,.4);
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
code, kbd { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .9em; background: rgba(255,255,255,.06); padding: 1px 6px; border-radius: 4px; color: #c9d1e0; }
a { color: var(--text); text-decoration: none; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99,102,241,.28), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(139,92,246,.22), transparent 60%),
    radial-gradient(700px 400px at 50% 100%, rgba(236,72,153,.15), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
  padding-bottom: 110px;
}
.nav {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 40px; max-width: 1240px; margin: 0 auto; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.brand-icon { width: 28px; height: 28px; color: var(--accent); }
.brand-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 2px 10px rgba(139, 92, 246, .45)); }
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--text-dim); font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; }

.hero-content { max-width: 900px; margin: 60px auto 0; padding: 0 40px; text-align: center; position: relative; z-index: 2; }
.badge {
  display: inline-block; padding: 6px 14px;
  background: rgba(99,102,241,.12); border: 1px solid rgba(99,102,241,.3);
  border-radius: 999px; font-size: 13px; color: #c7d2fe; font-weight: 500; margin-bottom: 24px;
}
.hero h1 { font-size: clamp(40px, 6.5vw, 76px); line-height: 1.04; letter-spacing: -.03em; font-weight: 800; margin: 0 0 22px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { max-width: 680px; margin: 0 auto 32px; color: var(--text-dim); font-size: 19px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-trust {
  margin-top: 36px; display: flex; gap: 22px; flex-wrap: wrap; justify-content: center;
  color: var(--text-dim); font-size: 13px;
}

.hero-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-orbs span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .4; animation: float 18s ease-in-out infinite; }
.hero-orbs span:nth-child(1) { width: 460px; height: 460px; background: #6366f1; top: -120px; left: -120px; }
.hero-orbs span:nth-child(2) { width: 360px; height: 360px; background: #8b5cf6; top: 80px; right: -80px; animation-delay: -6s; }
.hero-orbs span:nth-child(3) { width: 380px; height: 380px; background: #ec4899; bottom: -180px; left: 30%; animation-delay: -12s; }
@keyframes float { 0%, 100% { transform: translate(0,0) scale(1); } 33% { transform: translate(40px,-30px) scale(1.1); } 66% { transform: translate(-30px,20px) scale(.95); } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px;
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; border: none;
  transition: transform .12s, box-shadow .2s, background .2s;
  text-decoration: none;
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(99,102,241,.4); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(99,102,241,.55); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-icon { padding: 9px; background: var(--surface-2); color: var(--text-dim); border: 1px solid var(--border); border-radius: 8px; }
.btn-icon:hover { color: var(--text); background: var(--surface); }
.btn-danger:hover { color: var(--red); border-color: rgba(239,68,68,.4); }
.full { width: 100%; justify-content: center; }

/* Main / sections */
main { max-width: 1240px; margin: 0 auto; padding: 80px 40px 40px; }

.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head.center { text-align: center; flex-direction: column; align-items: center; margin-bottom: 50px; }
.section-head h2 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.02em; line-height: 1.15; }
.muted { color: var(--text-dim); font-size: 15px; max-width: 600px; margin: 0; }

/* Logos strip */
.logos { padding: 0 0 50px; text-align: center; }
.logos-label { color: var(--muted); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px; }
.logos-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 36px; color: #4b5269; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }

/* Features */
.features-section { padding: 40px 0 80px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.feature {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 24px; transition: transform .2s, border-color .2s;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(99,102,241,.4); }
.feature h3 { margin: 14px 0 6px; font-size: 16px; font-weight: 600; }
.feature p { margin: 0; color: var(--text-dim); font-size: 14px; }
.feature-ic { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.feature-ic svg { width: 22px; height: 22px; }
.ic-blue   { background: rgba(99,102,241,.15); color: #818cf8; }
.ic-purple { background: rgba(139,92,246,.15); color: #a78bfa; }
.ic-green  { background: rgba(16,185,129,.15); color: #34d399; }
.ic-orange { background: rgba(245,158,11,.15); color: #fbbf24; }
.ic-pink   { background: rgba(236,72,153,.15); color: #f472b6; }
.ic-cyan   { background: rgba(6,182,212,.15);  color: #22d3ee; }

/* Use cases */
.use-cases { padding: 40px 0 80px; }
.use-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.use-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.use-card h3 { margin: 0 0 8px; font-size: 17px; }
.use-card p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* How it works */
.how { padding: 40px 0 80px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; counter-reset: s; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; position: relative; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad); color: #fff;
  font-weight: 700; font-size: 14px; margin-bottom: 12px;
}
.steps h4 { margin: 0 0 4px; font-size: 16px; }
.steps p { margin: 0; color: var(--text-dim); font-size: 14px; }

/* Pricing */
.pricing { padding: 60px 0; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; max-width: 1080px; margin: 0 auto; }
.plan {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 28px; display: flex; flex-direction: column; gap: 12px;
  transition: transform .2s, border-color .2s;
}
.plan:hover { transform: translateY(-4px); }
.plan.featured {
  border-color: rgba(99,102,241,.5);
  background: linear-gradient(180deg, rgba(99,102,241,.08), rgba(139,92,246,.04)), var(--surface);
  box-shadow: 0 20px 60px rgba(99,102,241,.15);
  position: relative;
}
.plan-tag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px; letter-spacing: .06em; text-transform: uppercase;
}
.plan-name { font-size: 14px; color: var(--text-dim); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.plan-price { font-size: 14px; color: var(--text-dim); }
.plan-price span { font-size: 40px; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.plan ul { list-style: none; padding: 0; margin: 4px 0 16px; display: flex; flex-direction: column; gap: 8px; }
.plan li { font-size: 14px; color: var(--text-dim); padding-left: 22px; position: relative; }
.plan li::before { content: '✓'; color: #34d399; position: absolute; left: 0; font-weight: 700; }

/* Quotes */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding: 40px 0 80px; }
.quote { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; }
.quote p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; }
.quote span { color: var(--muted); font-size: 13px; }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; padding: 40px 0 80px; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px 20px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; outline: none; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::after { content: '+'; color: var(--text-dim); font-size: 22px; transition: transform .2s; }
.faq details[open] summary::after { content: '−'; }
.faq p { color: var(--text-dim); font-size: 14px; margin: 12px 0 0; }

/* CTA */
.cta {
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.08));
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 20px; padding: 60px 40px; text-align: center; margin: 40px 0;
}
.cta h2 { margin: 0 0 12px; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.02em; }
.cta p { color: var(--text-dim); font-size: 17px; margin: 0 0 26px; }

/* Spreadsheet (demo page) */
.ss-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ss-cell-label { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 600; color: var(--accent); background: rgba(99,102,241,.1); padding: 8px 12px; border-radius: 8px; border: 1px solid rgba(99,102,241,.25); min-width: 50px; text-align: center; }
.ss-formula { flex: 1; min-width: 220px; padding: 9px 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; font-family: 'JetBrains Mono', monospace; font-size: 13px; outline: none; transition: border-color .15s; }
.ss-formula:focus { border-color: var(--accent); }
.ss-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: auto; max-height: 480px; }
table.ss { border-collapse: separate; border-spacing: 0; font-size: 13px; width: 100%; }
table.ss th, table.ss td { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 0; min-width: 110px; height: 32px; }
table.ss th { background: var(--surface-2); font-weight: 600; text-align: center; padding: 6px 10px; position: sticky; top: 0; z-index: 1; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; font-size: 12px; }
table.ss tr th:first-child { left: 0; z-index: 2; min-width: 40px; }
table.ss tr td:first-child + td, table.ss tr th + th { border-left: 1px solid var(--border); }
table.ss td { color: var(--text); transition: background .1s; }
table.ss td:hover { background: rgba(99,102,241,.05); }
table.ss td.sel { outline: 2px solid var(--accent); outline-offset: -2px; background: rgba(99,102,241,.08); }
table.ss td .cell-val { padding: 6px 10px; display: block; }
table.ss td .cell-num { color: #93c5fd; text-align: right; font-variant-numeric: tabular-nums; }
table.ss td .cell-err { color: var(--red); }
table.ss input { width: 100%; height: 100%; border: 0; outline: 0; padding: 6px 10px; font-size: 13px; font-family: 'JetBrains Mono', monospace; background: var(--bg-soft); color: var(--text); box-sizing: border-box; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 50px 40px 30px; max-width: 1240px; margin: 0 auto; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.foot-grid h5 { margin: 0 0 12px; font-size: 13px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }
.foot-grid a { display: block; color: var(--text-dim); font-size: 14px; padding: 4px 0; }
.foot-grid a:hover { color: var(--text); }
.foot-grid p { color: var(--text-dim); font-size: 14px; margin: 12px 0 0; }
.foot-bot { text-align: center; color: var(--muted); font-size: 13px; padding-top: 24px; border-top: 1px solid var(--border); }
.heart { color: var(--pink); }

@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav, .hero-content, main, footer { padding-left: 20px; padding-right: 20px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
}

/* Legal modal */
.legal-modal {
  position: fixed; inset: 0; background: rgba(8,10,16,.78);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px; backdrop-filter: blur(6px);
}
.legal-modal[hidden] { display: none !important; }
.legal-card {
  background: #14182a; border: 1px solid #262c3a; border-radius: 16px;
  padding: 28px; max-width: 560px; width: 100%; max-height: 80vh;
  overflow: auto; position: relative; color: #e7eaf3;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.legal-card h3 { margin: 0 0 14px; font-size: 22px; }
.legal-card p { margin: 0 0 12px; line-height: 1.55; color: #c4cad8; font-size: 14px; }
.legal-card a { color: #a5b4fc; }
.legal-close {
  position: absolute; top: 10px; right: 14px; background: transparent;
  border: 0; color: #9aa3b8; font-size: 26px; cursor: pointer; line-height: 1;
}
.legal-close:hover { color: #fff; }

/* Toast */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  background: #1a1f2e; color: #e7eaf3; border: 1px solid #262c3a;
  padding: 12px 20px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.4); z-index: 1100;
  animation: toastIn .2s ease-out;
}
.toast[hidden] { display: none !important; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
