:root {
  /* Palette from the original LedgerQL site: hsl(226, 40%, 12%) base */
  --bg: #000000;
  --bg-alt: #0c101d;       /* sidebar */
  --surface: #12182b;      /* panel base */
  --surface-2: #1a223d;    /* navigation / button default */
  --border: #364063;
  --text: #DCDCDC;
  --muted: rgba(220,220,220,.7);
  --accent: #227BE4;       /* brand blue */
  --accent-2: #8ebcf1;     /* link blue */
  --radius: 12px;
  --max: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.accent { color: var(--accent); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  padding: .8em 1.4em;
  border-radius: 8px;
  border: 1px solid var(--accent);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px -6px rgba(34,123,228,.6); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn-sm { padding: .45em 1em; font-size: .9rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(12,16,29,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; }
.brand img { height: 34px; width: auto; }
.brand-mark { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: .95rem; }
.nav-links a:not(.btn) { color: var(--muted); }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.5rem; cursor: pointer; }

/* Hero */
.hero { padding: 72px 0 88px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 80% 20%, rgba(34,123,228,.16), transparent 70%),
    radial-gradient(500px 400px at 10% 90%, rgba(54,70,125,.25), transparent 70%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 48px; align-items: center; position: relative; max-width: 1440px; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 36em; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 40px; }
.hero-stats { list-style: none; padding: 0; margin: 0; display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats strong { display: block; font-size: 1.5rem; }
.hero-stats span { color: var(--muted); font-size: .85rem; }

.hero-media {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.8), 0 0 0 1px rgba(34,123,228,.12);
  position: relative;
}
.hero-media img { width: 100%; height: auto; }
@keyframes pulse { 50% { opacity: .35; } }

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 40px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card p { color: var(--muted); margin: 0; font-size: .95rem; }
.card-icon { color: var(--accent-2); font-size: .85rem; margin-bottom: 18px; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { border-top: 2px solid var(--border); padding-top: 20px; }
.steps li:hover { border-top-color: var(--accent); }
.step-num { color: var(--accent); font-size: .85rem; display: block; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: .95rem; }


.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-grid p { color: var(--muted); }
.terminal { background: #000000; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: .85rem; }
.terminal-bar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.terminal pre { margin: 0; padding: 20px; overflow-x: auto; line-height: 1.8; color: var(--text); }
.terminal .c { color: var(--accent-2); }
.terminal .ok { color: var(--accent); }
.cursor { animation: pulse 1s steps(1) infinite; }

/* Contact */
.contact { max-width: 720px; }
.contact-form { display: grid; gap: 16px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); }
.contact-form .btn { justify-self: start; }
.form-note { color: var(--accent); margin: 0; min-height: 1.2em; }

/* Footer: matches the original ledgerql.com bar */
.footer {
  display: flex; align-items: center; justify-content: center;
  min-height: 80px; padding: 0 20px; text-align: center;
  background: #DCDCDC; color: #000015;
  font: 16px Helvetica, Arial, sans-serif;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 16px;
    padding: 20px; background: var(--bg); border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .cards, .steps, .contact-form .row { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .hero { padding: 48px 0 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

.contact-info { list-style: none; padding: 0; margin: 0 0 32px; display: grid; gap: 10px; }
.contact-info li { display: flex; gap: 14px; align-items: baseline; }
.contact-info .mono { color: var(--muted); font-size: .8rem; min-width: 72px; }
.contact-info a { color: var(--accent); }
.contact-info a:hover { text-decoration: underline; }

/* Wider hero: keep the nav aligned with it */
.nav .container { max-width: 1440px; }

/* Original-site touches */
.card, .contact-form input, .contact-form select, .contact-form textarea, .terminal .ok, .step-num { color: var(--accent-2); }
.contact-info a { color: var(--accent-2); }
.contact-info a:hover { color: var(--accent); }

/* Spam honeypot: hidden from people */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form button:disabled { opacity: .6; cursor: wait; }

/* Phone: fixed +1 country code + number */
.contact-form .field { display: grid; gap: 6px; }
.phone-row { display: grid; grid-template-columns: 52px 1fr; gap: 8px; }
.contact-form select:invalid { color: var(--muted); }
.phone-prefix {
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-alt); color: var(--muted);
  cursor: not-allowed; user-select: none;
}
