/* Veripay design system — shared by the landing page, dashboard and admin. */

:root {
  --bg: #08090b;
  --bg-soft: #0d0f12;
  --panel: #111317;
  --panel-2: #16191e;
  --line: #22262e;
  --line-soft: #1a1d23;

  --text: #f2f4f7;
  --muted: #9aa3b2;
  --faint: #6b7383;

  --accent: #4ade80;
  --accent-dim: #16351f;
  --info: #7c8cff;
  --warn: #f5a524;
  --danger: #f2637e;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0; }

code, pre, .mono { font-family: var(--mono); }

code.inline {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: .875em;
  color: #d7dce6;
  white-space: nowrap;
}

pre {
  background: #050608;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.62;
  margin: 0;
  color: #dfe4ee;
}

hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

/* ── layout ─────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow { max-width: 900px; }

.section { padding: 88px 0; }
.section-tight { padding: 52px 0; }

.stack { display: flex; flex-direction: column; }
.stack-2 { gap: 8px; }
.stack-3 { gap: 12px; }
.stack-4 { gap: 16px; }
.stack-6 { gap: 24px; }
.stack-8 { gap: 32px; }

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.row-between { justify-content: space-between; }
.row-wrap { flex-wrap: wrap; }

.grid { display: grid; gap: 18px; }

/* Grid items default to min-width:auto, which lets wide content such as the
   provider marquee blow out its track. */
.grid > *, .hero-grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.spacer { flex: 1; }

/* ── top navigation ─────────────────────────────────────────────────────── */

header.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 9, 11, .82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.topbar .container {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 62px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 650;
  font-size: 15.5px;
  letter-spacing: -.02em;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: linear-gradient(150deg, var(--accent), #0f9f57);
  display: grid;
  place-items: center;
  color: #04150a;
  font-size: 13px;
  font-weight: 800;
  flex: 0 0 auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a.active { color: var(--text); }

.tag {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .09em;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid #1f4a2e;
  padding: 2px 7px;
  border-radius: 999px;
}

/* ── buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: background .14s ease, border-color .14s ease, opacity .14s ease;
}

.btn:hover { background: var(--panel-2); border-color: #2e343d; color: var(--text); }

.btn-primary {
  background: #fff;
  border-color: #fff;
  color: #08090b;
}
.btn-primary:hover { background: #e4e7ec; border-color: #e4e7ec; color: #08090b; }

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #05230f;
}
.btn-accent:hover { background: #38c56d; border-color: #38c56d; color: #05230f; }

.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--panel); }

.btn-danger { color: var(--danger); border-color: #3a2029; background: #1a1013; }
.btn-danger:hover { background: #24141a; border-color: #552b37; }

.btn-sm { height: 31px; padding: 0 11px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }

.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-google {
  background: #fff;
  border-color: #fff;
  color: #1f1f1f;
  font-weight: 550;
}
.btn-google:hover { background: #f1f3f5; border-color: #f1f3f5; color: #1f1f1f; }

/* ── surfaces ───────────────────────────────────────────────────────────── */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.card-flush { padding: 0; overflow: hidden; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.card-body { padding: 20px; }

.card-title { font-size: 15px; font-weight: 600; }

.panel-note {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--info);
  border-radius: var(--radius-sm);
  padding: 12px 15px;
  font-size: 13.5px;
  color: var(--muted);
}

.panel-note.warn { border-left-color: var(--warn); }
.panel-note.danger { border-left-color: var(--danger); }
.panel-note.good { border-left-color: var(--accent); }
.panel-note strong { color: var(--text); }

/* ── typography helpers ─────────────────────────────────────────────────── */

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .13em;
  font-weight: 650;
  color: var(--faint);
}

.display {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -.035em;
  font-weight: 680;
}

.h2 { font-size: clamp(25px, 3.2vw, 36px); letter-spacing: -.028em; }
.h3 { font-size: 19px; }

.lede { font-size: 17px; color: var(--muted); line-height: 1.62; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.measure { max-width: 620px; }
.measure-center { max-width: 620px; margin-left: auto; margin-right: auto; }

/* ── badges ─────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  white-space: nowrap;
}

.badge-good { color: var(--accent); background: var(--accent-dim); border-color: #1f4a2e; }
.badge-warn { color: var(--warn); background: #2a1f0c; border-color: #4a3714; }
.badge-danger { color: var(--danger); background: #2a1218; border-color: #4d2029; }
.badge-info { color: var(--info); background: #171a33; border-color: #2b3060; }

.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── provider chips ─────────────────────────────────────────────────────── */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 13px;
  color: var(--muted);
}

.chip .dot { background: var(--accent); }

/* ── forms ──────────────────────────────────────────────────────────────── */

label.field { display: flex; flex-direction: column; gap: 6px; }

.label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.hint { font-size: 12px; color: var(--faint); }

input[type="text"],
input[type="url"],
input[type="email"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  background: #050608;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 9px 12px;
  outline: none;
  transition: border-color .14s ease, box-shadow .14s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: #35506f;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .1);
}

input::placeholder, textarea::placeholder { color: #545c6b; }

textarea { resize: vertical; min-height: 84px; line-height: 1.55; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%239aa3b2' d='M6 8.2 2.2 4.4l.8-.8L6 6.6l3-3 .8.8z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 30px;
}

.switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.switch input { accent-color: var(--accent); width: 15px; height: 15px; }

/* ── tables ─────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

table.data th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 650;
  color: var(--faint);
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  white-space: nowrap;
}

table.data td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: rgba(255, 255, 255, .015); }

.empty {
  padding: 46px 24px;
  text-align: center;
  color: var(--faint);
  font-size: 14px;
}

/* ── stats ──────────────────────────────────────────────────────────────── */

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 19px;
}

.stat-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--faint);
  font-weight: 620;
}

.stat-value {
  font-size: 28px;
  font-weight: 620;
  letter-spacing: -.03em;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}

.stat-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.meter {
  height: 5px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
  margin-top: 11px;
}

.meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.meter.warn > span { background: var(--warn); }
.meter.danger > span { background: var(--danger); }

/* ── sparkline chart ────────────────────────────────────────────────────── */

.chart { display: flex; align-items: flex-end; gap: 3px; height: 110px; }

.chart .bar {
  flex: 1;
  min-width: 2px;
  background: #1e3a29;
  border-radius: 2px 2px 0 0;
  position: relative;
  transition: background .12s ease;
}

.chart .bar[data-v]:hover { background: var(--accent); }
.chart .bar.has-fail { background: #46212b; }

/* ── dashboard shell ────────────────────────────────────────────────────── */

.app-shell { display: flex; min-height: calc(100vh - 62px); }

.side-nav {
  width: 218px;
  flex: 0 0 218px;
  border-right: 1px solid var(--line-soft);
  padding: 22px 12px;
  background: var(--bg-soft);
}

.side-nav .group-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--faint);
  font-weight: 650;
  padding: 0 10px;
  margin: 16px 0 7px;
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--muted);
}

.side-nav a:hover { background: var(--panel); color: var(--text); }
.side-nav a.active { background: var(--panel-2); color: var(--text); font-weight: 550; }

.app-main { flex: 1; min-width: 0; padding: 30px 34px 70px; }

.page-head { margin-bottom: 26px; }
.page-title { font-size: 22px; letter-spacing: -.025em; }

/* ── code / key reveal ──────────────────────────────────────────────────── */

.key-reveal {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #050608;
  border: 1px solid #2c4a35;
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
}

.copy-btn {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 12px;
  cursor: pointer;
  flex: 0 0 auto;
}
.copy-btn:hover { color: var(--text); border-color: #2e343d; }

/* ── flash messages ─────────────────────────────────────────────────────── */

.flash {
  border-radius: var(--radius-sm);
  padding: 11px 15px;
  font-size: 13.5px;
  border: 1px solid var(--line);
  background: var(--panel);
  margin-bottom: 18px;
}

.flash-good { border-color: #1f4a2e; background: #0e2016; color: #b7f0cd; }
.flash-error { border-color: #4d2029; background: #1e1014; color: #f7c2cd; }

/* ── footer ─────────────────────────────────────────────────────────────── */

footer.site-footer {
  border-top: 1px solid var(--line-soft);
  padding: 46px 0 40px;
  color: var(--muted);
  font-size: 13.5px;
  background: var(--bg-soft);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 34px;
}

.footer-col h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--faint);
  margin-bottom: 11px;
}

.footer-col a { display: block; padding: 3px 0; color: var(--muted); }
.footer-col a:hover { color: var(--text); }

/* ── landing hero ───────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: 92px 0 64px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -220px 0 auto 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 620px;
  background: radial-gradient(ellipse at center, rgba(74, 222, 128, .11), transparent 68%);
  pointer-events: none;
}

.hero .container { position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 52px;
  align-items: start;
}

.marquee {
  overflow: hidden;
  position: relative;
  width: 100%;
  min-width: 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: marquee 26s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* code window */

.window {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
  font-size: 12px;
  color: var(--faint);
  font-family: var(--mono);
}

.window-dots { display: flex; gap: 5px; }
.window-dots i { width: 9px; height: 9px; border-radius: 50%; background: #2b3038; display: block; }

.window pre { border: 0; border-radius: 0; background: #050608; }

.code-line { display: block; }
.tok-key { color: #7c8cff; }
.tok-str { color: #4ade80; }
.tok-com { color: #5c6472; }
.tok-fn { color: #f5a524; }

/* numbered feature list */

.feature-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
}

/* ── responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 38px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
}

@media (max-width: 780px) {
  .nav-links { display: none; }
  .app-shell { flex-direction: column; }
  .side-nav {
    width: 100%;
    flex: none;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 10px 12px;
  }
  .side-nav .group-label { display: none; }
  .side-nav a { white-space: nowrap; }
  .app-main { padding: 22px 18px 60px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 58px 0; }
}
