/* VisitorGeo — clean, modern, minimal marketing/docs/dashboard styling.
   System font stack, light surface, CSS custom properties, no framework. */

:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #5b6577;
  --line: #e3e8f0;
  --brand: #2563eb;
  --brand-ink: #ffffff;
  --ok: #12a56a;
  --warn: #b45309;
  --err: #b91c1c;
  --code-bg: #0f172a;
  --code-ink: #e2e8f0;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 10px 30px rgba(15, 23, 42, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 620px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; max-width: 960px; margin: 0 auto;
}
.brand { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.brand:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--ink); font-weight: 500; }
.nav-cta {
  background: var(--brand); color: var(--brand-ink) !important;
  padding: 8px 14px; border-radius: 10px;
}
.nav-cta:hover { text-decoration: none; opacity: .92; }

/* Hero */
.hero { padding: 64px 0 40px; }
.hero h1 { font-size: 2.4rem; line-height: 1.15; letter-spacing: -.03em; margin: 0 0 16px; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0 10px; }

/* Buttons */
.btn {
  display: inline-block; font-weight: 600; font-size: 1rem;
  padding: 11px 18px; border-radius: 11px; border: 1px solid transparent;
  cursor: pointer; text-align: center;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { opacity: .92; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #cdd6e6; }
.btn-lg { padding: 13px 22px; font-size: 1.05rem; }

/* Live demo */
.demo { padding: 8px 0 36px; }
.demo-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); margin: 14px 0 8px;
}
.demo-status { margin: 0; color: var(--muted); }
.demo-fields { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.demo-fields dt { color: var(--muted); }
.demo-fields dd { margin: 0; font-weight: 600; }
.demo-error .demo-status { color: var(--err); font-weight: 600; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 20px 0 40px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.feature h2 { font-size: 1.1rem; margin: 0 0 8px; }
.feature p { margin: 0; color: var(--muted); }

/* Code blocks */
.code {
  background: var(--code-bg); color: var(--code-ink);
  border-radius: 12px; padding: 16px 18px; overflow-x: auto;
  font-family: var(--mono); font-size: .9rem; line-height: 1.55;
  margin: 12px 0;
}
.code code { font-family: inherit; }
code { font-family: var(--mono); font-size: .92em; }
p code, td code, li code { background: #eef2f9; padding: 1px 6px; border-radius: 6px; }

/* Example + pricing */
.example, .pricing { padding: 20px 0 40px; }
.example h2, .pricing h2, .docs h2, .dashboard h2 { font-size: 1.4rem; letter-spacing: -.02em; margin-top: 28px; }
.checklist { list-style: none; padding: 0; margin: 12px 0 20px; }
.checklist li { padding-left: 26px; position: relative; margin: 8px 0; }
.checklist li::before { content: "\2713"; color: var(--ok); position: absolute; left: 0; font-weight: 700; }
.price-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); max-width: 520px; }
.price { font-size: 1.4rem; margin: 0 0 8px; }
.price strong { font-size: 2rem; }

/* Docs tables */
.docs { padding: 40px 0 60px; }
.fields { width: 100%; border-collapse: collapse; margin: 14px 0 8px; font-size: .95rem; }
.fields th, .fields td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fields th { color: var(--muted); font-weight: 600; }
.fields .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 10px; max-width: 420px; margin: 20px 0; }
.form label { font-weight: 600; }
.form input {
  font: inherit; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--surface);
}
.form input:focus { outline: 2px solid var(--brand); border-color: var(--brand); }

/* Alerts */
.alert { border-radius: 11px; padding: 12px 14px; margin: 16px 0; border: 1px solid var(--line); }
.alert-error { background: #fef2f2; border-color: #fecaca; color: var(--err); }
.alert-warn { background: #fffbeb; border-color: #fde68a; color: var(--warn); }

/* Key box */
.keybox { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 20px; }
.key {
  font-family: var(--mono); font-size: 1.1rem; letter-spacing: .04em;
  background: #eef2f9; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; user-select: all;
}
.actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Dashboard */
.dashboard { padding: 40px 0 60px; }
.account-line { font-size: 1rem; }
.status { font-weight: 700; text-transform: capitalize; }
.status-active { color: var(--ok); }
.status-disabled { color: var(--err); }
.months { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 16px 0 8px; }
.month-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.month-card h3 { margin: 0 0 12px; font-size: 1.15rem; }
.month-card dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; }
.month-card dt { color: var(--muted); }
.month-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.month-card .amount { font-weight: 800; font-size: 1.1rem; }
.usage-table { max-width: 420px; }

/* 404 */
.notfound { padding: 80px 0; text-align: center; }
.notfound h1 { font-size: 4rem; margin: 0; letter-spacing: -.04em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0; background: var(--surface); }
.footer-links { margin: 0 0 6px; }
.footer-meta { color: var(--muted); margin: 0; }

@media (max-width: 720px) {
  .features { grid-template-columns: 1fr; }
  .months { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
}
