/* ============================================================
   ChampsPay — Aggregation Payment Platform
   Design system + global styles (vanilla CSS, no framework)
   ============================================================ */

:root {
  --brand: #2b5cff;          /* primary blue */
  --brand-600: #1f49d6;
  --brand-2: #00c2a8;        /* teal / money accent */
  --brand-2-600: #00a48d;
  --ink: #0f172a;            /* near-black text */
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e6ebf2;
  --bg: #ffffff;
  --bg-soft: #f5f8fd;
  --bg-dark: #0a0f1f;
  --bg-dark-2: #111a33;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --shadow-md: 0 8px 24px rgba(15,23,42,.08);
  --shadow-lg: 0 24px 60px rgba(15,23,42,.14);
  --grad: linear-gradient(135deg, #2b5cff 0%, #00c2a8 100%);
  --grad-soft: linear-gradient(135deg, rgba(43,92,255,.10), rgba(0,194,168,.10));
  --maxw: 1180px;
  --font: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-600); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; color: var(--ink-soft); }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.text-center { text-align: center; }
.lead { font-size: 1.12rem; color: var(--muted); }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  border: 1px solid transparent; cursor: pointer; transition: .18s ease; white-space: nowrap;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(43,92,255,.28); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 28px rgba(43,92,255,.34); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { color: var(--brand); }
.btn-sm { padding: 9px 16px; font-size: .9rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.18rem; color: var(--ink); }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px; background: var(--grad);
  display: grid; place-items: center; color: #fff; font-weight: 900; box-shadow: var(--shadow-sm);
}
.brand b { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink-soft); font-weight: 500; padding: 9px 14px; border-radius: 9px; font-size: .95rem; }
.nav-links a:hover { background: var(--bg-soft); color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--bg-dark); color: #fff; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 60% at 80% -10%, rgba(0,194,168,.25), transparent 60%),
    radial-gradient(50% 50% at 5% 10%, rgba(43,92,255,.35), transparent 60%);
}
.hero .container { position: relative; padding: 86px 22px 92px; }
.hero .eyebrow {
  display: inline-block; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase;
  color: #9fe9dd; background: rgba(0,194,168,.12); border: 1px solid rgba(0,194,168,.3);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lead { color: #c5d0e6; max-width: 56ch; font-size: 1.18rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 54px; }
.stat { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10); border-radius: var(--radius); padding: 20px; }
.stat .num { font-size: 1.9rem; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .lbl { color: #9fb0cc; font-size: .9rem; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 46px; text-align: center; }
.section-head .kicker { color: var(--brand); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .82rem; }
.section-head h2 { margin-top: 8px; }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm); transition: .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px; background: var(--grad-soft);
  display: grid; place-items: center; margin-bottom: 16px; color: var(--brand-600); font-weight: 800; font-size: 1.2rem;
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: .96rem; }

/* feature list */
.ul-check { list-style: none; margin: 0; padding: 0; }
.ul-check li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--ink-soft); }
.ul-check li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: .72rem; display: grid; place-items: center; font-weight: 700;
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: relative; }
.step .n {
  width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: .95rem; }
th { background: var(--bg-soft); color: var(--ink); font-weight: 700; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-soft); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--grad-soft); color: var(--brand-600); }

/* ---------- Code block ---------- */
.code {
  background: #0b1220; color: #e6edf7; border-radius: var(--radius-sm); padding: 18px 20px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: .86rem;
  overflow-x: auto; line-height: 1.7; border: 1px solid #1d2740;
}
.code .c { color: #6b8cae; }
.code .k { color: #7fd1ff; }
.code .s { color: #8fe9b0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--grad); color: #fff; border-radius: 24px; padding: 54px 40px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e8fbff; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.contact-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: #fff; display: flex; gap: 16px; align-items: flex-start;
  box-shadow: var(--shadow-sm);
}
.contact-card .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.contact-card .val { font-weight: 700; font-size: 1.08rem; color: var(--ink); }
.contact-card a.val:hover { color: var(--brand); }
.copy-btn { margin-left: auto; border: 1px solid var(--line); background: var(--bg-soft); border-radius: 8px; padding: 6px 10px; font-size: .8rem; cursor: pointer; color: var(--ink-soft); }
.copy-btn:hover { border-color: var(--brand); color: var(--brand); }

form.contact-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .96rem; color: var(--ink); background: var(--bg-soft);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: #fff; }

/* ---------- FAQ accordion ---------- */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq-q { width: 100%; text-align: left; background: none; border: none; padding: 18px 20px; font-size: 1.02rem; font-weight: 600; color: var(--ink); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-q .plus { color: var(--brand); font-weight: 800; transition: .2s; }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a-inner { padding: 0 20px 20px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-dark); color: #aeb9d0; padding: 56px 0 28px; }
.site-footer a { color: #cdd6ea; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { color: #fff; font-size: .98rem; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; font-size: .92rem; }
.footer-brand p { color: #97a3bd; font-size: .92rem; max-width: 34ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 38px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: .85rem; color: #8290ac; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .85rem; color: var(--muted); padding: 16px 0 0; }
.breadcrumb a { color: var(--muted); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #0a0f1f; color: #fff; padding: 12px 20px; border-radius: 999px; font-size: .92rem;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 100; box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3, .grid-2, .steps, .contact-grid, .footer-grid, .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; padding: 12px; gap: 2px; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; }
  .nav-toggle { display: inline-block; }
  .nav-actions .btn-ghost { display: none; }
  .grid-3, .grid-2, .steps, .contact-grid, .footer-grid, .hero-stats { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero .container { padding: 60px 22px 64px; }
  .cta-band { padding: 40px 22px; }
}
