/* ============================================================
   PEGA — design system (2026 rebrand)
   Marketing site + shop + admin. Zero-CDN, self-contained.
   Tokens derived from the brand mockup (blue SaaS identity).
   ============================================================ */

/* ---- Tokens ---- */
:root{
  --brand:      #2563eb;
  --brand-600:  #1d4ed8;
  --brand-700:  #1e40af;
  --brand-900:  #1e3a8a;
  --brand-050:  #eff4ff;
  --brand-100:  #dbe6ff;
  --grad:       linear-gradient(135deg,#3b82f6 0%,#2563eb 55%,#1e3a8a 100%);

  --ink:        #0b1220;   /* headings */
  --ink-2:      #1c2434;
  --text:       #475569;   /* body */
  --text-soft:  #64748b;
  --text-mute:  #94a3b8;

  --surf:       #ffffff;
  --surf-1:     #f8fafc;
  --surf-2:     #f1f5f9;
  --hero:       #f4f8ff;
  --line:       #e2e8f0;
  --line-2:     #eef2f7;

  --ok:         #16a34a;
  --warn:       #f59e0b;
  --danger:     #dc2626;

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
  --sh-sm: 0 1px 2px rgba(15,23,42,.06);
  --sh:    0 6px 20px rgba(15,23,42,.08);
  --sh-lg: 0 22px 60px rgba(30,58,138,.16);
  --container: 1200px;
  --nav-h: 76px;

  --font: "Plus Jakarta Sans","Inter",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}

/* ---- Reset ---- */
*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  font-family:var(--font);
  color:var(--text);
  background:var(--surf);
  line-height:1.6;
  font-size:16px;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;               /* page frame guard */
}
img,svg{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
ul{ list-style:none; }

/* ---- Layout ---- */
.container{ width:100%; max-width:var(--container); margin:0 auto; padding-inline:20px; }
.section{ padding-block:72px; }
.section-sm{ padding-block:48px; }
@media(max-width:640px){ .section{ padding-block:48px; } .container{ padding-inline:16px; } }

.eyebrow{ font-size:13px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; color:var(--brand); }
.section-head{ max-width:720px; margin:0 auto 40px; text-align:center; }
.section-head.left{ margin-inline:0; text-align:left; }

/* ---- Typography ---- */
h1,h2,h3,h4{ color:var(--ink); font-weight:800; line-height:1.12; letter-spacing:-.02em; }
h1{ font-size:clamp(2.1rem,5.2vw,3.6rem); }
h2{ font-size:clamp(1.7rem,3.6vw,2.6rem); }
h3{ font-size:clamp(1.15rem,2vw,1.45rem); }
.lead{ font-size:clamp(1.02rem,1.6vw,1.22rem); color:var(--text); }
.text-brand{ color:var(--brand); }
.muted{ color:var(--text-soft); }

/* ---- Buttons ---- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.55em;
  font-weight:700; font-size:.98rem; line-height:1;
  padding:14px 22px; border-radius:var(--r-sm); border:1.5px solid transparent;
  transition:transform .12s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space:nowrap; text-align:center;
}
.btn:active{ transform:translateY(1px); }
.btn-primary{ background:var(--brand); color:#fff; box-shadow:0 8px 20px rgba(37,80,235,.28); }
.btn-primary:hover{ background:var(--brand-600); }
.btn-ghost{ background:#fff; color:var(--ink); border-color:var(--line); }
.btn-ghost:hover{ border-color:var(--brand); color:var(--brand); }
.btn-dark{ background:var(--ink); color:#fff; }
.btn-dark:hover{ background:var(--ink-2); }
.btn-lg{ padding:16px 28px; font-size:1.04rem; }
.btn-sm{ padding:10px 16px; font-size:.9rem; }
.btn-block{ width:100%; }
.btn .i{ width:20px; height:20px; }

/* ---- Header / nav ---- */
.site-header{
  position:sticky; top:0; z-index:1000;
  background:rgba(255,255,255,.86); backdrop-filter:saturate(180%) blur(12px);
  border-bottom:1px solid var(--line);
}
.nav{ display:flex; align-items:center; gap:24px; height:var(--nav-h); }
.brand{ display:flex; align-items:center; gap:11px; flex:0 0 auto; }
.brand .mark{ width:40px; height:40px; flex:0 0 auto; }
.brand .word{ display:flex; flex-direction:column; line-height:1; }
.brand .word b{ font-size:1.32rem; font-weight:800; letter-spacing:.02em; color:var(--ink); }
.brand .word small{ font-size:.52rem; font-weight:700; letter-spacing:.13em; color:var(--text-mute); text-transform:uppercase; margin-top:3px; }
.nav-links{ display:flex; align-items:center; gap:6px; margin-inline:auto; }
.nav-links a{
  display:inline-flex; align-items:center; gap:5px;
  padding:9px 13px; border-radius:var(--r-sm);
  font-weight:600; font-size:.95rem; color:var(--ink-2);
  transition:background .15s, color .15s;
}
.nav-links a:hover, .nav-links a.active{ background:var(--brand-050); color:var(--brand); }
.nav-cta{ display:flex; align-items:center; gap:12px; flex:0 0 auto; }
.nav-cta .login{ font-weight:700; color:var(--brand); padding:9px 6px; }
.nav-toggle{ display:none; width:44px; height:44px; border:1px solid var(--line); border-radius:var(--r-sm); background:#fff; align-items:center; justify-content:center; flex:0 0 auto; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content:""; display:block; width:20px; height:2px; background:var(--ink); border-radius:2px; position:relative;
}
.nav-toggle span::before{ position:absolute; top:-6px; }
.nav-toggle span::after{ position:absolute; top:6px; }

@media(max-width:980px){
  .nav-links{
    position:fixed; inset:var(--nav-h) 0 auto 0; flex-direction:column; align-items:stretch;
    gap:2px; background:#fff; border-bottom:1px solid var(--line); padding:12px 16px 18px;
    box-shadow:var(--sh); transform:translateY(-8px); opacity:0; pointer-events:none;
    transition:opacity .18s, transform .18s; margin:0;
  }
  body.nav-open .nav-links{ opacity:1; transform:none; pointer-events:auto; }
  .nav-links a{ padding:13px 12px; font-size:1rem; }
  .nav-toggle{ display:inline-flex; }
  .nav-cta .login{ display:none; }
}
@media(max-width:520px){
  .brand .word small{ display:none; }
  .nav-cta .btn{ padding:11px 15px; font-size:.9rem; }
}

/* ---- Hero ---- */
.hero{ position:relative; background:linear-gradient(180deg,var(--hero) 0%,#fff 78%); overflow:hidden; }
.hero::before, .hero::after{
  content:""; position:absolute; border-radius:50%; z-index:0;
  background:radial-gradient(circle at 30% 30%,rgba(59,130,246,.16),rgba(59,130,246,0) 70%);
}
.hero::before{ width:520px; height:520px; top:-120px; right:-80px; }
.hero::after{ width:420px; height:420px; bottom:-160px; left:-140px; background:radial-gradient(circle at 30% 30%,rgba(37,80,235,.10),rgba(37,80,235,0) 70%); }
.hero-grid{ position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.05fr); gap:48px; align-items:center; padding-block:72px; }
.hero-copy h1{ margin:14px 0 18px; }
.hero-copy .lead{ max-width:33ch; }
.hero-actions{ display:flex; flex-wrap:wrap; gap:14px; margin:32px 0 22px; }
.hero-trust{ display:inline-flex; align-items:center; gap:9px; font-weight:600; color:var(--ink-2); }
.hero-trust .dot{ width:22px; height:22px; border-radius:50%; background:var(--brand-050); color:var(--brand); display:grid; place-items:center; flex:0 0 auto; }
.hero-visual{ position:relative; min-width:0; }
.hero-visual img{ width:100%; height:auto; border-radius:var(--r-lg); }
@media(max-width:980px){
  .hero-grid{ grid-template-columns:1fr; gap:36px; padding-block:48px; text-align:center; }
  .hero-copy .lead{ max-width:46ch; margin-inline:auto; }
  .hero-actions{ justify-content:center; }
  .hero-trust{ justify-content:center; }
}

/* ---- Feature strip (6 icons) ---- */
.feature-strip{ border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:#fff; }
.feature-strip .grid{ display:grid; grid-template-columns:repeat(6,1fr); gap:20px; padding-block:34px; }
.feat{ display:flex; gap:12px; min-width:0; }
.feat .ic{ width:42px; height:42px; flex:0 0 auto; border-radius:10px; background:var(--brand-050); color:var(--brand); display:grid; place-items:center; }
.feat .ic svg{ width:22px; height:22px; }
.feat h4{ font-size:.82rem; letter-spacing:.06em; text-transform:uppercase; color:var(--ink); margin-bottom:3px; }
.feat p{ font-size:.82rem; color:var(--text-soft); line-height:1.4; }
@media(max-width:900px){ .feature-strip .grid{ grid-template-columns:repeat(3,1fr); gap:22px 18px; } }
@media(max-width:560px){ .feature-strip .grid{ grid-template-columns:repeat(2,1fr); gap:20px 14px; } }

/* ---- Stats band ---- */
.stats{ background:var(--surf-1); border-radius:var(--r-xl); border:1px solid var(--line); }
.stats .grid{ display:grid; grid-template-columns:repeat(5,1fr); gap:16px; padding:34px 24px; text-align:center; }
.stat b{ display:block; font-size:clamp(1.6rem,3.2vw,2.3rem); font-weight:800; color:var(--brand); letter-spacing:-.02em; }
.stat span{ font-size:.9rem; color:var(--text-soft); font-weight:600; }
.stat .unit{ font-size:.62em; color:var(--text-mute); }
@media(max-width:820px){ .stats .grid{ grid-template-columns:repeat(3,1fr); gap:26px 12px; } }
@media(max-width:480px){ .stats .grid{ grid-template-columns:repeat(2,1fr); } }

/* ---- Cards / feature grid ---- */
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:24px; }
.grid-2{ display:grid; grid-template-columns:repeat(2,1fr); gap:32px; align-items:center; }
@media(max-width:900px){ .grid-3{ grid-template-columns:1fr; } .grid-2{ grid-template-columns:1fr; gap:28px; } }
.card{ background:#fff; border:1px solid var(--line); border-radius:var(--r-lg); padding:26px; box-shadow:var(--sh-sm); transition:box-shadow .2s, transform .2s, border-color .2s; }
.card:hover{ box-shadow:var(--sh); transform:translateY(-3px); border-color:var(--brand-100); }
.card .ic{ width:50px; height:50px; border-radius:12px; background:var(--grad); color:#fff; display:grid; place-items:center; margin-bottom:16px; }
.card .ic svg{ width:26px; height:26px; }
.card h3{ margin-bottom:8px; }
.card p{ color:var(--text-soft); font-size:.96rem; }

.check-list li{ display:flex; gap:11px; align-items:flex-start; padding:8px 0; color:var(--ink-2); font-weight:600; }
.check-list li .ck{ width:22px; height:22px; flex:0 0 auto; border-radius:50%; background:var(--brand-050); color:var(--brand); display:grid; place-items:center; margin-top:1px; }

/* ---- CTA band ---- */
.cta-band{ background:var(--grad); border-radius:var(--r-xl); color:#fff; padding:52px 40px; text-align:center; position:relative; overflow:hidden; }
.cta-band h2{ color:#fff; }
.cta-band p{ color:rgba(255,255,255,.9); max-width:52ch; margin:12px auto 26px; }
.cta-band .btn-primary{ background:#fff; color:var(--brand); box-shadow:0 10px 30px rgba(0,0,0,.18); }
.cta-band .btn-primary:hover{ background:#f1f5f9; }
.cta-band .btn-ghost{ background:transparent; color:#fff; border-color:rgba(255,255,255,.5); }
.cta-band .btn-ghost:hover{ background:rgba(255,255,255,.12); color:#fff; }
@media(max-width:560px){ .cta-band{ padding:38px 20px; } }

/* ---- Footer ---- */
.site-footer{ background:var(--ink); color:#cbd5e1; padding-block:56px 30px; }
.site-footer .cols{ display:grid; grid-template-columns:1.6fr 1fr 1fr 1fr; gap:36px; }
.site-footer .brand .word b{ color:#fff; }
.site-footer .brand .word small{ color:#64748b; }
.site-footer p{ font-size:.92rem; color:#94a3b8; margin-top:14px; max-width:34ch; }
.site-footer h5{ color:#fff; font-size:.82rem; letter-spacing:.08em; text-transform:uppercase; margin-bottom:14px; }
.site-footer li{ margin-bottom:9px; }
.site-footer a{ color:#cbd5e1; font-size:.94rem; }
.site-footer a:hover{ color:#fff; }
.site-footer .bottom{ border-top:1px solid #24303f; margin-top:40px; padding-top:22px; display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; font-size:.86rem; color:#64748b; }
@media(max-width:820px){ .site-footer .cols{ grid-template-columns:1fr 1fr; gap:28px; } }
@media(max-width:480px){ .site-footer .cols{ grid-template-columns:1fr; } }

/* ---- Forms ---- */
.field{ margin-bottom:16px; }
.field label{ display:block; font-size:.86rem; font-weight:700; color:var(--ink-2); margin-bottom:6px; }
.input, .field input, .field select, .field textarea{
  width:100%; padding:12px 14px; border:1.5px solid var(--line); border-radius:var(--r-sm);
  font:inherit; font-size:.98rem; color:var(--ink); background:#fff; min-height:46px;
}
.input:focus, .field :is(input,select,textarea):focus{ outline:none; border-color:var(--brand); box-shadow:0 0 0 3px rgba(37,80,235,.14); }

/* ---- Utilities ---- */
.badge{ display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border-radius:var(--r-pill); font-size:.78rem; font-weight:700; }
.badge-brand{ background:var(--brand-050); color:var(--brand); }
.badge-ok{ background:#dcfce7; color:#15803d; }
.text-center{ text-align:center; }
.mt-0{margin-top:0}.mt-2{margin-top:12px}.mt-4{margin-top:24px}.mb-4{margin-bottom:24px}
[hidden]{ display:none !important; }
