/* SpendyWay — your money, with a plan. */

@font-face {
  font-family: "Geist";
  src: url("assets/fonts/geist-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
/* Arial sized to Geist's measured metrics, so the swap barely moves text */
@font-face {
  font-family: "Geist Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("Helvetica");
  size-adjust: 104.17%;
  ascent-override: 96.47%;
  descent-override: 28.32%;
  line-gap-override: 0%;
}

:root {
  --bg: #f5f5f7;
  --surface: #fff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: rgb(0 0 0 / .1);
  --track: #e8e8ed;
  /* The app icon's teal is the one accent */
  --green: #116b5e;
  --green-hover: #0c594e;
  --green-tint: #e2f0ec;
  --ring: #34d3b0;
  --mint: #c6f4d5;
  --navy: #101a2e;

  --sans: "Geist", "Geist Fallback", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --hair: 1px;

  /* Elevation: one light from above; the more important a surface, the higher it sits */
  --e-1: 0 1px 1px rgb(0 0 0 / .03), 0 8px 20px -10px rgb(0 0 0 / .1), 0 30px 60px -30px rgb(0 0 0 / .12);
  --e-2: 0 1px 2px rgb(0 0 0 / .06), 0 12px 28px -12px rgb(0 0 0 / .2), 0 40px 70px -40px rgb(0 0 0 / .2);
  --e-thumb: 0 1px 2px rgb(0 0 0 / .1), 0 3px 8px -2px rgb(0 0 0 / .12);
  --e-sheet: 0 30px 60px -20px rgb(0 0 0 / .25);

  --wrap: 1080px;
  --bar-h: 52px;
}
@media (min-resolution: 2dppx) {
  :root { --hair: .5px; }
}

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

html {
  scroll-padding-top: calc(var(--bar-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.47 var(--sans);
  letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, figure, ul, ol, dl, dd, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
img, svg, canvas { display: block; }
/* The hidden attribute always wins over a component's display */
[hidden] { display: none !important; }

::selection { background: var(--mint); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: .875rem;
  transform: translateY(-160%);
  transition: transform .25s var(--ease);
}
.skip:focus { transform: none; }

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

/* ---------- Icons: Phosphor, two-tone inline and filled on tiles ---------- */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: currentColor;
}

/* An app-icon tile: solid green, white glyph, a lit top edge. Every block hangs from one */
.chip {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), inset 0 -1px 0 rgb(0 0 0 / .12), 0 1px 2px rgb(0 0 0 / .1), 0 6px 14px -8px rgb(0 0 0 / .35);
}
.chip .icon { width: 22px; height: 22px; }
.chip-large { width: 52px; height: 52px; border-radius: 14px; }
.chip-large .icon { width: 28px; height: 28px; }
.chip-on-dark { box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), inset 0 -1px 0 rgb(0 0 0 / .2), 0 0 0 1px rgb(255 255 255 / .06), 0 8px 18px -10px rgb(0 0 0 / .8); }

/* ---------- Nav: a translucent layer the page scrolls under ---------- */

.bar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--bar-h);
}
.bar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(245 245 247 / .78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: var(--hair) solid var(--line);
}

.bar-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--wrap), 100% - 44px);
  height: 100%;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.025em;
}
.brand-mark { width: 28px; height: 28px; flex: none; border-radius: 7px; box-shadow: 0 1px 2px rgb(0 0 0 / .12); }

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: .875rem;
}
.nav a { color: rgb(29 29 31 / .8); transition: color .2s ease; }
.nav a:hover { color: var(--ink); }
.nav .nav-cta {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 500;
  transition: background-color .2s ease, transform .16s var(--ease);
}
.nav .nav-cta:hover { background: var(--green-hover); color: #fff; }
.nav .nav-cta:active { transform: scale(.96); transition-duration: .06s; }

.menu-toggle { display: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  font-size: 1.0625rem;
  font-weight: 500;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, transform .18s var(--ease), opacity .2s ease;
}
/* Feedback on press, not on release */
.btn:active { transform: scale(.97); transition-duration: .06s; }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.btn > svg:not(.icon) { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.btn .icon { width: 20px; height: 20px; transition: transform .25s var(--ease); }
.btn:hover .icon { transform: translateX(3px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-hover); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #000; }
.btn-mint { background: var(--mint); color: var(--navy); }
.btn-mint:hover { background: #dcfae6; }
.btn-large { height: 56px; padding: 0 30px; font-size: 1.1875rem; }

.more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 1.0625rem;
}
.more svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.more:hover { text-decoration: underline; text-underline-offset: .2em; }
.more:hover svg { transform: translateX(2px); }

.btn-quiet {
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--green);
  font-size: 1rem;
  cursor: pointer;
}
.btn-quiet:hover { text-decoration: underline; text-underline-offset: .2em; }

/* ---------- Type ---------- */

h1 {
  font-size: clamp(3rem, 1.5rem + 5vw, 5.5rem);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -.04em;
}
h2 {
  font-size: clamp(2.25rem, 1.35rem + 3vw, 4rem);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -.036em;
  text-wrap: balance;
}
h3 {
  font-size: clamp(1.625rem, 1.25rem + 1.1vw, 2.25rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -.028em;
}
.lede {
  color: var(--ink-2);
  font-size: clamp(1.1875rem, 1rem + .6vw, 1.5rem);
  line-height: 1.38;
  letter-spacing: -.018em;
  text-wrap: pretty;
}
.fine {
  color: var(--ink-3);
  font-size: .8125rem;
  line-height: 1.45;
  letter-spacing: -.003em;
  text-wrap: pretty;
}

/* ---------- The tour: hero and app walkthrough in one pinned scene ---------- */

.tour { position: relative; }
.js .tour { height: 620vh; }
.tour-sticky {
  position: sticky;
  top: var(--bar-h);
  height: calc(100vh - var(--bar-h));
  height: calc(100svh - var(--bar-h));
  overflow: hidden;
}

.stage {
  position: absolute;
  inset: 0;
  touch-action: pan-y;
}
/* The poster is the first paint; the live scene fades in over it, pixel for pixel */
.poster {
  position: absolute;
  top: 0;
  left: 50%;
  height: 100%;
  width: auto;
  aspect-ratio: 1;
  transform: translate(calc(-50% + var(--shift-x, 0px)), var(--shift, 34vh));
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease;
}
/* Wide screens: the headline takes the left column and the phone starts on the right */
.wide-hero .poster { --shift: 0px; --shift-x: calc(47px + 16.8vh); }
.wide-hero .hero-copy {
  top: 50%;
  left: max(22px, calc(50% - 560px));
  width: min(540px, 44vw);
  text-align: left;
  transform: translate(0, calc(-50% + var(--lift, 0px)));
}
.wide-hero .hero-copy .lede { margin-inline: 0; text-wrap: pretty; }
.wide-hero .hero-copy .actions,
.wide-hero .hero-copy .availability { justify-content: flex-start; }
.poster.is-active { opacity: 1; }
.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: grab;
  transition: opacity .6s ease;
}
.stage.is-live canvas { opacity: 1; }
.stage.is-live .poster { opacity: 0; transition-duration: .6s; }
.stage.is-grabbing canvas { cursor: grabbing; }

.hero-copy {
  position: absolute;
  top: clamp(28px, 6.5vh, 80px);
  left: 50%;
  z-index: 3;
  width: min(900px, 100% - 44px);
  text-align: center;
  opacity: var(--copy, 1);
  transform: translate(-50%, var(--lift, 0px));
}
.hero-copy.is-gone { visibility: hidden; }
.hero-copy .lede { max-width: 34em; margin: 18px auto 0; text-wrap: balance; }
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 28px;
  margin-top: 30px;
}
.availability {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--ink-3);
  font-size: .875rem;
}
.availability svg { width: 15px; height: 15px; flex: none; fill: currentColor; }

/* Leader line: from the card to the highlight on the phone, redrawn every frame */
.tour-line {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  opacity: 0;
}
.tour-line path { fill: none; stroke: var(--green); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 2 5; }
.line-dot { fill: var(--ring); stroke: #fff; stroke-width: 3; }
.line-end { fill: var(--green); }

.tour-steps { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.callout {
  --dx: 0px;
  --dy: 0px;
  position: absolute;
  top: 50%;
  display: flex;
  gap: 16px;
  width: min(360px, 31vw);
  padding: 20px 22px 22px;
  border: var(--hair) solid var(--line);
  border-radius: 24px;
  background: rgb(255 255 255 / .9);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: var(--e-2);
  opacity: 0;
  transform: translate(var(--dx), calc(-50% + var(--dy)));
  transition: opacity .3s ease, transform .55s var(--ease);
}
.callout[data-side="left"] { left: max(22px, calc(50% - 560px)); --dx: -18px; }
.callout[data-side="right"] { right: max(22px, calc(50% - 560px)); --dx: 18px; }
.callout.is-active { --dx: 0px; opacity: 1; pointer-events: auto; }
.callout h3 { font-size: 1.25rem; font-weight: 650; line-height: 1.2; letter-spacing: -.022em; }
.callout p { margin-top: 6px; color: var(--ink-2); font-size: .9375rem; line-height: 1.45; text-wrap: pretty; }

/* Portrait stages: the card sits below the phone */
.tour.is-compact .callout {
  top: auto;
  right: 14px;
  bottom: 44px;
  left: 14px;
  width: auto;
  --dx: 0px;
  --dy: 14px;
  transform: translateY(var(--dy));
}
.tour.is-compact .callout.is-active { --dy: 0px; }

/* One frosted bar: where you are in the tour, and what you are looking at */
.tour-bar {
  position: absolute;
  bottom: 22px;
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 28px);
  padding: 9px 16px 9px 14px;
  border: var(--hair) solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / .86);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: var(--e-thumb);
  color: var(--ink-2);
  font-size: .75rem;
  white-space: nowrap;
  transform: translateX(-50%);
  opacity: var(--dots, 0);
  transition: opacity .3s ease;
}
.tour-bar p { overflow: hidden; text-overflow: ellipsis; }
.tour-dots { display: flex; flex: none; gap: 5px; }
.tour-dots span {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: rgb(0 0 0 / .18);
  transition: width .45s var(--ease), background-color .3s ease;
}
.tour-dots span.is-active { width: 20px; background: var(--ink); }
.tour.is-compact .tour-bar { bottom: 12px; }
.tour.is-compact .tour-bar p { display: none; }

/* Without script: no pinning, the tour reads as a plain list */
html:not(.js) .tour-sticky { position: relative; top: 0; height: auto; overflow: visible; padding-bottom: 48px; }
html:not(.js) .hero-copy { position: relative; top: 0; left: 0; margin: 64px auto 0; transform: none; }
html:not(.js) .stage { position: relative; height: 70vh; }
html:not(.js) .poster { --shift: 0%; }
html:not(.js) .tour-steps { position: relative; }
html:not(.js) .callouts { display: grid; gap: 16px; width: min(var(--wrap), 100% - 44px); margin: 0 auto; }
html:not(.js) .callout { position: static; width: auto; opacity: 1; transform: none; }
html:not(.js) .tour-line { display: none; }
html:not(.js) .tour-bar { position: static; width: max-content; margin: 16px auto 0; transform: none; opacity: 1; }

/* ---------- Segmented control ---------- */

.seg {
  --n: 2;
  --i: 0;
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  min-inline-size: 0;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: var(--track);
}
.seg-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / var(--n));
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--e-thumb);
  transform: translateX(calc(var(--i) * 100%));
  transition: transform .4s var(--ease);
}
.seg label span {
  position: relative;
  z-index: 1;
  display: block;
  padding: 4px 11px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: .8125rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: color .2s ease;
}
.seg input:checked + span,
.seg label:hover span { color: var(--ink); }
.seg label { position: relative; z-index: 1; cursor: pointer; }
.seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.seg input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 1px; }
.seg-small { --n: 3; --i: 1; }
.seg-small:has(label:nth-of-type(1) input:checked) { --i: 0; }
.seg-small:has(label:nth-of-type(2) input:checked) { --i: 1; }
.seg-small:has(label:nth-of-type(3) input:checked) { --i: 2; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(96px, 11vw, 150px); }
.plan, .about { background: var(--surface); }

/* One number you can trust */
.plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(48px, 7vw, 104px);
}
.plan-copy h2 { margin-top: 22px; }
.plan-copy .lede { margin-top: 20px; }
.checks { display: grid; gap: 12px; margin-top: 28px; }
.checks li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.checks .icon { width: 22px; height: 22px; color: var(--green); }
.plan-copy .fine { margin-top: 24px; font-size: .875rem; }

.ledger {
  padding: 28px 28px 26px;
  border-radius: 30px;
  background: var(--bg);
}
.ledger-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 14px;
  border-bottom: var(--hair) solid var(--line);
}
.ledger-head h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.02em; }
.ledger-head span { color: var(--ink-3); font-size: .875rem; }

.line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 12px;
  padding: 12px 0;
  border-bottom: var(--hair) solid var(--line);
}
.l-label { grid-column: 1; display: inline-flex; align-items: center; gap: 12px; }
.l-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--green);
  box-shadow: 0 0 0 var(--hair) var(--line), 0 1px 2px rgb(0 0 0 / .04);
}
.l-icon .icon { width: 19px; height: 19px; }
.l-icon-green { background: var(--green); color: #fff; box-shadow: inset 0 1px 0 rgb(255 255 255 / .22), 0 4px 10px -6px rgb(0 0 0 / .35); }
.line .seg { grid-column: 2; justify-self: start; }
.amt {
  grid-column: 3;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  text-align: right;
  white-space: nowrap;
}
.l-count { margin-left: 6px; color: var(--ink-3); font-size: .875rem; font-variant-numeric: tabular-nums; }
/* A thin digit-group space; Geist ships no narrow no-break space of its own */
.sep { letter-spacing: -.12em; }

.expenses {
  grid-column: 1 / -1;
  display: grid;
  gap: 2px;
  margin-top: 10px;
  padding-left: 46px;
  color: var(--ink-2);
  font-size: .9375rem;
  font-variant-numeric: tabular-nums;
}
.expenses li,
.exp-inner { display: flex; justify-content: space-between; gap: 16px; }
.expenses li.exp-new {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr;
  margin: 0 -8px;
  padding: 0 8px;
  border-radius: 8px;
  animation: row-open .42s var(--ease), row-ink 1.6s ease-out;
}
.exp-inner {
  min-height: 0;
  overflow: hidden;
  animation: row-in .42s var(--ease) both;
}
@keyframes row-open { from { grid-template-rows: 0fr; } }
@keyframes row-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes row-ink { from { background-color: rgb(198 244 213 / .9); } to { background-color: rgb(198 244 213 / 0); } }

/* The answer sits highest */
.total {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  margin-top: 20px;
  padding: 20px 22px;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--e-2);
}
.t-label { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -.02em; }
.t-amount {
  display: inline-flex;
  align-items: baseline;
  gap: .3em;
  color: var(--green);
  font-size: clamp(2.5rem, 1.9rem + 2vw, 3.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.t-amount small { font-size: .32em; font-weight: 500; letter-spacing: 0; }

.ledger-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 22px;
}

/* A month, in three moves */
.section-head { max-width: 760px; margin-inline: auto; text-align: center; }
.section-head .lede { margin-top: 20px; }

.moves { display: grid; gap: clamp(80px, 10vw, 128px); margin-top: clamp(64px, 8vw, 96px); }
.move {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
}
.move:nth-child(even) { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.move:nth-child(even) .move-copy { order: 2; }
.move-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.move-step { color: var(--ink-3); font-size: .875rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.move-copy > p {
  max-width: 27em;
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 1.125rem;
  line-height: 1.45;
  letter-spacing: -.016em;
  text-wrap: pretty;
}

.features { margin-top: 24px; border-top: var(--hair) solid var(--line); }
.features li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: var(--hair) solid var(--line);
}
.features .icon { width: 22px; height: 22px; margin-top: 1px; color: var(--green); }
.features strong { display: block; font-size: 1rem; font-weight: 600; letter-spacing: -.015em; }
.features span { display: block; margin-top: 2px; color: var(--ink-2); font-size: .9375rem; line-height: 1.4; }

/* Hairline figures sit on white plates, lit like everything else */
.plate {
  --hairline-plate: #fff;
  --hairline-hi: #1d1d1f;
  --hairline-edge: #6e6e73;
  --hairline-mid: #aeaeb3;
  --hairline-lo: #e2e2e7;
  --hairline-stroke: 1;
  padding: 20px 24px 16px;
  border: var(--hair) solid var(--line);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: var(--e-1);
}
/* The figures draw with generous margins; crop 18% in so the drawing fills its plate without touching its edges */
.figure-crop { overflow: hidden; aspect-ratio: 5 / 4; }
.figure { width: 118%; aspect-ratio: 5 / 4; margin: -7.2% 0 0 -9%; }
.plate figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: var(--hair) solid var(--line);
  color: var(--ink-2);
  font-size: .875rem;
}
.plate figcaption > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.plate figcaption .icon { width: 18px; height: 18px; color: var(--green); }
.readout { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 104px);
  align-items: start;
}
.about-copy p { color: var(--ink-2); font-size: 1.1875rem; line-height: 1.45; letter-spacing: -.016em; }
.about-copy p + p { margin-top: 18px; }
.about-copy .about-lead { color: var(--ink); font-size: clamp(1.375rem, 1.1rem + .9vw, 1.75rem); line-height: 1.32; letter-spacing: -.024em; }

/* The facts anchor the heading's column: icon, label, value, ruled like the ledger */
.facts {
  display: grid;
  margin-top: 40px;
  border-top: var(--hair) solid var(--line);
}
.facts > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 14px;
  padding: 16px 0;
  border-bottom: var(--hair) solid var(--line);
}
.facts .chip { grid-row: span 2; }
.facts dt { color: var(--ink-3); font-size: .875rem; }
.facts dd { font-size: 1.125rem; font-weight: 500; letter-spacing: -.02em; overflow-wrap: anywhere; }
.facts a { color: var(--green); }
.facts a:hover { text-decoration: underline; text-underline-offset: .2em; }

/* Contact: a dark card; the form sits on a light panel and the coins grow beside it */
.contact-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: start;
  gap: clamp(32px, 5vw, 64px);
  padding: clamp(28px, 5vw, 64px);
  border-radius: 36px;
  background: var(--navy);
  color: #fff;
  box-shadow: var(--e-2);
}
.contact-intro { padding-top: 6px; }
.contact-intro .chip { margin-bottom: 22px; }
.contact-intro h2 { max-width: 11em; font-size: clamp(2rem, 1.2rem + 2.3vw, 3.25rem); }
.contact-intro .lede { max-width: 26em; margin-top: 16px; color: rgb(255 255 255 / .72); }
.coins { width: min(100%, 360px); aspect-ratio: 1; margin: 12px 0 0 -12px; }
.coins canvas { display: block; width: 100%; height: 100%; }
.coins-caption { margin-top: -8px; color: rgb(255 255 255 / .58); font-size: .875rem; }
.contact.no-3d .coins, .contact.no-3d .coins-caption { display: none; }
.contact-email { margin-top: 18px; color: rgb(255 255 255 / .6); font-size: .9375rem; }
.contact-email a { color: var(--mint); }
.contact-email a:hover { text-decoration: underline; text-underline-offset: .2em; }
.contact-card :focus-visible { outline-color: var(--mint); }
.contact-panel :focus-visible { outline-color: var(--green); }

.contact-panel {
  padding: clamp(22px, 3vw, 32px);
  border-radius: 26px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), 0 30px 60px -30px rgb(0 0 0 / .6);
}
.contact-form { display: grid; gap: 18px; }

/* Progress: four segments, filled on a spring-like curve as answers land */
.progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--ink-2);
  font-size: .875rem;
  font-weight: 500;
}
.progress-pct { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.progress-track {
  --p: 0;
  position: relative;
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--track);
}
.progress-fill {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: var(--green);
  transform: scaleX(var(--p));
  transform-origin: left center;
  transition: transform .6s var(--ease), background-color .3s ease;
}
.contact-form.is-complete .progress-fill { background: #14806f; }
.progress-tick { position: absolute; top: 0; bottom: 0; left: var(--at); width: 3px; margin-left: -1.5px; background: var(--surface); }

.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.field label,
.field legend {
  display: block;
  margin-bottom: 8px;
  padding: 0;
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: -.012em;
}
.label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.label-row label { margin-bottom: 8px; }
.counter { color: var(--ink-3); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.control { position: relative; }
.field input,
.field textarea {
  width: 100%;
  padding: 13px 44px 13px 14px;
  border: 1px solid #d5d5db;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 116px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #a1a1a6; }
.field input:hover,
.field textarea:hover { border-color: #bdbdc4; }
.field input:focus,
.field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgb(17 107 94 / .16); }
.field.is-invalid input,
.field.is-invalid textarea { border-color: #c4372f; box-shadow: 0 0 0 4px rgb(196 55 47 / .1); }
.field-check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 20px;
  height: 20px;
  color: var(--green);
  opacity: 0;
  transform: scale(.5);
  transition: opacity .2s ease, transform .4s var(--ease);
  pointer-events: none;
}
.field.is-done .field-check { opacity: 1; transform: none; }
.field-error { margin-top: 6px; color: #b3261e; font-size: .8125rem; }
.field-error:empty { display: none; }

.topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.topic { position: relative; display: grid; }
.topic input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.topic span {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 100%;
  padding: 11px 12px;
  border: 1px solid #d5d5db;
  border-radius: 14px;
  font-size: .9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .15s var(--ease);
}
.topic .icon { width: 18px; height: 18px; color: var(--ink-2); transition: color .2s ease; }
.topic:hover span { border-color: #bdbdc4; }
.topic:active span { transform: scale(.98); }
.topic input:checked + span { border-color: var(--green); background: var(--green-tint); color: var(--green); }
.topic input:checked + span .icon { color: var(--green); }
.topic input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.field.is-invalid .topic span { border-color: #e2a9a4; }

.btn-send { width: 100%; height: 54px; margin-top: 4px; background: var(--ink); color: #fff; }
.btn-send:hover { background: #000; }
.contact-form.is-complete .btn-send { background: var(--green); }
.contact-form.is-complete .btn-send:hover { background: var(--green-hover); }
.form-note { margin-top: -6px; color: var(--ink-3); font-size: .8125rem; text-align: center; text-wrap: pretty; }
.form-note a { color: var(--green); }

.form-done { padding: 32px 8px 20px; text-align: center; }
.form-done:focus { outline: none; }
.form-done .chip { margin-bottom: 18px; }
.form-done h3 { font-size: 1.625rem; }
.form-done p { max-width: 26em; margin: 10px auto 0; color: var(--ink-2); }
.form-done .form-note { margin-top: 14px; }
.form-done .btn-quiet { margin-top: 14px; }

/* Footer */
.footer { padding: 26px 0 calc(34px + env(safe-area-inset-bottom)); border-top: var(--hair) solid var(--line); }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  color: var(--ink-3);
  font-size: .8125rem;
}
.brand-small { color: var(--ink); font-size: .9375rem; }
.brand-small .brand-mark { width: 22px; height: 22px; border-radius: 5.5px; }

/* ---------- Smaller screens ---------- */

@media (max-width: 860px) {
  .menu-toggle {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-right: -8px;
    border: 0;
    border-radius: 999px;
    background: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .menu-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
  .menu-toggle path { transform-box: fill-box; transform-origin: center; transition: transform .35s var(--ease); }
  .menu-toggle[aria-expanded="true"] .m-top { transform: translateY(3px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .m-bottom { transform: translateY(-3px) rotate(-45deg); }

  .nav {
    position: absolute;
    top: calc(100% + 8px);
    right: -12px;
    left: -12px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: var(--hair) solid var(--line);
    border-radius: 20px;
    background: rgb(255 255 255 / .96);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    backdrop-filter: saturate(180%) blur(24px);
    box-shadow: var(--e-sheet);
    font-size: 1.1875rem;
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(.97);
    transition: opacity .18s ease, transform .35s var(--ease), visibility 0s linear .35s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav a { padding: 14px 16px; border-radius: 12px; color: var(--ink); }
  .nav a:hover { background: var(--bg); }
  .nav .nav-cta { justify-content: center; height: 50px; margin-top: 6px; font-size: 1.0625rem; }
  .bar::before {
    content: "";
    position: fixed;
    inset: var(--bar-h) 0 0;
    background: rgb(0 0 0 / .2);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility 0s linear .25s;
  }
  .bar.is-open::before { opacity: 1; visibility: visible; transition-delay: 0s; }

  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .move,
  .move:nth-child(even) { grid-template-columns: minmax(0, 1fr); }
  .move:nth-child(even) .move-copy { order: 0; }
  .about-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-card { grid-template-columns: minmax(0, 1fr); }
  .coins { width: min(100%, 300px); margin: 4px auto 0; }
  .coins-caption { text-align: center; }
}

@media (max-width: 560px) {
  .hero-copy .lede { font-size: 1.0625rem; }
  .actions { gap: 14px 22px; margin-top: 24px; }
  .ledger { margin-inline: -8px; padding: 20px 16px 18px; border-radius: 26px; }
  .line-rule { grid-template-columns: 1fr auto; row-gap: 10px; }
  .line-rule .seg { grid-column: 1 / -1; grid-row: 2; margin-left: 46px; }
  .line-rule .amt { grid-column: 2; grid-row: 1; }
  .l-count { display: block; margin: 2px 0 0; }
  .total { padding: 18px; }
  .plan-copy .lede, .move-copy > p, .about-copy p { font-size: 1.0625rem; }
  .plate { padding: 14px 14px 12px; border-radius: 24px; }
  .plate figcaption { font-size: .8125rem; }
  .ledger-actions .btn { flex: 1 1 auto; }
  .callout { padding: 16px 16px 18px; gap: 14px; }
  .callout h3 { font-size: 1.125rem; }
  .callout p { font-size: .875rem; }
  .contact-card { border-radius: 28px; padding: 26px 16px 16px; }
  .contact-intro { padding-inline: 6px; }
  .contact-panel { padding: 20px 16px; border-radius: 22px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  /* Keep the comprehension cues: cross-fades and the ink of a new line */
  .poster, .stage canvas, .callout { transition-duration: .3s !important; }
  .expenses li.exp-new { animation: row-ink 1.2s ease-out !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .bar::after { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav, .callout { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-contrast: more) {
  :root { --ink-2: #3a3a3c; --ink-3: #48484a; --line: rgb(0 0 0 / .3); }
}
