/* RapidXtract website — shared styles (marketing site + help centre) */
:root {
  --brand: #2b7fff;
  --brand-600: #2563eb;
  --cyan: #00b4d8;
  --cyan-bright: #00f0ff;
  --navy: #0a1430;
  --navy-2: #101d42;
  --ink: #0f172a;
  --text: #1e293b;
  --muted: #5b6b85;
  --line: #e3e8f0;
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px rgba(15, 23, 42, .06);
  --max: 1180px;
  --hover: #eef4ff;
  --code-bg: #eef3fb;
  --code-line: #dde6f3;
  --code-ink: #1d3a7a;
  --kbd-line: #cfd8e6;
  --note-bg: #eef6ff;
  --note-line: #cfe1fb;
  --warn-bg: #fff8e8;
  --warn-line: #f6e0a8;
  color-scheme: light;
}

/* Dark theme — set on <html data-theme="dark"> by assets/theme.js */
:root[data-theme="dark"] {
  --ink: #eef2fb;
  --text: #cdd6ea;
  --muted: #93a3c4;
  --line: #26324f;
  --bg: #0b1226;
  --bg-soft: #0e1730;
  --card: #131d3a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .3);
  --hover: rgba(43, 127, 255, .16);
  --code-bg: #1a2547;
  --code-line: #2c3a63;
  --code-ink: #9cc3ff;
  --kbd-line: #3a4a75;
  --note-bg: rgba(43, 127, 255, .12);
  --note-line: rgba(43, 127, 255, .32);
  --warn-bg: rgba(245, 158, 11, .12);
  --warn-line: rgba(245, 158, 11, .35);
  color-scheme: dark;
}
:root[data-theme="dark"] .card:hover { border-color: #3a4a75; }

/* Theme toggle (light → dark → system, like the product) */
.theme-toggle {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  background: transparent; color: #c9d6f2; border: 1px solid rgba(255, 255, 255, .25);
}
.theme-toggle:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.theme-toggle svg { width: 18px; height: 18px; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd {
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: .88em;
}
code { background: var(--code-bg); border: 1px solid var(--code-line); border-radius: 6px; padding: 1px 6px; color: var(--code-ink); }
kbd {
  background: var(--card); border: 1px solid var(--kbd-line); border-bottom-width: 2px; border-radius: 6px;
  padding: 1px 7px; color: var(--ink); white-space: nowrap;
}
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ── Wordmark ─────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none !important; }
.brand img.logo { height: 38px; width: auto; }
.site-footer .brand img.logo, .help-footer .brand img.logo { height: 42px; }

/* ── Buttons ──────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer; text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--cyan)); color: #fff; box-shadow: 0 8px 20px rgba(43, 127, 255, .35); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.btn-outline { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-sm { padding: 8px 14px; font-size: .88rem; }

/* ── Header ───────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(4, 8, 20, .96); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .08); color: #fff;
}
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: #c9d6f2; padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .93rem; text-decoration: none; }
.site-nav a:hover, .site-nav a.active { color: #fff; background: rgba(255, 255, 255, .08); }
.header-actions { display: flex; gap: 10px; align-items: center; }
.menu-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* ── Sections ─────────────────────────────── */
section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); background: rgba(43, 127, 255, .1); padding: 6px 12px; border-radius: 999px; margin-bottom: 16px;
}
.section-head { text-align: center; max-width: 760px; margin: 0 auto 52px; }
.section-head h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.2; letter-spacing: -.02em; color: var(--ink); margin: 0 0 14px; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }
.grad { background: linear-gradient(135deg, var(--brand), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: #c7d6ef; }
.card h3 { margin: 14px 0 8px; font-size: 1.15rem; color: var(--ink); }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }
.card ul { margin: 14px 0 0; padding: 0; list-style: none; }
.card li { position: relative; padding-left: 24px; margin: 7px 0; font-size: .93rem; color: var(--text); }
.card li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px;
  border-left: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); transform: rotate(-45deg);
}
.icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(43, 127, 255, .14), rgba(0, 180, 216, .14)); color: var(--brand);
}
.icon svg { width: 24px; height: 24px; }

/* ── Footer ───────────────────────────────── */
.site-footer { background: var(--navy); color: #a9b7d6; padding: 64px 0 28px; font-size: .93rem; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin: 0 0 14px; }
.site-footer a { color: #a9b7d6; display: block; margin: 7px 0; }
.site-footer a:hover { color: #fff; }
/* Footer links are block-level; keep the logo's icon and wordmark side by side like the header */
.site-footer .brand, .help-footer .brand { display: inline-flex; margin: 0; }
.site-footer .bottom {
  border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 44px; padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  section { padding: 64px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .site-nav.open {
    display: flex; flex-direction: column; align-items: stretch; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--navy); padding: 12px 16px 18px; border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  .menu-toggle { display: block; }
  .header-actions .btn-ghost { display: none; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
}
