:root {
  --bg: #ffffff;
  --bg-alt: #f6f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #5b6475;
  --border: #e4e7ef;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --on-primary: #ffffff;
  --accent: #06b6d4;
  --ok: #16a34a;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --max: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f1a;
    --bg-alt: #111727;
    --surface: #151c2e;
    --text: #e8ecf5;
    --muted: #9aa4b8;
    --border: #253047;
    --primary: #818cf8;
    --primary-hover: #a5b4fc;
    --on-primary: #0b0f1a;
    --accent: #22d3ee;
    --ok: #4ade80;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
.narrow { max-width: 780px; }
.muted { color: var(--muted); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--on-primary); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.4em; border-radius: 999px; font-weight: 600; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: background .2s, transform .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); }
.btn-sm { padding: .5em 1.1em; font-size: .9rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
.brand-mark svg { width: 32px; height: 32px; }
.brand-mark rect { fill: var(--primary); }
.brand-mark path { fill: none; stroke: var(--on-primary); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { color: var(--muted); font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; }
  .nav-links .btn { margin-top: 8px; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Hero */
.hero {
  padding: 72px 0 56px; overflow: hidden;
  background:
    radial-gradient(600px 300px at 85% 10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(700px 400px at 10% 0%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, transparent); margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
.grad { background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 36px; }
.hero-stats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 32px; }
.hero-stats strong { display: block; font-size: 1.5rem; }
.hero-stats span { color: var(--muted); font-size: .9rem; }

/* CSS phone mockup */
.hero-art { position: relative; display: flex; justify-content: center; padding: 20px 0; }
.phone {
  width: 260px; height: 520px; border-radius: 42px; padding: 12px;
  background: linear-gradient(160deg, #1e293b, #0f172a);
  box-shadow: 0 30px 60px rgba(15, 23, 42, .35), inset 0 0 0 2px #334155;
  position: relative; animation: floaty 6s ease-in-out infinite;
}
.phone-notch { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 90px; height: 24px; background: #0f172a; border-radius: 14px; z-index: 2; }
.screen { height: 100%; border-radius: 32px; background: var(--bg-alt); padding: 52px 16px 16px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.screen-top { display: flex; align-items: center; gap: 10px; }
.screen .avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.lines { flex: 1; display: grid; gap: 6px; }
.lines i, .list i { display: block; height: 8px; border-radius: 4px; background: var(--border); }
.lines i.short { width: 60%; }
.card-balance { border-radius: 18px; padding: 14px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.card-balance small { opacity: .85; font-size: .7rem; }
.card-balance b { display: block; font-size: 1.4rem; margin-bottom: 8px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 50px; }
.bars i { flex: 1; height: var(--h); background: rgba(255,255,255,.75); border-radius: 4px 4px 0 0; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tiles span { aspect-ratio: 1; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.list { display: grid; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.float {
  position: absolute; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 10px 14px; border-radius: 12px; font-size: .85rem; font-weight: 600;
}
.float-a { top: 70px; left: 0; animation: floaty 7s ease-in-out infinite reverse; }
.float-b { bottom: 80px; right: 0; animation: floaty 8s ease-in-out infinite; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.ok { background: var(--ok); }
.dot.up { background: var(--accent); }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .float-a { left: 4%; }
  .float-b { right: 4%; }
}
@media (max-width: 420px) {
  .phone { width: 220px; height: 440px; }
  .float { font-size: .75rem; padding: 8px 10px; }
}

/* Logos */
.logos { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 22px 0; }
.logos-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 40px; color: var(--muted); }
.logos-inner span { font-size: .9rem; }
.logos-inner b { font-size: 1.15rem; opacity: .7; letter-spacing: -0.01em; }

/* Sections */
.section { padding: 88px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.eyebrow { display: inline-block; font-weight: 700; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }

.grid { display: grid; gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }

.features { grid-template-columns: repeat(3, 1fr); }
.feature { transition: transform .2s, box-shadow .2s, border-color .2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--primary) 40%, var(--border)); }
.feature p { color: var(--muted); margin: 0; }
.icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; background: color-mix(in srgb, var(--primary) 12%, transparent); }
.icon svg, .contact-list svg { width: 24px; height: 24px; fill: none; stroke: var(--primary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: none; }
.step { position: relative; }
.step p { color: var(--muted); margin: 0; }
.step-num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-weight: 800; margin-bottom: 18px; }

/* Pricing */
.billing { display: inline-flex; margin-top: 12px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.billing button { border: 0; background: none; color: var(--muted); padding: 8px 18px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 600; }
.billing button.active { background: var(--primary); color: var(--on-primary); }
.billing em { font-style: normal; font-size: .8em; opacity: .85; }
.pricing { grid-template-columns: repeat(3, 1fr); align-items: start; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.featured { border: 2px solid var(--primary); box-shadow: var(--shadow); }
.badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--on-primary); font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.plan-desc { color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 6px; margin: 8px 0 20px; }
.price .amount { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; }
.price .amount:not(.custom)::before { content: "$"; font-size: .55em; vertical-align: top; margin-right: 2px; }
.price small { color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; flex: 1; }
.plan li { padding-left: 28px; position: relative; }
.plan li::before {
  content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 18%, transparent);
}
.plan li::after {
  content: ""; position: absolute; left: 6px; top: calc(.3em + 4px); width: 5px; height: 9px;
  border: solid var(--ok); border-width: 0 2px 2px 0; transform: rotate(45deg);
}

/* Testimonials */
.testimonials { grid-template-columns: repeat(3, 1fr); }
.quote { margin: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.quote blockquote { margin: 0; font-size: 1.05rem; }
.quote figcaption { display: flex; align-items: center; gap: 12px; }
.quote figcaption small { display: block; color: var(--muted); }
.quote .avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; flex-shrink: 0; }
.a1 { background: linear-gradient(135deg, #6366f1, #22d3ee); }
.a2 { background: linear-gradient(135deg, #f97316, #ec4899); }
.a3 { background: linear-gradient(135deg, #10b981, #3b82f6); }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0 22px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--primary); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-copy h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.contact-copy p { color: var(--muted); }
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 12px; }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.field.invalid input, .field.invalid textarea { border-color: #ef4444; }
.check { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .95rem; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.form-status { margin: 0; min-height: 1.5em; font-weight: 600; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: #ef4444; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 56px 0 24px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-inner p { margin-top: 12px; max-width: 300px; }
.footer-links { display: flex; gap: 64px; }
.footer-links div { display: grid; gap: 8px; align-content: start; }
.footer-links h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-content: center; text-align: center; padding: 16px; gap: 8px; }
.notfound h1 { font-size: 5rem; margin: 0; background: linear-gradient(90deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound p { color: var(--muted); }

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

/* Responsive grids */
@media (max-width: 960px) {
  .features, .testimonials { grid-template-columns: repeat(2, 1fr); }
  .pricing { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
}
@media (max-width: 760px) {
  .section { padding: 64px 0; }
  .features, .testimonials, .steps, .contact { grid-template-columns: 1fr; }
  .footer-links { gap: 40px; }
}
