/* ==========================================================================
   APEX PAYMENTS — Prototype Design System
   B2B fintech / AI aesthetic. Placeholder content throughout.
   ========================================================================== */

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

:root {
  /* Brand */
  --brand: #0a6dff;
  --brand-700: #0a52d6;
  --brand-400: #4d92ff;
  --brand-100: #e7f0ff;
  --cyan: #00d4ff;
  --violet: #7c3aed;
  --green: #00c896;
  --green-bright: #00e0a4;
  --amber: #ff9f43;

  /* Neutrals — LIGHT theme (default). These flip in [data-theme="dark"]. */
  --bg: #ffffff;            /* page base */
  --ink: #0a1124;           /* primary text */
  --ink-2: #46506a;         /* muted text */
  --ink-3: #6b7488;         /* soft text */
  --line: #e7eaf2;          /* borders */
  --line-2: #eef1f8;        /* soft borders */
  --surface: #ffffff;       /* cards / elevated */
  --surface-2: #f6f8fc;     /* alt section / subtle fill */
  --surface-3: #eef2fb;     /* deeper fill */
  --nav-bg: rgba(255, 255, 255, .82);
  --brand-tint: #e7f0ff;    /* light brand wash (hover, callouts) */

  /* "Device/brand" panel surfaces (hero, engine, CTA, footer, stat band).
     These FLIP with theme — light values here, dark values in [data-theme="dark"]. */
  --dk-bg: #eef3fc;         /* panel base */
  --dk-bg-2: #eaeff7;       /* footer */
  --dk-card: #ffffff;       /* sub-cards inside panels */
  --dk-border: #e2e7f1;
  --dk-text: #0a1124;       /* strong text on panels */
  --dk-body: #46506a;       /* body text on panels */
  --dk-muted: #6b7488;      /* labels on panels */
  --dk-accent: #0e7490;     /* engine "LIVE" accent (readable on light) */
  --track: rgba(10, 17, 36, .09);   /* progress / bar tracks */
  --grid-line: rgba(10, 17, 36, .05); /* hero / panel grid lines */

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 51, .06), 0 4px 16px rgba(16, 24, 51, .05);
  --shadow-md: 0 8px 30px rgba(16, 24, 51, .10);
  --shadow-lg: 0 30px 80px rgba(10, 36, 99, .18);
  --maxw: 1200px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ===================== DARK THEME ===================== */
[data-theme="dark"] {
  --bg: #05090f;
  --ink: #e8edf6;
  --ink-2: #aab6cf;
  --ink-3: #8090aa;
  --line: rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .06);
  --surface: #0e1726;       /* elevated cards */
  --surface-2: #0a121e;     /* alt section */
  --surface-3: #111c2e;
  --nav-bg: rgba(8, 14, 24, .82);
  --brand-100: rgba(10, 109, 255, .16);
  --brand-tint: rgba(10, 109, 255, .14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 10px 34px rgba(0, 0, 0, .5);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, .6);
  /* dark values for the flipping panel tokens */
  --dk-bg: #04080f;
  --dk-bg-2: #080f1a;
  --dk-card: rgba(255, 255, 255, .035);
  --dk-border: rgba(255, 255, 255, .09);
  --dk-text: #ffffff;
  --dk-body: #aebbd4;
  --dk-muted: #7d8aa3;
  --dk-accent: #00d4ff;
  --track: rgba(255, 255, 255, .08);
  --grid-line: rgba(255, 255, 255, .05);
}
[data-theme="dark"] body { background: var(--bg); }
/* keep brand-tinted icon chips subtle in dark */
[data-theme="dark"] .card .ic,
[data-theme="dark"] .card.t-blue .ic,
[data-theme="dark"] .card.t-violet .ic,
[data-theme="dark"] .card.t-green .ic,
[data-theme="dark"] .card.t-amber .ic { background: rgba(255,255,255,.05); border-color: var(--line); }
[data-theme="dark"] .uc .uic { background: var(--brand-100); }
[data-theme="dark"] .member .av { background: linear-gradient(135deg, #16233a, #0e1726); }
[data-theme="dark"] .logo-chip { color: #5d6c8a; }
[data-theme="dark"] .compare td.apex { background: rgba(10,109,255,.10); }
/* contained dark accents need a hairline so they read against a dark page */
[data-theme="dark"] .cta-band { border: 1px solid rgba(255,255,255,.10); }
[data-theme="dark"] .price-card.pop { border-color: var(--brand); }
[data-theme="dark"] .ph-bars .bar { opacity: 1; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: clip;
  transition: background .3s var(--ease), color .3s var(--ease);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -.02em; margin: 0; font-weight: 800; overflow-wrap: break-word; }
p { margin: 0; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; position: relative; }
.section-sm { padding: 64px 0; }
.section-alt { background: var(--surface-2); }
.center { text-align: center; }
.grad-text {
  background: linear-gradient(100deg, var(--brand) 0%, var(--violet) 60%, var(--cyan) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Eyebrow + section head ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.eyebrow.on-dark { color: var(--cyan); }
.eyebrow.on-dark::before { background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.sec-head { max-width: 720px; }
.sec-head.center { margin: 0 auto; }
.sec-head h2 { font-size: clamp(28px, 4vw, 44px); }
.sec-head p { color: var(--ink-2); font-size: 18px; margin-top: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-weight: 650; font-size: 15px; padding: 12px 22px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; transition: all .25s var(--ease);
  white-space: nowrap; font-family: inherit;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px rgba(10, 109, 255, .32); }
.btn-primary:hover { background: var(--brand-700); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(10, 109, 255, .42); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-100); }
.btn-dark { background: #0d1730; color: #fff; }
.btn-dark:hover { background: #15224a; transform: translateY(-2px); }
.btn-white { background: #fff; color: var(--ink); }
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-lg { padding: 15px 30px; font-size: 16px; }
/* "on-dark" ghost buttons sit on panels that flip with theme → follow --dk tokens */
.on-dark .btn-ghost, .btn-ghost.on-dark { color: var(--dk-text); border-color: var(--dk-border); }
.on-dark .btn-ghost:hover, .btn-ghost.on-dark:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-100); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: saturate(180%) blur(14px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line-2);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.brand img { height: 26px; width: auto; }
/* logo wordmark is transparent blue ink → tint it white on dark backgrounds */
[data-theme="dark"] .brand img { filter: brightness(0) invert(1); }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a {
  padding: 8px 14px; border-radius: 9px; font-size: 14.5px; font-weight: 550; color: var(--ink-2);
  transition: all .2s; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--surface-2); }
.nav-cta { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.nav-cta .login-link { padding: 8px 14px; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.nav-cta .login-link:hover { color: var(--brand); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .25s; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--dk-bg); color: var(--dk-text); padding: 92px 0 0; }
.hero-mesh { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-mesh::before, .hero-mesh::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .30;
}
[data-theme="dark"] .hero-mesh::before, [data-theme="dark"] .hero-mesh::after { opacity: .55; }
.hero-mesh::before { width: 620px; height: 620px; left: -120px; top: -160px; background: radial-gradient(circle, rgba(10,109,255,.9), transparent 70%); animation: float1 16s ease-in-out infinite; }
.hero-mesh::after { width: 560px; height: 560px; right: -120px; top: -60px; background: radial-gradient(circle, rgba(124,58,237,.8), transparent 70%); animation: float2 19s ease-in-out infinite; }
.hero-glow3 { position: absolute; width: 480px; height: 480px; left: 40%; bottom: -200px; border-radius: 50%; filter: blur(100px); background: radial-gradient(circle, rgba(0,212,255,.5), transparent 70%); z-index: 0; animation: float1 22s ease-in-out infinite; }
.hero-grid {
  position: absolute; inset: 0; z-index: 0; opacity: .5;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 52px 52px; mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(40px,30px)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-35px,25px)} }
.hero-inner { position: relative; z-index: 2; text-align: center; padding-bottom: 60px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px 7px 9px; border-radius: 999px;
  background: var(--dk-card); border: 1px solid var(--dk-border); font-size: 13px; color: var(--dk-body); margin-bottom: 26px;
}
.hero-badge .pill { background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; letter-spacing: .04em; }
.hero h1 { font-size: clamp(36px, 6vw, 68px); font-weight: 850; letter-spacing: -.03em; max-width: 950px; margin: 0 auto; }
.hero-sub { font-size: clamp(17px, 2vw, 21px); color: var(--dk-body); max-width: 620px; margin: 24px auto 0; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--dk-muted); }

/* Hero stat strip */
.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 66px; border-top: 1px solid var(--dk-border); }
.hero-stats .stat { padding: 26px 16px; text-align: center; border-right: 1px solid var(--dk-border); }
.hero-stats .stat:last-child { border-right: 0; }
.hero-stats .stat .num { font-size: clamp(28px, 4vw, 42px); font-weight: 850; letter-spacing: -.02em; }
.hero-stats .stat .lbl { font-size: 12.5px; color: var(--dk-muted); text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }
/* stat accent colors — readable on light, vivid on dark */
.tn-cyan { color: #0891b2; } .tn-green { color: #059669; } .tn-violet { color: #7c3aed; } .tn-blue { color: #0a6dff; }
[data-theme="dark"] .tn-cyan { color: var(--cyan); }
[data-theme="dark"] .tn-green { color: var(--green-bright); }
[data-theme="dark"] .tn-violet { color: #b794ff; }
[data-theme="dark"] .tn-blue { color: var(--brand-400); }

/* ---------- Logo cloud ---------- */
.logos { padding: 40px 0 8px; }
.logos .cap { text-align: center; font-size: 13px; color: var(--ink-3); letter-spacing: .04em; margin-bottom: 26px; }
.logo-row { display: flex; align-items: center; justify-content: center; gap: 46px; flex-wrap: wrap; }
.logo-chip { font-weight: 800; font-size: 19px; color: #9aa3b8; letter-spacing: -.01em; opacity: .85; }
.logo-chip span { font-weight: 500; }

/* ---------- Cards / product grid ---------- */
.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(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: all .3s var(--ease); position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d9e0ee; }
.card .ic {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--brand-100), #fff); border: 1px solid var(--line); font-size: 22px;
}
.card h3 { font-size: 19px; margin-bottom: 9px; }
.card p { color: var(--ink-2); font-size: 15px; }
.card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--brand); font-weight: 650; font-size: 14px; }
.card .more svg { width: 15px; height: 15px; transition: transform .25s; }
.card:hover .more svg { transform: translateX(4px); }
.card-feature { padding: 0; }

/* Tinted accent cards */
.card.t-blue .ic { background: linear-gradient(135deg, #e7f0ff, #fff); }
.card.t-violet .ic { background: linear-gradient(135deg, #f1e9ff, #fff); }
.card.t-green .ic { background: linear-gradient(135deg, #e2fbf3, #fff); }
.card.t-amber .ic { background: linear-gradient(135deg, #fff1e2, #fff); }

/* ---------- Split feature row ---------- */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature-row.rev .ftext { order: 2; }
.feature-row .ftext h3 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 16px; }
.feature-row .ftext p { color: var(--ink-2); font-size: 17px; }
.feature-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.feature-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; color: var(--ink); }
.feature-list li svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; color: var(--green); }

/* ---------- Browser/screenshot frame (placeholder) ---------- */
.frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: var(--surface); }
/* Code/decision "terminal" frames stay dark in both themes (conventional). */
.frame.dark { border-color: rgba(255,255,255,.09); background: #080f1a; }
.frame-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.frame.dark .frame-bar { background: #0b1322; border-color: rgba(255,255,255,.09); }
.frame-bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #d4d9e6; }
.frame.dark .frame-bar .dot { background: #2a3650; }
.frame-bar .url { margin-left: 10px; font-size: 12px; color: var(--ink-3); font-family: 'JetBrains Mono', monospace; }
.frame.dark .frame-bar .url { color: #5d6c8a; }
.frame-body { padding: 22px; }
.ph-note { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

/* Placeholder dashboard bits */
.ph-dash { display: grid; gap: 16px; }
.ph-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.ph-kpi { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); }
.ph-kpi .k { font-size: 12px; color: var(--ink-3); }
.ph-kpi .v { font-size: 24px; font-weight: 800; margin-top: 4px; }
.ph-kpi .d { font-size: 12px; font-weight: 700; margin-top: 2px; }
.ph-kpi .d.up { color: var(--green); } .ph-kpi .d.down { color: #ef4444; }
.ph-chart { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: var(--surface); }
.ph-bars { display: flex; align-items: flex-end; gap: 9px; height: 130px; margin-top: 14px; }
.ph-bars .bar { flex: 1; border-radius: 6px 6px 0 0; background: linear-gradient(var(--brand-400), var(--brand)); opacity: .9; transition: height 1s var(--ease); }

/* ---------- Dark engine section ---------- */
.dark-sec { background: var(--dk-bg); color: var(--dk-text); position: relative; overflow: hidden; }
.dark-sec .sec-head h2 { color: var(--dk-text); }
.dark-sec .sec-head p { color: var(--dk-body); }
.dark-sec .dk-grid {
  position: absolute; inset: 0; opacity: .5; z-index: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, #000 20%, transparent 70%);
}
.dark-sec .container { position: relative; z-index: 1; }

/* ---------- AI pipeline animation ---------- */
/* Engine is an always-dark "device" panel — works on any theme/section */
.engine {
  border: 1px solid var(--dk-border); border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(10,109,255,.10), transparent 55%),
    radial-gradient(120% 80% at 100% 0%, rgba(124,58,237,.10), transparent 55%),
    var(--dk-bg);
  color: var(--dk-text);
  padding: 26px; box-shadow: var(--shadow-lg);
}
.engine-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }
.engine-live { display: flex; align-items: center; gap: 9px; font-family: 'JetBrains Mono', monospace; font-size: 12px; letter-spacing: .14em; color: var(--dk-accent); }
.engine-live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-bright); box-shadow: 0 0 12px var(--green-bright); animation: blink 1.4s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }
.engine-tx { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--dk-muted); }
.engine-tx b { color: var(--dk-text); font-weight: 600; }

/* Incoming transaction detail card */
.engine-txn { display: grid; grid-template-columns: 1.05fr 1fr; gap: 18px; border: 1px solid var(--dk-border); border-radius: 14px; background: var(--dk-card); padding: 18px 20px; margin-bottom: 18px; }
.etx-main { display: flex; flex-direction: column; }
.etx-label { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .18em; color: var(--dk-muted); }
.etx-caret { color: var(--dk-accent); }
.etx-amount { font-size: clamp(28px, 4vw, 36px); font-weight: 850; letter-spacing: -.02em; color: var(--dk-text); margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.etx-loc { font-size: 13px; color: var(--dk-body); }
.etx-loc b { color: var(--dk-text); font-weight: 600; }
.etx-status { margin-top: auto; padding-top: 14px; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; letter-spacing: .03em; color: var(--dk-accent); display: inline-flex; align-items: center; gap: 6px; }
.etx-status.done { color: var(--green-bright); }
[data-theme="dark"] .etx-status.done { color: var(--green-bright); }
.etx-meta { display: flex; flex-direction: column; justify-content: center; }
.etx-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--dk-border); }
.etx-row:last-child { border-bottom: 0; }
.etx-k { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: .12em; color: var(--dk-muted); }
.etx-v { font-size: 13px; color: var(--dk-text); font-weight: 600; text-align: right; }
.etx-risk { font-weight: 800; letter-spacing: .04em; }
.etx-risk.risk-low { color: #059669; } .etx-risk.risk-med { color: #d97706; } .etx-risk.risk-high { color: #e11d48; }
[data-theme="dark"] .etx-risk.risk-low { color: #34d399; }
[data-theme="dark"] .etx-risk.risk-med { color: #fbbf24; }
[data-theme="dark"] .etx-risk.risk-high { color: #fb7185; }

/* Cost breakdown strip */
.cost-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 18px 0; }
.cost-cell { border: 1px solid var(--dk-border); border-radius: 11px; background: var(--dk-card); padding: 11px 14px; display: flex; flex-direction: column; gap: 4px; }
.cost-cell .cost-k { font-size: 11px; color: var(--dk-muted); }
.cost-cell .cost-v { font-family: 'JetBrains Mono', monospace; font-size: 15px; font-weight: 700; color: var(--dk-text); font-variant-numeric: tabular-nums; transition: color .3s; }
.cost-cell.total { border-color: rgba(0,212,255,.35); background: rgba(0,212,255,.06); }
.cost-cell.total .cost-v { color: var(--dk-accent); }

/* Live system log */
.engine-log { border: 1px solid var(--dk-border); border-radius: 14px; background: var(--dk-card); padding: 14px 16px; margin-top: 18px; }
.elog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.elog-title { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .2em; color: var(--dk-muted); }
.elog-meta { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .1em; color: var(--dk-muted); }
.elog-meta b { color: var(--dk-text); font-weight: 700; }
.elog-ver { color: var(--dk-accent); }
.elog-body { height: 200px; overflow: hidden; display: flex; flex-direction: column; gap: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
.log-line { flex: 0 0 auto; line-height: 1.45; color: var(--dk-body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: logIn .3s var(--ease); }
.log-line .ts { color: var(--dk-muted); }
.log-line.ok { color: #059669; font-weight: 600; }
[data-theme="dark"] .log-line.ok { color: var(--green-bright); }
@keyframes logIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }

.pipe { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 22px; }
.pstep {
  border: 1px solid var(--dk-border); border-radius: 12px; padding: 14px 12px; background: var(--dk-card);
  text-align: center; transition: all .4s var(--ease); position: relative;
}
.pstep .pic { font-size: 20px; margin-bottom: 8px; filter: grayscale(.4); transition: .4s; }
.pstep .pn { font-size: 12px; font-weight: 700; color: var(--dk-body); }
.pstep .pd { font-size: 10px; color: var(--dk-muted); margin-top: 3px; line-height: 1.35; }
.pstep.on { border-color: rgba(0,212,255,.5); background: rgba(0,212,255,.07); box-shadow: 0 0 26px rgba(0,212,255,.16); transform: translateY(-3px); }
.pstep.on .pic { filter: none; transform: scale(1.12); }
.pstep.on .pn { color: var(--dk-text); }
.pstep.done { border-color: rgba(0,224,164,.35); }
.pstep.done .pic { filter: none; }
.pstep .pbar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--cyan); border-radius: 2px; transition: width .5s linear; }
.pstep.on .pbar { width: 100%; }

.engine-grids { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
.ebox { border: 1px solid var(--dk-border); border-radius: 14px; padding: 16px; background: var(--dk-card); }
.ebox .eh { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--dk-muted); margin-bottom: 13px; display: flex; align-items: center; gap: 7px; }
/* Feature scores */
.feat-row { display: grid; grid-template-columns: 120px 1fr 38px; gap: 10px; align-items: center; margin-bottom: 9px; font-size: 11.5px; }
.feat-row .fn { color: var(--dk-body); }
.feat-track { height: 6px; border-radius: 4px; background: var(--track); overflow: hidden; }
.feat-fill { height: 100%; width: 0; border-radius: 4px; transition: width 1.1s var(--ease); }
.feat-row .fv { font-family: 'JetBrains Mono', monospace; color: var(--dk-text); text-align: right; font-size: 11px; }
/* Routes */
.route { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; border: 1px solid var(--dk-border); border-radius: 11px; margin-bottom: 8px; transition: .4s; }
.route.win { border-color: rgba(0,224,164,.5); background: rgba(0,224,164,.07); box-shadow: 0 0 18px rgba(0,224,164,.12); }
.route .rl { display: flex; align-items: center; gap: 10px; }
.route .rdot { width: 9px; height: 9px; border-radius: 50%; }
.route .rn { font-size: 13px; font-weight: 650; color: var(--dk-text); }
.route .rr { font-size: 10.5px; color: var(--dk-muted); }
.route .rs { font-family: 'JetBrains Mono', monospace; font-size: 17px; font-weight: 800; color: var(--dk-muted); transition: color .3s; }
.route.win .rs { color: var(--green-bright); }
.route .rtag { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; color: var(--green-bright); border: 1px solid rgba(0,224,164,.4); border-radius: 999px; padding: 2px 7px; opacity: 0; transition: .3s; }
.route.win .rtag { opacity: 1; }
/* Decision */
.decis { margin-top: 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dcard { border: 1px solid var(--dk-border); border-radius: 12px; padding: 14px; background: var(--dk-card); text-align: center; opacity: .4; transition: .5s; }
.dcard.show { opacity: 1; border-color: rgba(0,212,255,.3); }
.dcard .dk { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--dk-muted); }
.dcard .dv { font-size: 15px; font-weight: 800; color: var(--dk-text); margin-top: 6px; }
.dcard .dv.g { color: #059669; }
.route.win .rs { color: #059669; }
[data-theme="dark"] .dcard .dv.g, [data-theme="dark"] .route.win .rs { color: var(--green-bright); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
.tab {
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; transition: .2s; font-family: inherit;
}
.tab:hover { border-color: var(--brand-400); color: var(--brand); }
.tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .5s var(--ease); }

/* ---------- Slideshow ---------- */
.slideshow { position: relative; }
.slides { position: relative; }
.slide { display: none; }
.slide.active { display: block; animation: fadeUp .5s var(--ease); }
.slide-dots { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.slide-dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; transition: .2s; padding: 0; }
.slide-dots button.active { background: var(--brand); width: 26px; border-radius: 6px; }

/* ---------- Steps (how it works) ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; padding-top: 22px; }
.step .sn { font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700; color: var(--brand); }
.step h4 { font-size: 17px; margin: 10px 0 8px; }
.step p { font-size: 14px; color: var(--ink-2); }
.step .line { position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--line); }
.step .line::after { content: ""; position: absolute; left: 0; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* ---------- Testimonial ---------- */
.quote { max-width: 860px; margin: 0 auto; text-align: center; }
.quote .mark { font-size: 56px; line-height: .5; color: var(--brand); font-weight: 900; }
.quote blockquote { font-size: clamp(20px, 3vw, 28px); font-weight: 600; letter-spacing: -.01em; margin: 18px 0 26px; color: var(--ink); }
.quote .who { display: flex; align-items: center; gap: 12px; justify-content: center; }
.quote .av { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--violet)); }
.quote .who .nm { font-weight: 700; font-size: 15px; }
.quote .who .rl { font-size: 13px; color: var(--ink-3); }

/* ---------- Pricing ---------- */
.price-toggle { display: inline-flex; align-items: center; gap: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px; margin: 0 auto 36px; }
.price-toggle button { border: 0; background: transparent; padding: 8px 18px; border-radius: 999px; font-weight: 650; font-size: 14px; cursor: pointer; color: var(--ink-2); font-family: inherit; }
.price-toggle button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.price-toggle .save { font-size: 11px; color: var(--green); font-weight: 800; }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.price-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; background: var(--surface); position: relative; }
.price-card.pop { border-color: var(--brand); box-shadow: var(--shadow-lg); }
.price-card .tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 5px 14px; border-radius: 999px; }
.price-card .pl { font-size: 15px; font-weight: 700; }
.price-card .pp { font-size: 42px; font-weight: 850; margin: 12px 0 2px; letter-spacing: -.03em; }
.price-card .pp .per { font-size: 15px; font-weight: 500; color: var(--ink-3); }
.price-card .pdesc { color: var(--ink-2); font-size: 14px; min-height: 42px; }
.price-card .plist { list-style: none; padding: 0; margin: 22px 0; display: grid; gap: 11px; }
.price-card .plist li { display: flex; gap: 10px; font-size: 14px; color: var(--ink); }
.price-card .plist li svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.member { text-align: center; }
.member .av { width: 100%; aspect-ratio: 1; border-radius: 16px; background: linear-gradient(135deg, var(--surface-3), #dfe7f7); display: grid; place-items: center; font-size: 30px; font-weight: 800; color: var(--brand-400); margin-bottom: 14px; }
.member .nm { font-weight: 700; font-size: 16px; }
.member .rl { font-size: 13px; color: var(--ink-3); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--dk-bg); color: var(--dk-text); padding: 60px; text-align: center; border: 1px solid var(--dk-border); }
.cta-band .glow { position: absolute; width: 500px; height: 500px; border-radius: 50%; filter: blur(110px); background: radial-gradient(circle, rgba(10,109,255,.35), transparent 70%); top: -200px; left: 30%; z-index: 0; }
[data-theme="dark"] .cta-band .glow { background: radial-gradient(circle, rgba(10,109,255,.6), transparent 70%); }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { font-size: clamp(28px, 4vw, 42px); }
.cta-band p { color: var(--dk-body); margin: 16px auto 28px; max-width: 540px; font-size: 18px; }
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer { background: var(--dk-bg-2); color: var(--dk-body); padding: 64px 0 30px; border-top: 1px solid var(--dk-border); }
.footer-top { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; }
.footer .brand { color: var(--dk-text); margin-bottom: 14px; }
.footer .brand img { filter: none; }
[data-theme="dark"] .footer .brand img { filter: brightness(0) invert(1); }
.footer .blurb { font-size: 14px; max-width: 280px; color: var(--dk-muted); }
.footer h5 { color: var(--dk-text); font-size: 13px; letter-spacing: .04em; margin: 0 0 14px; font-weight: 700; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a { font-size: 14px; color: var(--dk-body); transition: .2s; }
.footer a:hover { color: var(--brand); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--dk-border); font-size: 13px; color: var(--dk-muted); flex-wrap: wrap; gap: 12px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--dk-border); display: grid; place-items: center; }
.footer-social a:hover { border-color: var(--brand); }
.footer-social svg { width: 16px; height: 16px; }

/* ---------- Auth / forms ---------- */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - 68px); }
.auth-form-wrap { display: grid; place-items: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 28px; margin-bottom: 8px; }
.auth-card .sub { color: var(--ink-2); margin-bottom: 28px; font-size: 15px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; font-family: inherit; color: var(--ink);
  background: var(--surface); transition: .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.auth-aside { background: var(--dk-bg); color: var(--dk-text); position: relative; overflow: hidden; display: grid; align-items: center; padding: 56px; }
.auth-aside .glow { position: absolute; width: 480px; height: 480px; border-radius: 50%; filter: blur(100px); background: radial-gradient(circle, rgba(124,58,237,.35), transparent 70%); top: -120px; right: -120px; }
[data-theme="dark"] .auth-aside .glow { background: radial-gradient(circle, rgba(124,58,237,.6), transparent 70%); }
.auth-aside .ainner { position: relative; z-index: 1; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 13px; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.social-btn { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 9px; font-family: inherit; }
.social-btn:hover { background: var(--surface-2); }

/* Page hero (interior) */
.page-hero { background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 64px 0; }
.page-hero .eyebrow { justify-content: flex-start; }
.page-hero h1 { font-size: clamp(32px, 5vw, 52px); max-width: 760px; }
.page-hero p { font-size: 19px; color: var(--ink-2); max-width: 620px; margin-top: 18px; }

/* Use case list */
.uc { display: flex; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: .25s; }
.uc:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.uc .uic { width: 42px; height: 42px; border-radius: 11px; background: var(--brand-100); display: grid; place-items: center; flex-shrink: 0; font-size: 20px; }
.uc h4 { font-size: 16px; margin-bottom: 6px; }
.uc p { font-size: 14px; color: var(--ink-2); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Language switch ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface-2); margin-right: 6px; }
.lang-btn { border: 0; background: transparent; padding: 7px 11px; font-size: 13px; font-weight: 650; color: var(--ink-3); cursor: pointer; font-family: inherit; line-height: 1; transition: .2s; }
.lang-btn:hover { color: var(--ink); }
.lang-btn.active { background: var(--brand); color: #fff; }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink-2); cursor: pointer; display: inline-grid;
  place-items: center; margin-right: 8px; transition: .2s; padding: 0;
}
.theme-toggle:hover { color: var(--brand); border-color: var(--brand); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: block; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }

/* ---------- Dark "stat band" (contained dark panel for stat strips) ---------- */
.stat-band {
  border-radius: var(--radius-lg); background:
    radial-gradient(120% 90% at 50% 0%, rgba(10,109,255,.14), transparent 60%), var(--dk-bg);
  border: 1px solid var(--dk-border); padding: 8px 26px; box-shadow: var(--shadow-lg); overflow: hidden;
}
.stat-band .hero-stats { margin-top: 0; border-top: 0; }

/* ---------- Pricing — 4-tier + detail ---------- */
.price-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
.price-card { display: flex; flex-direction: column; }
.price-card .pmeta { margin: 16px 0 4px; display: grid; gap: 0; }
.price-card .pmeta .pm { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; border-top: 1px dashed var(--line); padding: 9px 0; }
.price-card .pmeta .pm .l { color: var(--ink-3); } .price-card .pmeta .pm .v { font-weight: 700; text-align: right; }
.price-card .consult { margin-top: auto; padding: 12px 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); min-height: 88px; }
.price-card .consult b { color: var(--ink); display: block; margin-bottom: 3px; font-size: 12px; }
.price-card .pcta { padding-top: 16px; }
.price-card.pop .pp { color: var(--brand); }
.tier-badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .05em; padding: 3px 9px; border-radius: 999px; background: var(--brand-100); color: var(--brand); margin-bottom: 10px; }

/* Shared "all plans include" strip */
.includes { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; margin-top: 26px; }
.includes .inc { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.includes .inc svg { width: 17px; height: 17px; color: var(--green); }

/* Optimization pricing cards */
.opt-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; background: var(--surface); }
.opt-card .big { font-size: 34px; font-weight: 850; letter-spacing: -.02em; margin: 10px 0 4px; }
.opt-card .big .unit { font-size: 15px; font-weight: 600; color: var(--ink-3); }
.opt-card.alt { background: linear-gradient(135deg, var(--brand), var(--violet)); color: #fff; border: 0; }
.opt-card.alt .big { color: #fff; } .opt-card.alt p { color: rgba(255,255,255,.85); }
.opt-card .or { text-align: center; font-weight: 800; color: var(--ink-3); }

/* Comparison table */
.compare-wrap { overflow-x: auto; }
.compare { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-width: 620px; }
.compare th, .compare td { padding: 16px 20px; text-align: left; font-size: 14.5px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.compare thead th { background: var(--surface-2); font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
.compare thead th.apex { color: var(--brand); }
.compare tbody td.feat { color: var(--ink-2); font-weight: 600; }
.compare tbody td.apex { font-weight: 700; color: var(--ink); background: rgba(10,109,255,.045); }
.compare tbody tr:last-child td { border-bottom: 0; }

/* Light callout */
.callout { border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--brand-tint), var(--surface)); padding: 34px; }
.callout h3 { font-size: 22px; margin-bottom: 8px; }
.callout ol { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 9px; }
.callout ol li { font-size: 15px; color: var(--ink); }

/* ---------- Responsive ---------- */
.nav-m { display: none; }   /* nav items that only appear in the mobile drawer */

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-cta .login-link, .nav-cta > .btn { display: none; }   /* CTAs move into the drawer */
  .nav-toggle { display: block; }
  .nav.open .nav-links {
    display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column;
    background: var(--bg); padding: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    gap: 4px; box-shadow: var(--shadow-md);
  }
  .nav.open .nav-links a { padding: 13px 14px; border-radius: 10px; font-size: 16px; font-weight: 600; color: var(--ink); }
  .nav.open .nav-links a:hover, .nav.open .nav-links a.active { background: var(--surface-2); }
  .nav.open .nav-links .nav-m { display: block; }
  .nav.open .nav-links .nav-m.nav-m-sep { display: block; height: 1px; padding: 0; margin: 8px 0 4px; background: var(--line); }
  .nav.open .nav-links .nav-m-btn { background: var(--brand); color: #fff; text-align: center; margin-top: 4px; }
  .nav.open .nav-links .nav-m-btn:hover { background: var(--brand-700); }

  .grid-3, .grid-4, .price-grid, .price-grid-4, .team-grid, .steps, .engine-grids, .pipe { grid-template-columns: repeat(2, 1fr); }
  .feature-row { grid-template-columns: 1fr; gap: 30px; }
  .feature-row.rev .ftext { order: 0; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .hero-stats .stat:nth-child(2) { border-right: 0; }
  .footer-top { grid-template-columns: 1.4fr repeat(2, 1fr); }
  .auth-split { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
}

@media (max-width: 620px) {
  .container { padding: 0 18px; }
  .section { padding: 56px 0; }
  .section-sm { padding: 44px 0; }
  .grid-2, .grid-3, .grid-4, .price-grid, .price-grid-4, .steps, .engine-grids { grid-template-columns: 1fr; }
  .pipe { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: 1fr; }
  .hero { padding-top: 64px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats .stat { padding: 20px 10px; }
  .logo-row { gap: 20px 26px; }
  .logo-chip { font-size: 16px; }
  .sec-head p { font-size: 16px; }
  .cta-band { padding: 36px 22px; }
  .engine { padding: 16px; }
  .engine-top { gap: 8px; }
  .engine-tx { font-size: 11px; }
  .engine-txn { grid-template-columns: 1fr; padding: 16px; }
  .cost-strip { grid-template-columns: repeat(2, 1fr); }
  .elog-body { font-size: 10.5px; height: 184px; }
  .elog-meta { font-size: 9px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
  .price-card, .card { padding: 24px; }
}

@media (max-width: 400px) {
  .lang-btn { padding: 7px 8px; }
  .hero-stats, .cost-strip, .footer-top { grid-template-columns: 1fr; }
  .pipe { grid-template-columns: 1fr; }
}
