/* ==========================================================================
   EnveloPay — Marketing site
   Design system + components. Pure CSS, no JavaScript.
   Brand: Slate #2E4057 · Gold #E9952A · Cream #FBF6EE
   Type:  Baloo 2 (headings, echoes the wordmark) · Quicksand (body)
   ========================================================================== */

/* ----- Design tokens ----- */
:root {
  --slate:        #2E4057;
  --slate-700:    #263647;
  --slate-900:    #1b2733;
  --gold:         #E9952A;
  --gold-600:     #cf8013;
  --cream:        #FBF6EE;
  --cream-200:    #f3ebdd;

  --ink:          #22303f;
  --muted:        #6c7785;
  --faint:        #9aa3ad;
  --line:         rgba(46, 64, 87, 0.12);
  --line-strong:  rgba(46, 64, 87, 0.22);
  --white:        #ffffff;

  --font-head: 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Quicksand', system-ui, sans-serif;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --sp-9: 96px; --sp-10: 128px;

  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 26px; --r-pill: 999px;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --shadow-soft: 0 18px 50px -28px rgba(46, 64, 87, 0.35);
  --shadow-card: 0 6px 24px -18px rgba(46, 64, 87, 0.45);

  --maxw: 1120px;
}

/* ----- Reset ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--slate);
  letter-spacing: -0.01em;
  line-height: 1.08;
}
::selection { background: var(--gold); color: var(--white); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* ----- Layout helpers ----- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--sp-9) 0; }
.section--tight { padding: var(--sp-8) 0; }
.center { text-align: center; }
.narrow { max-width: 640px; margin-left: auto; margin-right: auto; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: var(--sp-4);
}
.section-title { font-size: clamp(28px, 4.2vw, 44px); }
.section-lead {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--muted);
  margin-top: var(--sp-4);
  max-width: 560px;
}
.center .section-lead { margin-left: auto; margin-right: auto; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 14px 22px;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.5s var(--ease), background 0.3s var(--ease), box-shadow 0.4s var(--ease), color 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.98); }

.btn--primary { background: var(--slate); color: var(--white); box-shadow: var(--shadow-card); }
.btn--primary:hover { background: var(--slate-700); }

.btn--gold { background: var(--gold); color: var(--white); }
.btn--gold:hover { background: var(--gold-600); }

.btn--ghost { background: transparent; color: var(--slate); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--slate); background: rgba(46, 64, 87, 0.04); }

.btn--ghost-light { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn--ghost-light:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

.btn .btn-ic {
  width: 28px; height: 28px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 0.5s var(--ease);
}
.btn--ghost .btn-ic { background: rgba(46, 64, 87, 0.08); }
.btn:hover .btn-ic { transform: translate(2px, -1px); }

/* Coming-soon / muted button */
.btn--soon {
  background: rgba(46,64,87,0.12);
  color: var(--slate);
  cursor: not-allowed;
  box-shadow: none;
  border-color: transparent;
}
.btn--soon:hover { transform: none; }
.btn--soon .btn-ic { background: rgba(46, 64, 87, 0.1); }
.btn--soon .soon-tag { font-size: 12px; font-weight: 700; opacity: 0.75; }
/* on dark backgrounds */
.on-dark .btn--soon, .btn--soon.on-dark { background: rgba(255,255,255,0.16); color: var(--white); }
.on-dark .btn--soon .btn-ic { background: rgba(255,255,255,0.18); }

/* ----- Header / nav (floating pill) ----- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: 16px 0; }
:is(#pricing, #about) { scroll-margin-top: 100px; }
.nav {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 10px 12px 10px 22px;
  box-shadow: var(--shadow-soft);
}

/* CSS-only mobile menu (no JS) */
.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.nav-burger {
  display: none; width: 44px; height: 44px; border-radius: var(--r-pill);
  cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: rgba(46, 64, 87, 0.07);
}
.nav-burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--slate); transition: transform 0.4s var(--ease), opacity 0.3s var(--ease); }
.nav-links {
  display: flex; align-items: center; gap: 30px;
  font-weight: 600; font-size: 16px; color: var(--slate);
}
.nav-links a { transition: color 0.3s var(--ease); }
.nav-links a:hover { color: var(--gold-600); }
.nav-cta { display: flex; align-items: center; gap: 10px; }

/* Logo */
.logo { display: inline-flex; align-items: center; }
.logo img { height: 34px; width: auto; }
.site-footer .logo img { height: 30px; }

/* ----- Hero (full-bleed illustration) ----- */
.hero {
  position: relative;
  min-height: 100vh;            /* full-bleed to the top edge under the fixed header */
  display: flex;
  align-items: center;
  background: var(--slate) url('/assets/hero.svg') center right / cover no-repeat;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg,
    rgba(27,39,51,0.94) 0%,
    rgba(27,39,51,0.82) 34%,
    rgba(27,39,51,0.42) 64%,
    rgba(27,39,51,0.12) 100%);
}
.hero .container { position: relative; z-index: 1; }
.hero-inner { max-width: 640px; padding: var(--sp-8) 0; }
.hero .eyebrow { color: var(--gold); }   /* exact logo gold #E9952A */
.hero h1 {
  font-size: clamp(40px, 6.4vw, 76px);
  color: var(--white);
  margin-bottom: var(--sp-5);
}
.hero h1 .accent { color: var(--gold); }
.hero-lead {
  font-size: clamp(16px, 2.1vw, 21px);
  color: rgba(255,255,255,0.82);
  max-width: 520px;
  margin-bottom: var(--sp-6);
  font-weight: 500;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note { margin-top: var(--sp-5); font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 600; }

/* ----- Cards & grids ----- */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 28px;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--line-strong); }
.card h3 { font-family: var(--font-head); font-weight: 600; font-size: 19px; color: var(--slate); }
.card p { font-size: 14px; color: var(--muted); margin-top: 8px; }
.card--cream { background: var(--cream); }

.icon-tile {
  width: 50px; height: 50px; border-radius: 14px;
  background: var(--cream); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; margin-bottom: var(--sp-4);
}
.card--cream .icon-tile { background: var(--white); }
.icon-tile svg { width: 26px; height: 26px; stroke: var(--slate); stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.section--white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--slate { background: var(--slate); color: var(--white); }
.section--slate .section-title { color: var(--white); }
.section--slate .section-lead { color: rgba(255, 255, 255, 0.7); }

/* ----- WHY question grid ----- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.why-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px;
  display: flex; flex-direction: column;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: var(--line-strong); }
.why-card .q-ic {
  width: 40px; height: 40px; border-radius: 11px;
  background: rgba(233,149,42,0.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-4);
}
.why-card .q-ic svg { width: 20px; height: 20px; stroke: var(--gold-600); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.why-card h3 { font-family: var(--font-head); font-weight: 600; font-size: 18px; color: var(--slate); line-height: 1.2; }
.why-card p { font-size: 13.5px; color: var(--muted); margin-top: 10px; line-height: 1.55; }

/* ----- Solution / steps ----- */
.step .step-num { font-family: var(--font-head); font-weight: 800; font-size: 42px; color: var(--gold); line-height: 1; }
.step h3 { margin-top: 10px; }

/* ----- About ----- */
.about-split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: center; }
.about-split .section-title { margin-bottom: var(--sp-4); }
.about-points { margin-top: var(--sp-5); display: grid; gap: 14px; }
.about-points li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink); }
.about-points svg { width: 20px; height: 20px; stroke: var(--gold); stroke-width: 2.2; fill: none; flex-shrink: 0; margin-top: 2px; }
.about-points strong { color: var(--slate); font-weight: 700; }

/* ----- Pricing ----- */
.pricing-wrap { position: relative; }
.bill-radio { position: absolute; opacity: 0; pointer-events: none; }
.billing-toggle {
  display: inline-flex; background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 4px; margin: var(--sp-4) auto var(--sp-7);
  font-size: 13px; font-weight: 700;
}
.billing-toggle label { padding: 8px 18px; border-radius: var(--r-pill); color: var(--muted); cursor: pointer; transition: background 0.3s var(--ease), color 0.3s var(--ease); }
.billing-toggle label:hover { color: var(--slate); }
#bill-monthly:checked ~ .center .billing-toggle label[for="bill-monthly"],
#bill-annual:checked ~ .center .billing-toggle label[for="bill-annual"] { background: var(--slate); color: var(--white); }
.bill-radio:focus-visible ~ .center .billing-toggle { outline: 3px solid var(--gold); outline-offset: 3px; }

.price-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 28px 24px;
  display: flex; flex-direction: column;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.price-card.featured { border: 2px solid var(--gold); position: relative; }
.price-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--white);
  font-family: var(--font-head); font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 14px; border-radius: var(--r-pill); white-space: nowrap;
}
.price-tier { font-family: var(--font-head); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate); }
.featured .price-tier { color: var(--gold-600); }
.price-amount { margin: 14px 0 2px; min-height: 46px; }
.price-amount .num { font-family: var(--font-head); font-size: 40px; font-weight: 800; color: var(--slate); }
.price-amount .per { font-size: 13px; color: var(--muted); }
.price-annual { display: none; }            /* monthly is the default view */
.price-sub { font-size: 12px; color: var(--gold-600); font-weight: 700; margin-bottom: 4px; min-height: 16px; }
.price-limits { font-size: 12px; color: var(--faint); font-weight: 600; margin-bottom: var(--sp-4); }
.price-features { margin: var(--sp-4) 0 var(--sp-5); flex: 1; }
.price-features li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.45; margin-bottom: 10px; }
.price-features svg { width: 15px; height: 15px; stroke: var(--gold); stroke-width: 2.4; fill: none; flex-shrink: 0; margin-top: 2px; }

.pricing-note { text-align: center; max-width: 680px; margin: 0 auto var(--sp-6); font-size: 13px; color: var(--faint); line-height: 1.6; }
.pricing-note strong { color: var(--slate); font-weight: 700; }

/* Toggle behaviour: annual selected swaps the figures */
#bill-annual:checked ~ .pricing .price-monthly { display: none; }
#bill-annual:checked ~ .pricing .price-annual { display: block; }

/* ----- Trust ----- */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.trust-item svg { width: 30px; height: 30px; stroke: var(--gold); stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; margin: 0 auto 10px; }
.trust-item h4 { font-family: var(--font-body); font-size: 15px; font-weight: 700; color: var(--white); }
.trust-item p { font-size: 12px; color: rgba(255, 255, 255, 0.6); margin-top: 4px; }

/* ----- CTA band ----- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(30px, 4.4vw, 48px); margin-bottom: var(--sp-5); }
.cta-band .hero-cta { justify-content: center; }

/* ----- Footer ----- */
.site-footer { background: var(--slate-900); color: rgba(255, 255, 255, 0.75); padding: var(--sp-8) 0 var(--sp-6); font-size: 14px; }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: var(--sp-6); border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.footer-brand p { margin-top: 14px; max-width: 300px; font-size: 13px; color: rgba(255, 255, 255, 0.55); }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h5 { font-family: var(--font-head); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.5); margin-bottom: 14px; }
.footer-col a { display: block; margin-bottom: 10px; color: rgba(255, 255, 255, 0.78); transition: color 0.3s var(--ease); }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: var(--sp-5); font-size: 12px; color: rgba(255, 255, 255, 0.45); }

/* ----- Legal pages ----- */
.page-hero { padding: calc(var(--sp-8) + 64px) 0 var(--sp-6); text-align: center; }  /* clear the fixed header */
.page-hero h1 { font-size: clamp(34px, 5vw, 56px); }
.page-hero .meta { margin-top: var(--sp-4); color: var(--muted); font-size: 14px; font-weight: 600; }

.legal { max-width: 760px; margin: 0 auto; padding-bottom: var(--sp-9); }
.legal h2 { font-family: var(--font-head); font-size: 24px; margin: var(--sp-7) 0 var(--sp-4); padding-top: var(--sp-3); }
.legal h3 { font-family: var(--font-body); font-size: 17px; font-weight: 700; color: var(--slate); margin: var(--sp-5) 0 var(--sp-3); }
.legal p, .legal li { font-size: 15px; color: var(--ink); margin-bottom: var(--sp-3); line-height: 1.75; }
.legal ul { margin: 0 0 var(--sp-4) 0; }
.legal ul li { position: relative; padding-left: 22px; }
.legal ul li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.legal a { color: var(--gold-600); font-weight: 700; }
.legal a:hover { text-decoration: underline; }
.legal .toc { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 24px; margin-bottom: var(--sp-6); }
.legal .toc h4 { font-family: var(--font-head); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 12px; }
.legal .toc a { display: inline-block; margin: 0 16px 8px 0; font-size: 14px; }

/* ----- Support page ----- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 12px; overflow: hidden; transition: border-color 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 24px; font-family: var(--font-head); font-weight: 600; font-size: 17px; color: var(--slate); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { width: 22px; height: 22px; flex-shrink: 0; stroke: var(--gold); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.4s var(--ease); }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq .faq-body { padding: 0 24px 22px; font-size: 15px; color: var(--muted); line-height: 1.7; }
.faq .faq-body strong { color: var(--slate); }

.support-contact { background: var(--slate); color: var(--white); border-radius: var(--r-xl); padding: var(--sp-7); text-align: center; max-width: 760px; margin: var(--sp-8) auto 0; }
.support-contact h2 { color: var(--white); font-size: 28px; }
.support-contact p { color: rgba(255, 255, 255, 0.75); margin: var(--sp-3) 0 var(--sp-5); }
.support-contact .email { font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--gold); }

/* ----- Reduced motion ----- */
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .about-split { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 760px) {
  .section { padding: var(--sp-8) 0; }
  .nav { padding: 8px 8px 8px 16px; }
  .logo img { height: 30px; }

  /* mobile nav: burger + dropdown */
  .nav-burger { display: flex; }
  .nav-cta { display: none; }
  .nav-links { display: none; }
  .nav-toggle:checked ~ .nav-links {
    display: flex; flex-direction: column; gap: 2px;
    position: absolute; top: calc(100% + 10px); left: 0; right: 0;
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 10px; box-shadow: var(--shadow-soft);
  }
  .nav-toggle:checked ~ .nav-links a { padding: 14px 16px; border-radius: var(--r-md); font-size: 16px; }
  .nav-toggle:checked ~ .nav-links a:hover { background: var(--cream); color: var(--slate); }
  .nav-toggle:focus-visible ~ .nav-burger { outline: 3px solid var(--gold); outline-offset: 3px; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .grid-3, .grid-4, .why-grid { grid-template-columns: 1fr; }
  .hero { min-height: 92svh; background-position: 70% center; }
  .hero::before { background: linear-gradient(180deg, rgba(27,39,51,0.86) 0%, rgba(27,39,51,0.72) 55%, rgba(27,39,51,0.5) 100%); }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .footer-top { flex-direction: column; gap: 32px; }
  .footer-cols { gap: 40px; }
  .support-contact { padding: var(--sp-6) var(--sp-5); }
  .legal .toc a { display: block; margin-right: 0; }
}

/* very small phones */
@media (max-width: 380px) {
  .container { padding: 0 18px; }
  .logo img { height: 27px; }
  .card, .why-card, .price-card { padding: 22px 20px; }
}
