/* Homepage: a scroll-driven 3D story. The WebGL canvas sits behind everything;
   each .scene is tall, and its .sticky child stays on screen while JS turns
   scroll progress into motion. Without JS or with reduced motion, it all
   collapses into a normal, readable page. */

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
.home main, .home footer { position: relative; z-index: 1; }
.home h2 { font: 800 clamp(34px, 5.2vw, 64px)/1.02 var(--display); letter-spacing: -0.025em; margin: 0 0 18px; text-wrap: balance; }
.fine { color: var(--dim); font-size: 14px; margin: 14px 0 0; }

.scene { position: relative; }
.js .scene-hero { height: 250vh; }
.js .scene-forecast { height: 340vh; }
.js .scene-inbox { height: 360vh; }
.js .scene-reveal { height: 300vh; }
.js .scene-custom { height: 1000vh; }
.js .scene .sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }

/* ---------- 1 · hero ---------- */
.hero-copy {
  position: absolute; inset: auto 0 9vh; text-align: center; padding: 0 16px;
  will-change: transform, opacity;
}
.hero-copy h1 {
  font: 800 clamp(52px, 10.5vw, 150px)/0.92 var(--display); letter-spacing: -0.045em; margin: 0 0 22px;
  background: linear-gradient(180deg, #ffffff 30%, #e3c47e 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 80px rgba(214, 168, 78, 0.15);
}
.hero-copy p { color: var(--mist); max-width: 600px; margin: 0 auto 26px; font-size: clamp(17px, 2.2vw, 20px); }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-line {
  position: absolute; left: 0; right: 0; top: 50%; translate: 0 -50%; margin: 0 auto; max-width: 1100px; padding: 0 16px; text-align: center; text-wrap: balance;
  font: 800 clamp(30px, 5vw, 70px)/1.02 var(--display); letter-spacing: -0.03em; color: var(--ice);
  opacity: 0; pointer-events: none; text-shadow: 0 4px 40px rgba(10, 10, 11, 0.9);
}
.scroll-hint { position: absolute; left: 50%; bottom: 22px; width: 24px; height: 38px; margin-left: -12px; border: 1.5px solid var(--line-strong); border-radius: 12px; }
.scroll-hint i { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--signal); animation: hint 1.8s cubic-bezier(0.6, 0, 0.4, 1) infinite; }
@keyframes hint { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- 2 · forecast ---------- */
/* Text above, the 3D line through the middle band, numbers along the bottom. */
.fc-layout { height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 92px 0 34px; }
.fc-copy { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px 48px; align-items: end; }
.fc-copy h2 { margin: 0; }
.fc-copy > p { color: var(--mist); margin: 0; max-width: 460px; }
.fc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; }
.fc-stats div { display: grid; gap: 2px; padding-left: 16px; border-left: 2px solid var(--line-strong); }
.fc-stats dt { color: var(--dim); font-size: 14.5px; }
.fc-stats dd { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fc-stats dd span { font: 800 clamp(30px, 3.6vw, 42px)/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fc-stats div:first-child dd span { color: var(--signal); }
.fc-stats div:last-child dd span { color: var(--mint); }
.fc-stats small { color: var(--mist); font-size: 14px; }
.gl-fallback { display: none; }
.no-gl .gl-fallback { display: block; position: absolute; right: 16px; top: 50%; translate: 0 -50%; width: min(56vw, 760px); border-radius: 16px; border: 1px solid var(--line-strong); }

/* ---------- 3 · inbox merge ---------- */
.inbox-layout { height: 100%; display: grid; grid-template-rows: auto auto 1fr auto; padding: 96px 0 28px; }
.inbox-heads { position: relative; display: grid; text-align: center; }
.inbox-heads .ih { grid-area: 1 / 1; margin: 0; opacity: 0; transition: opacity 0.45s, translate 0.45s; translate: 0 14px; }
.inbox-heads .ih.on { opacity: 1; translate: 0 0; }
.inbox-lead { color: var(--mist); text-align: center; max-width: 640px; margin: 14px auto 0; }
.stage { position: relative; margin-top: 18px; perspective: 1200px; grid-row: 3; min-height: 0; }
.frame {
  position: absolute; display: flex; align-items: flex-start; gap: 10px; padding: 16px 16px 0;
  border-radius: 22px; border: 1px solid var(--line); background: rgba(20, 20, 21, 0.55); backdrop-filter: blur(14px);
  will-change: opacity, transform;
}
.frame b { font: 700 17px/28px var(--display); }
.frame em { line-height: 28px; }
.frame em { font-style: normal; color: var(--dim); font-size: 13.5px; }
.frame .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #0e0e0f; font: 800 13px var(--display); }
.frame-m { border-color: var(--line-strong); }
.schip {
  position: absolute; left: 0; top: 0; height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 16px;
  border-radius: 14px; border: 1px solid var(--line); background: rgba(14, 22, 38, 0.92);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9); will-change: transform, opacity;
}
.schip .logo { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font: 800 14px var(--display); color: #0e0e0f; background: var(--c); }
.schip .t { flex: 1; min-width: 0; display: grid; }
.schip .t b, .schip .t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schip .t b { font-weight: 700; font-size: 15px; }
.schip .t span { color: var(--dim); font-size: 12.5px; }
.schip .amt { font: 800 16px var(--display); font-variant-numeric: tabular-nums; }
.schip .x2 { margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--signal); color: var(--on-signal); font-size: 11.5px; font-weight: 700; opacity: 0; }
.schip .mail { position: absolute; inset: -1px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-radius: inherit; background: #eee8dc; color: #1f1e1b; }
.schip .mail svg { flex: none; width: 22px; height: 22px; color: #5a5248; }
.schip .mail span { display: grid; min-width: 0; }
.schip .mail b, .schip .mail i { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schip .mail b { font-size: 14px; }
.schip .mail i { font-style: normal; font-size: 12.5px; color: #6b6357; }
.stage-foot { grid-row: 4; display: flex; justify-content: center; align-items: center; gap: 16px; flex-wrap: wrap; }
.view-pill { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(20, 20, 21, 0.7); }
.view-pill .vp { position: relative; z-index: 1; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--mist); transition: color 0.3s, background 0.3s; }
.view-pill .vp.on { background: var(--signal); color: var(--on-signal); }
.stage-total { color: var(--mist); font-size: 15px; }
.stage-total b { color: var(--ice); font: 800 20px var(--display); }

/* ---------- 4 · reveal ---------- */
.reveal-title { position: absolute; top: 92px; left: 0; right: 0; text-align: center; padding: 0 16px; z-index: 2; }
.reveal-wrap { position: absolute; inset: 0; display: grid; place-items: center; perspective: 1600px; padding: 0 16px; }
/* No will-change here: Chrome keeps a will-change layer at the scale it was first drawn (0.6x)
   and stretches it, which blurs the screenshot once it zooms in. */
.reveal-frame { position: relative; width: min(1100px, 92vw); transform-origin: 50% 60%; }
.shot-clip {
  border-radius: 18px; overflow: hidden; background: #0a0a0b; border: 1px solid var(--line-strong);
  box-shadow: 0 60px 140px -50px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(214, 168, 78, 0.08), 0 0 120px -30px rgba(214, 168, 78, 0.25);
}
.callout-tag {
  position: absolute; padding: 8px 14px; border-radius: 12px; font-weight: 700; font-size: 14px; white-space: nowrap;
  background: var(--signal); color: var(--on-signal); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
  opacity: 0; pointer-events: none;
}
.callout-tag::before { content: ''; position: absolute; left: 22px; top: -6px; width: 12px; height: 12px; background: inherit; transform: rotate(45deg); border-radius: 2px; }
.ct-1 { left: 22%; top: 34%; }
.ct-2 { left: 53%; top: 36%; background: var(--mint); }
.ct-3 { left: 69%; top: 56%; background: var(--amber); }

/* ---------- 5 · drift ---------- */
.drift { padding: 90px 0; overflow: hidden; display: grid; gap: 18px; }
/* JS repeats each row's chips so it always spans the screen, and keeps it centred. */
.drift-row { display: flex; gap: 14px; width: max-content; will-change: transform; }
.chip {
  display: inline-flex; align-items: baseline; gap: 10px; padding: 14px 20px; border-radius: 16px; white-space: nowrap;
  border: 1px solid var(--line); background: rgba(20, 20, 21, 0.72); backdrop-filter: blur(10px); font-weight: 500;
}
.chip b { font: 800 18px var(--display); }
.chip i { font-style: normal; color: var(--dim); font-size: 14px; }
.chip.sub b { color: var(--aurora); }
.chip.in b { color: var(--mint); }
.chip.warn b { color: var(--amber); }

/* ---------- 6 · smart plan: small and tilted, it swings flat and comes closer over a floor
   of flowing money, then pulls savings and the essentials into itself. JS drives it all. ---------- */
.js .scene-plan { height: 470vh; }
.pl-flow {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none; perspective: 620px; perspective-origin: 50% 38%;
  -webkit-mask: linear-gradient(180deg, transparent 46%, #000 78%), linear-gradient(90deg, transparent 22%, #000 58%);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(180deg, transparent 46%, #000 78%), linear-gradient(90deg, transparent 22%, #000 58%);
  mask-composite: intersect;
}
.pl-floor {
  position: absolute; left: -70%; right: -70%; bottom: -14%; height: 150%; transform-origin: 50% 100%; transform: rotateX(70deg);
  display: grid; align-content: end; gap: 34px; padding-bottom: 40px; opacity: 0.55;
}
.pl-row { display: flex; gap: 20px; width: max-content; will-change: transform; }
.pl-row .chip { flex: none; backdrop-filter: none; background: rgba(20, 20, 21, 0.9); }
.pl-layout { position: relative; z-index: 1; height: 100%; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: 56px; align-items: center; padding-top: 64px; }
.plus-tag {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 24px; padding: 5px 13px 5px 11px; border-radius: 999px;
  border: 1px solid rgba(196, 122, 69, 0.42); background: rgba(196, 122, 69, 0.1); color: #e8c7a8; font-weight: 700; font-size: 13.5px;
}
.plus-tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--aurora); box-shadow: 0 0 12px var(--aurora); }
/* The sentence lights up a clause at a time, in step with the panel. */
.home .pl-lines { display: grid; gap: 2px; margin: 0 0 26px; font: 800 clamp(30px, 3.3vw, 48px)/1.08 var(--display); letter-spacing: -0.03em; }
.pl-line { position: relative; color: rgba(238, 232, 220, 0.14); transition: color 0.5s, translate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), text-shadow 0.5s; }
.pl-line::before {
  content: ''; position: absolute; left: -22px; top: 0.2em; bottom: 0.2em; width: 4px; border-radius: 4px; background: var(--signal);
  box-shadow: 0 0 14px var(--signal); opacity: 0; transition: opacity 0.4s;
}
.pl-line.done { color: rgba(183, 173, 156, 0.42); }
.pl-line.on { color: var(--ice); translate: 12px 0; text-shadow: 0 0 44px rgba(214, 168, 78, 0.32); }
.pl-line.on::before { opacity: 1; }
.pl-note { color: var(--mist); margin: 0; max-width: 470px; font-size: 16.5px; }

.pl-stage { position: relative; display: grid; place-items: center; perspective: 1400px; perspective-origin: 50% 40%; }
.pl-rig { position: relative; width: min(500px, 100%); margin: 0; padding: 26px 26px 20px; transform-style: preserve-3d; will-change: transform; }
.pl-glass {
  position: absolute; inset: 0; border-radius: 26px; border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #181716, #0e0d0c);
  box-shadow: 0 60px 130px -50px rgba(214, 168, 78, 0.55), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.pl-glass::before { content: ''; position: absolute; inset: -1px 14% auto; height: 1px; background: linear-gradient(90deg, transparent, var(--signal), transparent); }
.pl-rig > :not(.pl-glass) { position: relative; transform: translateZ(1px); }
.pd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.pd-label { display: block; color: var(--mist); font-size: 14px; font-weight: 700; }
.pd-day b { display: block; margin: 4px 0 6px; font: 800 clamp(46px, 5vw, 64px)/1 var(--display); letter-spacing: -0.035em; color: var(--mint); font-variant-numeric: tabular-nums; text-shadow: 0 0 50px rgba(143, 196, 110, 0.25); }
.pd-day b small { margin-left: 6px; font-size: 0.34em; letter-spacing: 0; color: var(--mist); text-shadow: none; }
.pd-until { color: var(--dim); font-size: 14px; }
.pd-chip { padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(143, 196, 110, 0.32); background: rgba(143, 196, 110, 0.12); color: var(--mint); font-size: 13px; font-weight: 700; white-space: nowrap; transition: opacity 0.4s, scale 0.4s cubic-bezier(0.3, 1.5, 0.5, 1); }
.js:not(.reduced) .pl-rig:not(.done) .pd-chip { opacity: 0; scale: 0.7; }
.pd-bar { display: flex; gap: 3px; height: 12px; margin: 20px 0 12px; border-radius: 999px; overflow: hidden; background: rgba(214, 168, 78, 0.06); }
.pd-bar i { flex: none; width: var(--w); min-width: 0; height: 100%; }
.s-bills { background: var(--signal); }
.s-subs { background: var(--aurora); }
.s-savings { background: #b8862f; }
.s-essentials { background: var(--amber); }
.s-free { background: var(--mint); }
.pd-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; }
.pd-legend li { display: flex; align-items: baseline; gap: 7px; color: var(--dim); font-size: 13px; }
.pd-legend li i { width: 8px; height: 8px; border-radius: 50%; align-self: center; }
.pd-legend li b { color: var(--ice); font: 800 15px var(--display); font-variant-numeric: tabular-nums; }
.pl-slots-title { margin: 18px 0 8px; color: var(--mist); font-size: 13.5px; font-weight: 700; }
.pl-slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; transform-style: preserve-3d; }
.pl-slot { position: relative; height: 54px; border-radius: 14px; border: 1px dashed rgba(214, 168, 78, 0.2); transform-style: preserve-3d; }
.pl-box {
  position: absolute; inset: -1px; display: grid; grid-template-columns: 9px minmax(0, 1fr); column-gap: 9px; align-content: center; padding: 0 12px;
  border-radius: 14px; border: 1px solid rgba(245, 181, 61, 0.5); background: linear-gradient(180deg, rgba(44, 34, 14, 0.97), rgba(26, 21, 11, 0.97));
  box-shadow: 0 22px 44px -20px rgba(0, 0, 0, 0.95); will-change: transform;
}
.pl-box i { grid-row: 1 / 3; align-self: center; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.pl-box span { grid-column: 2; color: var(--mist); font-size: 12.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-box b { grid-column: 2; font: 800 16px/1.15 var(--display); font-variant-numeric: tabular-nums; }
.pl-box.b-savings { border-color: rgba(184, 134, 47, 0.6); background: linear-gradient(180deg, rgba(16, 30, 62, 0.97), rgba(10, 20, 44, 0.97)); }
.pl-box.b-savings i { background: #b8862f; box-shadow: 0 0 10px #b8862f; }
.pl-box.landed { animation: pl-land 0.6s ease-out; }
@keyframes pl-land { 35% { box-shadow: 0 0 0 2px rgba(245, 181, 61, 0.8), 0 0 34px rgba(245, 181, 61, 0.7); } }
.pd-changes { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.pd-changes > p { margin: 0 0 8px; color: var(--mist); font-size: 13.5px; font-weight: 700; }
.pd-changes ul { list-style: none; display: grid; gap: 7px; margin: 0; padding: 0; }
.pd-changes li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 13px; border-radius: 13px; border: 1px solid var(--line); background: rgba(214, 168, 78, 0.035); }
.pd-changes li span { display: grid; gap: 1px; min-width: 0; }
.pd-changes li b { font-weight: 700; font-size: 14.5px; }
.pd-changes li em { font-style: normal; color: var(--dim); font-size: 13px; }
.pd-changes li strong { font: 800 15px var(--display); white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--mint); }

/* ---------- 7 · small things: a ring of twelve that turns with the scroll ----------
   JS places the tiles, turns the ring, and gives each tile --t (0-1: how far its moment in
   front has gone) and --f (how squarely it faces you). Each object below is drawn from those. */
.js .scene-features { height: 760vh; }
.ft-head { position: relative; z-index: 2; padding-top: 92px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.ft-head h2 { margin: 0; max-width: 600px; }
.ft-progress { flex: none; width: 200px; height: 2px; margin-bottom: 18px; border-radius: 2px; background: var(--line); overflow: hidden; }
.ft-progress i { display: block; width: 100%; height: 100%; background: var(--signal); box-shadow: 0 0 10px var(--signal); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.ft-stage { position: absolute; inset: 0; display: grid; place-items: center; padding-top: 110px; perspective: 1600px; perspective-origin: 50% 40%; }
.ft-ring { position: relative; width: 320px; height: 384px; transform-style: preserve-3d; will-change: transform; }
.ft {
  --t: 0; --f: 0;
  position: absolute; inset: 0; display: flex; flex-direction: column; padding: 22px 22px 24px; border-radius: 24px;
  border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(28, 27, 25, 0.96), rgba(14, 14, 15, 0.95));
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.95); backface-visibility: hidden; transition: border-color 0.4s, box-shadow 0.4s;
}
.ft.front { border-color: rgba(214, 168, 78, 0.55); box-shadow: 0 0 0 1px rgba(214, 168, 78, 0.18), 0 50px 110px -40px rgba(214, 168, 78, 0.5); }
.ft h3 { margin: auto 0 8px; font: 700 21px/1.2 var(--display); }
.ft p { margin: 0; color: var(--mist); font-size: 14.5px; line-height: 1.5; }
.ft-obj { position: relative; height: 170px; display: grid; place-items: center; }

/* reminders: the bell rings while it's in front; the reminder slides up with the scroll */
.o-bell .bell { width: 76px; height: 76px; fill: none; stroke: var(--amber); stroke-width: 3; stroke-linejoin: round; transform-origin: 50% 12%; filter: drop-shadow(0 0 14px rgba(245, 181, 61, 0.5)); }
.front .o-bell .bell { animation: ft-ring 1.2s ease-in-out infinite; }
@keyframes ft-ring { 0%, 62%, 100% { rotate: 0deg; } 10% { rotate: 17deg; } 20% { rotate: -15deg; } 30% { rotate: 10deg; } 40% { rotate: -6deg; } 50% { rotate: 3deg; } }
.o-toast {
  position: absolute; left: 50%; bottom: 2px; translate: -50% calc((1 - var(--t)) * 18px); opacity: var(--t); white-space: nowrap;
  padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(22, 22, 23, 0.96); color: var(--mist); font-size: 12.5px;
}
.o-toast b { color: var(--ice); }
/* trials: the price tag swings and the price goes up */
.o-tag .tag {
  position: relative; display: grid; place-items: center; width: 136px; height: 62px; border-radius: 14px; transform-origin: 14px 50%;
  border: 1px solid rgba(196, 122, 69, 0.55); background: linear-gradient(135deg, #2b2418, #1a1610); box-shadow: 0 20px 40px -20px #000;
  rotate: calc(-16deg + var(--t) * 22deg);
}
.o-tag .tag i { position: absolute; left: 10px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; background: var(--void); border: 1px solid rgba(196, 122, 69, 0.6); }
.o-tag s, .o-tag .tag b { grid-area: 1 / 1; margin-left: 14px; font: 800 25px var(--display); text-decoration: none; }
.o-tag s { color: var(--ice); opacity: clamp(0, (0.55 - var(--t)) * 8, 1); translate: 0 calc(var(--t) * -16px); }
.o-tag .tag b { color: #ff8a9b; opacity: clamp(0, (var(--t) - 0.45) * 8, 1); translate: 0 calc((1 - var(--t)) * 16px); }
.o-badge { position: absolute; bottom: 4px; padding: 4px 11px; border-radius: 999px; background: rgba(245, 181, 61, 0.14); border: 1px solid rgba(245, 181, 61, 0.4); color: var(--amber); font-size: 12.5px; font-weight: 700; opacity: var(--t); }
/* budgets: the ring fills to what's spent */
.o-ring svg { width: 116px; height: 116px; rotate: -90deg; }
.o-ring circle { fill: none; stroke-width: 9; }
.o-ring .track { stroke: rgba(214, 168, 78, 0.12); }
.o-ring .fill { stroke: var(--mint); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--t) * 72); filter: drop-shadow(0 0 8px rgba(143, 196, 110, 0.5)); }
.o-ring > span { position: absolute; color: var(--mist); font-size: 12px; text-align: center; }
.o-ring > span b { display: block; color: var(--ice); font: 800 22px/1.1 var(--display); }
/* goals: coins drop into the jar and it fills */
.o-jar .jar { position: relative; width: 86px; height: 106px; overflow: hidden; border: 3px solid rgba(238, 232, 220, 0.5); border-top-width: 7px; border-radius: 14px 14px 26px 26px; background: rgba(214, 168, 78, 0.04); }
.o-jar .fill { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--t) * 74%); background: linear-gradient(180deg, rgba(143, 196, 110, 0.85), rgba(127, 184, 154, 0.55)); box-shadow: 0 -2px 12px rgba(143, 196, 110, 0.6); }
.o-jar .coin { position: absolute; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe7a3, #e2b04a 60%, #a8771f); }
.o-jar .c1 { top: calc(-26px + clamp(0, var(--t) * 2, 1) * 66px); left: 38%; }
.o-jar .c2 { top: calc(-26px + clamp(0, var(--t) * 2 - 0.5, 1) * 58px); left: 62%; }
.o-jar .c3 { top: calc(-26px + clamp(0, var(--t) * 2 - 1, 1) * 48px); }
.o-goal { position: absolute; bottom: 0; color: var(--mist); font-size: 12.5px; font-weight: 600; }
/* accounts and cards: the stack fans out */
.o-cards .k { position: absolute; width: 124px; height: 78px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.18); box-shadow: 0 20px 40px -18px #000; transform-origin: 50% 130%; }
.o-cards .k::before { content: ''; position: absolute; left: 12px; top: 22px; width: 20px; height: 15px; border-radius: 4px; background: linear-gradient(135deg, #f6dc94, #b98a3c); }
.o-cards .k1 { background: linear-gradient(135deg, #1b1a18, #2e2416); rotate: calc(var(--t) * -18deg); translate: calc(var(--t) * -30px) calc(var(--t) * 6px); }
.o-cards .k2 { background: linear-gradient(135deg, #221a10, #1c1b19); translate: 0 calc(var(--t) * -8px); }
.o-cards .k3 { background: linear-gradient(135deg, #2a170e, #5c2414); rotate: calc(var(--t) * 18deg); translate: calc(var(--t) * 30px) calc(var(--t) * 6px); }
/* statements: the page drops into the tray, its lines filling in */
.o-doc .doc { position: relative; z-index: 1; display: grid; gap: 9px; align-content: start; width: 84px; height: 104px; padding: 16px 12px; border-radius: 8px; background: #eee8dc; box-shadow: 0 16px 30px -14px #000; translate: 0 calc(var(--t) * 30px - 16px); }
.o-doc .doc i { height: 6px; border-radius: 3px; background: #a39886; transform-origin: 0 50%; }
.o-doc .doc i:nth-child(1) { --n: 0; width: 80%; } .o-doc .doc i:nth-child(2) { --n: 1; } .o-doc .doc i:nth-child(3) { --n: 2; width: 66%; }
.o-doc .doc i:nth-child(4) { --n: 3; } .o-doc .doc i:nth-child(5) { --n: 4; width: 50%; }
.o-doc .doc i { scale: clamp(0, var(--t) * 6 - var(--n), 1) 1; }
.o-doc .tray { position: absolute; z-index: 2; bottom: 8px; width: 132px; height: 36px; border: 2px solid var(--line-strong); border-top: 0; border-radius: 0 0 14px 14px; background: linear-gradient(180deg, rgba(20, 20, 21, 0.4), rgba(20, 20, 21, 0.95)); }
/* loans: each payment fills its bar, and the bars get shorter as the balance goes down */
.o-steps { display: flex; align-items: flex-end; gap: 9px; height: 112px; }
.o-steps i { position: relative; width: 16px; height: calc(104px - var(--n) * 14px); border-radius: 5px; overflow: hidden; background: rgba(214, 168, 78, 0.1); }
.o-steps i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--signal), #b8862f); transform-origin: 50% 100%; transform: scaleY(clamp(0, var(--t) * 6.4 - var(--n), 1)); }
/* net worth: the line draws itself */
.o-graph svg { width: 176px; height: 104px; overflow: visible; }
.o-graph .line { fill: none; stroke: var(--mint); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--t) * 100); filter: drop-shadow(0 0 6px rgba(143, 196, 110, 0.6)); }
.o-graph .area { fill: rgba(143, 196, 110, 0.13); opacity: var(--t); }
/* calendar: the page turns over to the next date */
.o-cal .cal { position: relative; width: 104px; height: 112px; perspective: 500px; transform-style: preserve-3d; }
.o-cal .page { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; border-radius: 14px; border-top: 20px solid var(--signal); background: #eee8dc; color: #151516; backface-visibility: hidden; box-shadow: 0 16px 30px -14px #000; }
.o-cal small { color: #4d473e; font-weight: 700; font-size: 13px; }
.o-cal .page b { font: 800 44px/1 var(--display); }
.o-cal .top { transform-origin: 50% 0; transform: rotateX(calc(var(--t) * 175deg)); }
/* currency: the coin spins from dollars to euros */
.o-coin .coin { position: relative; width: 98px; height: 98px; transform-style: preserve-3d; transform: rotateY(calc(var(--t) * 540deg)); }
.o-coin .coin b {
  position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; backface-visibility: hidden; font: 800 46px var(--display);
  color: #4a3510; background: radial-gradient(circle at 35% 30%, #fff1c2, #e8be5a 55%, #b3802a); box-shadow: inset 0 0 0 5px rgba(120, 80, 20, 0.35), 0 16px 34px -14px #000;
}
.o-coin .coin .back { transform: rotateY(180deg); color: #34302a; background: radial-gradient(circle at 35% 30%, #f8f4ec, #c7bdac 55%, #8c8273); box-shadow: inset 0 0 0 5px rgba(56, 52, 46, 0.3), 0 16px 34px -14px #000; }
/* rules and splits: one receipt comes apart into two categories */
.o-split { display: flex; }
.o-split .half { display: grid; place-content: center; gap: 2px; width: 72px; height: 98px; background: #eee8dc; color: #151516; text-align: center; box-shadow: 0 16px 30px -14px #000; }
.o-split small { color: #4d473e; font-size: 11px; font-weight: 700; }
.o-split .half b { font: 800 20px var(--display); }
.o-split .l { border-radius: 10px 0 0 10px; border-right: 2px dashed #b3a690; translate: calc(var(--t) * -14px) 0; rotate: calc(var(--t) * -8deg); }
.o-split .r { border-radius: 0 10px 10px 0; translate: calc(var(--t) * 14px) 0; rotate: calc(var(--t) * 8deg); }
/* languages: hello, in each of them */
.o-words .win { height: 56px; overflow: hidden; -webkit-mask: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.o-words .list { display: grid; translate: 0 calc(var(--w, 0) * -56px); }
.o-words .list b { display: grid; place-items: center; height: 56px; font: 800 38px var(--display); }

/* ---------- 8 · customize: the card stays on screen while the look changes; at the end a pen signs it ---------- */
.scene-custom { --cz-accent: var(--signal); --fx-glass: 0; --fx-glow: 0; --fx-grain: 0; }
.cz-layout { position: relative; z-index: 1; height: 100%; display: grid; grid-template-columns: 112px minmax(0, 500px) 1fr; align-items: center; gap: 0 36px; padding: 64px 0 0; }
.cz-rail { list-style: none; margin: 0; padding: 0 0 0 18px; display: grid; gap: 18px; position: relative; transition: opacity 0.5s; }
.cz-rail::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--line); }
.cz-rail li { position: relative; color: var(--dim); font-weight: 700; font-size: 14px; letter-spacing: 0.02em; transition: color 0.35s; }
.cz-rail li::before { content: ''; position: absolute; left: -18px; top: 50%; width: 2px; height: 0; translate: 0 -50%; border-radius: 2px; background: var(--cz-accent); transition: height 0.35s, background 0.35s; }
.cz-rail li.done { color: var(--mist); }
.cz-rail li.on { color: var(--ice); }
.cz-rail li.on::before { height: 22px; }
.final .cz-rail { opacity: 0; }

.cz-steps { display: grid; }
.cz-step {
  grid-area: 1 / 1; align-self: center; opacity: 0; translate: 0 26px; visibility: hidden;
  transition: opacity 0.5s, translate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s 0.6s;
}
.cz-step.on { opacity: 1; translate: 0 0; visibility: visible; transition-delay: 0s; }
.cz-step > p { color: var(--mist); margin: 0; }
.cz-step .cz-kicker { margin: 0 0 12px; color: var(--cz-accent); font: 700 13px var(--font); letter-spacing: 0.16em; text-transform: uppercase; transition: color 0.4s; }
.cz-final .btn { margin-top: 26px; }
.cz-get { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.cz-final .cz-get .btn { margin-top: 0; }
.cz-private { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin: 24px 0 0; }
.cz-private div { padding-top: 12px; border-top: 1px solid var(--line); }
.cz-private dt { font: 700 17px/1.25 var(--display); margin-bottom: 4px; }
.cz-private dd { margin: 0; color: var(--mist); font-size: 14.5px; line-height: 1.45; }

.cz-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 24px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(20, 20, 21, 0.7); }
.cz-pills span { padding: 7px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--mist); transition: background 0.35s, color 0.35s; }
.cz-pills span.on { background: var(--ice); color: #0e0e0f; }

.cz-swatches { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.cz-swatches i { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--void), 0 0 0 3px transparent; transition: box-shadow 0.3s, scale 0.3s; }
.cz-swatches i.on { scale: 1.15; box-shadow: 0 0 0 3px var(--void), 0 0 0 5px var(--c), 0 0 22px var(--c); }

.cz-toggles { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.cz-toggles li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(20, 20, 21, 0.7); font-weight: 700; font-size: 14px; color: var(--mist); transition: color 0.3s, border-color 0.3s; }
.cz-toggles li::before { content: ''; flex: none; width: 30px; height: 18px; border-radius: 999px; background: rgba(183, 173, 156, 0.25) radial-gradient(circle 6px at 9px 50%, var(--mist) 98%, transparent) no-repeat; transition: background 0.3s; }
.cz-toggles li.on { color: var(--ice); border-color: var(--line-strong); }
.cz-toggles li.on::before { background: var(--cz-accent) radial-gradient(circle 6px at 21px 50%, #0e0e0f 98%, transparent) no-repeat; }

/* The depth step shows each effect as its switch turns on. JS sets --fx-glass, --fx-glow
   and --fx-grain (0-1) from scroll, and tilts .cz-depth toward the cursor once 3D tilt is on. */
@keyframes tog-pop { 40% { scale: 1.1; } }
.cz-toggles li.on { animation: tog-pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.cz-toggles li.latest { border-color: var(--cz-accent); }
.cz-toggles li.on::before { box-shadow: 0 0 calc(var(--fx-glow) * 16px) var(--cz-accent); }
.cz-depth > .cz-note { margin-top: 18px; min-height: 1.6em; color: var(--ice); font-weight: 500; font-size: 15.5px; }
.cz-depth { position: relative; isolation: isolate; transform-origin: 40% 50%; }
.cz-depth h2 { text-shadow: 0 0 calc(var(--fx-glow) * 34px) rgb(125 227 255 / calc(var(--fx-glow) * 0.55)); }
/* Glass: a frosted panel forms behind the text; the chips rising behind it show the blur. */
.cz-depth::before, .cz-depth::after { content: ''; position: absolute; inset: -34px -38px; z-index: -1; border-radius: 28px; pointer-events: none; }
.cz-depth::before {
  background: rgb(150 185 230 / calc(var(--fx-glass) * 0.08));
  border: 1px solid rgb(125 227 255 / calc(var(--fx-glass) * 0.22));
  backdrop-filter: blur(calc(var(--fx-glass) * 22px)) saturate(calc(100% + var(--fx-glass) * 50%));
  box-shadow: 0 40px 90px -40px rgb(0 0 0 / calc(var(--fx-glass) * 0.9));
}
/* Glow: light edges and a halo around the panel. */
.cz-depth::after { opacity: var(--fx-glow); box-shadow: inset 0 0 0 1px var(--cz-accent), 0 0 70px -10px var(--cz-accent); }
.cz-pass { position: absolute; inset: -34px -38px; z-index: -2; opacity: var(--fx-glass); pointer-events: none; }
.cz-pass .chip { position: absolute; top: 0; backdrop-filter: none; will-change: transform; background: rgb(125 227 255 / 0.16); border-color: var(--line-strong); }
.cz-pass .chip.sub { background: rgb(169 139 255 / 0.24); }
.cz-pass .chip.in { background: rgb(74 222 128 / 0.2); }
.cz-pass .chip:nth-child(1) { left: 4%; }
.cz-pass .chip:nth-child(2) { left: 50%; }
.cz-pass .chip:nth-child(3) { left: 24%; }
/* Soft glow behind everything (the app's other backdrop), shown with the Glow switch. */
.cz-bloom {
  position: absolute; inset: 0; pointer-events: none; opacity: var(--fx-glow);
  background: radial-gradient(45% 55% at 72% 50%, rgb(125 227 255 / 0.22), transparent 70%), radial-gradient(40% 50% at 28% 55%, rgb(169 139 255 / 0.2), transparent 70%);
}
/* Film grain over the whole screen; the tile is drawn by JS and jitters while it's on. */
.cz-grain { position: absolute; inset: -120px; z-index: 2; pointer-events: none; opacity: calc(var(--fx-grain) * 0.5); background-size: 180px; animation: grain 0.5s steps(5) infinite paused; }
.grainy .cz-grain { animation-play-state: running; }
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-60px, 40px); } 40% { transform: translate(50px, -70px); }
  60% { transform: translate(-30px, -40px); } 80% { transform: translate(70px, 60px); } 100% { transform: translate(0, 0); }
}

/* A small dashboard that rearranges itself: 0 = default, 1 = rearranged with a new panel, 2 = focus. */
.cz-board { position: relative; margin-top: 24px; width: min(440px, 100%); aspect-ratio: 16 / 10; }
.bp {
  position: absolute; display: block; padding: 8px 10px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: rgba(14, 22, 38, 0.85); color: var(--mist); font: 700 12px var(--font);
  transition: left 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    height 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s, background 0.5s, border-color 0.5s, box-shadow 0.5s;
}
.bp::after { content: ''; position: absolute; left: 10px; right: 30%; bottom: 10px; height: 6px; border-radius: 3px; background: rgba(183, 173, 156, 0.18); }
.bp-3::after { display: none; }
.bp svg { position: absolute; left: 10px; bottom: 10px; width: calc(100% - 20px); height: 50%; overflow: visible; }
.bp polyline { fill: none; stroke: var(--cz-accent); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.bp-1 { left: 0; top: 0; width: 64%; height: 44%; }
.bp-2 { left: 66%; top: 0; width: 34%; height: 44%; }
.bp-3 { left: 0; top: 47%; width: 64%; height: 53%; }
.bp-4 { left: 66%; top: 47%; width: 34%; height: 53%; }
.bp-5 { left: 66%; top: 100%; width: 34%; height: 0; opacity: 0; }
.cz-board[data-l='1'] .bp-3, .cz-board[data-l='2'] .bp-3 { left: 0; top: 0; width: 100%; height: 40%; }
.cz-board[data-l='1'] .bp-1, .cz-board[data-l='2'] .bp-1 { left: 0; top: 43%; width: 49%; height: 26%; }
.cz-board[data-l='1'] .bp-2, .cz-board[data-l='2'] .bp-2 { left: 51%; top: 43%; width: 49%; height: 26%; background: rgba(245, 181, 61, 0.14); border-color: rgba(245, 181, 61, 0.45); }
.cz-board[data-l='1'] .bp-4, .cz-board[data-l='2'] .bp-4 { left: 0; top: 72%; width: 49%; height: 28%; }
.cz-board[data-l='1'] .bp-5, .cz-board[data-l='2'] .bp-5 { left: 51%; top: 72%; width: 49%; height: 28%; opacity: 1; background: transparent; border-color: var(--line-strong); }
.cz-board[data-l='2'] .bp { opacity: 0.25; }
.cz-board[data-l='2'] .bp-3 {
  opacity: 1; height: 100%; z-index: 1; color: var(--ice); border-color: var(--cz-accent);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.9), 0 0 40px -12px var(--cz-accent);
}

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .js .scene-forecast { height: 300vh; }
  .fc-layout { padding-top: 80px; }
  .fc-copy { grid-template-columns: 1fr; }
  .fc-copy > p { font-size: 15.5px; }
  .fc-stats { gap: 10px; }
  .fc-stats div { padding-left: 10px; }
  .fc-stats dd span { font-size: 22px; }
  .fc-stats small { display: none; }
  .inbox-layout { padding-top: 80px; }
  .inbox-lead { display: none; }
  .callout-tag { font-size: 10.5px; padding: 4px 8px; white-space: normal; max-width: 34%; line-height: 1.25; }
  .callout-tag::before { display: none; }
  .ct-1 { left: 3%; top: 36%; }
  .ct-2 { left: 38%; top: 40%; }
  .ct-3 { left: auto; right: 7%; top: 62%; }
  .js .scene-custom { height: 875vh; }
  /* The card sits up top; the steps share the lower half (each one names itself). */
  .cz-layout { grid-template-columns: minmax(0, 1fr); align-items: end; padding: 0 0 36px; }
  .cz-rail { display: none; }
  .cz-steps { align-self: end; }
  .cz-step { align-self: end; }
  .cz-step > p { font-size: 15.5px; }
  .cz-step .cz-kicker { margin-bottom: 8px; }
  .cz-pills, .cz-swatches, .cz-toggles, .cz-board { margin-top: 16px; }
  .cz-swatches i { width: 26px; height: 26px; }
  .cz-pills span { padding: 6px 12px; font-size: 13px; }
  .cz-board { width: min(300px, 100%); }
  .cz-depth::before, .cz-depth::after, .cz-pass { inset: -18px -14px; border-radius: 20px; }
  .cz-pass .chip { padding: 10px 14px; font-size: 14px; }
  .cz-depth > .cz-note { margin-top: 12px; font-size: 14.5px; }
  /* smart plan: the sentence above, the panel (scaled by JS to fit) below */
  .pl-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 14px; align-items: start; padding-top: 76px; }
  .pl-copy .plus-tag { margin-bottom: 12px; }
  .home .pl-lines { font-size: clamp(22px, 6.4vw, 30px); margin: 0; }
  .pl-note { display: none; }
  .pl-stage { align-self: stretch; place-items: start center; }
  .pl-rig { width: 100%; padding: 18px 16px 14px; transform-origin: 50% 0; }
  .pl-box { padding: 0 9px; column-gap: 7px; }
  .pl-box b { font-size: 15px; }
  /* small things: a drum that turns upward instead of a ring */
  /* The heading covers the tile turning away above it. */
  .ft-head { padding-top: 80px; padding-bottom: 28px; background: linear-gradient(180deg, var(--void) 78%, transparent); }
  .ft-progress { display: none; }
  .ft-stage { padding-top: 150px; }
  .ft-ring { width: min(300px, 82vw); height: 300px; }
  .ft-obj { height: 120px; }
  .ft h3 { font-size: 18px; }
  .ft p { font-size: 13.5px; }
  .cz-private { grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 14px; }
  .cz-private div { padding-top: 8px; }
  .cz-private dt { font-size: 14.5px; }
  .cz-private dd { display: none; }
  .no-gl .gl-fallback { position: static; translate: none; width: 100%; margin-top: 16px; }
}

/* ---------- reduced motion / no JS: a normal page ---------- */
.reduced .scene, html:not(.js) .scene { height: auto !important; }
.reduced .scene .sticky, html:not(.js) .scene .sticky { position: relative; height: auto; min-height: 100vh; }
.reduced .hero-copy, html:not(.js) .hero-copy { position: relative; inset: auto; padding: 46vh 16px 60px; }
.reduced .hero-line, .reduced .scroll-hint { display: none; }
.reduced .inbox-heads .ih { transition: none; }
.reduced .stage { min-height: 460px; }
.reduced .reveal-title, html:not(.js) .reveal-title { position: relative; top: auto; padding-top: 96px; }
.reduced .reveal-wrap, html:not(.js) .reveal-wrap { position: relative; inset: auto; padding: 24px 16px 80px; }
.reduced .inbox-layout, .reduced .fc-layout { min-height: 100vh; }
.reduced .scroll-hint i { animation: none; }
.reduced .cz-layout, html:not(.js) .cz-layout { min-height: 100vh; padding: 110px 0 90px; align-items: start; }
.reduced .cz-rail, html:not(.js) .cz-rail { display: none; }
/* With the rail gone, the steps keep their own column. */
@media (min-width: 901px) {
  .reduced .cz-steps, html:not(.js) .cz-steps { grid-column: 2; }
}
.reduced .cz-steps, html:not(.js) .cz-steps { gap: 64px; }
.reduced .cz-step, html:not(.js) .cz-step { grid-area: auto; opacity: 1; translate: none; visibility: visible; transition: none; }
.reduced .cz-grain, html:not(.js) .cz-grain, html:not(.js) .cz-note { display: none; }
.reduced .cz-pass { display: none; }
/* smart plan and small things, settled and in normal flow */
.reduced .pl-layout, html:not(.js) .pl-layout { min-height: 100vh; padding: 110px 0 90px; }
.reduced .pl-line, html:not(.js) .pl-line { color: var(--ice); }
.reduced .pl-flow, html:not(.js) .pl-flow { display: none; }
.reduced .ft-stage, html:not(.js) .ft-stage { position: relative; inset: auto; display: block; padding: 34px 0 100px; perspective: none; }
.reduced .ft-ring, html:not(.js) .ft-ring {
  width: min(1180px, 100% - 32px); height: auto; margin-inline: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; transform: none !important;
}
.reduced .ft, html:not(.js) .ft { position: relative; inset: auto; min-height: 330px; --t: 1 !important; --f: 1; transform: none !important; opacity: 1 !important; }
.reduced .ft-head, html:not(.js) .ft-head { padding-top: 96px; }
@media (max-width: 900px) {
  .reduced .ft-ring, html:not(.js) .ft-ring { grid-template-columns: minmax(0, 1fr); }
}
