
:root{
  --bg:#f7f9fc;
  --paper:#ffffff;
  --ink:#0f172a;
  --muted:#6b7280;
  --line:#e7ecf5;
  --brandA:#7b5cff;
  --brandB:#4fc3ff;
  --shadow:0 24px 80px rgba(13,18,31,.08);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:Inter,system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:var(--ink);background:var(--bg);}
a{color:#1f3fff;text-decoration:none}
.container{max-width:1200px;margin:0 auto;padding:0 20px}

/* Header */
.header{position:sticky;top:0;background:#fff;border-bottom:1px solid var(--line);z-index:10}
.header__inner{height:64px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.brand{display:flex;align-items:center;gap:10px;color:var(--ink);font-weight:700}
.brand__badge{display:inline-flex;width:26px;height:26px;border-radius:8px;align-items:center;justify-content:center;color:#fff;background:linear-gradient(135deg,var(--brandA),var(--brandB))}
.nav a{margin:0 10px;color:#475569}
.btn{display:inline-flex;align-items:center;justify-content:center;border-radius:12px;padding:12px 16px;font-weight:700;border:1px solid var(--line)}
.btn-primary{background:linear-gradient(90deg,var(--brandA),var(--brandB));color:#fff;border-color:transparent}
.btn-grad{background:linear-gradient(135deg,var(--brandA),var(--brandB));color:#fff;border-color:transparent}
.btn-ghost{background:#eef2ff;color:#374151;border-color:#c7d2fe}

/* Hero */
.hero{background:linear-gradient(180deg,rgba(123,92,255,.12),rgba(79,195,255,.12));padding:64px 0 56px}
.hero__grid{display:grid;grid-template-columns:1.1fr 1fr;gap:36px;align-items:center}
.eyebrow{color:#6a77d1;letter-spacing:.12em;font-size:12px;font-weight:800}
.hero h1{font-size:56px;line-height:1.05;margin:.2em 0 .2em}
.lead{color:var(--muted);max-width:52ch}
.hero__right img{width:100%;height:auto}

/* Preview */
.preview{padding:30px 0 10px}
.preview h2{font-size:28px}
.device{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:10px;overflow:hidden}
.device img{width:100%;display:block;border-radius:12px}

/* How + Fees */
.howfees{padding:24px 0 12px}
.howfees__grid{display:grid;grid-template-columns:1.1fr .9fr;gap:28px}
.how h2{margin:0 0 10px}
.how__item{display:flex;gap:12px;align-items:flex-start;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px 16px;margin:10px 0;box-shadow:var(--shadow)}
.how__item .ico{width:28px;height:28px;border-radius:8px;background:#ede9fe;display:inline-flex;align-items:center;justify-content:center}

/* Fees Pro */
.fees{background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:18px}
.fees__head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.seg{display:flex;align-items:center;gap:14px;color:#475569;font-size:14px}
.dot{width:10px;height:10px;border-radius:999px;display:inline-block}
.dot--others{background:#c7d2fe}
.dot--wall{background:linear-gradient(90deg,var(--brandA),var(--brandB))}
.bars{margin:12px 0}
.bar{margin:12px 0}
.bar__track{height:14px;background:#eef2f7;border-radius:999px;position:relative;overflow:hidden}
.bar__fill{height:14px;border-radius:999px;background:linear-gradient(90deg,var(--brandA),var(--brandB))}
.bar--others .bar__fill{background:#a6b7ff}
.bar__meta{display:flex;align-items:center;justify-content:space-between;color:#475569;margin-top:6px}
.callout{display:flex;align-items:center;gap:10px;margin:8px 0}
.badge{display:inline-block;background:linear-gradient(90deg,var(--brandA),var(--brandB));color:#fff;padding:4px 10px;border-radius:999px;font-weight:700;font-size:12px}
.fees__cards{display:grid;grid-template-columns:1fr;gap:12px}
.card.sm{border:1px solid var(--line);border-radius:12px;padding:12px;background:#fff}
.card .k{font-weight:800;margin-bottom:8px}
.card .r{display:flex;justify-content:space-between;margin:6px 0}
.card .save{color:#0f766e;margin-top:6px}
.ticks{margin:0;padding-left:18px;color:#475569}

/* Opportunities */
.opps{padding:24px 0}
.opps__lead{max-width:720px;margin:24px 0}
.cards{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.tile{display:flex;gap:14px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:16px}
.tile__ico{width:40px;height:40px;border-radius:12px;background:#ede9fe;display:inline-flex;align-items:center;justify-content:center}

/* About / compliance pills */
.about{padding:24px 0}
.about__grid{display:grid;grid-template-columns:1.2fr .8fr;gap:20px;align-items:start}
.pill{display:flex;gap:12px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:14px;margin:8px 0;box-shadow:var(--shadow)}
.pill__ico{width:34px;height:34px;border-radius:10px;background:#ede9fe;display:inline-flex;align-items:center;justify-content:center}

/* Stats + Solutions */
.solutions{padding:24px 0 10px}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:14px}
.stat{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:16px;text-align:center}
.stat strong{font-size:26px;display:block}
.solutions__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.solution{display:flex;gap:12px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:16px}
.solution__ico{width:36px;height:36px;border-radius:10px;background:#ede9fe;display:inline-flex;align-items:center;justify-content:center}
.solution--cta{grid-row:span 2;display:flex;align-items:flex-start}
.solution--cta .btn{margin-top:10px}

/* FAQ */
.faq{padding:20px 0}
.faq__grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.faq details{background:#fff;border:1px solid var(--line);border-radius:12px;padding:10px 12px;margin:8px 0}
.faq summary{cursor:pointer;font-weight:600}

/* CTA band */
.cta-band{background:#fff;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:22px 0;margin-top:10px}
.cta-band__inner{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}

/* Footer (improved mobile) */
.footer{background:#fff;border-top:1px solid var(--line);margin-top:0}
.footer__grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:16px;padding:24px 0}
.footer h5{margin:6px 0}
.footer ul{list-style:none;margin:0;padding:0}
.footer li{margin:6px 0}
.footer a{color:#475569}
.muted{color:#6b7280}
.copyright{border-top:1px solid var(--line);padding:12px 0;color:#6b7280;text-align:center}

@media (max-width:1024px){
  .hero__grid{grid-template-columns:1fr}
  .howfees__grid{grid-template-columns:1fr}
  .about__grid{grid-template-columns:1fr}
  .stats{grid-template-columns:repeat(2,1fr)}
  .solutions__grid{grid-template-columns:1fr}
  .faq__grid{grid-template-columns:1fr}
  .footer__grid{grid-template-columns:1fr 1fr}
}
@media (max-width:640px){
  .header__inner{gap:8px}
  .nav{display:none}
  .hero h1{font-size:38px}
  .cards{grid-template-columns:1fr}
  .stats{grid-template-columns:1fr 1fr}
  .footer__grid{grid-template-columns:1fr; text-align:center}
  .footer .brand--foot{justify-content:center}
  .footer .foot-col{display:flex;flex-direction:column;align-items:center}
  .footer ul li a{display:inline-block;padding:4px 6px}
}


/* About Pro */
.about--pro{padding:18px 0}
.about__shell{display:grid;grid-template-columns:1fr 1.1fr;gap:28px;align-items:center}
.about__illustration{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:18px}
.about__illustration img{width:100%;height:auto;display:block}
.about__content h2{margin:0 0 8px}
.about__content p{margin:8px 0;color:#475569}
.chips{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0 4px}
.chip{display:inline-flex;align-items:center;gap:6px;background:#f1f5ff;border:1px solid #e3e8ff;border-radius:999px;padding:6px 10px;font-weight:600;font-size:12px;color:#334155}
.chip .dot{width:8px;height:8px;border-radius:999px;background:linear-gradient(90deg,var(--brandA),var(--brandB))}
.about__cards{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin-top:10px}
.pill.pro{display:flex;gap:12px;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);padding:14px}
.pill__icon{width:40px;height:40px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center}
.pill__icon.gradient{background:linear-gradient(135deg,rgba(123,92,255,.12),rgba(79,195,255,.12));color:#5b21b6}
@media (max-width:1024px){
  .about__shell{grid-template-columns:1fr}
}


/* Reveal on scroll */
.reveal{opacity:0; transform:translateY(20px); transition:opacity .6s ease, transform .6s ease}
.reveal.visible{opacity:1; transform:none}

/* Sparklines */
.sparks{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:10px 0 6px}
.spark{background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:10px}
.spark svg{width:100%;height:44px;display:block}
.sparkline{fill:none;stroke:url(#sparkGrad);stroke-width:2}
.spark__label{display:block;margin-top:4px;color:#475569;font-size:12px;font-weight:600}
/* Spark gradient definition host */
svg defs linearGradient#sparkGrad stop:first-child{stop-color:var(--brandA)} /* no-op for inline; grad defined in JS */

/* Footer spacing minor tweaks */
.footer__grid{row-gap:18px}

/* Tighten gaps below About */
.about--pro{padding-top:10px;padding-bottom:10px}


/* Fees v2 — balanced layout */
.fees.v2, .fees--pro.v2{padding:16px}
.feesv2__grid{display:grid;grid-template-columns:1.1fr .9fr;gap:16px;align-items:center}
.feesv2__head{grid-column:1 / -1;display:grid;gap:6px;align-items:flex-start}
.feesv2__head h3{margin:0}
.legend{display:flex;gap:14px;align-items:center;color:#475569}
.card{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);padding:12px}
.chart{width:100%;height:auto;display:block}
/* Animate bars on reveal */
.reveal.visible .chart .bar-rect.others{animation:growOthers 1s ease forwards; transform-origin:bottom}
.reveal.visible .chart .bar-rect.wall{animation:growWall 1s .15s ease forwards; transform-origin:bottom}
@keyframes growOthers{from{height:0; y:150} to{height:110; y:40}}
@keyframes growWall{from{height:0; y:150} to{height:55; y:95}}
.feesv2__example .k{font-weight:800;margin-bottom:6px}
.feesv2__example .r{display:flex;justify-content:space-between;margin:4px 0}
.feesv2__example .save{color:#0f766e;margin-top:6px}
.feesv2__example .ticks{margin:8px 0 0 18px;color:#475569}

/* Fill left gaps by densifying grids */
.solutions__grid{grid-auto-flow:dense}
.tile,.solution,.pill.pro{min-height:0}

/* Compact section paddings to avoid large voids */
.hero{padding-bottom:48px}
.preview{padding-top:24px}
.about--pro{padding-top:8px;padding-bottom:8px}
.solutions{padding-top:18px}


/* --- Typographic polish --- */
html{scroll-behavior:smooth}
body{font-size:16.5px; letter-spacing:0.01em}
p{line-height:1.75}
.lead{font-size:18.5px; line-height:1.7}
h1,h2,h3,h4{letter-spacing:0.01em}
.hero h1{font-size:52px; line-height:1.08}
.section h2, .about__content h2, .solutions h2{font-size:34px; line-height:1.2}
.about__content{max-width:62ch}
.cards .tile p, .solution p, .pill p{line-height:1.7}

/* give breathing room inside cards but keep layout tight */
.tile, .solution, .pill, .card{padding:18px}

/* better image behaviour */
.about__illustration img{max-width:100%; height:auto; display:block}

/* --- Mobile typography --- */
@media (max-width:640px){
  body{font-size:16px}
  .hero h1{font-size:34px; line-height:1.15}
  .section h2, .about__content h2, .solutions h2{font-size:26px}
  .lead{font-size:16.5px}
  .chips{gap:8px}
  .about__cards{grid-template-columns:1fr}
  .sparks{grid-template-columns:1fr}
}


/* Full-width About content */
.about__fw{padding-top:12px;padding-bottom:12px}
.about__fw .about__content{max-width:100%}
.about__cards{margin-top:14px}
.sparks{margin:12px 0}

/* Global vertical rhythm */
section{scroll-margin-top:72px}
.hero{padding-top:68px;padding-bottom:56px}
.section, .opps, .about--pro, .solutions, .faq, .howfees, .preview{padding-top:28px;padding-bottom:28px}

/* Fees v3 */
.fees--pro.v3{padding:18px}
.feesv3__grid{display:grid;grid-template-columns:1.1fr .9fr;gap:18px;align-items:center}
.feesv3__head{grid-column:1 / -1;display:grid;gap:6px}
.chart3{width:100%;height:auto;display:block}
.chart3 .pct{fill:#475569;font-size:12px;font-weight:700}
.chart3 .pct.good{fill:#0f766e}
.chart3 .xlabel{fill:#475569;font-size:12px}
.tooltip{position:absolute;transform:translate(-50%,-130%);background:#0f172a;color:#fff;padding:6px 8px;border-radius:8px;font-size:12px;box-shadow:0 10px 30px rgba(0,0,0,.15);pointer-events:none;white-space:nowrap}
.tooltip::after{content:"";position:absolute;left:50%;bottom:-6px;transform:translateX(-50%);border:6px solid transparent;border-top-color:#0f172a}
.feesv3__chart{position:relative}

/* Animate bar heights (IntersectionObserver in main.js) */
.reveal.visible .chart3 .bar3.others rect{animation:growBarA 1s ease forwards}
.reveal.visible .chart3 .bar3.wall rect{animation:growBarB 1s .15s ease forwards}
@keyframes growBarA{from{height:0; y:180} to{height:120; y:60}}
@keyframes growBarB{from{height:0; y:180} to{height:64; y:116}}

/* Extra air in cards */
.tile, .solution, .pill, .card{padding:20px}


/* Pro headers / hierarchy */
.section-title h3{margin:4px 0 2px; font-size:28px; line-height:1.2}
.eyebrow{display:inline-block; font-size:12px; letter-spacing:.12em; font-weight:800; color:#6a77d1}
.how h2{display:flex; align-items:center; gap:10px}
.how h2 .eyebrow{margin-right:6px}
.how__item h4{font-size:18px; margin:0 0 4px}
.how__item p{margin:0; color:#475569}
.ico{width:36px; height:36px; border-radius:10px; background:linear-gradient(135deg, rgba(123,92,255,.15), rgba(79,195,255,.15)); display:inline-flex; align-items:center; justify-content:center}
.ico--svg svg{width:22px;height:22px}
.g-stroke{stroke: #6a77d1; stroke-width:2; fill:none}
.g-fill{fill: url(#gradA)}

/* Chart readability */
.chart3 .xlabel{font-size:13px}
.chart3 .pct{font-size:14px; paint-order: stroke; stroke: #fff; stroke-width:4px}
.chart3 .pct.good{fill:#0f766e; stroke-width:3px}
.chart3 g rect{filter: drop-shadow(0 4px 10px rgba(17,24,39,.12))}

/* Give more air between blocks */
.section, .opps, .about--pro, .solutions, .faq, .howfees, .preview{padding-top:36px; padding-bottom:36px}
.how__item{padding:16px 18px}

/* Mobile polish */
@media (max-width:640px){
  .section-title h3{font-size:24px}
  .how__item h4{font-size:17px}
}


/* --- Mobile fixes for chart and buttons --- */
@media (max-width:640px){
  /* Put chart and side card in a column and give the chart a stable height */
  .feesv3__grid{grid-template-columns:1fr; gap:14px}
  .feesv3__chart{padding:14px}
  .chart3{width:100%; height:260px} /* avoid ultra-thin chart on small screens */
  .feesv3__side{margin-top:2px}

  /* Avoid button overlap: stack and stretch buttons on narrow screens */
  .cta-band__buttons{display:grid; grid-template-columns:1fr; gap:10px; width:100%}
  .cta-band .btn{width:100%}

  /* CTA inside solution card */
  .solution--cta .btn{width:100%}
}


/* --- Legal pages --- */
.legal{padding-top:40px; padding-bottom:40px; background:linear-gradient(180deg, rgba(123,92,255,.05), rgba(79,195,255,.05));}
.legal__wrap{max-width:900px}
.legal__head h1{margin:.2em 0 .1em; font-size:34px; line-height:1.2}
.legal__body{background:#fff; border:1px solid var(--line); border-radius:16px; box-shadow:var(--shadow); padding:22px}
.legal__body h2{font-size:22px; margin:14px 0 6px}
.legal__body h3{font-size:18px; margin:12px 0 6px}
.legal__body p{color:#475569; line-height:1.75}
.legal__body ul{margin:8px 0 12px 22px}
.legal__body li{margin:6px 0}
.legal__body .note{background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:10px 12px; margin:12px 0; color:#334155}
@media (max-width:640px){
  .legal__wrap{padding:0 10px}
  .legal__head h1{font-size:26px}
  .legal__body{padding:16px}
}
