/* =========================================================================
   PayLoop · Shared design system
   Linked by every page.  Page-specific styles live inline in each HTML file.
   ========================================================================= */

/* ---------- TOKENS ---------- */
:root {
  --teal:        #1BA49C;
  --teal-dark:   #0E7F78;
  --ink:         #0B1418;
  --slate:       #5B6B73;
  --slate-soft:  #8A98A0;
  --mint:        #EAF7F5;
  --mint-deep:   #D5EEEA;
  --surface:     #FFFFFF;
  --dark:        #0A0F12;
  --dark-soft:   #141B20;
  --border:      #E5ECEF;
  --border-dark: #1E2830;

  --g1: #20C997;
  --g2: #3B82F6;
  --g3: #8B5CF6;
  --grad: linear-gradient(90deg, var(--g1) 0%, var(--g2) 55%, var(--g3) 100%);
  --grad-soft: linear-gradient(135deg, rgba(32,201,151,.15) 0%, rgba(59,130,246,.15) 55%, rgba(139,92,246,.15) 100%);

  --radius-sm: 10px;
  --radius:    20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(11,20,24,.04), 0 2px 8px rgba(11,20,24,.04);
  --shadow:    0 4px 16px rgba(11,20,24,.06), 0 10px 40px rgba(11,20,24,.06);
  --shadow-lg: 0 20px 60px rgba(11,20,24,.12);

  --container: 1200px;
  --gutter: 24px;

  --font-head: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

/* ---------- TYPE SCALE ---------- */
h1 { font-size: clamp(40px, 5.8vw, 72px); line-height: 1.04; font-weight: 800; }
h2 { font-size: clamp(32px, 4vw, 52px);  line-height: 1.08; font-weight: 800; }
h3 { font-size: clamp(22px, 2vw, 28px);   line-height: 1.2;  font-weight: 700; }
h4 { font-size: 18px; line-height: 1.3; font-weight: 700; }

.eyebrow {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--teal);
}
.eyebrow.on-dark { color: #6EE5D7; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- LAYOUT ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
section { padding: 96px 0; }
.section-dark { background: var(--dark); color: #EDF2F4; }
.section-mint { background: var(--mint); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity .25s ease;
  z-index: -1;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary:hover::before { opacity: 1; }
.btn-secondary {
  background: rgba(11,20,24,.04);
  color: var(--ink);
}
.btn-secondary:hover { background: rgba(11,20,24,.08); }
.btn-on-dark { background: #fff; color: var(--ink); }
.btn-on-dark:hover { transform: translateY(-1px); }
.btn-ghost-on-dark {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.btn-ghost-on-dark:hover { background: rgba(255,255,255,.14); }
.btn-arrow::after {
  content: "→";
  margin-left: 2px;
  transition: transform .2s ease;
}
.btn:hover .btn-arrow::after,
.btn-arrow:hover::after { transform: translateX(3px); }

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.scrolled { border-color: var(--border); background: rgba(255,255,255,.94); }
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav-logo img { height: 28px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
}
.nav-links a { color: var(--ink); position: relative; }
.nav-links a:hover { color: var(--teal); }
.nav-links a.active { color: var(--teal); }

/* Product dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.nav-dropdown > a::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s ease;
}
.nav-dropdown:hover > a::after { transform: rotate(-135deg) translateY(2px); }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: -16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown-menu a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: background .15s ease;
}
.nav-dropdown-menu a:hover { background: var(--mint); }
.nav-dropdown-menu a strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 2px;
}
.nav-dropdown-menu a span {
  font-size: 12.5px;
  color: var(--slate);
}

.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-cta .btn { padding: 11px 20px; font-size: 14px; }
.nav-burger { display: none; }

@media (max-width: 900px) {
  .nav-links, .nav-cta .btn-secondary { display: none; }
  .nav-burger {
    display: inline-flex;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    background: rgba(11,20,24,.04);
  }
  .nav-burger span {
    display: block;
    width: 20px; height: 2px;
    background: var(--ink);
    position: relative;
  }
  .nav-burger span::before, .nav-burger span::after {
    content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink);
  }
  .nav-burger span::before { top: -6px; }
  .nav-burger span::after  { top:  6px; }
}
.mobile-menu {
  display: none;
  padding: 16px var(--gutter) 24px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  padding: 14px 0;
  font-family: var(--font-head);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.mobile-menu .mm-group { padding: 10px 0 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--slate-soft); border: 0; }
.mobile-menu .btn { margin-top: 16px; width: 100%; justify-content: center; }

/* ---------- TRUST ROW ---------- */
.trust-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 10px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  color: var(--slate);
}
.trust-row strong { color: var(--ink); font-family: var(--font-head); font-weight: 700; }
.trust-sep {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--border);
  border-radius: 50%;
}

/* ---------- SECTION HEAD ---------- */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .eyebrow { display: block; margin-bottom: 14px; }
.section-head p { color: var(--slate); font-size: 18px; margin-top: 14px; }
.section-head h2 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- FAQ ---------- */
.faq { background: #fff; }
.faq .section-head { max-width: 780px; margin: 0 auto 48px; text-align: center; }
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-q {
  width: 100%;
  text-align: left;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
}
.faq-icon {
  flex: 0 0 28px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, background .25s ease;
  font-size: 14px;
  color: var(--teal-dark);
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--grad); color: #fff; }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  color: var(--slate);
  font-size: 15.5px;
  line-height: 1.6;
}
.faq-a-inner { padding: 0 0 24px; max-width: 640px; }
.faq-item.open .faq-a { max-height: 500px; }

/* ---------- CTA-FINAL ---------- */
.cta-final {
  padding: 112px 0;
  background: var(--dark);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-final::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 900px; height: 900px;
  background: radial-gradient(circle, rgba(32,201,151,.12), rgba(59,130,246,.06) 40%, transparent 65%);
  pointer-events: none;
}
.cta-final > .container { position: relative; z-index: 1; }
.cta-final h2 { color: #fff; max-width: 740px; margin: 0 auto 20px; }
.cta-final p {
  color: rgba(237,242,244,.7);
  max-width: 520px;
  margin: 0 auto 32px;
  font-size: 18px;
}
.cta-final .trust-row {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  color: rgba(237,242,244,.8);
}
.cta-final .trust-row strong { color: #fff; }

/* ---------- FOOTER ---------- */
footer {
  background: var(--dark-soft);
  color: rgba(237,242,244,.7);
  padding: 64px 0 32px;
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
footer h5 {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
}
footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
footer a:hover { color: #fff; }
.footer-brand img { height: 28px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-brand p { font-size: 14px; max-width: 260px; line-height: 1.55; }
.footer-bottom {
  border-top: 1px solid var(--border-dark);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- REVEAL ON SCROLL ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- PRODUCT PAGE PRIMITIVES ---------- */
.product-hero {
  padding: 88px 0 72px;
  position: relative;
  overflow: hidden;
}
.product-hero::before {
  content: "";
  position: absolute;
  inset: -80px -80px auto auto;
  width: 620px; height: 620px;
  background: radial-gradient(ellipse at center, rgba(32,201,151,.18), rgba(59,130,246,.10) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.product-hero .container { position: relative; z-index: 1; }
.product-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.product-hero h1 { margin: 14px 0 20px; font-size: clamp(36px, 4.5vw, 60px); }
.product-hero .lead {
  font-size: clamp(17px, 1.4vw, 20px);
  color: var(--slate);
  margin-bottom: 32px;
  max-width: 520px;
  line-height: 1.55;
}
.product-hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px;
}
.product-hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.product-hero-visual img { width: 100%; display: block; }
@media (max-width: 900px) {
  .product-hero-grid { grid-template-columns: 1fr; }
  .product-hero-visual { order: 2; max-width: 420px; margin: 0 auto; }
}

/* Feature grid (4 cards) */
.feat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.feat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.feat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--grad-soft);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.feat-card h3 { font-size: 22px; margin-bottom: 10px; }
.feat-card p { color: var(--slate); font-size: 15px; line-height: 1.55; }
@media (max-width: 720px) { .feat-grid { grid-template-columns: 1fr; } }

/* Related modules strip */
.related { background: var(--mint); }
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.related-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.related-card .eyebrow { font-size: 11px; }
.related-card h3 { font-size: 20px; }
.related-card p { color: var(--slate); font-size: 14px; flex: 1; }
.related-card .arr {
  color: var(--teal-dark);
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
}
@media (max-width: 900px) { .related-grid { grid-template-columns: 1fr; } }

/* Scenario (dark narrative) */
.scenario { background: var(--dark); color: #EDF2F4; }
.scenario .scenario-wrap {
  max-width: 840px; margin: 0 auto;
}
.scenario h2 { color: #fff; margin-bottom: 24px; }
.scenario p { font-size: 18px; line-height: 1.7; color: rgba(237,242,244,.8); margin-bottom: 20px; }
.scenario p strong { color: #fff; font-weight: 600; }
.scenario .quote {
  border-left: 3px solid var(--teal);
  padding: 4px 0 4px 24px;
  margin: 28px 0;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

/* ---------- LEGAL PAGE PRIMITIVES ---------- */
.legal-page { padding: 80px 0 120px; max-width: 820px; margin: 0 auto; }
.legal-page h1 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 8px; }
.legal-page .updated {
  font-family: var(--font-head);
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--slate-soft);
  margin-bottom: 48px;
}
.legal-page h2 {
  font-size: 24px;
  margin-top: 40px;
  margin-bottom: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.legal-page h2:first-of-type { border-top: 0; padding-top: 0; }
.legal-page h3 { font-size: 17px; margin-top: 24px; margin-bottom: 8px; }
.legal-page p, .legal-page li {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.legal-page ul, .legal-page ol { padding-left: 24px; margin-bottom: 14px; }
.legal-page a { color: var(--teal-dark); border-bottom: 1px solid currentColor; }
.legal-page a:hover { color: var(--teal); }
.legal-page table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.legal-page th, .legal-page td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.legal-page th { font-family: var(--font-head); font-weight: 700; color: var(--ink); background: var(--mint); }
.legal-page .box {
  background: var(--mint);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 24px 0;
  color: var(--ink);
  font-size: 15px;
}

/* ---------- RESPONSIVE TIGHTENING ---------- */
@media (max-width: 700px) { section { padding: 72px 0; } }
