:root {
  --navy: #12284a;
  --navy-2: #1c3a66;
  --blue: #6ea8e3;
  --blue-soft: #e8f1fb;
  --green: #1f8a5f;
  --green-soft: #e3f4ec;
  --warn: #b4501f;
  --warn-soft: #fcede4;
  --ink: #142033;
  --muted: #5b6678;
  --line: #e4e8ef;
  --bg: #ffffff;
  --bg-2: #f5f8fc;
  --card: #ffffff;
  --shadow: 0 24px 60px -24px rgb(18 40 74 / .35), 0 8px 20px -12px rgb(18 40 74 / .2);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e9eef6; --muted: #a3afc2; --line: #26324a;
    --bg: #0c1424; --bg-2: #111c31; --card: #15223a;
    --blue-soft: #1a2c48; --green-soft: #173a2c; --warn-soft: #3d2519;
    --green: #4cc392; --warn: #f0a07c;
    --shadow: 0 24px 60px -24px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; }
main { overflow-x: clip; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.02em; margin: 0; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 24px; padding: 14px clamp(16px, 4vw, 48px); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.top.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgb(0 0 0 / .4); }
.top nav { display: flex; gap: 28px; margin: 0 auto; }
.top nav a { text-decoration: none; color: var(--muted); font-weight: 500; transition: color .2s; }
.top nav a:hover { color: var(--ink); }
.top-actions { display: flex; gap: 10px; }

.wordmark { font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em; text-decoration: none; color: var(--navy); position: relative; padding-bottom: 4px; }
.wordmark::after { content: ""; position: absolute; left: 0; bottom: 0; width: 28px; height: 4px; border-radius: 4px; background: var(--blue); }
.wordmark span { font-weight: 500; color: var(--muted); margin-left: 6px; }
@media (prefers-color-scheme: dark) { .wordmark { color: #fff; } }
.wordmark.small { font-size: 1.05rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; padding: 10px 18px; border-radius: 12px; border: 1.5px solid transparent; transition: transform .2s var(--ease), box-shadow .2s, background .2s; white-space: nowrap; }
.btn.big { padding: 15px 26px; font-size: 1.05rem; border-radius: 14px; }
.btn.solid { background: var(--navy); color: #fff; box-shadow: 0 10px 24px -12px rgb(18 40 74 / .8); }
.btn.solid:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgb(18 40 74 / .8); background: var(--navy-2); }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn.ghost:hover { border-color: var(--blue); transform: translateY(-2px); }
.btn.light { background: #fff; color: var(--navy); }
.btn.light:hover { background: #fff; }
@media (prefers-color-scheme: dark) { .btn.solid { background: var(--blue); color: #0c1424; } .btn.solid:hover { background: #8dbbea; } }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; padding: clamp(40px, 7vw, 96px) clamp(16px, 4vw, 48px) 64px; max-width: 1240px; margin: 0 auto; position: relative; }
.hero::before { content: ""; position: absolute; inset: -10% -20% auto auto; width: 720px; height: 720px; background: radial-gradient(closest-side, color-mix(in srgb, var(--blue) 30%, transparent), transparent); z-index: -1; animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-80px, 60px) scale(1.1); } }
.eyebrow { color: var(--blue); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin: 0 0 14px; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); font-weight: 800; }
.grad { background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-color-scheme: dark) { .grad { background-image: linear-gradient(90deg, #fff, var(--blue)); } }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin: 20px 0 28px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-weight: 500; font-size: .95rem; }
.ticks li { display: flex; align-items: center; gap: 8px; }
.ticks li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f8a5f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; flex: none; }

/* Mock dashboard */
.hero-visual { position: relative; perspective: 1400px; }
.mock { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; transform: rotateY(-8deg) rotateX(4deg); transition: transform .8s var(--ease); }
.hero-visual:hover .mock { transform: rotateY(0) rotateX(0); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.mock-bar span { margin-left: 10px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.mock-body { padding: 20px; }
.mock-hello { font-weight: 800; font-size: 1.2rem; margin: 0 0 14px; }
.mock-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.mt { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.mt small { display: block; color: var(--muted); font-size: .72rem; }
.mt b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.mt.warn b { color: var(--warn); }
.mock-list .row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 11px 4px; border-top: 1px solid var(--line); font-size: .88rem; }
.mock-list .row small { display: block; color: var(--muted); font-size: .75rem; }
.mock-list .row > b { font-variant-numeric: tabular-nums; }
.pill { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); transition: background .4s, color .4s; white-space: nowrap; }
.pill.soft { background: var(--blue-soft); color: var(--ink); }
.pill.sent { background: var(--blue-soft); color: var(--navy); }
@media (prefers-color-scheme: dark) { .pill.sent { color: #fff; } }
.pill.paid { background: var(--green-soft); color: var(--green); }
#demo-row { transition: background .4s; border-radius: 8px; }
#demo-row.flash { background: var(--green-soft); }

.float { position: absolute; display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 600; font-size: .85rem; opacity: 0; transform: translateY(12px) scale(.96); transition: opacity .5s var(--ease), transform .5s var(--ease); pointer-events: none; }
.float.show { opacity: 1; transform: none; }
.f1 { left: -24px; bottom: -22px; }
.f2 { right: -18px; top: 64px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.dot.green { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }

/* ---------- Strip ---------- */
.strip { max-width: 1140px; margin: 0 auto 24px; padding: 28px clamp(16px, 4vw, 48px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip b { display: block; font-size: 2rem; font-weight: 800; color: var(--navy); }
@media (prefers-color-scheme: dark) { .strip b { color: var(--blue); } }
.strip span { color: var(--muted); font-size: .95rem; }

/* ---------- Features ---------- */
.features, .how, .faq { max-width: 1140px; margin: 0 auto; padding: clamp(56px, 8vw, 104px) clamp(16px, 4vw, 48px); text-align: center; }
.sub { color: var(--muted); font-size: 1.1rem; max-width: 36em; margin: 16px auto 48px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 26px; transition: transform .35s var(--ease), box-shadow .35s, border-color .35s; }
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--blue) 50%, var(--line)); }
.feature p { color: var(--muted); margin: 8px 0 0; }
.icon { width: 46px; height: 46px; border-radius: 12px; background: var(--blue-soft); display: grid; place-items: center; margin-bottom: 18px; transition: transform .35s var(--ease); }
.feature:hover .icon { transform: rotate(-6deg) scale(1.08); }
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--navy); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-color-scheme: dark) { .icon svg { stroke: var(--blue); } }

/* ---------- Chase ---------- */
.chase { background: var(--navy); color: #fff; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; padding: clamp(56px, 8vw, 104px) max(clamp(16px, 4vw, 48px), calc((100vw - 1140px) / 2)); position: relative; overflow: hidden; }
.chase::after { content: ""; position: absolute; width: 500px; height: 500px; right: -160px; bottom: -220px; background: radial-gradient(closest-side, rgb(110 168 227 / .35), transparent); }
.chase .eyebrow { color: var(--blue); }
.chase p { color: #c4d3ea; font-size: 1.08rem; }
.chase .ticks { color: #dbe6f5; }
.chase .ticks li::before { background-color: rgb(255 255 255 / .12); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236ea8e3' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E"); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.timeline::before { content: ""; position: absolute; left: 33px; top: 12px; bottom: 12px; width: 2px; background: linear-gradient(var(--blue), rgb(110 168 227 / .1)); }
.timeline li { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 16px; }
.timeline .day { flex: none; width: 68px; text-align: center; font-size: .78rem; font-weight: 800; padding: 6px 0; border-radius: 999px; background: #1f3d6b; color: #fff; position: relative; }
.timeline li > div { background: rgb(255 255 255 / .06); border: 1px solid rgb(255 255 255 / .1); border-radius: 14px; padding: 14px 16px; flex: 1; }
.timeline li p { margin: 4px 0 0; font-size: .92rem; color: #b6c7e2; font-style: italic; }
.timeline li.done .day { background: var(--green); }
.timeline li.done p { font-style: normal; }

/* ---------- How ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; text-align: left; counter-reset: s; }
.step { position: relative; padding: 28px; border-radius: 18px; background: var(--bg-2); }
.step span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 800; margin-bottom: 18px; }
@media (prefers-color-scheme: dark) { .step span { background: var(--blue); color: #0c1424; } }
.step p { color: var(--muted); margin: 8px 0 0; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; text-align: left; }
.faq h2 { text-align: center; margin-bottom: 32px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 1.08rem; padding: 18px 40px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 400; color: var(--blue); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 18px; animation: open .35s var(--ease); }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Final ---------- */
.final { margin: 0 clamp(16px, 4vw, 48px) 72px; border-radius: 28px; padding: clamp(48px, 7vw, 88px) 24px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--navy) 0%, #24508a 100%); position: relative; overflow: hidden; }
.final::before { content: ""; position: absolute; inset: auto -100px -200px auto; width: 420px; height: 420px; background: radial-gradient(closest-side, rgb(110 168 227 / .5), transparent); animation: drift 10s ease-in-out infinite alternate; }
.final p { color: #c4d3ea; font-size: 1.1rem; margin: 12px 0 28px; }

footer { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 28px clamp(16px, 4vw, 48px); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .mock { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero, .chase { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; margin: 0 auto; width: 100%; }
  .grid { grid-template-columns: 1fr 1fr; }
  .top nav { display: none; }
  .top-actions { margin-left: auto; }
}
@media (max-width: 640px) {
  .grid, .steps { grid-template-columns: 1fr; }
  .strip { grid-template-columns: 1fr 1fr; }
  .top-actions .ghost { display: none; }
  .mock { transform: none; }
  .mock-tiles { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .mt { padding: 8px; }
  .mt b { font-size: .85rem; }
  .mock-list .row { grid-template-columns: 1fr auto; }
  .mock-list .row .pill { grid-row: 2; justify-self: start; }
  .f1 { left: 8px; bottom: -18px; }
  .f2 { right: 8px; top: -18px; }
  .cta .btn { flex: 1; }
}

/* ---------- Pricing ---------- */
.pricing { max-width: 1000px; margin: 0 auto; padding: clamp(56px, 8vw, 104px) clamp(16px, 4vw, 48px); text-align: center; }
.pricing .sub { margin-bottom: 28px; }
.billing { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 40px; }
.billing button { position: relative; z-index: 1; border: 0; background: none; font: inherit; font-weight: 700; color: var(--muted); padding: 10px 22px; border-radius: 999px; cursor: pointer; transition: color .3s; white-space: nowrap; }
.billing button[aria-pressed="true"] { color: #fff; }
.billing button em { font-style: normal; font-size: .75rem; font-weight: 700; margin-left: 6px; color: var(--green); transition: color .3s; }
.billing button[aria-pressed="true"] em { color: #b9f0d6; }
.billing-thumb { position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px; background: var(--navy); transition: transform .45s var(--ease); }
.billing.yearly .billing-thumb { transform: translateX(100%); }
@media (prefers-color-scheme: dark) { .billing-thumb { background: var(--blue); } .billing button[aria-pressed="true"] { color: #0c1424; } .billing button[aria-pressed="true"] em { color: #0b5a3a; } }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; text-align: left; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 32px; transition: transform .35s var(--ease), box-shadow .35s; }
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.plan.featured { border: 2px solid var(--navy); box-shadow: var(--shadow); }
@media (prefers-color-scheme: dark) { .plan.featured { border-color: var(--blue); } }
.badge { position: absolute; top: -13px; left: 32px; background: var(--navy); color: #fff; font-size: .75rem; font-weight: 800; padding: 5px 12px; border-radius: 999px; }
@media (prefers-color-scheme: dark) { .badge { background: var(--blue); color: #0c1424; } }
.plan-for { color: var(--muted); margin: 6px 0 18px; min-height: 3.1em; }
.price { margin: 0; display: flex; align-items: baseline; gap: 4px; }
.price .amount { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; display: inline-block; }
.price .amount.flip { animation: flip .45s var(--ease); }
@keyframes flip { 0% { opacity: 0; transform: translateY(-14px); } 100% { opacity: 1; transform: none; } }
.price .per { color: var(--muted); font-weight: 600; }
.saving { min-height: 1.4em; margin: 4px 0 18px; color: var(--green); font-weight: 700; font-size: .9rem; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; }
.plan li::before { content: ""; flex: none; margin-top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f8a5f' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center/12px no-repeat; }
.plan .btn { width: 100%; }
.founding { margin-top: 28px; color: var(--muted); }
@media (max-width: 720px) { .plans { grid-template-columns: 1fr; } .billing button { padding: 10px 14px; } }

/* ---------- Legal pages ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 48px clamp(16px, 4vw, 48px) 72px; }
.doc h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 800; }
.doc h2 { font-size: 1.25rem; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 20px; display: grid; gap: 6px; }
.doc .updated { color: var(--muted); margin-top: 8px; }
.doc a { color: var(--navy); }
@media (prefers-color-scheme: dark) { .doc a { color: var(--blue); } }
footer a { color: inherit; }
