/*
  Better Finance — Global Styles
  Notes: maintainable, responsive-first.
*/
:root {
  --bg: #0b1020;
  --bg-soft: #0f1630;
  --panel: #111a3a;
  --card: #121a3c;
  --text: #e8eefc;
  --muted: #a9b4d6;
  --primary: #3ea1ff;
  --primary-600: #2a8fe8;
  --primary-700: #1f7cd1;
  --accent: #7cffc4;
  --success: #2dd4bf;
  --warning: #fbbf24;
  --danger: #ef4444;
  --ring: rgba(62,161,255,.35);
  --radius: 14px;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
  --container: 1120px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, #0b1126 100%);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 18px; color: var(--muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(8px);
  background: rgba(10, 15, 35, .65);
  border-bottom: 1px solid rgba(255,255,255,.06);
  transition: box-shadow .2s ease, background .2s ease;
}
.site-header.scrolled { box-shadow: 0 10px 30px rgba(0,0,0,.35); background: rgba(10, 15, 35, .85); }

.nav-container { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.brand-text { font-weight: 700; color: var(--text); letter-spacing: 0.1px; }

.nav { position: relative; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; align-items: center; }
.nav-list a { color: var(--text); text-decoration: none; font-weight: 500; opacity: .9; }
.nav-list a:hover { opacity: 1; }

.nav-toggle { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; border: 1px solid rgba(255,255,255,.08); background: transparent; cursor: pointer; }
.nav-toggle .bar { width: 20px; height: 2px; background: var(--text); display: block; margin: 3px 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; font-weight: 600; border-radius: 999px; padding: 12px 18px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .06s ease, box-shadow .2s ease, background .2s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--primary), var(--primary-600)); color: #061325; box-shadow: 0 10px 30px rgba(62,161,255,.35); }
.btn-primary:hover { background: linear-gradient(180deg, var(--primary-600), var(--primary-700)); box-shadow: 0 12px 36px rgba(62,161,255,.45); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--text); border-color: rgba(255,255,255,.08); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn.full { width: 100%; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-gradient { position: absolute; inset: -20% -10% auto -10%; height: 60%; background: radial-gradient(1200px 600px at 20% 20%, rgba(62,161,255,.25), transparent 60%), radial-gradient(1000px 500px at 80% 10%, rgba(124,255,196,.15), transparent 65%); pointer-events: none; }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; padding: 64px 0 40px; }
.hero-copy p { font-size: 1.125rem; }
.trust-row { margin-top: 18px; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; color: var(--muted); font-size: .95rem; }
.trust-row .dot { width: 4px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.25); }

.hero-card { background: linear-gradient(180deg, #0e1737, #0b1330); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; min-width: 280px; }
.card-head { display: flex; justify-content: space-between; }
.chip { font-size: .75rem; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--text); border: 1px solid rgba(255,255,255,.06); }
.chip.muted { opacity: .7; }
.card-balance { margin: 18px 0; }
.card-balance .label { color: var(--muted); font-size: .875rem; }
.card-balance .value { font-size: 1.8rem; font-weight: 700; letter-spacing: .2px; }
.card-rows .row { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px dashed rgba(255,255,255,.08); }
.row-label { color: var(--muted); }

/* Sections */
.section { padding: 72px 0; }
.section.alt { background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01)); border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.section-head { text-align: center; max-width: 820px; margin: 0 auto 36px; }

/* Features */
.grid { display: grid; gap: 18px; }
.features-grid { grid-template-columns: repeat(4, 1fr); }
.feature-card { background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.feature-card h3 { margin-bottom: 8px; }
.feature-card .icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(62,161,255,.12); margin-bottom: 12px; }
.feature-card .icon svg { width: 24px; height: 24px; fill: var(--primary); }
.feature-card .link { display: inline-block; margin-top: 8px; color: var(--accent); text-decoration: none; }
.feature-card .link:hover { text-decoration: underline; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.step-num { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; background: rgba(124,255,196,.14); color: var(--accent); font-weight: 700; margin-bottom: 10px; }

/* Testimonials */
.testimonials-grid { grid-template-columns: repeat(3, 1fr); }
.testimonial { background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.testimonial blockquote { margin: 10px 0 12px; font-size: 1.05rem; color: var(--text); }
.stars { display: inline-flex; gap: 4px; }
.stars svg { width: 16px; height: 16px; fill: var(--warning); opacity: .9; }

/* FAQs */
.faq-list { max-width: 860px; margin: 0 auto; display: grid; gap: 10px; }
.faq { background: var(--card); border: 1px solid rgba(255,255,255,.06); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq[open] { border-color: rgba(124,255,196,.25); box-shadow: 0 10px 28px rgba(124,255,196,.08); }
.faq-body { margin-top: 8px; color: var(--muted); }

/* Footer */
.site-footer { padding: 36px 0; border-top: 1px solid rgba(255,255,255,.06); background: #0a1023; }
.footer-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-meta { text-align: right; color: var(--muted); }

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(16px); transition: all .6s cubic-bezier(.23,1,.32,1); }
.reveal.visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
}
@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-meta { text-align: center; }
  .nav-toggle { display: inline-flex; }
  .nav-list { position: absolute; right: 0; top: 64px; flex-direction: column; align-items: flex-start; background: rgba(10,15,35,.95); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px; width: min(260px, 90vw); display: none; box-shadow: var(--shadow); }
  .nav-list.open { display: flex; }
}
