/* BILSOLVER — UI (Relay-inspired, electric-blue). Vanilla, self-contained. */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;450;500;600&family=Instrument+Serif:ital@1&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #05070B;
  --bg-2: #070A10;
  --surface: #0C1119;
  --surface-2: #121A26;
  --border: #1B2634;
  --border-2: #26344A;
  --text: #EAF0F8;
  --muted: #9BA6B8;
  --dim: #69748A;
  --accent: #3B82F6;
  --accent-2: #60A5FA;
  --accent-soft: #BBD3FF;
  --accent-ink: #04070D;
  --accent-glow: rgba(59, 130, 246, .22);
  --success: #34D399;
  --danger: #F87171;
  --warn: #FBBF24;

  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  --maxw: 1200px;
  --gutter: clamp(16px, 4vw, 80px);
  --radius: 14px;
  --radius-lg: 20px;
  --dur: .5s;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
/* dot-grid texture + blue bloom glows */
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 120% 80% at 50% 0%, #000 40%, transparent 100%);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(60% 40% at 50% -5%, var(--accent-glow), transparent 60%),
    radial-gradient(40% 30% at 90% 10%, rgba(96, 165, 250, .10), transparent 60%),
    radial-gradient(50% 40% at 5% 30%, rgba(59, 130, 246, .08), transparent 60%);
}

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

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter); }
section { position: relative; padding-block: clamp(64px, 10vw, 140px); }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--dim); display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow .num { color: var(--accent); }
.sec-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.sec-head h2 {
  font-family: var(--font-sans); font-weight: 600; letter-spacing: -.02em; line-height: 1.05;
  font-size: clamp(30px, 5vw, 52px); margin-top: 18px;
}
.sec-head p { color: var(--muted); margin-top: 16px; font-size: clamp(15px, 2vw, 18px); max-width: 560px; }
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--accent-2); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px); background: rgba(5, 7, 11, .66);
  border-bottom: 1px solid transparent; transition: border-color var(--dur) var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-sans); font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-size: 14px; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  font-family: var(--font-mono); font-size: 12px; color: var(--muted); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; letter-spacing: .05em;
}
.lang-toggle:hover { color: var(--text); border-color: var(--border-2); }
.lang-toggle b { color: var(--accent-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-sans); font-weight: 500; font-size: 15px; letter-spacing: -.01em;
  padding: 12px 20px; border-radius: 11px; border: 1px solid transparent; transition: all .22s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: var(--accent-ink); font-weight: 600; box-shadow: 0 8px 24px -8px var(--accent-glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 34px -10px var(--accent-glow); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-2); background: var(--surface-2); }
.btn-sm { padding: 9px 15px; font-size: 14px; border-radius: 9px; }
.btn-block { width: 100%; }

/* ---------- pill badge ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-mono); font-size: 12.5px;
  letter-spacing: .04em; color: var(--muted); background: rgba(18, 26, 38, .6);
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px;
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.pill b { color: var(--text); font-weight: 500; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(48px, 8vw, 90px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 {
  font-family: var(--font-sans); font-weight: 600; letter-spacing: -.03em; line-height: 1.02;
  font-size: clamp(44px, 8vw, 84px); margin: 22px 0 0;
}
.hero p.sub { color: var(--muted); font-size: clamp(16px, 2.2vw, 20px); margin-top: 22px; max-width: 480px; }
.hero-cta { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 22px; margin-top: 26px; flex-wrap: wrap; }
.hero-meta span { font-family: var(--font-mono); font-size: 12.5px; color: var(--dim); display: inline-flex; align-items: center; gap: 8px; }
.hero-meta span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ---------- code panel ---------- */
.code-panel { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .8); }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, .01); }
.code-dots { display: flex; gap: 7px; }
.code-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--border-2); display: block; }
.code-title { font-family: var(--font-mono); font-size: 12px; color: var(--dim); }
.code-tabs { display: flex; gap: 4px; padding: 10px 12px 0; }
.code-tab { font-family: var(--font-mono); font-size: 12.5px; color: var(--dim); background: none; border: none; padding: 7px 13px; border-radius: 8px 8px 0 0; }
.code-tab.active { color: var(--accent-2); background: rgba(59, 130, 246, .08); }
.code-body { padding: 16px 18px; overflow-x: auto; }
.code-body pre { font-family: var(--font-mono); font-size: 13px; line-height: 1.7; color: #C7D2E0; white-space: pre; }
.code-body .k { color: var(--accent-2); }
.code-body .s { color: #7DD3A8; }
.code-body .c { color: var(--dim); }
.copy-btn { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; padding: 5px 10px; display: inline-flex; align-items: center; gap: 6px; }
.copy-btn:hover { color: var(--text); border-color: var(--border-2); }
.copy-btn.done { color: var(--success); border-color: var(--success); }

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: border-color .25s, transform .25s var(--ease); }
.card:hover { border-color: var(--border-2); transform: translateY(-2px); }
.card .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(59, 130, 246, .1); border: 1px solid var(--border); margin-bottom: 18px; }
.card .ico svg { width: 19px; height: 19px; color: var(--accent-2); }
.card h3 { font-family: var(--font-sans); font-weight: 600; font-size: 19px; letter-spacing: -.01em; margin-bottom: 9px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .tag { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); display: block; }
.badge-status { float: right; font-family: var(--font-mono); font-size: 11px; padding: 4px 9px; border-radius: 999px; letter-spacing: .04em; }
.badge-on { color: var(--success); background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .25); }
.badge-soon { color: var(--dim); background: var(--surface-2); border: 1px solid var(--border); }
.card-soon { opacity: .6; }
.card-soon:hover { transform: none; }

/* ---------- stats strip ---------- */
.stats-strip { border-block: 1px solid var(--border); background: rgba(12, 17, 25, .5); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 30px 24px; border-left: 1px solid var(--border); }
.stat:first-child { border-left: none; }
.stat .v { font-family: var(--font-sans); font-weight: 600; font-size: clamp(30px, 4vw, 46px); letter-spacing: -.02em; color: var(--accent-2); line-height: 1; }
.stat .l { font-size: 14px; margin-top: 10px; }
.stat .s { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); margin-top: 4px; }

/* ---------- pricing ---------- */
.price-table { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.price-row { display: grid; grid-template-columns: 2fr 1fr 1fr; align-items: center; padding: 20px 24px; border-top: 1px solid var(--border); }
.price-row:first-child { border-top: none; }
.price-row.head { background: rgba(255, 255, 255, .015); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.price-row .name { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.price-row .name svg { width: 18px; height: 18px; color: var(--accent-2); }
.price-row .per { font-family: var(--font-mono); color: var(--accent-2); font-size: 17px; }
.price-row .k { font-family: var(--font-mono); color: var(--muted); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--border); padding: 4px 0; }
.faq summary { list-style: none; cursor: pointer; padding: 20px 0; font-family: var(--font-sans); font-weight: 500; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent-2); font-size: 22px; font-weight: 300; transition: transform .25s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); font-size: 15px; padding: 0 0 20px; max-width: 720px; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); padding-block: 48px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.footer .cols { display: flex; gap: 30px; flex-wrap: wrap; }
.footer a { color: var(--muted); font-size: 14px; }
.footer a:hover { color: var(--text); }
.footer .fine { font-family: var(--font-mono); font-size: 12px; color: var(--dim); width: 100%; margin-top: 10px; }

/* ---------- auth pages (login / account) ---------- */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 40px var(--gutter); }
.auth-card { width: 100%; max-width: 440px; background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(26px, 4vw, 40px); box-shadow: 0 40px 100px -50px rgba(0, 0, 0, .9); }
.auth-card .brand { justify-content: center; margin-bottom: 8px; }
.auth-card h1 { font-family: var(--font-sans); font-weight: 600; font-size: 26px; text-align: center; letter-spacing: -.02em; }
.auth-card .lede { color: var(--muted); text-align: center; font-size: 14.5px; margin-top: 8px; margin-bottom: 24px; }
.auth-tabs { display: flex; background: var(--bg-2); border: 1px solid var(--border); border-radius: 11px; padding: 4px; margin-bottom: 22px; }
.auth-tab { flex: 1; padding: 9px; border: none; background: none; color: var(--muted); font-family: var(--font-sans); font-weight: 500; font-size: 14px; border-radius: 8px; transition: all .2s; }
.auth-tab.active { background: var(--surface-2); color: var(--text); }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.field input { width: 100%; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; color: var(--text); font-family: var(--font-body); font-size: 15px; transition: border-color .2s; }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, .15); }
.field .hint { font-size: 12px; color: var(--dim); margin-top: 6px; }
.divider { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--dim); font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; background: #fff; color: #1f2328; font-weight: 600; border: none; border-radius: 11px; padding: 12px; font-family: var(--font-sans); font-size: 15px; transition: opacity .2s; }
.btn-google:hover { opacity: .9; }
.btn-google:disabled { opacity: .4; cursor: not-allowed; }
.btn-google svg { width: 18px; height: 18px; }
.auth-note { font-family: var(--font-mono); font-size: 11.5px; color: var(--dim); text-align: center; margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 7px; }
.auth-note .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.msg { border-radius: 10px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 16px; display: none; }
.msg.show { display: block; }
.msg.err { background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .3); color: #FCA5A5; }
.msg.ok { background: rgba(52, 211, 153, .1); border: 1px solid rgba(52, 211, 153, .3); color: #6EE7B7; }

/* ---------- account ---------- */
.acct-hero { padding-top: 40px; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.acct-hero .who { display: flex; align-items: center; gap: 14px; }
.acct-hero .avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-family: var(--font-sans); font-weight: 600; font-size: 20px; color: var(--accent-2); overflow: hidden; }
.acct-hero h1 { font-family: var(--font-sans); font-weight: 600; font-size: 24px; letter-spacing: -.01em; }
.acct-hero .email { color: var(--muted); font-size: 14px; }
.acct-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 30px; }
.acct-card { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.acct-card .lbl { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; }
.acct-card .big { font-family: var(--font-sans); font-weight: 600; font-size: 40px; letter-spacing: -.02em; color: var(--accent-2); line-height: 1; }
.acct-card .big small { font-size: 18px; color: var(--muted); }
.keybox { display: flex; align-items: center; gap: 10px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font-family: var(--font-mono); font-size: 13.5px; color: var(--text); word-break: break-all; }
.keybox code { flex: 1; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.kv:first-of-type { border-top: none; }
.kv .kk { color: var(--muted); }
.kv .vv { color: var(--text); font-family: var(--font-mono); font-size: 13px; text-align: right; }
.span-2 { grid-column: 1 / -1; }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: none; }
  .stat { border-top: 1px solid var(--border); }
  .stat:nth-child(-n+2) { border-top: none; }
  .acct-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .price-row { grid-template-columns: 1.4fr 1fr; }
  .price-row .k { display: none; }
  .price-row.head span:last-child { display: none; }
}
@media (max-width: 560px) {
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat { border-left: none !important; }
}
