/* ==========================================================================
   JAMB API — Design tokens
   Identity: exam OMR answer-sheet + developer terminal.
   Palette:  #14172B ink, #F5F6FA paper, #3B3FE0 indigo (primary),
             #F2A93B pencil-amber (accent/CTA), #2FAE66 correct-green,
             #E14F4F reject-red
   Type:     Space Grotesk (display), Inter (body), JetBrains Mono (data/code)
   Signature: shaded OMR bubbles (A B C D) used as marks, dividers, loaders
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --ink: #14172B;
  --ink-soft: #2B2F4A;
  --paper: #F5F6FA;
  --paper-raised: #FFFFFF;
  --line: #E1E3EE;
  --indigo: #3B3FE0;
  --indigo-dark: #2A2DB0;
  --amber: #F2A93B;
  --amber-dark: #D6900F;
  --green: #2FAE66;
  --red: #E14F4F;
  --muted: #6A6E8C;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 10px;
  --shadow: 0 4px 24px rgba(20,23,43,0.08);
  --shadow-lg: 0 16px 48px rgba(20,23,43,0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code, pre, .mono { font-family: var(--font-mono); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 8px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  font-family: var(--font-body);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--indigo); color: #fff; box-shadow: 0 8px 20px rgba(59,63,224,0.28); }
.btn-primary:hover { background: var(--indigo-dark); }
.btn-amber { background: var(--amber); color: var(--ink); box-shadow: 0 8px 20px rgba(242,169,59,0.35); }
.btn-amber:hover { background: var(--amber-dark); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--ink); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-outline-light:hover { border-color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger { background: var(--red); color: #fff; }
.btn-green { background: var(--green); color: #fff; }

/* ---------- Navbar ---------- */
.navbar { position: sticky; top: 0; z-index: 100; background: rgba(245,246,250,0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--ink); position: relative; flex-shrink: 0; }
.brand-mark::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--amber); }
.nav-links { display: flex; align-items: center; gap: 30px; font-weight: 500; font-size: 15px; }
.nav-links a { color: var(--ink-soft); transition: color .15s; }
.nav-links a:hover, .nav-links a.active { color: var(--indigo); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

@media (max-width: 900px) {
  .nav-links { position: fixed; top: 72px; left: 0; right: 0; background: var(--paper-raised); flex-direction: column; padding: 20px 24px; border-bottom: 1px solid var(--line); display: none; gap: 18px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-cta .btn-outline { display: none; }
}

/* ---------- Hero (signature: OMR bubble sheet) ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 90px 0 70px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em; color: var(--amber); background: rgba(242,169,59,0.12); border: 1px solid rgba(242,169,59,0.35); padding: 6px 14px; border-radius: 999px; margin-bottom: 22px; text-transform: uppercase; }
.hero h1 { font-size: clamp(34px, 5vw, 54px); margin-bottom: 20px; }
.hero h1 .hl { color: var(--amber); }
.hero p.lead { font-size: 18px; color: rgba(255,255,255,0.72); max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.hero-stats div strong { display: block; font-family: var(--font-display); font-size: 26px; }
.hero-stats div span { font-size: 13px; color: rgba(255,255,255,0.55); }

/* Terminal card */
.terminal { background: #1C1F38; border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; box-shadow: var(--shadow-lg); overflow: hidden; }
.terminal-head { display: flex; gap: 7px; padding: 13px 16px; background: rgba(255,255,255,0.04); }
.terminal-head span { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.terminal-body { padding: 20px; font-family: var(--font-mono); font-size: 13px; color: #C9CCE6; overflow-x: auto; }
.terminal-body .c1 { color: #7DD3AE; }
.terminal-body .c2 { color: var(--amber); }
.terminal-body .c3 { color: #8B90C4; }

/* OMR bubble motif */
.omr-row { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; color: rgba(255,255,255,0.5); }
.omr-row .qn { width: 26px; }
.bubble { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.35); display: inline-flex; align-items: center; justify-content: center; font-size: 9px; }
.bubble.filled { background: var(--amber); border-color: var(--amber); color: var(--ink); font-weight: 700; }
.omr-strip { position: absolute; right: -40px; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: space-around; opacity: 0.5; transform: rotate(3deg); pointer-events: none; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-tight { padding: 56px 0; }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-title .eyebrow { background: rgba(59,63,224,0.08); border-color: rgba(59,63,224,0.25); color: var(--indigo); }
.section-title h2 { font-size: clamp(26px, 3.4vw, 38px); }
.section-title p { color: var(--muted); font-size: 16px; }
.section-alt { background: var(--paper-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-dark { background: var(--ink); color: #fff; }
.section-dark .muted-light { color: rgba(255,255,255,0.6); }

/* ---------- Feature / cards grid ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); } .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card .icon-mark { width: 46px; height: 46px; border-radius: 10px; background: rgba(59,63,224,0.08); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--indigo); font-family: var(--font-mono); font-weight: 700; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; margin-bottom: 0; }

/* ---------- Subjects strip ---------- */
.subject-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper-raised); font-size: 14px; font-weight: 500; }
.subject-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.subject-wrap { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ---------- Pricing ---------- */
.price-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: 14px; padding: 34px 28px; position: relative; display: flex; flex-direction: column; }
.price-card.popular { border-color: var(--indigo); box-shadow: 0 0 0 4px rgba(59,63,224,0.08); }
.price-card .badge { position: absolute; top: -13px; left: 28px; background: var(--indigo); color: #fff; font-size: 11.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; letter-spacing: .03em; text-transform: uppercase; }
.price-card .amount { font-family: var(--font-display); font-size: 40px; margin: 14px 0 4px; }
.price-card .amount span { font-size: 15px; font-weight: 500; color: var(--muted); font-family: var(--font-body); }
.price-card ul { list-style: none; margin: 22px 0; padding: 0; flex-grow: 1; }
.price-card li { display: flex; gap: 10px; padding: 7px 0; font-size: 14.5px; color: var(--ink-soft); }
.price-card li::before { content: "●"; color: var(--green); font-size: 10px; margin-top: 6px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 26px 22px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); }
.step .num { font-family: var(--font-mono); color: var(--amber-dark); font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.step h4 { font-size: 16px; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,0.7); padding: 60px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h5 { color: #fff; font-family: var(--font-display); font-size: 14px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; font-size: 14.5px; }
.footer li a:hover { color: var(--amber); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13.5px; color: rgba(255,255,255,0.45); }
.social-row { display: flex; gap: 12px; }
.social-row a { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; }

/* ---------- Forms (auth + dashboard) ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--paper); padding: 40px 20px; }
.auth-card { width: 100%; max-width: 440px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: 14px; padding: 40px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); font-size: 14.5px; margin-bottom: 26px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.form-control, select.form-control, textarea.form-control {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14.5px;
  font-family: var(--font-body); background: var(--paper); transition: border-color .15s;
}
.form-control:focus { border-color: var(--indigo); outline: none; background: #fff; }
.form-hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.alert { padding: 13px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; border: 1px solid transparent; }
.alert-success { background: rgba(47,174,102,0.1); color: #1B7A46; border-color: rgba(47,174,102,0.3); }
.alert-error { background: rgba(225,79,79,0.1); color: #B23434; border-color: rgba(225,79,79,0.3); }
.alert-info { background: rgba(59,63,224,0.08); color: var(--indigo-dark); border-color: rgba(59,63,224,0.25); }

/* ---------- App shell (dashboard + admin) ---------- */
.app-shell { display: flex; min-height: 100vh; background: var(--paper); }
.app-sidebar { width: 250px; background: var(--ink); color: rgba(255,255,255,0.75); flex-shrink: 0; padding: 22px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.app-sidebar .brand { color: #fff; padding: 0 22px 22px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 14px; }
.app-sidebar .grp-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,0.35); padding: 16px 22px 6px; }
.app-sidebar a { display: flex; align-items: center; gap: 11px; padding: 10px 22px; font-size: 14.5px; font-weight: 500; transition: background .15s, color .15s; border-left: 3px solid transparent; }
.app-sidebar a:hover { background: rgba(255,255,255,0.05); color: #fff; }
.app-sidebar a.active { background: rgba(242,169,59,0.1); color: var(--amber); border-left-color: var(--amber); }
.app-main { flex-grow: 1; min-width: 0; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 30px; background: var(--paper-raised); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.app-topbar h1 { font-size: 20px; margin: 0; }
.app-content { padding: 30px; }
.user-chip { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--indigo); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display); }
.mobile-menu-btn { display: none; background: none; border: none; font-size: 22px; cursor: pointer; }
@media (max-width: 960px) {
  .app-sidebar { position: fixed; left: -260px; top: 0; z-index: 200; transition: left .2s; }
  .app-sidebar.open { left: 0; }
  .mobile-menu-btn { display: block; }
}

/* Stat cards */
.stat-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.stat-card .label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.stat-card .value { font-family: var(--font-display); font-size: 28px; }
.stat-card .delta { font-size: 12.5px; color: var(--green); margin-top: 6px; }

/* Tables */
.table-wrap { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data-table th { text-align: left; background: var(--paper); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
table.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: rgba(59,63,224,0.03); }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; gap: 14px; flex-wrap: wrap; }

.badge-tag { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-active, .badge-approved, .badge-published, .badge-credit { background: rgba(47,174,102,0.12); color: #1B7A46; }
.badge-pending, .badge-draft { background: rgba(242,169,59,0.15); color: var(--amber-dark); }
.badge-suspended, .badge-rejected, .badge-revoked, .badge-debit { background: rgba(225,79,79,0.12); color: #B23434; }
.badge-admin { background: rgba(59,63,224,0.12); color: var(--indigo); }

.pagination { display: flex; gap: 6px; padding: 16px 20px; justify-content: flex-end; }
.pagination a, .pagination span { padding: 7px 13px; border-radius: 6px; font-size: 13.5px; border: 1px solid var(--line); }
.pagination a:hover { border-color: var(--indigo); color: var(--indigo); }
.pagination .current { background: var(--indigo); color: #fff; border-color: var(--indigo); }

.key-box { font-family: var(--font-mono); background: var(--ink); color: var(--amber); padding: 12px 16px; border-radius: 8px; font-size: 13px; word-break: break-all; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

.tab-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab-nav a { padding: 11px 18px; font-size: 14.5px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab-nav a.active { color: var(--indigo); border-color: var(--indigo); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .bubble { width: 50px; height: 50px; margin: 0 auto 16px; border: 2px solid var(--line); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); color: var(--muted); }

/* blog & docs */
.blog-card { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.blog-card img { width: 100%; height: 190px; object-fit: cover; background: var(--line); }
.blog-card .body { padding: 20px; }
.blog-card .meta { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; font-family: var(--font-mono); }
.blog-card h3 { font-size: 17px; margin-bottom: 8px; }
.blog-card p { font-size: 14px; color: var(--muted); }

.docs-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
@media (max-width: 860px) { .docs-layout { grid-template-columns: 1fr; } }
.docs-nav { position: sticky; top: 90px; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.docs-nav a { display: block; padding: 9px 14px; border-radius: 6px; font-size: 14px; color: var(--ink-soft); }
.docs-nav a:hover { background: var(--paper); }
.docs-nav a.active { background: rgba(59,63,224,0.08); color: var(--indigo); font-weight: 600; }
.docs-content { background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; }
.docs-content h2 { margin-top: 34px; }
.docs-content h2:first-child { margin-top: 0; }
.docs-content pre { background: var(--ink); color: #C9CCE6; padding: 18px; border-radius: 8px; overflow-x: auto; font-size: 13px; }
.docs-content code { background: rgba(59,63,224,0.08); padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.docs-content pre code { background: none; padding: 0; }
.docs-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.docs-content th, .docs-content td { border: 1px solid var(--line); padding: 9px 12px; font-size: 14px; text-align: left; }
.docs-content th { background: var(--paper); }

.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; background: var(--ink); color: #fff; padding: 20px; }
.error-page .code { font-family: var(--font-display); font-size: clamp(70px,14vw,140px); color: var(--amber); line-height: 1; margin-bottom: 10px; }

.chip-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip-nav a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; background: var(--paper-raised); }
.chip-nav a.active { background: var(--indigo); color: #fff; border-color: var(--indigo); }

.w-full { width: 100%; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.mt-0{margin-top:0} .mb-0{margin-bottom:0}
.flex { display: flex; }
.gap-2 { gap: 8px; } .gap-3 { gap: 14px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
