/* ===== Tokens ===== */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --navy: #0b1f3a;
  --navy-2: #1b3358;
  --ink: #0b1f3a;
  --muted: #5b6b80;
  --line: #e3e7ee;
  --teal: #0b7a6c;
  --teal-2: #12a594;
  --teal-soft: #e3f4f1;
  --red: #c2341d;
  --red-soft: #fdecea;
  --amber: #b45309;
  --amber-soft: #fdf1e1;
  --r: 16px;
  --shadow: 0 1px 2px rgba(11, 31, 58, 0.04), 0 10px 28px -12px rgba(11, 31, 58, 0.18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--teal-2); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } html { scroll-behavior: auto; } }

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

/* ===== Brand ===== */
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.8rem 1.3rem; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: 0.98rem; text-decoration: none; cursor: pointer; transition: transform 0.15s, background 0.15s, box-shadow 0.15s; white-space: nowrap; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: #096a5e; }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--navy); }
.btn-ghost:hover { border-color: #c9d1dd; }
.btn-small { padding: 0.5rem 0.95rem; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }

.badge-demo { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; font-weight: 600; color: var(--amber); background: var(--amber-soft); padding: 0.25rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.badge-demo::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ===== Landing: header ===== */
.top { position: sticky; top: 0; z-index: 20; background: rgba(246, 247, 249, 0.85); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.top nav { display: flex; align-items: center; gap: 0.5rem; }
.top nav .link { font-weight: 500; font-size: 0.95rem; text-decoration: none; padding: 0.5rem 0.75rem; color: var(--muted); }
.top nav .link:hover { color: var(--ink); }
@media (max-width: 480px) { .top nav .link { display: none; } }

/* ===== Landing: sections ===== */
.section { padding: 5rem 0; }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 2.75rem; }
.eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin-bottom: 0.75rem; }
h1 { font-size: clamp(2.3rem, 6vw, 3.9rem); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; }
h2 { font-size: clamp(1.75rem, 4vw, 2.6rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }
.sub { font-size: 1.15rem; color: var(--muted); margin-top: 1rem; }
@media (max-width: 640px) { .section { padding: 3.5rem 0; } .section-head { margin-bottom: 2rem; } .sub { font-size: 1.02rem; } }

/* Hero */
.hero { padding: 3.5rem 0 4.5rem; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.hero h1 span { color: var(--teal); }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-note { display: flex; align-items: center; gap: 0.5rem; margin-top: 1.4rem; font-size: 0.9rem; color: var(--muted); }
.hero-note svg { color: var(--teal); flex: none; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 2.75rem; } .hero { padding: 2rem 0 3.5rem; } }
@media (max-width: 420px) { .cta-row .btn { flex: 1 1 0; } }

/* Hero mock */
.mock { position: relative; background: var(--surface); border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--line); padding: 1.25rem; }
.mock-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem; }
.mock-label { font-size: 0.8rem; color: var(--muted); font-weight: 500; }
.mock-total { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; }
.mock-chart { width: 100%; height: 80px; display: block; margin: 0.5rem 0 1rem; }
.mock-chart .line { fill: none; stroke: var(--teal-2); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.8s 0.3s ease-out forwards; }
.mock-chart .area { fill: url(#mockFill); opacity: 0; animation: fade 0.8s 1.4s ease-out forwards; }
.mock-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 0; border-top: 1px solid var(--line); opacity: 0; transform: translateY(8px); animation: rise 0.5s ease-out forwards; animation-delay: calc(0.6s + var(--i) * 0.18s); }
.mock-dot { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; font-size: 0.72rem; font-weight: 700; color: #fff; }
.mock-row .name { font-weight: 600; font-size: 0.9rem; line-height: 1.25; }
.mock-row .meta { font-size: 0.78rem; color: var(--muted); }
.mock-row .val { margin-left: auto; text-align: right; font-weight: 600; font-size: 0.9rem; }
.pill { display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 999px; white-space: nowrap; }
.pill-teal { background: var(--teal-soft); color: var(--teal); }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-navy { background: #e7ecf4; color: var(--navy); }
.pill-red { background: var(--red-soft); color: var(--red); }
.mock-float { position: absolute; right: -14px; bottom: -18px; background: var(--navy); color: #fff; border-radius: 14px; padding: 0.7rem 0.9rem; display: flex; align-items: center; gap: 0.6rem; box-shadow: var(--shadow); font-size: 0.85rem; font-weight: 600; opacity: 0; animation: pop 0.5s 1.9s cubic-bezier(0.2, 0.9, 0.3, 1.3) forwards; }
.mock-float .tick { width: 22px; height: 22px; border-radius: 50%; background: var(--teal-2); display: grid; place-items: center; }
@media (max-width: 480px) { .mock-float { right: 8px; bottom: -20px; } }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(0.85) translateY(6px); } to { opacity: 1; transform: none; } }

/* Team strip */
.team { padding: 0 0 1rem; text-align: center; }
.team-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.team-list { list-style: none; margin: 0.9rem 0 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem 2.5rem; font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; color: #7a8698; }
@media (max-width: 480px) { .team-list { gap: 0.4rem 1.5rem; font-size: 1.1rem; } }

/* ===== Flow diagram: today vs with us ===== */
.flows { display: grid; gap: 1.5rem; }
.flow-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; box-shadow: var(--shadow); }
.flow-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.flow-title { font-weight: 700; font-size: 1.05rem; }
.flow-time { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 0.95rem; padding: 0.35rem 0.8rem; border-radius: 999px; }
.flow-time.slow { background: var(--red-soft); color: var(--red); }
.flow-time.fast { background: var(--teal-soft); color: var(--teal); }
.flow { display: flex; align-items: center; gap: 0.35rem; }
.node { position: relative; flex: 1 1 0; min-width: 0; text-align: center; padding: 0.85rem 0.6rem; border-radius: 12px; background: var(--bg); border: 1.5px solid var(--line); font-weight: 600; font-size: 0.88rem; line-height: 1.2; opacity: 0; transform: translateY(10px); transition: opacity 0.45s, transform 0.45s; transition-delay: calc(var(--i) * 0.16s); }
.node.manual { border-color: #f1b7ad; background: #fff8f7; }
.node.us { background: var(--navy); color: #fff; border-color: var(--navy); }
.node.end { border-color: var(--teal-2); background: var(--teal-soft); }
.tag { display: inline-flex; align-items: center; gap: 0.2rem; margin-top: 0.4rem; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--red); background: var(--red-soft); padding: 0.12rem 0.4rem; border-radius: 999px; }
.arrow { flex: none; width: 26px; height: 14px; opacity: 0; transition: opacity 0.4s; transition-delay: calc(var(--i) * 0.16s + 0.08s); }
.arrow path { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.arrow.slow path { stroke: #e0a297; stroke-dasharray: 3 4; }
.arrow.fast path { stroke: var(--teal-2); stroke-dasharray: 5 4; animation: march 0.8s linear infinite; }
.flow-fast { max-width: 36rem; }
@keyframes march { to { stroke-dashoffset: -18; } }
.reveal.in .node, .reveal.in .arrow { opacity: 1; transform: none; }
.flows-legend { display: flex; justify-content: center; gap: 1.25rem; margin-top: 1.25rem; font-size: 0.85rem; color: var(--muted); flex-wrap: wrap; }
@media (max-width: 860px) {
  .flows { grid-template-columns: minmax(0, 1fr); gap: 0.85rem; }
  .flow-card { padding: 1rem 0.75rem; }
  .flow-head { gap: 0.5rem; margin-bottom: 1rem; }
  .flow-title { font-size: 0.95rem; }
  .flow-time { font-size: 0.8rem; padding: 0.25rem 0.6rem; }
  .flow { flex-direction: column; align-items: stretch; gap: 0.2rem; }
  .flow .node { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; text-align: left; padding: 0.55rem 0.8rem; }
  .flow .node br { display: none; }
  .flow .tag { margin-top: 0; flex: none; }
  .flow-fast { max-width: none; }
  .node { padding: 0.65rem 0.4rem; font-size: 0.8rem; }
  .arrow { align-self: center; transform: rotate(90deg); width: 22px; height: 12px; }
  .reveal.in .arrow { transform: rotate(90deg); }
}

/* Hub diagram: with ClearAlts */
.hub-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px minmax(0, 1fr) 104px minmax(0, 1fr); align-items: center; }
.hub-row .node { align-self: center; }
.hub-link { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; align-self: center; }
.hub-link .arrow { width: 72px; height: 14px; }
.link-label { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.72rem; font-weight: 700; color: var(--teal); background: var(--teal-soft); padding: 0.15rem 0.5rem; border-radius: 999px; white-space: nowrap; opacity: 0; transition: opacity 0.4s; transition-delay: calc(var(--i) * 0.16s + 0.1s); }
.link-label.ghost { visibility: hidden; }
.reveal.in .link-label { opacity: 1; }
.hub-center { font-size: 1rem; padding: 1.1rem 0.6rem; box-shadow: 0 0 0 6px var(--teal-soft); }
.branches { display: block; width: 100%; height: 44px; margin-top: 0.4rem; }
.branches path { fill: none; stroke: var(--teal-2); stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity 0.5s 1.4s; }
.reveal.in .branches path { opacity: 1; animation: march 0.8s linear infinite; }
.outputs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.out { display: flex; gap: 0.7rem; align-items: flex-start; background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 0.8rem; opacity: 0; transform: translateY(8px); transition: opacity 0.45s, transform 0.45s; transition-delay: calc(var(--i) * 0.16s + 0.2s); }
.reveal.in .out { opacity: 1; transform: none; }
.out-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--teal-soft); color: var(--teal); display: grid; place-items: center; flex: none; }
.out-ico svg { width: 18px; height: 18px; }
.out-t { font-weight: 700; font-size: 0.9rem; }
.out-d { font-size: 0.8rem; color: var(--muted); line-height: 1.35; margin-top: 0.1rem; }
.hub-cap { text-align: center; font-size: 0.78rem; color: var(--muted); margin-top: 1rem; }
@media (max-width: 860px) {
  .hub-row { grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.1fr) 64px minmax(0, 1fr); }
  .hub-row .node { padding: 0.6rem 0.3rem; font-size: 0.76rem; }
  .hub-center { font-size: 0.82rem !important; padding: 0.9rem 0.3rem !important; box-shadow: 0 0 0 4px var(--teal-soft); }
  .hub-link .arrow { transform: none !important; width: 44px; height: 12px; }
  .link-label { font-size: 0.58rem; padding: 0.1rem 0.3rem; gap: 0.12rem; }
  .link-label svg { width: 9px; height: 9px; }
  .branches { display: none; }
  .outputs { grid-template-columns: minmax(0, 1fr); gap: 0.5rem; position: relative; margin-top: 1.4rem; padding-top: 0; }
  .outputs::before { content: ""; position: absolute; left: 50%; top: -1.4rem; height: 1.4rem; border-left: 2px dashed var(--teal-2); }
  .out { padding: 0.65rem 0.75rem; align-items: center; }
}

/* ===== Redemption diagram ===== */
.redeem { max-width: 44rem; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.75rem; box-shadow: var(--shadow); }
.redeem-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 5rem; align-items: center; gap: 0.9rem; margin-bottom: 1.1rem; }
.redeem-row .lbl { font-weight: 600; font-size: 0.92rem; }
.redeem-row .amt { text-align: right; font-weight: 700; }
.track { position: relative; height: 26px; border-radius: 8px; background: var(--bg); overflow: hidden; }
.fill { position: absolute; top: 0; bottom: 0; width: 0; border-radius: 8px; transition: width 1s cubic-bezier(0.2, 0.8, 0.2, 1); }
.fill.req { left: 0; background: var(--navy); transition-delay: 0.1s; }
.fill.paid { left: 0; background: var(--teal-2); transition-delay: 0.6s; }
.fill.pend { right: 0; background: repeating-linear-gradient(135deg, #f3b562 0 6px, #f7c98a 6px 12px); transition-delay: 1.1s; }
.reveal.in .fill.req { width: 100%; }
.reveal.in .fill.paid { width: 40%; }
.reveal.in .fill.pend { width: 60%; }
.cap-line { position: absolute; top: -4px; bottom: -4px; left: 40%; width: 2px; background: var(--red); opacity: 0; transition: opacity 0.4s 1s; }
.reveal.in .cap-line { opacity: 1; }
.resubmit { display: flex; align-items: center; justify-content: flex-end; gap: 0.6rem; margin-top: 0.4rem; opacity: 0; transform: translateX(-10px); transition: all 0.6s 1.7s; }
.reveal.in .resubmit { opacity: 1; transform: none; }
.resubmit svg { color: var(--teal-2); flex: none; }
.resubmit .chip { background: var(--teal-soft); color: var(--teal); font-weight: 700; font-size: 0.9rem; padding: 0.5rem 0.9rem; border-radius: 999px; display: inline-flex; align-items: center; gap: 0.4rem; }
.redeem-cap { text-align: center; margin-top: 1.4rem; color: var(--muted); font-size: 0.95rem; }
.illus { display: block; text-align: center; font-size: 0.75rem; color: var(--muted); margin-top: 0.75rem; }
@media (max-width: 520px) {
  .redeem { padding: 1.25rem 1rem; }
  .redeem-row { grid-template-columns: 4.6rem minmax(0, 1fr) 3.6rem; gap: 0.6rem; }
  .redeem-row .lbl, .redeem-row .amt { font-size: 0.82rem; }
  .resubmit { justify-content: center; }
}

/* ===== Tiles ===== */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.75rem; box-shadow: var(--shadow); }
.tile-ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); margin-bottom: 1.25rem; }
.tile-ico svg { width: 26px; height: 26px; }
.tile h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
.tile p { color: var(--muted); margin-top: 0.35rem; }
@media (max-width: 800px) { .tiles { grid-template-columns: minmax(0, 1fr); gap: 0.85rem; } .tile { display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 1rem; align-items: center; padding: 1.1rem; } .tile-ico { margin: 0; grid-row: span 2; } }

/* ===== CTA ===== */
.cta { background: var(--navy); color: #fff; border-radius: 28px; padding: 3.5rem 1.5rem; text-align: center; position: relative; overflow: hidden; }
.cta h2 { max-width: 32rem; margin: 0 auto; }
.cta .btn { margin-top: 1.75rem; background: var(--teal-2); color: var(--navy); }
.cta .btn:hover { background: #2bbfab; }
.cta-waves { position: absolute; inset: auto 0 0 0; width: 100%; height: 120px; opacity: 0.18; pointer-events: none; }
.foot { padding: 2rem 0 3rem; color: var(--muted); font-size: 0.85rem; }
.foot .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
