/* PaisaPeti website.

   One stylesheet for every page. The site's Content-Security-Policy allows no inline
   styles, so everything visual lives here. The colours are the app's own tokens
   (lib/core/theme/app_colors.dart), and the pictures of the app are drawn here in
   HTML, CSS and SVG: there is no image file besides the logo and the link preview. */

/* ───────────────────────── Tokens ───────────────────────── */

:root {
  color-scheme: light;
  --bg: #f7f7fc;
  --surface: #ffffff;
  --ink: #12122b;
  --muted: #5e5f7a;
  --line: #e4e4f0;
  --chip: #ededf7;
  --brand: #4f46e5;
  --brand-text: #4f46e5;
  --mint: #2fd39a;
  --mint-text: #0f7a57;
  --save: #17804f;
  --spend: #e9a21b;
  --spend-text: #8a5a00;
  --danger: #c0392b;
  --hero: #1b1650;
  --on-hero: #f1f0ff;
  --on-hero-muted: #c3c0ea;
  --on-hero-good: #6fe3b4;
  --on-hero-bad: #ff9c85;
  --glow-a: rgba(109, 93, 245, 0.42);
  --glow-b: rgba(47, 211, 154, 0.34);
  --glow-c: rgba(233, 162, 27, 0.2);
  --dot: rgba(18, 18, 43, 0.1);
  --shadow: 18 18 43;
  --grad-from: #4f46e5;
  --grad-to: #0c9a6c;
  --font: Inter, "Inter Variable", system-ui, -apple-system, "Segoe UI", Roboto,
    "Noto Sans", "Noto Sans Devanagari", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* The dark tokens are written twice: once for a phone or computer set to dark, once
   for someone who chose dark with the button. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0b17;
    --surface: #141426;
    --ink: #e9e9f7;
    --muted: #9a9bb8;
    --line: #25253f;
    --chip: #1d1d36;
    --brand: #6d5df5;
    --brand-text: #a59bff;
    --mint: #3ddc9e;
    --mint-text: #3ddc9e;
    --save: #4fd6a0;
    --spend: #f2b33d;
    --spend-text: #f2b33d;
    --danger: #f0806b;
    --hero: #221c66;
    --glow-a: rgba(109, 93, 245, 0.4);
    --glow-b: rgba(61, 220, 158, 0.18);
    --glow-c: rgba(242, 179, 61, 0.1);
    --dot: rgba(233, 233, 247, 0.09);
    --shadow: 0 0 0;
    --grad-from: #a59bff;
    --grad-to: #3ddc9e;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b17;
  --surface: #141426;
  --ink: #e9e9f7;
  --muted: #9a9bb8;
  --line: #25253f;
  --chip: #1d1d36;
  --brand: #6d5df5;
  --brand-text: #a59bff;
  --mint: #3ddc9e;
  --mint-text: #3ddc9e;
  --save: #4fd6a0;
  --spend: #f2b33d;
  --spend-text: #f2b33d;
  --danger: #f0806b;
  --hero: #221c66;
  --glow-a: rgba(109, 93, 245, 0.4);
  --glow-b: rgba(61, 220, 158, 0.18);
  --glow-c: rgba(242, 179, 61, 0.1);
  --dot: rgba(233, 233, 247, 0.09);
  --shadow: 0 0 0;
  --grad-from: #a59bff;
  --grad-to: #3ddc9e;
}

/* ───────────────────────── Base ───────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--brand-text);
}

button {
  font: inherit;
  color: inherit;
}

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid var(--brand-text);
  outline-offset: 3px;
  border-radius: 8px;
}

.wrap {
  width: min(1160px, 100% - 40px);
  margin-inline: auto;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ico {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.skip {
  position: fixed;
  inset-block-start: 10px;
  inset-inline-start: 10px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* Hindi: Devanagari wants more room between lines and no tightened letters. */
:lang(hi) body,
html:lang(hi) body {
  line-height: 1.75;
}

html:lang(hi) h1,
html:lang(hi) h2,
html:lang(hi) h3 {
  letter-spacing: 0;
  line-height: 1.3;
}

/* ───────────────────────── Scroll progress ───────────────────────── */

.progress {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 60;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--mint));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

@supports (animation-timeline: scroll()) {
  .progress {
    animation: progress linear both;
    animation-timeline: scroll(root);
  }
}

@keyframes progress {
  to {
    transform: scaleX(1);
  }
}

/* ───────────────────────── Nav ───────────────────────── */

.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 50;
  border-block-end: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

.nav.is-stuck {
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  -webkit-backdrop-filter: saturate(170%) blur(18px);
  backdrop-filter: saturate(170%) blur(18px);
  border-block-end-color: var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mark {
  width: 38px;
  height: 38px;
  border-radius: 23%;
  flex: none;
}

.logo img {
  width: 38px;
  height: 38px;
}

/* The coin of the logo drops into the money box: once when the page opens, and again
   whenever the logo is pointed at. */
.mark-coin {
  animation: coin-drop 0.9s var(--ease) 0.3s both;
}

.logo:hover .mark-coin {
  animation: coin-drop-again 0.8s var(--ease) both;
}

@keyframes coin-drop {
  0% {
    transform: translateY(-50px);
  }
  60% {
    transform: translateY(0);
  }
  76% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes coin-drop-again {
  0% {
    transform: translateY(-50px);
  }
  60% {
    transform: translateY(0);
  }
  76% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0);
  }
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-inline-start: auto;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--chip);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--chip);
}

.seg-btn {
  min-width: 46px;
  height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.seg-btn[aria-pressed="true"] {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgb(var(--shadow) / 0.18);
}

.theme {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--chip);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.3s var(--ease), background-color 0.2s;
}

.theme:hover {
  transform: rotate(18deg) scale(1.06);
}

.theme .ico {
  width: 20px;
  height: 20px;
}

.theme .to-light,
:root[data-mode="dark"] .theme .to-dark {
  display: none;
}

:root[data-mode="dark"] .theme .to-light {
  display: block;
}

/* ───────────────────────── Buttons and small parts ───────────────────────── */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background-color 0.2s;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 14px 34px -14px var(--brand);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: inset-inline-start 0.7s var(--ease);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px -14px var(--brand);
}

.btn-primary:hover::after {
  inset-inline-start: 130%;
}

.btn-ghost {
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: var(--surface);
}

.btn .ico {
  transition: transform 0.25s var(--ease);
}

.btn:hover .ico-down {
  transform: translateY(3px);
}

.btn:hover .ico-next {
  transform: translateX(3px);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font-weight: 650;
  font-size: 0.9rem;
}

.pulse {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mint);
  flex: none;
}

.pulse::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--mint);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  to {
    transform: scale(3.2);
    opacity: 0;
  }
}

.grad {
  background: linear-gradient(100deg, var(--grad-from) 0%, var(--grad-to) 50%, var(--grad-from) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-block: 0.12em;
  animation: shimmer 7s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ───────────────────────── Hero ───────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  padding-block: 132px 72px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--dot) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 30%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 65% at 50% 30%, #000 15%, transparent 75%);
}

.aurora {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.aurora i {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}

.aurora i:nth-child(1) {
  width: min(52vw, 660px);
  height: min(52vw, 660px);
  inset-block-start: -12%;
  inset-inline-end: 0;
  background: var(--glow-a);
  animation: drift-a 20s ease-in-out infinite alternate;
}

.aurora i:nth-child(2) {
  width: min(44vw, 520px);
  height: min(44vw, 520px);
  inset-block-start: 34%;
  inset-inline-end: 26%;
  background: var(--glow-b);
  animation: drift-b 24s ease-in-out infinite alternate;
}

.aurora i:nth-child(3) {
  width: min(36vw, 420px);
  height: min(36vw, 420px);
  inset-block-start: 4%;
  inset-inline-start: -8%;
  background: var(--glow-c);
  animation: drift-c 28s ease-in-out infinite alternate;
}

@keyframes drift-a {
  to {
    transform: translate3d(-12%, 14%, 0) scale(1.15);
  }
}

@keyframes drift-b {
  to {
    transform: translate3d(18%, -16%, 0) scale(0.9);
  }
}

@keyframes drift-c {
  to {
    transform: translate3d(14%, 20%, 0) scale(1.2);
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 48px;
}

.hero h1 {
  margin-block: 22px 20px;
  font-size: clamp(2.6rem, 6.4vw, 4.9rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.lead {
  max-width: 34em;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block-start: 30px;
}

.points {
  display: grid;
  gap: 12px;
  margin-block-start: 34px;
}

.points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 0.98rem;
}

.points .tile {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(47, 211, 154, 0.16);
  color: var(--mint-text);
  flex: none;
}

/* The phone and what floats around it. `--px` and `--py` follow the pointer, from -1
   to 1; the script sets them. */
.stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 680px;
  perspective: 1500px;
}

.tilt {
  transform: rotateY(calc(-10deg + var(--px, 0) * 8deg)) rotateX(calc(5deg + var(--py, 0) * -7deg));
  transform-style: preserve-3d;
  transition: transform 0.35s ease-out;
}

.phone {
  position: relative;
  width: 318px;
  padding: 11px;
  border-radius: 50px;
  background: linear-gradient(150deg, #34306b, #0d0c1d 60%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.12),
    0 60px 100px -40px rgb(27 22 80 / 0.7),
    0 30px 70px -30px var(--glow-a);
}

.phone::before {
  content: "";
  position: absolute;
  inset-block-start: 21px;
  inset-inline-start: 50%;
  z-index: 3;
  width: 11px;
  height: 11px;
  margin-inline-start: -5.5px;
  border-radius: 50%;
  background: #0d0c1d;
  box-shadow: inset 0 0 0 2px #23214a;
}

.screen {
  position: relative;
  height: 628px;
  padding: 12px 13px 0;
  border-radius: 40px;
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
}

.status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 18px;
  padding-inline: 12px;
  font-size: 10px;
  font-weight: 700;
}

.status i {
  display: inline-block;
  width: 18px;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--ink) 70%, transparent 70%);
  box-shadow: inset 0 0 0 1px var(--ink);
  opacity: 0.8;
}

.app-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-block: 8px 10px;
  padding-inline: 3px;
}

.app-bar b {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.synced {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 10.5px;
  font-weight: 650;
}

.synced .ico {
  width: 13px;
  height: 13px;
  color: var(--save);
}

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 4px;
  border-radius: 999px;
  background: var(--chip);
}

.tab {
  position: relative;
  z-index: 1;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 750;
  cursor: pointer;
  transition: color 0.3s;
}

.tab.is-on {
  color: var(--brand-text);
}

.tab-pill {
  position: absolute;
  inset-block: 4px;
  inset-inline-start: 4px;
  width: calc((100% - 8px) / 4);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 1px 4px rgb(var(--shadow) / 0.2);
  transform: translateX(calc(var(--tab, 0) * 100%));
  transition: transform 0.45s var(--ease);
}

.hc {
  margin-block-start: 10px;
  padding: 14px 14px 13px;
  border-radius: 26px;
  background: var(--hero);
  color: var(--on-hero);
}

.hc-top {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 650;
}

.hc-top span {
  color: var(--on-hero-muted);
}

.ring-box {
  position: relative;
  width: 172px;
  height: 172px;
  margin: 10px auto 8px;
}

.ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring circle {
  fill: none;
  stroke-width: 12;
}

.ring-track {
  stroke: rgba(255, 255, 255, 0.08);
}

.seg-arc {
  transition:
    stroke-dasharray 0.9s var(--ease),
    stroke-dashoffset 0.9s var(--ease);
}

/* With the script, the ring starts empty and is drawn when it comes into view. */
.js .seg-arc {
  stroke-dasharray: 0 100;
  stroke-dashoffset: 0;
}

.arc-saved {
  stroke: #a6ebc4;
}
.arc-rent {
  stroke: #9c6ade;
}
.arc-bills {
  stroke: #d9824b;
}
.arc-food {
  stroke: #e9a21b;
}
.arc-groceries {
  stroke: #b5844a;
}
.arc-other {
  stroke: #7b7fd4;
}

.ring-mid {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1px;
  text-align: center;
}

.ring-mid span {
  color: var(--on-hero-muted);
  font-size: 11px;
  font-weight: 600;
}

.ring-mid b {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.ring-mid i {
  color: var(--on-hero-good);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 650;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 11px;
  font-size: 9.5px;
  font-weight: 600;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--key, #a6ebc4);
}

.key-rent {
  --key: #9c6ade;
}
.key-bills {
  --key: #d9824b;
}
.key-food {
  --key: #e9a21b;
}
.key-groceries {
  --key: #b5844a;
}
.key-more {
  --key: #8f90a8;
}

.trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-block-start: 12px;
  padding-block-start: 11px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.14);
}

.trio span {
  display: block;
  color: var(--on-hero-muted);
  font-size: 9.5px;
  font-weight: 600;
}

.trio b {
  display: block;
  margin-block: 1px 4px;
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.trio .is-good b {
  color: var(--on-hero-good);
}

.chg {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--on-hero-muted);
  font-size: 8.5px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.chg.good {
  background: rgba(111, 227, 180, 0.16);
  color: var(--on-hero-good);
}

.chg.bad {
  background: rgba(255, 156, 133, 0.16);
  color: var(--on-hero-bad);
}

.mbm {
  margin-block-start: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.mbm-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--muted);
}

.mbm-top b {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.mbm-keys {
  display: inline-flex;
  gap: 8px;
}

.mbm-keys span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mbm-keys span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--save);
}

.mbm-keys span:last-child::before {
  background: var(--spend);
}

.mini-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 64px;
  margin-block-start: 10px;
}

.mini-bars span {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100%;
}

.mini-bars i {
  width: 9px;
  border-radius: 3px 3px 0 0;
  background: var(--save);
  height: var(--a);
}

.mini-bars i:last-child {
  background: var(--spend);
  height: var(--b);
}

.dock {
  position: absolute;
  inset-inline: 12px;
  inset-block-end: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding-inline: 8px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow:
    0 0 0 1px var(--line),
    0 10px 24px -8px rgb(var(--shadow) / 0.35);
}

.dock > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding-inline: 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.dock .ico {
  width: 19px;
  height: 19px;
}

.dock .is-on {
  background: var(--chip);
  color: var(--brand-text);
}

.dock .plus {
  position: relative;
  flex: none;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  background: var(--brand);
  color: #fff;
}

.dock .plus::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--brand);
  animation: ripple 2.6s ease-out infinite;
}

@keyframes ripple {
  0% {
    box-shadow: 0 0 0 0 rgba(109, 93, 245, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 14px rgba(109, 93, 245, 0);
  }
}

.float {
  position: absolute;
  z-index: 2;
  translate: calc(var(--px, 0) * var(--depth, 0) * 1px) calc(var(--py, 0) * var(--depth, 0) * 1px);
  transition: translate 0.4s ease-out;
  animation: bob 7s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: translateY(-12px);
  }
}

.glass {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  box-shadow: 0 24px 50px -24px rgb(var(--shadow) / 0.45);
  font-size: 0.8rem;
  line-height: 1.3;
}

.glass b {
  display: block;
  font-size: 0.9rem;
}

.glass small {
  color: var(--muted);
  font-size: 0.78rem;
}

.glass .tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: rgba(233, 162, 27, 0.18);
  color: var(--spend-text);
  flex: none;
}

.float-bill {
  --depth: 26;
  inset-block-start: -2%;
  inset-inline-start: -5%;
}

.float-bill .ico {
  transform-origin: 50% 10%;
  animation: ring-bell 4s ease-in-out infinite;
}

@keyframes ring-bell {
  0%,
  78%,
  100% {
    transform: rotate(0);
  }
  82% {
    transform: rotate(16deg);
  }
  86% {
    transform: rotate(-14deg);
  }
  90% {
    transform: rotate(10deg);
  }
  94% {
    transform: rotate(-6deg);
  }
}

.float-fund {
  --depth: -20;
  inset-block-end: 11%;
  inset-inline-end: -6%;
  animation-delay: -3s;
}

.small-ring {
  width: 40px;
  height: 40px;
  transform: rotate(-90deg);
  flex: none;
}

.small-ring circle {
  fill: none;
  stroke-width: 5;
  stroke: var(--chip);
}

.small-ring circle + circle {
  stroke: var(--spend);
  stroke-linecap: round;
  stroke-dasharray: 41 100;
}

.coin {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border: calc(var(--size) * 0.16) solid #a6f2d5;
  border-radius: 50%;
  background: #2fd39a;
  box-shadow: 0 14px 26px -10px rgba(47, 211, 154, 0.75);
  translate: calc(var(--px, 0) * var(--depth, 0) * 1px) calc(var(--py, 0) * var(--depth, 0) * 1px);
  transition: translate 0.4s ease-out;
  animation: bob 6s ease-in-out infinite;
}

.coin-a {
  --size: 46px;
  --depth: 40;
  inset-block-start: 6%;
  inset-inline-end: 8%;
  animation-delay: -1s;
}

.coin-b {
  --size: 26px;
  --depth: -34;
  inset-block-end: 9%;
  inset-inline-start: 9%;
  animation-delay: -2.4s;
}

.coin-c {
  --size: 18px;
  --depth: 54;
  inset-block-start: 46%;
  inset-inline-end: 1%;
  animation-delay: -4s;
}

/* ───────────────────────── Marquee ───────────────────────── */

.marquee {
  overflow: hidden;
  padding-block: 20px;
  border-block: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 44s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee ul {
  display: flex;
  flex: none;
}

.marquee li {
  display: flex;
  align-items: center;
  gap: 34px;
  padding-inline-start: 34px;
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}

.marquee li::after {
  content: "";
  width: 9px;
  height: 9px;
  border: 2px solid #a6f2d5;
  border-radius: 50%;
  background: #2fd39a;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ───────────────────────── Sections ───────────────────────── */

.sec {
  padding-block: clamp(72px, 10vw, 128px);
}

.sec-head {
  max-width: 760px;
  margin-block-end: 48px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-text);
  font-weight: 750;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

h2 {
  margin-block: 14px 16px;
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.sec-head p,
.sub {
  color: var(--muted);
  font-size: 1.12rem;
}

/* ───────────────────────── Two taps ───────────────────────── */

.write-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}

.steps {
  display: grid;
  gap: 10px;
  margin-block-start: 32px;
  counter-reset: step;
}

.steps li {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  padding: 16px 18px;
  border: 1px solid transparent;
  border-radius: 20px;
  counter-increment: step;
  animation: step-on 9s linear infinite;
}

.steps li::before {
  content: counter(step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--chip);
  color: var(--brand-text);
  font-weight: 800;
}

.steps b {
  font-size: 1.08rem;
}

.steps span {
  color: var(--muted);
  font-size: 0.98rem;
}

.steps li:nth-child(1) {
  animation-name: step-a;
}
.steps li:nth-child(2) {
  animation-name: step-b;
}
.steps li:nth-child(3) {
  animation-name: step-c;
}

@keyframes step-a {
  0%,
  9% {
    background: var(--surface);
    border-color: var(--line);
  }
  12%,
  100% {
    background: transparent;
    border-color: transparent;
  }
}

@keyframes step-b {
  0%,
  9% {
    background: transparent;
    border-color: transparent;
  }
  12%,
  33% {
    background: var(--surface);
    border-color: var(--line);
  }
  36%,
  100% {
    background: transparent;
    border-color: transparent;
  }
}

@keyframes step-c {
  0%,
  33% {
    background: transparent;
    border-color: transparent;
  }
  36%,
  94% {
    background: var(--surface);
    border-color: var(--line);
  }
  98%,
  100% {
    background: transparent;
    border-color: transparent;
  }
}

/* The entry sheet, filling itself in: a loop of nine seconds that the three steps
   beside it follow. */
.demo {
  position: relative;
  max-width: 400px;
  margin-inline: auto;
  padding: 10px 22px 24px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--surface);
  box-shadow: 0 50px 90px -50px rgb(var(--shadow) / 0.5), 0 30px 60px -40px var(--glow-a);
}

.demo::before {
  content: "";
  display: block;
  width: 44px;
  height: 5px;
  margin: 0 auto 16px;
  border-radius: 99px;
  background: var(--line);
}

.demo-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.kinds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-block: 14px 18px;
  padding: 4px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  color: var(--muted);
}

.kinds span {
  padding-block: 8px;
  border-radius: 999px;
}

.kinds span:first-child {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 4px rgb(var(--shadow) / 0.18);
}

.amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  min-height: 72px;
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.amount .rupee {
  margin-inline-end: 6px;
  color: var(--muted);
  font-size: 0.6em;
  font-weight: 700;
}

.digit {
  display: inline-block;
  animation: 9s linear infinite both;
}

.digit:nth-of-type(2) {
  animation-name: digit-a;
}
.digit:nth-of-type(3) {
  animation-name: digit-b;
}
.digit:nth-of-type(4) {
  animation-name: digit-c;
}

@keyframes digit-a {
  0%,
  13% {
    opacity: 0;
    transform: translateY(12px);
    max-width: 0;
  }
  15%,
  94% {
    opacity: 1;
    transform: none;
    max-width: 1ch;
  }
  98%,
  100% {
    opacity: 0;
    max-width: 0;
  }
}

@keyframes digit-b {
  0%,
  19% {
    opacity: 0;
    transform: translateY(12px);
    max-width: 0;
  }
  21%,
  94% {
    opacity: 1;
    transform: none;
    max-width: 1ch;
  }
  98%,
  100% {
    opacity: 0;
    max-width: 0;
  }
}

@keyframes digit-c {
  0%,
  25% {
    opacity: 0;
    transform: translateY(12px);
    max-width: 0;
  }
  27%,
  94% {
    opacity: 1;
    transform: none;
    max-width: 1ch;
  }
  98%,
  100% {
    opacity: 0;
    max-width: 0;
  }
}

.caret {
  align-self: center;
  width: 3px;
  height: 0.9em;
  margin-inline-start: 4px;
  border-radius: 2px;
  background: var(--brand);
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  to {
    visibility: hidden;
  }
}

.picks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-block: 14px 20px;
}

.picks > span {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.9rem;
  font-weight: 650;
  white-space: nowrap;
}

.picks .picked {
  animation: pick 9s linear infinite both;
}

@keyframes pick {
  0%,
  40% {
    background: var(--chip);
    color: var(--ink);
    transform: none;
  }
  42% {
    background: var(--brand);
    color: #fff;
    transform: scale(0.94);
  }
  45%,
  94% {
    background: var(--brand);
    color: #fff;
    transform: none;
  }
  98%,
  100% {
    background: var(--chip);
    color: var(--ink);
  }
}

.demo-save {
  display: grid;
  place-items: center;
  height: 54px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 750;
  animation: save 9s linear infinite both;
}

@keyframes save {
  0%,
  14% {
    opacity: 0.4;
    transform: none;
  }
  16%,
  56% {
    opacity: 1;
    transform: none;
  }
  59% {
    opacity: 1;
    transform: scale(0.95);
  }
  62%,
  94% {
    opacity: 1;
    transform: none;
  }
  98%,
  100% {
    opacity: 0.4;
  }
}

.toast {
  position: absolute;
  inset-inline: 22px;
  inset-block-end: -22px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 18px;
  background: var(--hero);
  color: var(--on-hero);
  font-weight: 650;
  font-size: 0.94rem;
  box-shadow: 0 20px 40px -20px rgb(var(--shadow) / 0.6);
  animation: toast 9s linear infinite both;
}

.toast .ico {
  color: var(--on-hero-good);
}

@keyframes toast {
  0%,
  62% {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  66%,
  92% {
    opacity: 1;
    transform: none;
  }
  97%,
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ───────────────────────── Bento ───────────────────────── */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
}

.card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s, box-shadow 0.4s;
}

/* A soft light that follows the pointer over a card. */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--glow-a), transparent 62%);
  opacity: 0;
  transition: opacity 0.4s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -40px rgb(var(--shadow) / 0.45);
}

.card:hover::before {
  opacity: 0.32;
}

.card h3 {
  margin-block-end: 8px;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.card > p {
  color: var(--muted);
}

.viz {
  margin-block-start: auto;
  padding-block-start: 26px;
}

.viz.fills {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.viz.fills .bars {
  flex: 1;
  min-height: 190px;
}

.c7 {
  grid-column: span 7;
}
.c5 {
  grid-column: span 5;
}
.c4 {
  grid-column: span 4;
}

/* Card: where it went. */
.note-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(47, 211, 154, 0.16);
  color: var(--mint-text);
  font-weight: 700;
  font-size: 0.85rem;
}

.chart-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.keys {
  display: inline-flex;
  gap: 14px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.keys span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.keys span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--save);
}

.keys span:last-child::before {
  background: var(--spend);
}

.bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 10px;
  margin-block-start: 18px;
  padding-block-end: 26px;
  border-block-end: 1px solid var(--line);
}

.bars > span {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 100%;
}

.bars i {
  width: min(26px, 34%);
  height: var(--a);
  border-radius: 8px 8px 0 0;
  background: var(--save);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 1s var(--ease);
  transition-delay: calc(var(--n) * 70ms + 150ms);
}

.bars i + i {
  height: var(--b);
  background: var(--spend);
  transition-delay: calc(var(--n) * 70ms + 220ms);
}

.is-in .bars i,
html:not(.js) .bars i {
  transform: none;
}

.bars em {
  position: absolute;
  inset-block-end: -24px;
  inset-inline: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 600;
  text-align: center;
}

.bars > span:nth-child(1),
.mini-bars span:nth-child(1) {
  --a: 78%;
  --b: 62%;
  --n: 0;
}
.bars > span:nth-child(2),
.mini-bars span:nth-child(2) {
  --a: 78%;
  --b: 54%;
  --n: 1;
}
.bars > span:nth-child(3),
.mini-bars span:nth-child(3) {
  --a: 84%;
  --b: 70%;
  --n: 2;
}
.bars > span:nth-child(4),
.mini-bars span:nth-child(4) {
  --a: 84%;
  --b: 48%;
  --n: 3;
}
.bars > span:nth-child(5),
.mini-bars span:nth-child(5) {
  --a: 92%;
  --b: 42%;
  --n: 4;
}
.bars > span:nth-child(6),
.mini-bars span:nth-child(6) {
  --a: 92%;
  --b: 28%;
  --n: 5;
}

/* Card: the emergency fund, with the slider of the app. */
.fund {
  padding: 16px 14px 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg);
}

.fund-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.step {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--chip);
  color: var(--brand-text);
  cursor: pointer;
  transition: transform 0.15s, opacity 0.2s;
}

.step:active {
  transform: scale(0.9);
}

.step:disabled {
  opacity: 0.4;
  cursor: default;
}

.fund-number {
  text-align: center;
}

.roll {
  height: 3.3rem;
  overflow: hidden;
}

.roll b {
  display: block;
  color: var(--brand-text);
  font-size: 3rem;
  font-weight: 800;
  line-height: 3.3rem;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.roll .up {
  animation: roll-up 0.32s var(--ease);
}

.roll .down {
  animation: roll-down 0.32s var(--ease);
}

@keyframes roll-up {
  from {
    transform: translateY(70%);
    opacity: 0;
  }
}

@keyframes roll-down {
  from {
    transform: translateY(-70%);
    opacity: 0;
  }
}

.fund-number span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.range {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 40px;
  margin-block: 6px 0;
  background: transparent;
  cursor: grab;
}

.range:active {
  cursor: grabbing;
}

.range::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 99px;
  background: linear-gradient(
    90deg,
    var(--brand) calc(15px + (100% - 30px) * var(--at, 0.45)),
    var(--line) calc(15px + (100% - 30px) * var(--at, 0.45))
  );
}

.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  margin-block-start: -10px;
  border: 6px solid var(--brand);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  transition: transform 0.15s;
}

.range:active::-webkit-slider-thumb {
  transform: scale(1.18);
}

.range::-moz-range-track {
  height: 10px;
  border-radius: 99px;
  background: var(--line);
}

.range::-moz-range-progress {
  height: 10px;
  border-radius: 99px;
  background: var(--brand);
}

.range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 6px solid var(--brand);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

.range-ends {
  display: flex;
  justify-content: space-between;
  padding-inline: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.fund-hint {
  min-height: 1.6em;
  margin-block-start: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.fund-goal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-block-start: 16px;
  padding-block-start: 14px;
  border-block-start: 1px solid var(--line);
}

.fund-goal span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.fund-goal b {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.fund-segs {
  display: flex;
  gap: 4px;
  margin-block: 12px 10px;
}

.fund-segs i {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}

.fund-segs b {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--zone, var(--spend));
  transition: width 0.4s var(--ease);
}

.fund-state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 0.9rem;
  font-weight: 600;
}

.zone {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(233, 162, 27, 0.18);
  color: var(--spend-text);
  font-size: 0.8rem;
  font-weight: 750;
  white-space: nowrap;
}

.fund[data-zone="low"] {
  --zone: var(--danger);
}

.fund[data-zone="low"] .zone {
  background: rgba(192, 57, 43, 0.14);
  color: var(--danger);
}

.fund[data-zone="safe"] {
  --zone: var(--save);
}

.fund[data-zone="safe"] .zone {
  background: rgba(47, 211, 154, 0.18);
  color: var(--mint-text);
}

.fund-more {
  margin-block-start: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

/* Card: investments. */
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.two span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.two b {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.gain {
  margin-block-start: 4px;
  color: var(--save);
  font-size: 0.95rem;
  font-weight: 750;
}

.spark {
  width: 100%;
  height: auto;
  margin-block-start: 12px;
  overflow: visible;
}

.spark path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spark .put-in {
  stroke: var(--muted);
  stroke-dasharray: 2 7;
  opacity: 0.7;
}

.spark .worth {
  stroke: var(--save);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.6s var(--ease) 0.2s;
}

.spark .area {
  fill: var(--save);
  stroke: none;
  opacity: 0;
  transition: opacity 0.8s 1s;
}

.is-in .spark .worth,
html:not(.js) .spark .worth {
  stroke-dashoffset: 0;
}

.is-in .spark .area,
html:not(.js) .spark .area {
  opacity: 0.13;
}

/* Cards: bills, and lent and borrowed. */
.rows {
  display: grid;
  gap: 10px;
}

.rows li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: var(--bg);
}

.rows .face {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--chip);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-text);
  flex: none;
}

.rows .what {
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.rows b {
  display: block;
  font-size: 0.98rem;
}

.rows small {
  color: var(--muted);
  font-size: 0.82rem;
}

.rows .get {
  color: var(--save);
  font-weight: 700;
}

.rows .due {
  color: var(--spend-text);
  font-weight: 700;
}

.switch {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 99px;
  background: var(--line);
  flex: none;
  transition: background-color 0.35s;
}

.switch::after {
  content: "";
  position: absolute;
  inset-block-start: 3px;
  inset-inline-start: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.35s var(--ease);
}

.is-in .switch.on,
html:not(.js) .switch.on {
  background: var(--save);
}

.is-in .switch.on::after,
html:not(.js) .switch.on::after {
  transform: translateX(18px);
}

.rows li:nth-child(1) .switch,
.rows li:nth-child(1) .switch::after {
  transition-delay: 0.6s;
}

.rows li:nth-child(3) .switch,
.rows li:nth-child(3) .switch::after {
  transition-delay: 1.1s;
}

/* Card: the summary as a picture. */
.share-viz {
  display: grid;
  place-items: center;
  padding-block: 8px 4px;
}

.shot {
  width: min(270px, 100%);
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(160deg, #2a2380, var(--hero));
  color: var(--on-hero);
  box-shadow: 0 34px 60px -34px rgb(27 22 80 / 0.9);
  transform: rotate(-4deg);
  transition: transform 0.6s var(--ease);
}

.card:hover .shot {
  transform: rotate(0) scale(1.03);
}

.shot-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.shot-top img {
  width: 26px;
  height: 26px;
}

.shot-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-block: 14px;
}

.shot-ring {
  width: 74px;
  height: 74px;
  transform: rotate(-90deg);
  flex: none;
}

.shot-ring circle {
  fill: none;
  stroke-width: 14;
}

.shot-row span {
  display: block;
  color: var(--on-hero-muted);
  font-size: 0.8rem;
}

.shot-row b {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.shot-row i {
  display: block;
  color: var(--on-hero-good);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 650;
}

.shot-foot {
  padding-block-start: 10px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--on-hero-muted);
  font-size: 0.74rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-block-start: 18px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--brand-text);
  font-weight: 700;
  font-size: 0.92rem;
}

.share-btn .ico {
  animation: nudge 2.4s ease-in-out infinite;
}

@keyframes nudge {
  50% {
    transform: scale(1.2) rotate(-8deg);
  }
}

/* Card: made to fit you. Each tile is a button that does what it says. */
.fits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.fit {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg);
  text-align: start;
  line-height: 1.4;
}

button.fit {
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s;
}

button.fit:hover {
  transform: translateY(-3px);
  border-color: var(--brand-text);
}

.fit .tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-block-end: 6px;
  border-radius: 14px;
  background: var(--chip);
  color: var(--brand-text);
  font-weight: 800;
}

.fit b {
  font-size: 1rem;
}

.fit small {
  color: var(--muted);
  font-size: 0.86rem;
}

.fit .flip {
  display: grid;
  height: 1.3em;
  overflow: hidden;
  font-size: 0.95rem;
}

.fit .flip span {
  grid-area: 1 / 1;
  animation: flip-a 4.5s var(--ease) infinite;
}

.fit .flip span + span {
  animation-name: flip-b;
}

@keyframes flip-a {
  0%,
  42% {
    transform: none;
    opacity: 1;
  }
  50%,
  92% {
    transform: translateY(-100%);
    opacity: 0;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

@keyframes flip-b {
  0%,
  42% {
    transform: translateY(100%);
    opacity: 0;
  }
  50%,
  92% {
    transform: none;
    opacity: 1;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* ───────────────────────── Family ───────────────────────── */

.family-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 56px;
}

.fam {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 13 / 10;
  margin-inline: auto;
}

.fam-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fam-lines line {
  stroke: var(--muted);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 0.1 16;
  opacity: 0.55;
  animation: flow 1.4s linear infinite;
}

@keyframes flow {
  to {
    stroke-dashoffset: -16.1;
  }
}

.hub {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  width: 21%;
  translate: -50% -50%;
  filter: drop-shadow(0 22px 30px rgba(79, 70, 229, 0.45));
}

[dir="rtl"] .hub {
  translate: 50% -50%;
}

.hub svg {
  width: 100%;
  height: auto;
  border-radius: 23%;
}

.hub .mark-coin {
  animation: coin-loop 3.4s var(--ease) infinite;
}

@keyframes coin-loop {
  0% {
    transform: translateY(-50px);
  }
  22% {
    transform: translateY(0);
  }
  29% {
    transform: translateY(-5px);
  }
  36%,
  100% {
    transform: translateY(0);
  }
}

.person {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 17%;
  translate: -50% -50%;
  font-size: 0.86rem;
  font-weight: 700;
  animation: bob 6s ease-in-out infinite;
}

.person i {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 28%;
  font-size: clamp(1.5rem, 4.4vw, 2.4rem);
  font-style: normal;
  box-shadow: 0 16px 30px -18px rgb(var(--shadow) / 0.5);
}

.person-a {
  inset-block-start: 17%;
  inset-inline-start: 17%;
}
.person-a i {
  background: #e6e0f5;
}
.person-b {
  inset-block-start: 17%;
  inset-inline-start: 83%;
  animation-delay: -1.5s;
}
.person-b i {
  background: #d9e4f5;
}
.person-c {
  inset-block-start: 75%;
  inset-inline-start: 11%;
  animation-delay: -3s;
}
.person-c i {
  background: #f5e8d4;
}
.person-d {
  inset-block-start: 75%;
  inset-inline-start: 89%;
  animation-delay: -4.5s;
}
.person-d i {
  background: #f5e1ea;
}

.added {
  position: absolute;
  inset-block-end: 0;
  inset-inline-start: 50%;
  display: grid;
  width: max-content;
  max-width: 70%;
  translate: -50% 0;
}

.added > span {
  grid-area: 1 / 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 16px 30px -20px rgb(var(--shadow) / 0.5);
  font-size: 0.86rem;
  font-weight: 650;
  white-space: nowrap;
  animation: added-a 6s var(--ease) infinite;
}

.added > span + span {
  animation-name: added-b;
}

.added em {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--brand-text);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 750;
}

@keyframes added-a {
  0%,
  4% {
    opacity: 0;
    transform: translateY(10px);
  }
  10%,
  44% {
    opacity: 1;
    transform: none;
  }
  50%,
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes added-b {
  0%,
  54% {
    opacity: 0;
    transform: translateY(10px);
  }
  60%,
  94% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.facts {
  display: grid;
  gap: 18px;
  margin-block-start: 30px;
}

.facts li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 16px;
}

.facts .tile {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--chip);
  color: var(--brand-text);
}

.facts b {
  font-size: 1.08rem;
}

.facts span {
  color: var(--muted);
}

/* ───────────────────────── Privacy ───────────────────────── */

.vault {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 40px;
  padding: clamp(28px, 5vw, 64px);
  border-radius: 40px;
  background: var(--hero);
  color: var(--on-hero);
  overflow: hidden;
}

.vault::before,
.vault::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
}

.vault::before {
  width: 420px;
  height: 420px;
  inset-block-start: -160px;
  inset-inline-end: -80px;
  background: rgba(109, 93, 245, 0.7);
  animation: drift-b 18s ease-in-out infinite alternate;
}

.vault::after {
  width: 340px;
  height: 340px;
  inset-block-end: -180px;
  inset-inline-start: 10%;
  background: rgba(47, 211, 154, 0.32);
  animation: drift-a 22s ease-in-out infinite alternate;
}

.vault .kicker {
  color: var(--on-hero-good);
}

.vault .sub {
  color: var(--on-hero-muted);
}

.vault .btn {
  margin-block-start: 28px;
  background: #fff;
  color: #1b1650;
}

.vault .btn:hover {
  transform: translateY(-2px);
}

.no-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block-start: 26px;
}

.no-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 0.86rem;
  font-weight: 650;
}

.no-list .ico {
  width: 15px;
  height: 15px;
  color: var(--on-hero-good);
}

.promises {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-content: center;
}

.promises li {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: transform 0.35s var(--ease), background-color 0.3s;
}

.promises li:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
}

.promises .tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-block-end: 14px;
  border-radius: 14px;
  background: rgba(111, 227, 180, 0.16);
  color: var(--on-hero-good);
}

.promises b {
  display: block;
  margin-block-end: 4px;
  font-size: 1.06rem;
  line-height: 1.3;
}

.promises span {
  color: var(--on-hero-muted);
  font-size: 0.95rem;
}

/* ───────────────────────── Questions ───────────────────────── */

.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 48px;
}

.faq {
  display: grid;
  gap: 10px;
  interpolate-size: allow-keywords;
}

.faq details {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.faq details[open] {
  border-color: var(--brand-text);
  box-shadow: 0 20px 40px -30px var(--glow-a);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 22px;
  font-weight: 700;
  font-size: 1.06rem;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "";
  width: 12px;
  height: 12px;
  margin-inline-end: 4px;
  border-inline-end: 2.5px solid var(--brand-text);
  border-block-end: 2.5px solid var(--brand-text);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform 0.35s var(--ease);
  flex: none;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-3px, -3px);
}

.faq details::details-content {
  block-size: 0;
  overflow: hidden;
  transition:
    block-size 0.4s var(--ease),
    content-visibility 0.4s allow-discrete;
}

.faq details[open]::details-content {
  block-size: auto;
}

.faq details p {
  padding: 0 22px 22px;
  color: var(--muted);
}

/* ───────────────────────── Last call ───────────────────────── */

.cta {
  position: relative;
  isolation: isolate;
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: clamp(48px, 8vw, 96px) 24px;
  border-radius: 44px;
  background: linear-gradient(140deg, #6d5df5, #4338ca 55%, #2a2380);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000, transparent 70%);
}

.cta-box {
  width: 132px;
  height: 132px;
  overflow: visible;
  filter: drop-shadow(0 26px 30px rgba(13, 12, 29, 0.45));
}

.cta-box .mark-coin {
  animation: coin-fall 3.2s var(--ease) infinite;
}

.cta-box .mark-box {
  animation: box-bump 3.2s var(--ease) infinite;
}

@keyframes coin-fall {
  0% {
    transform: translateY(-64px);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  30% {
    transform: translateY(0);
  }
  37% {
    transform: translateY(-6px);
  }
  44%,
  88% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(26px);
    opacity: 0;
  }
}

@keyframes box-bump {
  0%,
  28%,
  44%,
  100% {
    transform: none;
  }
  33% {
    transform: translateY(2.5px);
  }
}

.cta h2 {
  margin: 0;
}

.cta p {
  max-width: 30em;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.12rem;
}

.cta .badge {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  color: #fff;
}

/* ───────────────────────── Footer ───────────────────────── */

.foot {
  padding-block: 48px 40px;
  border-block-start: 1px solid var(--line);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}

.foot p {
  max-width: 22em;
  margin-block-start: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.foot h3 {
  margin-block-end: 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.foot li + li {
  margin-block-start: 4px;
}

.foot li a {
  display: inline-block;
  padding-block: 5px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
}

.foot li a:hover {
  color: var(--brand-text);
}

.foot-end {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-block-start: 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ───────────────────────── The pages of words ───────────────────────── */

.doc {
  width: min(760px, 100% - 40px);
  margin-inline: auto;
  padding-block: 120px 72px;
}

.doc h1 {
  margin-block-end: 18px;
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.doc h2 {
  margin-block: 40px 10px;
  font-size: 1.4rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.doc p,
.doc ul,
.doc ol {
  margin-block: 0 16px;
}

.doc ul,
.doc ol {
  padding-inline-start: 1.3em;
}

.doc ul {
  list-style: disc;
}

.doc ol {
  list-style: decimal;
}

.doc li + li {
  margin-block-start: 8px;
}

.doc li::marker {
  color: var(--brand-text);
}

.doc .muted {
  color: var(--muted);
}

.doc .card {
  display: block;
  margin-block: 20px;
  padding: 24px;
}

.doc .card:hover {
  transform: none;
  box-shadow: none;
}

.doc .card::before {
  display: none;
}

.doc .card h2 {
  margin-block-start: 0;
}

.doc .card > :last-child {
  margin-block-end: 0;
}

.lost {
  display: grid;
  justify-items: center;
  gap: 18px;
  min-height: 70vh;
  align-content: center;
  text-align: center;
}

.lost .cta-box {
  filter: drop-shadow(0 26px 30px var(--glow-a));
}

/* ───────────────────────── Coming into view ───────────────────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
  transition-delay: calc(var(--order, 0) * 90ms);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

.js .card.reveal.is-in:hover {
  transform: translateY(-4px);
  transition-delay: 0s;
}

.d1 {
  --order: 1;
}
.d2 {
  --order: 2;
}
.d3 {
  --order: 3;
}
.d4 {
  --order: 4;
}
.d5 {
  --order: 5;
}

.js .stage.reveal {
  transform: translateY(40px) scale(0.96);
}

.js .stage.reveal.is-in {
  transform: none;
}

/* The change of theme opens as a circle from the button that was pressed. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

/* ───────────────────────── Smaller screens ───────────────────────── */

@media (max-width: 1020px) {
  .hero-grid,
  .write-grid,
  .family-grid,
  .faq-grid,
  .vault {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    padding-block-start: 112px;
  }

  .hero-copy {
    text-align: center;
  }

  .lead {
    margin-inline: auto;
  }

  .actions {
    justify-content: center;
  }

  .points {
    justify-content: center;
    justify-items: start;
    width: fit-content;
    margin-inline: auto;
    text-align: start;
  }

  .tilt {
    transform: none;
  }

  .float-bill {
    inset-inline-start: 2%;
  }

  .float-fund {
    inset-inline-end: 2%;
  }

  .c7,
  .c5 {
    grid-column: span 12;
  }

  .c4 {
    grid-column: span 6;
  }

  .c4:nth-of-type(5) {
    grid-column: span 12;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }

  .wrap,
  .doc {
    width: min(1160px, 100% - 32px);
  }

  .hero {
    padding-block: 100px 48px;
  }

  .btn {
    width: 100%;
  }

  .stage {
    min-height: 640px;
  }

  .phone {
    width: 292px;
  }

  .screen {
    height: 600px;
  }

  .ring-box {
    width: 150px;
    height: 150px;
  }

  .float {
    display: none;
  }

  .coin-a {
    inset-block-start: -1%;
    inset-inline-end: 3%;
  }

  .c4 {
    grid-column: span 12;
  }

  .card {
    padding: 22px;
    border-radius: 26px;
  }

  .fits,
  .promises {
    grid-template-columns: 1fr;
  }

  .fit {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .fit .tile {
    margin-block-end: 0;
  }

  .fit small {
    flex-basis: 100%;
  }

  .bars {
    gap: 4px;
  }

  .viz.fills .bars {
    min-height: 160px;
  }

  .person {
    width: 20%;
    font-size: 0.8rem;
  }

  .hub {
    width: 24%;
  }

  .foot-grid {
    grid-template-columns: 1fr;
  }

  .vault,
  .cta {
    border-radius: 30px;
  }
}

/* ───────────────────────── Less motion ───────────────────────── */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .progress,
  .caret {
    display: none;
  }

  .steps li {
    background: var(--surface);
    border-color: var(--line);
  }

  .picks .picked {
    background: var(--brand);
    color: #fff;
  }

  .toast {
    position: static;
    margin-block-start: 14px;
  }

  .added > span + span,
  .fit .flip span + span {
    display: none;
  }
}
