/* =========================================================================
   Arvata — landing page styles
   Design system: ElevenLabs "parchment command terminal" (DESIGN.md),
   which overrides Arvata's "Ledger" visual direction.
   - Monochrome controls on warm paper surfaces.
   - The only chroma: Ember Orange (spend running hot) + Void Violet
     (reconciled / recovered) — "color as the spend made visible", applied
     only to ledger data, never to interactive chrome.
   ========================================================================= */

:root {
  /* Surfaces (ElevenLabs) */
  --canvas:    #fdfcfc;  /* page background */
  --sand:      #f5f3f1;  /* card / section inset surface */
  --border:    #e5e5e5;  /* hairline borders + dividers */
  --ink:       #000000;  /* primary text, filled button, dark band */
  --driftwood: #777169;  /* secondary text */
  --fog:       #a59f97;  /* tertiary helper text */
  --silver:    #b1b0b0;  /* faint washes */

  /* Chroma — decorative / data only (never UI state) */
  --heat:      #ff4704;  /* Ember Orange — spend over budget, running away */
  --cool:      #0447ff;  /* Void Violet  — reconciled, recovered, resolved  */

  /* Type */
  --font-display: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body:    'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-mark:    'Space Grotesk', var(--font-display);

  /* Shape */
  --r-pill: 9999px;
  --r-card: 20px;
  --r-card-lg: 24px;
  --r-input: 4px;

  /* Elevation — sub-pixel hairlines only */
  --ring: rgba(0,0,0,0.06) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 1px 2px 0px, rgba(0,0,0,0.04) 0px 2px 4px 0px;
  --elev: rgba(0,0,0,0.4) 0px 0px 1px 0px, rgba(0,0,0,0.04) 0px 1px 1px 0px, rgba(0,0,0,0.04) 0px 2px 4px 0px;

  --maxw: 1200px;
  --gutter: 24px;
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
/* overscroll-behavior stops the rubber-band bounce; the ink background means any
   residual overscroll at the bottom matches the dark footer (never a gray flash). */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overscroll-behavior: none; background: var(--ink); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0.16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 300; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

::selection { background: rgba(4,71,255,0.14); }

/* Numbers everywhere render mono + tabular so layout never shifts */
.mono, .fig { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- layout */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

section { padding: 96px 0; }
@media (max-width: 900px) { section { padding: 72px 0; } }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--driftwood);
}

/* Section "ledger line": eyebrow left, hairline rule center, mono figure right */
.ledger-line {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}
.ledger-line .rule {
  flex: 1 1 auto;
  height: 1px;
  background: var(--border);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}
.is-inview .ledger-line .rule,
.ledger-line.is-drawn .rule { transform: scaleX(1); }
.ledger-line .fig {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--driftwood);
  white-space: nowrap;
}
.dark .ledger-line .rule { background: rgba(255,255,255,0.16); }
.dark .ledger-line .eyebrow,
.dark .ledger-line .fig { color: var(--fog); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--r-pill);
  padding: 13px 22px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--ring); }
.btn-secondary { background: var(--canvas); color: var(--ink); box-shadow: var(--ring); }
.btn-secondary:hover { background: var(--sand); }
.btn-ghost {
  background: transparent; border-color: transparent; padding: 13px 4px; color: var(--ink);
}
.btn-ghost:hover { color: var(--driftwood); }
.dark .btn-primary { background: var(--canvas); color: var(--ink); border-color: var(--canvas); }
.dark .btn-ghost { color: var(--canvas); }
.dark .btn-ghost:hover { color: var(--fog); }
.dark .btn-secondary { background: transparent; color: var(--canvas); border-color: rgba(255,255,255,0.28); box-shadow: none; }
.dark .btn-secondary:hover { background: rgba(255,255,255,0.08); }

.link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.link:hover { border-color: var(--ink); }
.dark .link { color: var(--canvas); border-color: rgba(255,255,255,0.3); }

/* visible focus */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cool);
  outline-offset: 2px;
  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;
}

/* ============================================================ HEADER */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253,252,252,0.82);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display);
  font-weight: 500; font-size: 19px; letter-spacing: -0.02em;
  color: var(--ink);
}
.logo-icon { width: 24px; height: 24px; flex: 0 0 auto; color: currentColor; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a {
  font-size: 14px; font-weight: 400; color: var(--ink); letter-spacing: 0.01em;
  transition: color 0.15s ease;
}
.nav a:hover { color: var(--driftwood); }
.header-cta { display: flex; align-items: center; gap: 12px; }
.header-cta .btn { padding: 9px 16px; font-size: 14px; }

.hamburger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--ink); margin: 5px 0; transition: 0.2s; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink); color: var(--canvas);
  display: none; flex-direction: column; padding: 24px;
}
.mobile-menu.open { display: flex; }
.mobile-menu .mm-top { display: flex; justify-content: space-between; align-items: center; }
.mobile-menu .brand, .mobile-menu .bars { color: var(--canvas); }
.mobile-menu nav { display: flex; flex-direction: column; gap: 4px; margin-top: 40px; }
.mobile-menu nav a {
  font-family: var(--font-display); font-weight: 300; font-size: 32px; letter-spacing: -0.02em;
  color: var(--canvas); padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.mobile-menu .mm-close { background: none; border: 0; color: var(--canvas); font-size: 28px; cursor: pointer; line-height: 1; }
.mobile-menu .btn { margin-top: 32px; align-self: flex-start; }

@media (max-width: 900px) {
  .nav, .header-cta .btn { display: none; }
  .hamburger { display: block; }
}

/* ============================================================ HERO */
.hero { padding-top: 88px; padding-bottom: 96px; }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 64px;
  align-items: center;
}
.hero-copy { min-width: 0; }
.hero-copy .eyebrow { display: block; margin-bottom: 22px; }
.hero h1 {
  font-size: clamp(40px, 5.4vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  max-width: 16ch;
}
.hero .subhead {
  font-size: 19px; line-height: 1.55; color: var(--driftwood);
  max-width: 46ch; margin-bottom: 32px;
}
/* demo email-capture form (hero + close) */
.demo-form { margin-top: 32px; max-width: 470px; }
.close .demo-form { margin: 32px auto 0; }
.df-row { display: flex; gap: 10px; }
.df-input {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 13px 16px; box-shadow: var(--ring);
  transition: border-color 0.15s ease;
}
.df-input::placeholder { color: var(--fog); }
.df-input:focus-visible { border-color: var(--ink); }
.df-row .btn { flex: 0 0 auto; }
.df-msg {
  margin-top: 12px; min-height: 1.1em;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.01em;
  color: var(--driftwood);
}
.df-msg.error { color: var(--heat); }
.dark .df-input {
  background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.22); color: var(--canvas); box-shadow: none;
}
.dark .df-input:focus-visible { border-color: var(--canvas); }
.dark .df-msg { color: var(--silver); }
.dark .df-msg.error { color: #ff8a5f; }
@media (max-width: 480px) {
  .df-row { flex-direction: column; align-items: stretch; }
  .df-row .btn { justify-content: center; }
}

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: clamp(34px, 9vw, 48px); }
}

/* ============================================================ LIVE LEDGER */
.ledger {
  position: relative;
  background: var(--sand);
  border-radius: var(--r-card-lg);
  padding: 36px 34px 30px;
  overflow: hidden;
}
.ledger > * { position: relative; }

/* top-half interactive chart + cursor drill */
.ledger-chart { position: relative; margin: 16px 0 44px; }
.lc-bar { display: flex; height: 34px; width: 100%; border-radius: 7px; overflow: hidden; }
.lc-seg { height: 100%; flex: 0 0 var(--w); transition: opacity 0.25s ease, background-color 0.25s ease; }
.lc-seg:nth-child(1) { background: #2a333d; }
.lc-seg:nth-child(2) { background: #3f4853; }
.lc-seg:nth-child(3) { background: #5a6470; }
.lc-seg:nth-child(4) { background: #7c766e; }
.lc-seg:nth-child(5) { background: #9a948c; }
.lc-seg:nth-child(6) { background: #b6b3ad; }
.lc-seg:nth-child(7) { background: #cdcac4; }
.lc-bar.drilling .lc-seg { opacity: 0.3; }
.lc-bar.drilling .lc-seg.active { opacity: 1; background-color: var(--heat); }

.lc-cursor {
  position: absolute; top: 0; left: 0; width: 22px; height: 22px; opacity: 0; z-index: 3;
  pointer-events: none; filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.3));
  transition: left 0.6s cubic-bezier(0.5,0.05,0.2,1), top 0.6s cubic-bezier(0.5,0.05,0.2,1), transform 0.16s ease, opacity 0.3s ease;
}
.lc-cursor path { fill: var(--canvas); stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.lc-cursor.click { transform: scale(0.8); }

.lc-tip {
  position: absolute; top: 0; left: 0; z-index: 4; pointer-events: none;
  background: var(--ink); color: var(--canvas); border-radius: 8px; padding: 7px 11px;
  font-family: var(--font-mono); font-size: 11px; white-space: nowrap;
  display: flex; gap: 12px; align-items: baseline;
  opacity: 0; transform: translateY(4px); transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: var(--elev);
}
.lc-tip.show { opacity: 1; transform: none; }
.lc-tip .lc-tip-amt { color: #ff9a6a; font-variant-numeric: tabular-nums; }

.l-row { display: flex; align-items: baseline; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.l-head { font-size: clamp(15px, 1.7vw, 20px); }
.l-head .l-name { font-weight: 500; letter-spacing: 0.04em; }

.l-name { white-space: nowrap; color: var(--ink); }
.l-dots {
  flex: 1 1 auto; align-self: center; height: 1em; margin: 0 10px; overflow: hidden;
  background-image: radial-gradient(currentColor 1px, transparent 1.6px);
  background-size: 7px 100%; background-position: 0 bottom; background-repeat: repeat-x;
  color: var(--silver); min-width: 6px;
}
.l-amt { white-space: nowrap; font-weight: 500; flex: 0 0 auto; }

.l-head .l-amt {
  font-size: clamp(26px, 3.4vw, 42px);
  font-weight: 500; color: var(--heat); margin-left: 4px;
}
.l-head .l-delta {
  flex-basis: 100%; margin-top: 10px; text-align: right;
  font-size: 13px; color: var(--heat); font-weight: 500; letter-spacing: 0.02em;
}
.l-head .l-delta-sub { color: var(--driftwood); }

/* head wraps the delta beneath */
.l-head { flex-wrap: wrap; }

.ledger-body { margin-top: 18px; }
.ledger.collapsible .ledger-body { /* JS-driven reveal */ }

.l-sub {
  font-size: clamp(11px, 1.2vw, 13px);
  color: var(--driftwood);
  padding: 7px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  gap: 0;
  min-width: 0;
  transition: background-color 0.25s ease;
}
.l-sub.drill { background: rgba(255,71,4,0.09); }
.l-sub .tree { color: var(--silver); margin-right: 8px; white-space: nowrap; flex: 0 0 auto; }
/* name truncates before it can push amounts/tags past the card edge */
.l-sub .l-name { color: var(--ink); font-weight: 400; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.l-sub .l-amt { color: var(--ink); }
.l-tag {
  margin-left: 10px; flex: 0 0 auto;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em;
  color: var(--driftwood);
  background: rgba(0,0,0,0.04);
  border-radius: var(--r-pill); padding: 3px 9px;
  white-space: nowrap;
}
.l-sub.rd .l-tag { color: var(--heat); background: rgba(255,71,4,0.10); }
.l-sub .star { color: var(--heat); }

.l-subtotal-rule { height: 1px; background: var(--border); margin: 12px 0 12px auto; width: 220px; max-width: 60%; }
.l-reconciled .l-name { font-weight: 500; letter-spacing: 0.04em; }
.l-reconciled .l-amt { color: var(--cool); font-size: clamp(15px, 1.7vw, 19px); }
.l-reconciled .l-check { color: var(--cool); margin-left: 14px; font-weight: 700; }

.l-foot {
  margin-top: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--driftwood);
}
.l-foot .star { color: var(--heat); }

.ledger-hint {
  margin-top: 16px; font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--fog);
}

/* Animated reveal: only applied when motion is allowed and JS collapses it */
.ledger.is-collapsed .ledger-body { display: none; }
.ledger .l-sub, .ledger .l-subtotal-rule, .ledger .l-reconciled, .ledger .l-foot { /* default visible */ }
.ledger.reveal .l-sub,
.ledger.reveal .l-subtotal-rule,
.ledger.reveal .l-reconciled,
.ledger.reveal .l-foot {
  opacity: 0; transform: translateY(6px);
  animation: lineIn 0.34s ease forwards;
  animation-delay: var(--d, 0ms);
}
@keyframes lineIn { to { opacity: 1; transform: none; } }

@media (max-width: 600px) {
  .ledger { padding: 26px 22px 24px; }
  .l-head .l-amt { font-size: 28px; }
  /* keep the line-item name readable: drop the tag to its own indented line.
     A zero-height full-width break forces the wrap so the chip still hugs its text. */
  .l-sub { flex-wrap: wrap; }
  .l-sub .l-name { white-space: nowrap; }
  .l-sub .l-amt { margin-left: auto; }
  .l-sub::after { content: ""; order: 8; flex: 0 0 100%; height: 0; }
  .l-tag { order: 9; flex: 0 0 auto; margin-left: 28px; margin-top: 6px; }
}

/* ============================================================ STAT ROW */
.prose { max-width: 68ch; }
.prose .body { font-size: 18px; line-height: 1.6; color: var(--driftwood); margin-top: 18px; }
h2.section-title { font-size: clamp(30px, 3.6vw, 40px); line-height: 1.12; letter-spacing: -0.025em; max-width: 20ch; }

.stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  margin-top: 56px; border-top: 1px solid var(--border);
}
.stat {
  padding: 28px 28px 0; border-left: 1px solid var(--border);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .fig { font-size: clamp(40px, 5vw, 56px); font-weight: 500; line-height: 1; color: var(--ink); }
.stat .stat-label { margin-top: 14px; font-size: 14px; line-height: 1.45; color: var(--driftwood); max-width: 26ch; }
.footnote { margin-top: 26px; font-family: var(--font-mono); font-size: 11px; color: var(--fog); }

@media (max-width: 700px) {
  .stat-row { grid-template-columns: 1fr; }
  .stat { border-left: 0; border-top: 1px solid var(--border); padding: 24px 0 0; }
  .stat:first-child { border-top: 0; }
}

/* ============================================================ DARK BAND */
.dark { background: var(--ink); color: var(--canvas); }
.dark h2.section-title { color: var(--canvas); }
.dark .body { color: var(--silver); }

/* The Gap — translation table */
.gap-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 0 40px; align-items: stretch;
  margin-top: 56px;
}
.translate-col h3 {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fog);
  margin-bottom: 18px;
}
.translate-col.sand-col { padding: 0; }
.t-item {
  font-family: var(--font-mono); font-size: 14px;
  padding: 16px 0; border-top: 1px solid rgba(255,255,255,0.12);
  color: var(--canvas);
}
.translate-col.left .t-item { color: var(--silver); }
.gap-mid {
  align-self: stretch; width: 1px; position: relative;
  background: rgba(255,255,255,0.12);
}
.gap-mid .arrow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-family: var(--font-mono); color: var(--fog); font-size: 14px; background: var(--ink); padding: 8px 4px;
}
@media (max-width: 700px) {
  .gap-grid { grid-template-columns: 1fr; gap: 8px; }
  .gap-mid { display: none; }
  .translate-col.right { margin-top: 24px; }
}

/* ============================================================ PRODUCT BLOCKS */
.intro-line { font-size: 18px; line-height: 1.6; color: var(--driftwood); max-width: 62ch; margin-top: 18px; }
.blocks { margin-top: 56px; display: flex; flex-direction: column; gap: 20px; }

.block {
  background: var(--sand);
  border-radius: var(--r-card-lg);
  padding: 36px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
.block.lead { padding: 44px; }
.block .b-index {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--driftwood); text-transform: uppercase; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.block .b-index .star { color: var(--heat); }
.block h3 { font-size: clamp(24px, 2.8vw, 32px); line-height: 1.12; letter-spacing: -0.02em; }
.block .b-copy { margin-top: 16px; font-size: 16px; line-height: 1.6; color: var(--driftwood); max-width: 48ch; }
.block .b-copy + .link { margin-top: 20px; display: inline-block; }

/* vignette = white elevated card mock */
.vignette {
  background: #fff; border-radius: var(--r-card); padding: 22px;
  box-shadow: var(--elev); font-family: var(--font-mono); font-size: 13px;
}
.vignette .v-title {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--driftwood); margin-bottom: 16px;
}
.v-check-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--border); }
.v-check-row:last-child { border-bottom: 0; }
.v-check-row .src { color: var(--ink); }
.v-check-row .state { color: var(--cool); font-weight: 500; }
.v-check-row .state.pending { color: var(--fog); }

/* nested tagged-spend tree (Pillar 1 vignette) */
.v-title .v-rec { float: right; color: var(--cool); font-weight: 500; }
.tree { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tree li { display: flex; align-items: baseline; padding: 5px 0; color: var(--driftwood); }
.tree .t-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree .t-amt { white-space: nowrap; color: var(--ink); padding-left: 12px; }
.tree .t-g { color: var(--silver); margin-right: 7px; white-space: nowrap; }
.tree .t0 {
  color: var(--ink); font-weight: 500; font-size: 13px;
  border-bottom: 1px solid var(--border); padding-bottom: 9px; margin-bottom: 3px;
}
.tree .t1 { font-size: 12.5px; padding-left: 2px; }
.tree .t2 { font-size: 12px; padding-left: 22px; }
.tree .t2 .t-amt { color: var(--driftwood); }

.spark { width: 100%; height: 90px; margin: 6px 0 14px; }
/* lines draw in when the block scrolls into view (only when .anim is set by JS) */
.anim .spark-line { stroke-dasharray: 1; stroke-dashoffset: 1; }
.anim .spark.in-view .spark-line { stroke-dashoffset: 0; transition: stroke-dashoffset 1.1s ease; }
.anim .spark.in-view .spark-line:nth-child(2) { transition-delay: 0.16s; }
.anim .spark.in-view .spark-line:nth-child(3) { transition-delay: 0.32s; }
.v-legend { display: flex; gap: 16px; font-size: 11px; color: var(--driftwood); }
.v-legend i { font-style: normal; }
.v-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

.flow-figure { display: flex; align-items: center; gap: 14px; font-size: clamp(16px, 2vw, 22px); }
.flow-figure .from { color: var(--heat); }
.flow-figure .to { color: var(--cool); }
.flow-figure .arrow { color: var(--fog); }
.v-sub { margin-top: 14px; color: var(--driftwood); font-size: 12px; }
.v-sub .held { color: var(--cool); }

.beforeafter { display: flex; align-items: center; gap: 14px; font-size: clamp(15px, 1.9vw, 20px); }
.beforeafter .from { color: var(--heat); }
.beforeafter .to { color: var(--cool); }

@media (max-width: 820px) {
  .block, .block.lead { grid-template-columns: 1fr; gap: 28px; padding: 30px; }
}

/* ============================================================ INTEGRATIONS (marquee) */
.marquees { margin-top: 56px; display: flex; flex-direction: column; gap: 24px; }
.marquee-label {
  display: block; margin: 0 var(--gutter) 14px; text-align: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--driftwood);
}
.marquee-note { text-align: center; margin-top: 32px; color: var(--driftwood); font-size: 14px; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee-track {
  display: flex; width: max-content;
  animation: marquee-left 52s linear infinite;
}
.marquee[data-dir="right"] .marquee-track { animation-name: marquee-right; animation-duration: 60s; }
.marquee:hover .marquee-track { animation-play-state: paused; }
/* trailing margin (not flex gap) so the two duplicated halves loop seamlessly at -50% */
@keyframes marquee-left  { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marquee-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.int-chip {
  display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto;
  margin-right: 14px;
  padding: 13px 20px; border: 1px solid var(--border); border-radius: var(--r-pill);
  background: var(--canvas); color: var(--driftwood); white-space: nowrap;
  box-shadow: var(--ring); transition: color 0.15s ease, border-color 0.15s ease;
}
.int-chip:hover { color: var(--ink); border-color: var(--silver); }
.int-chip svg { width: 22px; height: 22px; flex: 0 0 auto; color: inherit; }
/* real brand logos (Simple Icons) recolored to a uniform monochrome via mask */
.int-logo {
  width: 22px; height: 22px; flex: 0 0 auto;
  background-color: var(--driftwood);
  -webkit-mask: var(--logo) center / contain no-repeat;
          mask: var(--logo) center / contain no-repeat;
  transition: background-color 0.15s ease;
}
.int-chip:hover .int-logo { background-color: var(--ink); }
.int-chip .nm { font-family: var(--font-body); font-size: 15px; font-weight: 500; }
.int-chip.muted { background: var(--sand); box-shadow: none; color: var(--fog); }

@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; overflow: visible; }
  .marquee-track { animation: none; width: auto; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 0 var(--gutter); }
  .int-chip { margin-right: 0; }
  .int-chip.dup { display: none; }
}

/* ============================================================ CLOSE (dark) */
.close { text-align: center; padding: 120px 0; }
.close h2.section-title { margin: 0 auto; max-width: 18ch; }
.close .body { margin: 18px auto 32px; max-width: 50ch; }
.close .ledger-line { justify-content: center; }
.close-actions { display: flex; justify-content: center; }
.close-callback {
  margin: 48px auto 0; max-width: 560px;
  font-family: var(--font-mono); font-variant-numeric: tabular-nums;
  font-size: clamp(12px, 1.7vw, 15px);
  display: flex; align-items: baseline; color: var(--silver);
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; padding: 16px 20px;
}
.close-callback .l-name { color: var(--canvas); }
.close-callback .l-dots { color: rgba(255,255,255,0.25); }
.close-callback .l-amt { color: #9db4ff; }
.close-callback .l-check { color: #9db4ff; margin-left: 12px; }

/* ============================================================ FOOTER */
.site-footer { background: var(--ink); color: var(--silver); padding: 72px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid .brand { color: var(--canvas); }
.footer-grid .brand .bars { color: var(--canvas); }
.footer-tag { margin-top: 16px; font-size: 14px; color: var(--fog); max-width: 28ch; }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fog); margin: 0 0 16px; font-weight: 500; }
.footer-col a { display: block; font-size: 14px; color: var(--silver); padding: 6px 0; transition: color 0.15s ease; }
.footer-col a:hover { color: var(--canvas); }
.footer-fine {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12);
  font-family: var(--font-mono); font-size: 11px; color: var(--fog); line-height: 1.6;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-grid .footer-brand-col { grid-column: 1 / -1; }
}

/* ============================================================ LEGAL PAGES */
.legal { padding: 56px 0 96px; }
.legal .wrap { max-width: 760px; }
.legal .back {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--driftwood); display: inline-block; margin-bottom: 28px;
}
.legal .back:hover { color: var(--ink); }
.legal h1 {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(32px, 4vw, 44px); letter-spacing: -0.025em; line-height: 1.1;
}
.legal .updated { font-family: var(--font-mono); font-size: 12px; color: var(--fog); margin-top: 14px; }
.legal h2 {
  font-family: var(--font-display); font-weight: 400; font-size: 22px;
  letter-spacing: -0.01em; margin-top: 44px;
}
.legal p { font-size: 16px; line-height: 1.65; color: var(--driftwood); margin-top: 14px; }
.legal a:not(.back):not(.brand):not(.btn) { color: var(--ink); border-bottom: 1px solid var(--border); }
.legal ul { margin-top: 14px; padding-left: 22px; list-style: disc; }
.legal li { font-size: 16px; line-height: 1.6; color: var(--driftwood); margin-top: 8px; }
.legal .disclaimer {
  margin-top: 40px; padding: 20px 22px; background: var(--sand);
  border-radius: var(--r-card); font-size: 14px; line-height: 1.6; color: var(--driftwood);
}

/* reduced motion: kill all transitions/animations, show end states */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ledger-line .rule { transform: scaleX(1); }
}
