/* ============================================================================
   ALVENERA — "The Quiet Ledger"
   ----------------------------------------------------------------------------
   Design system for the Alvenera site.

   The app is a light, paper-white ledger. The site is its negative: a deep navy
   room in which those light screens are the only lit objects. Mint is spent
   sparingly — on one line of the chart, one button, one rule — so that when it
   appears it reads as a signal rather than as decoration.

   Three voices carry the whole page:
     Fraunces        — display. Editorial, optical-size aware, set light and tight.
     Instrument Sans — prose and UI. Neutral, slightly warm, never shouts.
     JetBrains Mono  — every figure, index, and label. A ledger is made of
                       numbers in columns; the numbers get their own typeface and
                       they are always tabular, so nothing shifts as they animate.

   Sections alternate ink -> paper -> ink. That alternation is the page's pacing;
   each section paints its own ground so the rhythm survives any reordering.
   ========================================================================== */

/* ---------------------------------------------------------------- 1. Tokens */

:root {
  /* Ink — the site's ground. --ink-800 is the brand navy from the mark. */
  --ink-900: #050F17;
  --ink-800: #0B1F33;
  --ink-700: #10293E;
  --ink-600: #16344C;
  --ink-500: #1E4361;

  /* Paper — the app's ground, borrowed for the light movements. */
  --paper-000: #FFFFFF;
  --paper-100: #F5F8F9;
  --paper-200: #EDF2F4;
  --paper-300: #DCE4E9;

  /* Mint — the mark's own colour, plus the two shades it needs to stay legible:
     the light one for text on ink, the deep one for text on paper. */
  --mint: #2ED3A0;
  --mint-lo: #7FDCC0;
  --mint-deep: #0D7A5F;
  --mint-wash: #E4F2ED;

  /* Semantics. Spend is warmer on ink than the app's red, which goes muddy
     against navy; the paper sections use the app's own value. */
  --gain: #2ED3A0;
  --gain-ink: #1E8449;
  --spend: #FF8272;
  --spend-ink: #C0392B;
  --amber: #F5B84B;
  --amber-ink: #B3660B;
  --violet: #A78BFA;
  --azure: #6FA8DC;

  /* Type roles, re-pointed per section by [data-ground]. */
  --fg-1: #E8F1F5;
  --fg-2: #9DB2C0;
  --fg-3: #64808F;
  --accent: var(--mint);
  --ground: var(--ink-800);
  --raised: rgba(255, 255, 255, .04);
  --raised-2: rgba(255, 255, 255, .07);
  --rule: rgba(157, 178, 192, .16);
  --rule-strong: rgba(157, 178, 192, .3);
  --shadow-lift: 0 24px 60px -20px rgba(0, 0, 0, .6), 0 2px 8px rgba(0, 0, 0, .3);

  /* Families */
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;

  /* Motion. One easing does almost all the work: a long expo-out that starts
     fast and settles without a bounce. Anything reversible (hover, toggles)
     uses the symmetric curve instead, so it feels the same going back. */
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-sym: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 180ms;
  --t-base: 320ms;
  --t-slow: 620ms;
  --t-reveal: 1100ms;

  /* Measure and rhythm */
  --shell: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --bay: clamp(88px, 11vw, 168px);
  --radius: 18px;
  --radius-lg: 28px;
  --radius-sm: 10px;
}

/* A section declares which ground it sits on; every component below reads the
   role tokens, never the raw palette, so one attribute flips a whole movement. */
[data-ground="paper"] {
  --fg-1: #16232E;
  --fg-2: #58707F;
  --fg-3: #93A5B2;
  --accent: var(--mint-deep);
  --ground: var(--paper-100);
  --raised: #FFFFFF;
  --raised-2: #FFFFFF;
  --rule: rgba(11, 31, 51, .1);
  --rule-strong: rgba(11, 31, 51, .2);
  --gain: var(--gain-ink);
  --spend: var(--spend-ink);
  --amber: var(--amber-ink);
  --violet: #7B2FA8;
  --azure: #3453B8;
  --shadow-lift: 0 1px 2px rgba(22, 35, 46, .06), 0 18px 44px -12px rgba(22, 35, 46, .16);
}

[data-ground="abyss"] { --ground: var(--ink-900); }

/* ------------------------------------------------------------ 2. Reset/base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  background: var(--ink-800);
  color: var(--fg-1);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--mint); color: var(--ink-900); }

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  transform: translateY(-200%);
  background: var(--mint); color: var(--ink-900);
  padding: 10px 18px; border-radius: 999px;
  font: 600 14px/1 var(--sans);
  transition: transform var(--t-base) var(--ease);
}
.skip-link:focus { transform: none; }

/* ------------------------------------------------------------ 3. Typography */

.display, h1, h2, h3 {
  font-family: var(--display);
  font-weight: 300;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 120;
  letter-spacing: -.025em;
  line-height: 1.02;
  margin: 0;
  text-wrap: balance;
}

h1, .t-hero {
  font-size: clamp(2.5rem, 5.6vw, 4.4rem);
  line-height: 1.0;
  letter-spacing: -.035em;
}

h2, .t-section {
  font-size: clamp(2.05rem, 4.4vw, 3.75rem);
  line-height: 1.02;
  letter-spacing: -.032em;
}

h3, .t-card {
  font-size: clamp(1.22rem, 1.9vw, 1.55rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 30;
}

/* The one place italics are allowed: a single emphasised phrase per headline,
   in Fraunces' WONK italic, so the eye lands where the argument turns. */
.turn {
  font-style: italic;
  font-variation-settings: "SOFT" 10, "WONK" 1, "opsz" 120;
  color: var(--accent);
}

p { margin: 0 0 1.1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.05rem, 1.45vw, 1.28rem);
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 36ch;
}
.lede--wide { max-width: 54ch; }

.prose { color: var(--fg-2); max-width: 64ch; }
.prose strong { color: var(--fg-1); font-weight: 600; }
.prose a { color: var(--accent); box-shadow: inset 0 -1px 0 currentColor; }

/* Mono is the ledger voice: indices, labels, figures, timestamps. */
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--accent);
  flex: none;
}
.eyebrow--bare::before { display: none; }

.figure {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -.03em;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1;
  color: var(--fg-1);
  word-spacing: -.34em;
}

/* --------------------------------------------------------------- 4. Layout */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.bay {
  background: var(--ground);
  color: var(--fg-1);
  padding-block: var(--bay);
  position: relative;
}

/* The signature: every section is introduced by a hairline that spans the full
   measure with its index sitting on it, like the rule at the top of a ledger
   page. It is the same object at every scale, which is what makes the page read
   as one system rather than as a stack of blocks. */
.bay__head {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(24px, 4vw, 56px);
  padding-top: 46px;
  border-top: 1px solid var(--rule);
  position: relative;
}
.bay__head::before {
  content: attr(data-index);
  position: absolute;
  top: 14px; left: 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1;
  color: var(--accent);
}

@media (min-width: 900px) {
  .bay__head { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: end; }
}

.stack   { display: grid; gap: clamp(14px, 1.6vw, 22px); align-content: start; }
.stack-l { display: grid; gap: clamp(28px, 4vw, 52px); align-content: start; }

.split { display: grid; gap: clamp(36px, 5vw, 84px); align-items: center; }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); }
  .split--flip > :first-child { order: 2; }
}

.grid-3 { display: grid; gap: clamp(14px, 1.6vw, 20px); grid-template-columns: 1fr; }
@media (min-width: 700px)  { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.grid-2 { display: grid; gap: clamp(14px, 1.6vw, 20px); grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

/* ----------------------------------------------------------- 5. Scroll line */

/* Not a progress bar — a running balance. The line advances along the top of
   the viewport and the mono readout beside it counts the page down, which is
   the same gesture the product performs on a ledger. */
.balance-line {
  position: fixed;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--rule);
  z-index: 90;
  pointer-events: none;
}
.balance-line__fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--mint-deep), var(--mint));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* --------------------------------------------------------------- 6. Header */

.masthead {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  padding-block: 18px;
  transition: padding var(--t-slow) var(--ease), background var(--t-slow) var(--ease),
              border-color var(--t-slow) var(--ease), backdrop-filter var(--t-slow) var(--ease);
  border-bottom: 1px solid transparent;
}
.masthead.is-stuck {
  padding-block: 11px;
  background: color-mix(in srgb, var(--ink-900) 82%, transparent);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: rgba(157, 178, 192, .14);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.brand__word {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .3em;
  color: #E8F1F5;
  text-transform: uppercase;
  padding-left: 2px;
}
/* The wordmark's V climbs and falls like the mark above it, so it carries the
   accent — the same rule the app's drawn lockup follows. */
.brand__word i { font-style: normal; color: var(--mint); }

.nav { display: none; align-items: center; gap: 6px; }
@media (min-width: 940px) { .nav { display: flex; } }

.nav__link {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14.5px;
  color: #9DB2C0;
  transition: color var(--t-base) var(--ease-sym);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 4px;
  height: 1px;
  background: var(--mint);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform var(--t-base) var(--ease);
}
.nav__link:hover { color: #E8F1F5; }
.nav__link:hover::after { transform: scaleX(1); transform-origin: 0 50%; }

.masthead__actions { display: flex; align-items: center; gap: 10px; }

/* Language toggle — a real control, because the product is bilingual and its
   audience is. Two cells and a thumb that slides between them. */
.lang {
  position: relative;
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(157, 178, 192, .16);
}
.lang__thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  transition: transform var(--t-base) var(--ease);
}
.lang[data-lang="fr"] .lang__thumb { transform: translateX(100%); }
.lang__opt {
  position: relative;
  z-index: 1;
  width: 40px;
  padding: 5px 0;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  color: #64808F;
  transition: color var(--t-base) var(--ease-sym);
}
.lang__opt[aria-pressed="true"] { color: #E8F1F5; }

/* Mobile drawer */
.burger {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(157, 178, 192, .18);
}
@media (min-width: 940px) { .burger { display: none; } }
.burger span {
  display: block; width: 16px; height: 1.5px; background: #E8F1F5;
  transition: transform var(--t-base) var(--ease), opacity var(--t-fast) linear;
}
.burger span + span { margin-top: 4px; }
[aria-expanded="true"].burger span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
[aria-expanded="true"].burger span:nth-child(2) { opacity: 0; }
[aria-expanded="true"].burger span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.drawer {
  position: fixed;
  inset: 0;
  z-index: 79;
  background: color-mix(in srgb, var(--ink-900) 96%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: grid;
  align-content: center;
  padding: 0 var(--gutter);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base) var(--ease-sym), visibility var(--t-base);
}
.drawer.is-open { opacity: 1; visibility: visible; }
.drawer a {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 9vw, 3rem);
  letter-spacing: -.03em;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease);
}
.drawer.is-open a { opacity: 1; transform: none; }
.drawer.is-open a:nth-child(1) { transition-delay: 60ms; }
.drawer.is-open a:nth-child(2) { transition-delay: 110ms; }
.drawer.is-open a:nth-child(3) { transition-delay: 160ms; }
.drawer.is-open a:nth-child(4) { transition-delay: 210ms; }
.drawer.is-open a:nth-child(5) { transition-delay: 260ms; }

/* --------------------------------------------------------------- 7. Buttons */

.btn {
  --btn-bg: var(--mint);
  --btn-fg: var(--ink-900);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.005em;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
  will-change: transform;
}
.btn::before {
  /* The bloom: a soft radial that tracks the pointer, so the surface looks lit
     from wherever the cursor is rather than uniformly bright. */
  content: "";
  position: absolute;
  inset: -60%;
  z-index: -1;
  background: radial-gradient(220px circle at var(--px, 50%) var(--py, 50%),
              rgba(255, 255, 255, .55), transparent 62%);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-sym);
}
.btn:hover { box-shadow: 0 14px 34px -12px rgba(46, 211, 160, .6); }
.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(.975); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--fg-1);
  border: 1px solid var(--rule-strong);
}
.btn--ghost::before { background: radial-gradient(220px circle at var(--px, 50%) var(--py, 50%), rgba(46, 211, 160, .2), transparent 62%); }
.btn--ghost:hover { box-shadow: none; border-color: var(--accent); }

/* Pre-launch status. A pill rather than a banner: the fact belongs beside the
   name, as a property of the product, not as an announcement bar the visitor
   has to dismiss before reading anything. The dot pings slowly — one signal of
   life on a page that is otherwise still. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(46, 211, 160, .32);
  background: rgba(46, 211, 160, .08);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mint-lo);
  white-space: nowrap;
}
.pill__dot {
  position: relative;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--mint);
  flex: none;
}
.pill__dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--mint);
  animation: ping 2800ms var(--ease-sym) infinite;
}
@keyframes ping {
  0%        { transform: scale(.55); opacity: .9; }
  70%, 100% { transform: scale(2);   opacity: 0; }
}

/* In the masthead the pill sits with the wordmark; on narrow screens the row
   belongs to the brand, the language toggle and the menu, and the hero states
   the same fact two lines below. */
.masthead .pill { display: none; }
@media (min-width: 780px) { .masthead .pill { display: inline-flex; } }

.hero__status { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.masthead__brand { display: flex; align-items: center; gap: 14px; }

.btn--lg { padding: 18px 34px; font-size: 16.5px; }
.btn--sm { padding: 10px 18px; font-size: 14px; }
@media (max-width: 560px) { .btn--sm { display: none; } }
.btn__arrow { transition: transform var(--t-base) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* A quieter call to action: text with a rule that redraws on hover. */
.link-cta {
  display: inline-flex;
  justify-self: start;
  width: fit-content;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  padding-bottom: 3px;
  position: relative;
}
.link-cta::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform-origin: 100% 50%;
  transition: transform var(--t-base) var(--ease);
}
.link-cta:hover::after { transform: scaleX(0); transform-origin: 0 50%; }
.link-cta svg { transition: transform var(--t-base) var(--ease); }
.link-cta:hover svg { transform: translateX(4px); }

/* ----------------------------------------------------------------- 8. Cards */

.card {
  position: relative;
  background: var(--raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(22px, 2.4vw, 30px);
  overflow: hidden;
  transition: border-color var(--t-slow) var(--ease), transform var(--t-slow) var(--ease),
              background var(--t-slow) var(--ease);
}
/* A 3px capping rule in the accent — lifted straight from the app's stat cards,
   which is what ties the site's surfaces to the product's. */
.card--capped::before {
  content: "";
  position: absolute; inset: 0 0 auto 0;
  height: 3px;
  background: var(--cap, var(--accent));
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--t-slow) var(--ease);
}
.card--capped.is-in::before,
.is-in .card--capped::before { transform: scaleX(1); }

.card:hover { border-color: var(--rule-strong); }
.card__icon {
  width: 42px; height: 42px;
  border-radius: 13px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
  margin-bottom: 18px;
}
.card__body { color: var(--fg-2); font-size: 15.5px; line-height: 1.58; margin-top: 10px; }

/* Feature cards tilt very slightly toward the pointer. The rotation ceiling is
   deliberately under 4deg: enough to feel like a physical object catching
   light, not enough to become a gimmick. */
.tilt { will-change: transform; }

/* The specification list in the privacy panel. Term left, value right, on the
   same hairline rhythm as the ledger rows — a datasheet, deliberately, because
   the claim being made there is a technical one. */
.spec { margin: 0; display: grid; }
.spec > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 0;
  border-top: 1px solid var(--rule);
}
.spec > div:first-child { border-top: 0; padding-top: 0; }
.spec dt { color: var(--fg-2); font-size: 14.5px; }
.spec dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--fg-1);
  text-align: right;
}

/* ------------------------------------------------------- 9. Ledger surfaces */

/* The product's own card language, rebuilt for the web at 1:1 with the app so
   the screenshots on this page are the app, not an illustration of it. */
.ledger {
  background: var(--paper-000);
  color: #16232E;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(22, 35, 46, .06), 0 8px 20px rgba(22, 35, 46, .045);
  overflow: hidden;
}
.ledger__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-top: 1px solid var(--paper-300);
}
.ledger__row:first-child { border-top: 0; }
.ledger__date { width: 42px; text-align: center; flex: none; font-size: 11px; color: #586C7D; }
.ledger__name { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; }
.ledger__amt { text-align: right; flex: none; }
.ledger__amt b { display: block; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 13.5px; font-weight: 700; }
.ledger__amt span { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 11px; color: #93A5B2; }
.ledger__row--future { opacity: .55; }

.chip {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.chip--green   { background: #E7F4EC; color: #1E8449; }
.chip--blue    { background: #EAEFFB; color: #3453B8; }
.chip--amber   { background: #FDF1E3; color: #B3660B; }
.chip--violet  { background: #F3EAFA; color: #7B2FA8; }
.chip--neutral { background: #EEF3F5; color: #586C7D; }

.amt-gain  { color: #1E8449; }
.amt-spend { color: #C0392B; }

/* Device — the phone that holds a real screen. Kept as a frame, not a
   photograph, so it stays crisp at every size and weighs nothing. */
.device {
  position: relative;
  width: 100%;
  max-width: 288px;
  border-radius: 40px;
  padding: 10px;
  background: linear-gradient(160deg, #24384B, #0B1F33 60%);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .75), 0 0 0 1px rgba(157, 178, 192, .16),
              inset 0 1px 0 rgba(255, 255, 255, .12);
}
.device__screen {
  border-radius: 31px;
  background: var(--paper-100);
  overflow: hidden;
  padding: 16px 12px 12px;
  display: grid;
  gap: 10px;
  color: #16232E;
}
.device__notch {
  position: absolute;
  top: 10px; left: 50%;
  transform: translateX(-50%);
  width: 92px; height: 20px;
  border-radius: 0 0 14px 14px;
  background: #0B1F33;
  z-index: 2;
}
.device__bar {
  display: flex;
  justify-content: space-around;
  padding-top: 12px;
  margin-top: auto;
  border-top: 1px solid var(--paper-300);
  color: #93A5B2;
}
.device__bar i { display: block; width: 18px; height: 18px; border-radius: 5px; background: currentColor; opacity: .35; }
.device__bar i.on { background: var(--mint-deep); opacity: 1; }

.device__topbar { display: flex; align-items: center; justify-content: space-between; }
.device__topbar strong { font-size: 17px; letter-spacing: -.025em; }
.device__add {
  width: 30px; height: 30px;
  border-radius: 10px;
  background: var(--mint-deep);
  display: grid; place-items: center;
}

/* The full-size product shot: the app at close to its real width, so chips,
   figures and the reconciliation letters stay readable rather than becoming
   texture. Centred in its column, because a phone floated left in a wide
   column reads as an accident. */
.device--full { max-width: 352px; }
.device--full .device__screen { padding: 20px 14px 14px; gap: 14px; }
.stage { display: grid; justify-items: center; }

/* ----------------------------------------------------- 10. Projection panel */

/* The hero object. It draws a running balance, then keeps drawing past today
   in a dashed line — which is literally the feature the headline promises. The
   demo and the claim are the same artefact. */
.panel {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(20px, 2.4vw, 30px);
  background: linear-gradient(150deg, rgba(46, 211, 160, .1), rgba(255, 255, 255, .03) 42%),
              rgba(255, 255, 255, .04);
  border: 1px solid rgba(157, 178, 192, .18);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
/* Narrow: the date stamp goes above the figure rather than fighting it for a
   half-width column that neither can use. */
@media (max-width: 640px) {
  .panel__head { flex-direction: column-reverse; gap: 10px; }
  .panel__head > p:last-child { text-align: left; }
}
.panel__chart { position: relative; }
.panel__chart svg { width: 100%; height: auto; overflow: visible; }

/* The posted line draws itself. --len is the path's own measured length, handed
   over by JS, so the keyframe works on any geometry; if JS never runs the custom
   property stays unset, the declaration is invalid, and the line simply renders
   complete — which is the right fallback. */
.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); }
.is-in .draw { animation: draw 1500ms var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* The projected half is wiped in from the "today" rule, continuing the gesture. */
.wipe {
  transform-box: view-box;
  transform-origin: 392px 0;
  transform: scaleX(0);
}
.is-in .wipe { animation: wipe 1300ms var(--ease) 900ms forwards; }
@keyframes wipe { to { transform: scaleX(1); } }

.area { opacity: 0; }
.is-in .area { animation: fade 1400ms var(--ease) 400ms forwards; }
@keyframes fade { to { opacity: 1; } }

/* The marker that lands on the projected end point once the line arrives. */
.marker {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: 50% 50%;
}
.is-in .marker { animation: markerIn 700ms var(--ease) 2000ms forwards; }
@keyframes markerIn {
  from { opacity: 0; transform: translateY(8px) scale(.92); }
  to   { opacity: 1; transform: none; }
}

.panel__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--fg-3);
}
.panel__legend span { display: inline-flex; align-items: center; gap: 8px; }
.panel__legend i { width: 16px; height: 2px; border-radius: 2px; background: var(--mint); }
.panel__legend i.dash {
  background: none;
  border-top: 2px dashed var(--mint-lo);
  height: 0;
}

/* Stat cells beneath the chart: mono figures that count up on reveal. */
.cells {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cells > div { background: var(--ground); padding: 14px 14px 15px; }
.cells .figure { font-size: clamp(1.05rem, 2vw, 1.4rem); }
.cells .eyebrow { font-size: 9.5px; letter-spacing: .14em; margin-bottom: 8px; }

/* The proof strip: the same cell object, given room to breathe and a fourth
   column. Reusing it rather than inventing a "stat band" is what keeps the
   page feeling like one system. */
.cells--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.cells--wide > div {
  padding: clamp(20px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.cells--wide .figure { font-size: clamp(1.6rem, 3.4vw, 2.5rem); }
.cells--wide .eyebrow { font-size: 10px; align-items: start; }
@media (min-width: 860px) { .cells--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* The instrument gauge in the masthead: the page's own running balance, read
   out in the same mono the product uses for figures. */
.readout {
  display: none;
  font-size: 11px;
  letter-spacing: .1em;
  color: #64808F;
  padding-right: 6px;
}
.readout b { color: #9DB2C0; font-weight: 500; }
@media (min-width: 1120px) { .readout { display: inline-block; } }

/* ------------------------------------------------------------ 11. Hero bays */

.hero {
  position: relative;
  padding-top: clamp(132px, 17vw, 210px);
  padding-bottom: clamp(70px, 9vw, 130px);
  background: var(--ink-800);
  overflow: hidden;
}
/* Two very soft mint auroras, set far apart and heavily blurred. They are the
   only light source in the room; everything else is a surface catching it. */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.hero::before {
  width: 60vw; height: 60vw; max-width: 780px; max-height: 780px;
  top: -22%; right: -14%;
  background: radial-gradient(circle, rgba(46, 211, 160, .2), transparent 68%);
}
.hero::after {
  width: 46vw; height: 46vw; max-width: 560px; max-height: 560px;
  bottom: -26%; left: -12%;
  background: radial-gradient(circle, rgba(47, 111, 153, .22), transparent 70%);
}
.hero > * { position: relative; z-index: 1; }

.hero__grid { display: grid; gap: clamp(48px, 6vw, 70px); align-items: center; }
@media (min-width: 1040px) {
  .hero__grid { grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr); }
}

.hero__stage { position: relative; }
/* The phone breaks out of the panel's lower-left corner. Overlap is what makes
   a composition read as depth rather than as two boxes side by side. */
.hero__device {
  display: none;
  position: absolute;
  left: -58px; bottom: -66px;
  width: 208px;
  z-index: 2;
}
@media (min-width: 1180px) { .hero__device { display: block; } }

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .05em;
  color: var(--fg-3);
}
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { color: var(--mint); flex: none; }

/* ------------------------------------------------------------ 12. Ticker */

/* A single hairline strip of the product's vocabulary, drifting. It divides the
   hero from the argument without a heading, and it carries the bilingual and
   Quebec-specific proof (OFX, Desjardins, AES-256) as texture rather than as a
   list someone has to read. */
.ticker {
  border-block: 1px solid var(--rule);
  background: var(--ink-900);
  overflow: hidden;
  padding-block: 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker__track {
  display: flex;
  width: max-content;
  gap: 44px;
  animation: drift 46s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__track span {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-3);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 44px;
}
.ticker__track span::after { content: "◆"; color: var(--mint); font-size: 7px; }
@keyframes drift { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------- 13. Numbered list */

.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: clamp(16px, 2.4vw, 32px);
  row-gap: 6px;
  padding-block: clamp(24px, 3vw, 36px);
  border-top: 1px solid var(--rule);
  align-items: start;
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--accent);
  padding-top: 6px;
}
/* Title and body both live in the text column. Without the explicit placement
   the body auto-flows into the next row's first cell — the 48px index column —
   and collapses to one word per line. */
.step__title,
.step__body { grid-column: 2; }
.step__title { font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 6px; }
.step__body { color: var(--fg-2); font-size: 15.5px; max-width: 58ch; }
/* The three-column reading (index / title / body) needs the full measure to
   work; in a split column it crushes the body to a ribbon. So it is opt-in,
   used only where the list spans the page, and every other list stays two
   columns with the body under its title. */
@media (min-width: 900px) {
  .steps--wide .step { grid-template-columns: 48px minmax(0, 15rem) minmax(0, 1fr); align-items: baseline; }
  .steps--wide .step__title { grid-column: 2; margin-bottom: 0; }
  .steps--wide .step__body { grid-column: 3; }
}

/* ------------------------------------------------------------ 14. Accordion */

.faq { border-top: 1px solid var(--rule); }
.faq__item { border-bottom: 1px solid var(--rule); }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  text-align: left;
  padding: clamp(20px, 2.4vw, 28px) 0;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  font-weight: 600;
  letter-spacing: -.012em;
  color: var(--fg-1);
  transition: color var(--t-base) var(--ease-sym);
}
.faq__q:hover { color: var(--accent); }
.faq__sign { position: relative; width: 16px; height: 16px; flex: none; }
.faq__sign::before, .faq__sign::after {
  content: "";
  position: absolute; inset: 50% 0 auto 0;
  height: 1.5px; background: currentColor;
  transition: transform var(--t-base) var(--ease);
}
.faq__sign::after { transform: rotate(90deg); }
.faq__item.is-open .faq__sign::after { transform: rotate(0deg); }
.faq__a {
  overflow: hidden;
  height: 0;
  transition: height var(--t-slow) var(--ease);
}
.faq__a > div {
  padding-bottom: clamp(20px, 2.4vw, 28px);
  color: var(--fg-2);
  max-width: 62ch;
  font-size: 15.8px;
}

/* ----------------------------------------------------------- 15. Closing CTA */

.close-cta {
  position: relative;
  background: var(--ink-900);
  overflow: hidden;
  text-align: center;
}
.close-cta::before {
  content: "";
  position: absolute;
  left: 50%; bottom: -46%;
  width: 120vw; height: 90vw;
  max-height: 900px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 100%, rgba(46, 211, 160, .3), transparent 62%);
  pointer-events: none;
}
.close-cta > * { position: relative; z-index: 1; }
.close-cta .eyebrow { justify-content: center; }
.close-cta .btn-row { justify-content: center; }

/* --------------------------------------------------------------- 16. Footer */

.footer {
  background: var(--ink-900);
  border-top: 1px solid var(--rule);
  padding-block: clamp(52px, 6vw, 84px) 34px;
  color: var(--fg-2);
  font-size: 14.5px;
}
.footer__grid {
  display: grid;
  gap: clamp(34px, 4vw, 56px);
  grid-template-columns: 1fr;
}
@media (min-width: 780px)  { .footer__grid { grid-template-columns: 1.6fr repeat(2, 1fr); } }
@media (min-width: 1040px) { .footer__grid { grid-template-columns: 2fr repeat(3, 1fr); } }

.footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin: 0 0 16px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer li a { transition: color var(--t-base) var(--ease-sym); }
.footer li a:hover { color: var(--mint); }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--fg-3);
}

/* ------------------------------------------------------------- 17. Article */

/* Long-form pages (privacy, error) reuse the same system at a narrower measure
   so they never look like a different site. */
.article { max-width: 74ch; }
.article h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-top: 2.2em; margin-bottom: .5em; }
.article h2:first-of-type { margin-top: 1.4em; }
.article p, .article li { color: var(--fg-2); font-size: 16.5px; }
.article ul { padding-left: 1.1em; display: grid; gap: 8px; margin: 0 0 1.3em; }
.article li::marker { color: var(--accent); }
.article code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--raised-2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 2px 7px;
}

/* --------------------------------------------------------------- 18. Motion */

/* The reveal. Content is masked by its own box and rises into it, the way a
   posted entry appears on a ledger line — not a generic fade-up. Children in a
   [data-stagger] group inherit an incremental delay from JS. */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity var(--t-reveal) var(--ease),
    transform var(--t-reveal) var(--ease),
    clip-path var(--t-reveal) var(--ease);
  transition-delay: var(--d, 0ms);
  clip-path: inset(0 0 12% 0);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 -30% 0);
}

/* Headlines reveal per line rather than as a block, which is what makes a
   display setting feel typeset rather than animated.

   The container must be a grid, not a block: the line masks are block-level, so
   in a block container the whitespace between them in the markup would each
   generate an empty line box and blow the setting apart. A grid container drops
   whitespace-only children, so the leading stays exactly as specified. */
.lines { display: grid; }
.line-mask { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.line-mask > span {
  display: block;
  transform: translateY(105%);
  transition: transform 1200ms var(--ease);
  transition-delay: var(--d, 0ms);
}
.is-in .line-mask > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; clip-path: none; }
  .line-mask > span { transform: none; }
  .draw { stroke-dasharray: none; stroke-dashoffset: 0; }
  .wipe { transform: none; }
  .area, .marker { opacity: 1; }
  .ticker__track { animation: none; }
  .pill__dot::after { display: none; }
}
