/* ==========================================================================
   Flowsheet sections. Wispr-inspired, green-primary, light grid + dark forest
   sections, graphs. Color is functional.
   ========================================================================== */

/* ---- Atoms ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0 1.35rem;
  border-radius: var(--r-pill);
  font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600;
  line-height: 1; border: 1.5px solid transparent; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn--lg { min-height: 54px; padding: 0 1.9rem; font-size: 1.05rem; }
.btn--xl { min-height: 72px; padding: 0 3rem; font-size: 1.3rem; gap: 0.7rem; box-shadow: 0 18px 40px -16px rgba(20, 160, 111, 0.75); }
.btn--xl svg { width: 22px; height: 22px; }
.btn--primary { background: var(--green-400); color: var(--accent-ink); box-shadow: 0 10px 24px -12px rgba(20, 160, 111, 0.7); }
.btn--primary:hover { background: var(--green-500); transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(20, 160, 111, 0.8); }
.btn--soft { background: var(--green-50); color: var(--green-700); border-color: var(--green-100); }
.btn--soft:hover { background: var(--green-100); }
.btn--ghost { background: transparent; color: var(--ink); min-height: 40px; }
.btn--ghost:hover { color: var(--green-600); }
.btn--lock { background: var(--amber); color: #3a2700; font-weight: 700; min-height: 38px; padding: 0 1rem; }
.btn--lock:hover { filter: brightness(0.96); }
.btn--lock.is-locked { background: var(--green-400); color: var(--accent-ink); }
.btn[disabled] { opacity: 0.72; cursor: default; transform: none; }

.tk {
  font-family: var(--font-mono); font-size: 0.9em; font-weight: 500;
  color: var(--green-700); background: var(--green-50);
  padding: 0.12em 0.45em; border-radius: 7px; border: 1px solid var(--green-100);
}
.tk--lg { font-size: 0.82em; }
.dark .tk, .panel .tk { color: var(--green-200); background: rgba(31,194,133,0.12); border-color: var(--line-dark); }

kbd {
  font-family: var(--font-mono); font-size: 0.74em; font-weight: 600;
  color: var(--ink-2); background: #fff; border: 1px solid var(--line-strong);
  border-bottom-width: 2px; border-radius: 6px; padding: 0.18em 0.45em; margin: 0 0.06em;
}
.dark kbd { color: var(--on-dark); background: rgba(255,255,255,0.06); border-color: var(--line-dark); }

.pill {
  display: inline-flex; align-items: center; gap: 0.35em;
  font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600;
  padding: 0.28em 0.75em; border-radius: var(--r-pill);
}
.pill--draft { background: var(--green-50); color: var(--green-600); border: 1px solid var(--green-100); }
.pill--ratified { background: rgba(31,194,133,0.16); color: var(--green-400); border: 1px solid rgba(31,194,133,0.3); }
.pill--ratified::before { content: "\2713"; }

.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.dot--green { background: var(--green-400); }
.dot--teal { background: var(--teal); }
.dot--amber { background: var(--amber); }
.dot--muted { background: var(--on-dark-3); }

.head { max-width: 820px; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.head--center { margin-inline: auto; }
.head h2 { font-size: var(--fs-h2); margin-top: 0.85rem; }

.card {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
}

/* ============================ NAV ============================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  transition: background-color var(--dur), border-color var(--dur), backdrop-filter var(--dur);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(243, 247, 242, 0.8);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; }
.brand__mark { display: block; width: 28px; height: 28px; }
.brand__name { font-weight: 700; font-size: 1.2rem; color: var(--ink); letter-spacing: -0.02em; }
.brand__name--light { color: var(--on-dark); }
.nav__links { display: flex; gap: 0.4rem; }
.nav__links a { font-size: var(--fs-sm); font-weight: 500; color: var(--ink-2); padding: 0.5rem 0.85rem; border-radius: var(--r-pill); }
.nav__links a:hover { color: var(--green-600); background: var(--green-50); }
.nav__cta { display: flex; align-items: center; gap: 0.6rem; }
.nav__burger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.nav__burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ============================ HERO ============================ */
.hero { position: relative; padding-top: 122px; padding-bottom: clamp(3rem, 2rem + 4vw, 6rem); overflow: hidden; }
.hero__flow { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5; }
.hero__flow svg { width: 100%; height: 100%; }
.hero__flow-text { font-family: var(--font-serif); font-style: italic; font-size: 30px; fill: var(--green-700); opacity: 0.16; }
.hero__inner { text-align: center; }
.hero__title { font-size: var(--fs-display); font-weight: 600; letter-spacing: -0.035em; margin: 1.1rem 0 1.4rem; }
.hero__title em { color: var(--green-500); font-size: 1.04em; }
.hero__title .hero__token {
  font-family: var(--font-mono); font-style: normal; font-weight: 600;
  font-size: 0.82em; letter-spacing: -0.02em; color: var(--green-500);
}
.hero__lead { font-size: var(--fs-lead); color: var(--ink-2); }
.hero__form { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; margin: 2.6rem auto 1.2rem; max-width: 580px; }
.hero__form input {
  flex: 1 1 280px; min-width: 240px; height: 72px; padding: 0 1.6rem; font-size: 1.05rem;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-pill);
  background: var(--paper-2); transition: border-color var(--dur);
}
.hero__form input::placeholder { color: var(--ink-3); }
.hero__form input:focus { outline: none; border-color: var(--green-400); }
.hero__form .btn--xl { flex: 0 0 auto; }
.hero__note { font-size: var(--fs-sm); color: var(--ink-3); }

/* Social-proof signup counter */
.hero__count { margin: 1.6rem 0 0; font-size: var(--fs-sm); color: var(--ink-3); display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; }
.hero__count strong { color: var(--ink); font-weight: 800; font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); line-height: 1; letter-spacing: -0.03em; }
.hero__count::before {
  content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--green-400);
  box-shadow: 0 0 0 0 rgba(31, 194, 133, 0.5); animation: pulse-dot 2.2s var(--ease) infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(31, 194, 133, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(31, 194, 133, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 194, 133, 0); }
}

/* Rolling-digit odometer for the live signup count */
.odometer { display: inline-flex; align-items: center; line-height: 1; height: 1em; font-variant-numeric: tabular-nums; }
.odometer__col { height: 1em; overflow: hidden; }
.odometer__strip { display: flex; flex-direction: column; transition: transform 1.5s var(--ease-slide); will-change: transform; }
.odometer__strip > b { flex: none; height: 1em; display: flex; align-items: center; justify-content: center; font-weight: inherit; }
.odometer__sep { padding: 0 0.03em; }

/* Form confirmation + error note (kept out of the button so it never wraps) */
.form-success {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin: 2.4rem auto 1.2rem; padding: 0.85rem 1.6rem;
  font-weight: 600; color: var(--green-700);
  background: var(--green-50); border: 1px solid var(--green-100); border-radius: var(--r-pill);
}
.form-success::before { content: "\2713"; color: var(--green-500); font-weight: 700; }
.form-note { margin-top: 0.9rem; font-size: var(--fs-sm); color: var(--coral); }

.hero__stage { margin-top: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.panel {
  position: relative; max-width: 940px; margin-inline: auto;
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  padding: clamp(1rem, 0.5rem + 2vw, 2rem);
}
.panel__doc { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; max-width: 640px; }
.panel__bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
.panel__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.panel__file { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-3); font-style: normal; }
.panel__body { padding: 1.5rem 1.5rem 3.5rem; }
.panel__body p { font-size: 1.1rem; line-height: 1.8; color: var(--ink-2); }
.panel__body .dim { color: var(--ink-3); }
.demo-token { color: var(--green-600); font-family: var(--font-mono); font-weight: 600; }
.demo-caret { display: inline-block; width: 2px; height: 1.05em; background: var(--green-500); margin-left: 1px; vertical-align: text-bottom; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* Animated pointer that glides to the Lock button and taps it */
.demo-cursor {
  position: absolute; left: 42%; top: 42%; z-index: 6;
  width: 26px; height: 26px; opacity: 0; pointer-events: none;
  transform: translate(-50%, -50%);
  transition: left 1.15s var(--ease), top 1.15s var(--ease), opacity 0.45s var(--ease);
  filter: drop-shadow(0 3px 5px rgba(6, 52, 42, 0.35));
}
.demo-cursor.is-active { opacity: 1; }
.demo-cursor.is-click { animation: cursor-tap 0.42s var(--ease); }
@keyframes cursor-tap {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  45% { transform: translate(-50%, -50%) scale(0.76); }
}
.btn--lock.is-pressed { transform: scale(0.94); filter: brightness(0.93); }

.receipt {
  position: absolute; right: clamp(1rem, 0.5rem + 1vw, 2rem); bottom: clamp(-1rem, -2vw, 0rem);
  width: min(330px, 80%);
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-md); padding: 1.1rem 1.2rem;
  transform-origin: center; /* JS sets this to the ebitda[q3] token */
  transition: opacity 0.5s ease-out, transform 0.9s cubic-bezier(0.33, 1, 0.68, 1);
}
/* Zooms out of the typed token: armed (collapsed onto the token) then
   smoothly scales up to place. JS drives it so no-JS keeps it visible. */
.receipt.is-armed { opacity: 0; transform: scale(0.08); transition: none; }
.receipt.is-popped { opacity: 1; transform: none; }
@keyframes token-pop {
  0% { background: rgba(31, 194, 133, 0); }
  30% { background: rgba(31, 194, 133, 0.32); }
  100% { background: rgba(31, 194, 133, 0); }
}
.demo-token.is-flash { animation: token-pop 0.62s ease-in; border-radius: 5px; padding: 0 2px; }
.receipt__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.receipt__value { font-size: 1.7rem; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; }
.receipt__meta { display: grid; gap: 0.5rem; }
.receipt__meta div { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--fs-xs); }
.receipt__meta dt { color: var(--ink-3); }
.receipt__meta dd { color: var(--ink-2); font-weight: 600; }
.receipt__spark { display: flex; align-items: center; gap: 0.5rem; margin: 0.85rem 0; padding: 0.5rem 0; border-block: 1px solid var(--line); }
.receipt__spark svg { width: 90px; height: 24px; }
.receipt__spark span { font-family: var(--font-mono); font-size: 0.7rem; color: var(--green-600); }
.receipt__foot { display: flex; align-items: center; justify-content: space-between; }
.kbd-hint { font-size: var(--fs-xs); }

/* ============================ APP MARQUEE ============================ */
.apps { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.apps__label { text-align: center; font-size: var(--fs-sm); color: var(--ink-3); margin-bottom: 1.75rem; }
.marquee { position: relative; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee__track { display: flex; align-items: center; gap: clamp(1.5rem, 1rem + 3vw, 4rem); width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track > span { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.4rem, 1rem + 1.6vw, 2.1rem); color: var(--green-700); opacity: 0.55; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================ STAKES (dark) ============================ */
.stakes__head { max-width: 880px; margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.stakes__title { font-size: var(--fs-h2); margin-top: 0.85rem; }
.stakes__title em { color: var(--green-300); }
.stakes__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(1.25rem, 0.75rem + 2vw, 2rem); align-items: stretch; }
.gauge-card, .stat {
  background: var(--green-800); border: 1px solid var(--line-dark);
  border-radius: var(--r-lg); padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
}
.gauge-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.gauge { position: relative; width: clamp(180px, 40vw, 230px); aspect-ratio: 1; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge__track { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 16; }
.gauge__fill { fill: none; stroke: url(#none); stroke: var(--green-400); stroke-width: 16; stroke-linecap: round;
  stroke-dasharray: 528; stroke-dashoffset: 528; transition: stroke-dashoffset 1.6s var(--ease); }
.gauge__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; padding-inline: 24%; text-align: center; }
.gauge__num { font-size: clamp(2.4rem, 1.6rem + 3vw, 3.4rem); font-weight: 700; color: var(--on-dark); letter-spacing: -0.03em; line-height: 1; }
.gauge__label { font-size: 0.7rem; line-height: 1.3; color: var(--on-dark-3); font-family: var(--font-mono); }
.gauge-card__body { color: var(--on-dark-2); margin: 1.1rem 0 0.75rem; }
.src { font-family: var(--font-mono); font-size: 0.72rem; color: var(--on-dark-3); }

.stat-stack { display: grid; gap: clamp(1.25rem, 0.75rem + 2vw, 2rem); }
.stat__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.stat__num { font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3.2rem); font-weight: 700; letter-spacing: -0.03em; color: var(--on-dark); }
.stat:first-child .stat__num { color: #f6a08e; }
.stat:last-child .stat__num { color: #f3bd6b; }
.stat__spark { width: 130px; height: 38px; flex: none; }
.stat p { color: var(--on-dark-2); margin-bottom: 0.75rem; font-size: var(--fs-sm); }
.stakes__foot { max-width: 64ch; margin-top: clamp(2rem, 1rem + 2vw, 3rem); color: var(--on-dark-2); font-size: var(--fs-lead); }

/* ============================ HOW ============================ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; list-style: none; }
.step { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.6rem 1.4rem; box-shadow: var(--shadow-sm); }

/* Staggered scroll reveal: cards glide in one after another */
.how .step { transition-property: opacity, transform; transition-duration: 0.5s; transition-timing-function: var(--ease-slide); transform: translateY(44px); }
.how .step.is-in { transform: none; }
.how .step[data-delay="1"] { transition-delay: 0.07s; }
.how .step[data-delay="2"] { transition-delay: 0.14s; }
.how .step[data-delay="3"] { transition-delay: 0.21s; }
.step__n { font-family: var(--font-mono); font-weight: 600; font-size: var(--fs-sm); color: var(--green-500); }
.step h3 { font-size: var(--fs-h3); margin: 0.7rem 0 0.55rem; }
.step p { font-size: var(--fs-sm); color: var(--ink-2); }
.step__art { margin-top: 1.4rem; height: 58px; display: flex; align-items: center; gap: 0.5rem; padding: 0 1rem; border-radius: var(--r-sm); background: var(--green-50); font-family: var(--font-mono); font-size: var(--fs-sm); }
.step__art .blink { width: 2px; height: 1.1em; background: var(--green-500); animation: blink 1s steps(1) infinite; }
.step__art--flow .d { width: 9px; height: 9px; border-radius: 50%; background: var(--green-600); }
.step__art--flow .l { flex: 1; height: 2px; background: var(--grad-green); border-radius: 2px; }
.step__art--flow .c { color: var(--green-700); font-weight: 600; }
.step__art--lock { background: rgba(242,167,59,0.14); color: #9a6a08; justify-content: center; font-weight: 600; }
.step__art--ok { background: rgba(31,194,133,0.14); justify-content: center; }

/* ============================ GRAPHS ============================ */
.graphs__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.graph { padding: clamp(1.5rem, 1rem + 2vw, 2.25rem); }
.graph__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.graph__head h3 { font-size: var(--fs-h3); }
.graph__tag { font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-3); }
.graph__note { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 1.5rem; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; }
.legend__item { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--fs-xs); color: var(--ink-3); }

.bars { display: grid; gap: 1.25rem; }
.bar-row { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 1rem; }
.bar-row__label { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500; }
.bar-row__track { background: var(--green-50); border-radius: var(--r-pill); height: 30px; overflow: hidden; }
.bar { height: 100%; width: 0; border-radius: var(--r-pill); display: flex; align-items: center; justify-content: flex-end; padding-right: 0.7rem; transition: width 1.3s var(--ease); }
.bar span { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 600; color: #fff; }
.bar--muted { background: var(--line-strong); }
.bar--muted span { color: var(--ink-2); }
.bar--amber { background: var(--amber); }
.bar--amber span { color: #3a2700; }
.bar--green { background: var(--grad-green); min-width: 44px; }

.linechart { position: relative; }
.linechart svg { width: 100%; height: auto; }
.lc-grid line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 5; }
.lc-area { fill: rgba(31,194,133,0.12); opacity: 0; transition: opacity 1s var(--ease) 0.4s; }
.lc-live { fill: none; stroke: var(--green-400); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lc-stale { fill: none; stroke: var(--line-strong); stroke-width: 3; stroke-dasharray: 4 6; stroke-linecap: round; }
.lc-live, .lc-stale { stroke-dasharray: 1; stroke-dashoffset: 1; }
.lc-live[data-lc-line] { transition: stroke-dashoffset 1.6s var(--ease); }
.lc-stale[data-lc-line2] { transition: stroke-dashoffset 1.6s var(--ease) 0.3s; stroke-dasharray: 0.02 0.04; }
.lc-dot { fill: var(--green-400); opacity: 0; transition: opacity 0.4s var(--ease) 1.6s; }
.lc-dot--muted { fill: var(--on-dark-3); }
.linechart.is-drawn .lc-live, .linechart.is-drawn .lc-stale { stroke-dashoffset: 0; }
.linechart.is-drawn .lc-area, .linechart.is-drawn .lc-dot { opacity: 1; }
.linechart__x { display: flex; justify-content: space-between; margin-top: 0.6rem; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--ink-3); }

/* ============================ PROVENANCE (dark) ============================ */
.prov__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.prov__copy h2 { font-size: var(--fs-h2); margin: 0.85rem 0 1.25rem; }
.prov__copy h2 em { color: var(--green-300); }
.prov__lead { font-size: var(--fs-lead); color: var(--on-dark-2); margin-bottom: 1.75rem; max-width: 46ch; }
.prov__list { display: grid; gap: 0.9rem; }
.prov__list li { display: flex; align-items: flex-start; gap: 0.7rem; font-size: var(--fs-sm); color: var(--on-dark-2); }
.prov__list .dot { margin-top: 0.45em; }
.prov__panel { display: flex; justify-content: center; }
.overlay { width: 100%; max-width: 420px; background: var(--green-800); border: 1px solid var(--line-dark); border-radius: var(--r-lg); padding: 1.6rem; box-shadow: var(--shadow-lg); }
.overlay__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.overlay__token { font-family: var(--font-mono); font-size: var(--fs-sm); color: var(--green-300); }
.overlay__value { font-size: 2.6rem; font-weight: 700; color: var(--on-dark); line-height: 1; margin-bottom: 1.1rem; letter-spacing: -0.03em; }
.overlay__table { width: 100%; border-collapse: collapse; margin-bottom: 1.25rem; }
.overlay__table th, .overlay__table td { text-align: left; padding: 0.5rem 0; font-size: var(--fs-sm); border-bottom: 1px solid var(--line-dark); }
.overlay__table th { color: var(--on-dark-3); font-weight: 400; width: 34%; }
.overlay__table td { color: var(--on-dark); }
.conf { display: grid; gap: 0.4rem; margin-bottom: 1.1rem; }
.conf__row { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--on-dark-2); }
.conf__val { color: var(--green-300); font-family: var(--font-mono); }
.conf__bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: var(--r-pill); overflow: hidden; margin-bottom: 0.5rem; }
.conf__bar i { display: block; height: 100%; width: 0; background: var(--grad-emerald); border-radius: var(--r-pill); transition: width 1.2s var(--ease); }
.overlay__foot { font-family: var(--font-mono); font-size: 0.7rem; color: var(--on-dark-3); }

/* ============================ FEATURES ============================ */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.feat { padding: 1.75rem; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.feat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feat--wide { grid-column: span 2; }
.feat h3 { font-size: var(--fs-h3); margin-bottom: 0.55rem; }
.feat p { font-size: var(--fs-sm); color: var(--ink-2); }
.feat__icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 13px; font-size: 1.3rem; margin-bottom: 1.1rem; font-weight: 600; }
.feat__icon--green { background: var(--green-50); color: var(--green-600); }
.feat__icon--teal { background: rgba(22,182,194,0.12); color: var(--teal); }
.feat__icon--amber { background: rgba(242,167,59,0.14); color: #b87708; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }
.chip { font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 500; color: var(--green-700); background: var(--green-50); border: 1px solid var(--green-100); border-radius: var(--r-pill); padding: 0.4rem 0.85rem; transform: translateX(8px); opacity: 0; transition: transform 0.6s var(--ease), opacity 0.6s var(--ease); }
.is-in .chip { transform: none; opacity: 1; }
.tok-list { display: grid; gap: 0.55rem; margin-top: 1.25rem; }
.tok-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 1rem; background: var(--cream); border: 1px solid var(--line); border-radius: var(--r-sm); }
.tok-list span { font-size: var(--fs-sm); color: var(--ink-3); text-align: right; }

/* ============================ WHO ============================ */
.who__lead { margin-top: 1rem; font-size: var(--fs-lead); color: var(--ink-2); }
.who-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-top: 2.5rem; }
.who-chip { font-weight: 600; font-size: var(--fs-sm); color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 0.7rem 1.4rem; transition: var(--dur); }
.who-chip:hover { border-color: var(--green-400); color: var(--green-600); }
.who-chip--lead { background: var(--green-400); color: var(--accent-ink); border-color: var(--green-400); }

/* ============================ VOICES (dark marquee cards) ============================ */
.voices .marquee--cards { margin-top: clamp(2rem, 1rem + 3vw, 3.5rem); }
.marquee--cards .marquee__track { gap: 1.25rem; animation-duration: 56s; }
.voice { width: 360px; flex: none; background: var(--green-800); border: 1px solid var(--line-dark); border-radius: var(--r-lg); padding: 1.6rem; }
.voice blockquote { font-family: var(--font-sans); font-style: normal; font-weight: 400; font-size: 1.0625rem; line-height: 1.55; color: var(--on-dark); margin-bottom: 1rem; }
.voice figcaption { font-size: var(--fs-sm); font-weight: 600; color: var(--green-300); }

/* ============================ CTA ============================ */
.cta { position: relative; overflow: hidden; }
.cta__curve { position: absolute; inset: 0; z-index: -1; display: flex; align-items: center; justify-content: center; opacity: 0.6; }
.cta__curve svg { width: min(720px, 90%); height: auto; }
.cta__title { font-size: clamp(2.5rem, 1.6rem + 4vw, 4.5rem); font-weight: 600; letter-spacing: -0.03em; }
.cta__title em { color: var(--green-500); }
.cta__lead { font-size: var(--fs-lead); color: var(--ink-2); margin: 1.25rem auto 2rem; }
.cta__form { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.cta__form input { min-width: 290px; height: 54px; padding: 0 1.3rem; border: 1.5px solid var(--line-strong); border-radius: var(--r-pill); background: var(--paper-2); transition: border-color var(--dur); }
.cta__form input::placeholder { color: var(--ink-3); }
.cta__form input:focus { outline: none; border-color: var(--green-400); }
.cta__note { font-size: var(--fs-sm); color: var(--ink-3); margin-top: 1.25rem; }

/* ============================ FOOTER ============================ */
.footer { padding-block: clamp(3rem, 2rem + 3vw, 5rem) 2rem; }
.footer__inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid var(--line-dark); }
.footer__brand p { margin-top: 0.9rem; font-size: var(--fs-sm); color: var(--on-dark-2); max-width: 30ch; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.footer__cols h4 { color: var(--on-dark); font-size: var(--fs-sm); margin-bottom: 1rem; }
.footer__cols a { display: block; font-size: var(--fs-sm); color: var(--on-dark-2); padding: 0.3rem 0; }
.footer__cols a:hover { color: var(--green-300); }
.footer__bar { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 2rem; font-size: var(--fs-xs); color: var(--on-dark-3); }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .feat--wide { grid-column: span 2; }
}
@media (max-width: 860px) {
  .nav__links, .nav__cta .btn { display: none; }
  .nav__burger { display: flex; }
  .stakes__grid, .graphs__grid, .prov__grid, .footer__inner { grid-template-columns: 1fr; }
  .receipt { position: relative; right: 0; bottom: 0; width: 100%; margin-top: 1.25rem; }
  .panel__doc { max-width: none; }
  .panel__body { padding-bottom: 1.5rem; }
}
@media (max-width: 560px) {
  .steps, .feat-grid { grid-template-columns: 1fr; }
  .feat--wide { grid-column: span 1; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .cta__form input { min-width: 100%; }
  .bar-row { grid-template-columns: 84px 1fr; }
  .voice { width: 280px; }
  .btn--xl { min-height: 62px; padding: 0 1.8rem; font-size: 1.12rem; }
  .hero__form input { height: 62px; flex-basis: 100%; }
  .hero__form .btn--xl { width: 100%; }
}

/* ============================ TEXT BALANCE ============================ */
/* Even out short copy so no line is left holding a single word. */
.hero__lead, .hero__note, .stakes__foot, .gauge-card__body, .stat p,
.step p, .graph__note, .prov__lead, .feat p, .who__lead,
.cta__lead, .cta__note, .apps__label, .footer__brand p,
.prov__list li, .voice blockquote, .tok-list span {
  text-wrap: balance;
}

/* ============================ DEMO VIDEO (sticky scroll reveal) ============================ */
/* A tall section pins the video, which scales up from a rounded card as you
   scroll through it. JS drives the transform; CSS holds a sensible default so
   it still looks right with no JS or reduced motion. */
.demo-video { position: relative; height: 200vh; background: var(--paper); }
.demo-video__sticky {
  position: sticky; top: 0;
  height: 100vh; min-height: 540px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: clamp(0.9rem, 0.5rem + 1vw, 1.6rem);
  padding-inline: var(--page-x);
  overflow: hidden;
}
.demo-video__eyebrow { margin: 0; }
.demo-video__frame {
  position: relative; margin: 0;
  width: min(1200px, 94vw);
  aspect-ratio: 2520 / 1080;
  max-height: 78vh;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--green-950);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  transform: scale(0.86); /* JS grows this toward 1 on scroll */
  transform-origin: center center;
  will-change: transform;
}
.demo-video__media { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Before/after overlay: a labelled box at the top-left of each half. The
   video's split sits a little below center, so the "With" label is nudged
   past the midline to land at the top of the lower half. */
.demo-video__labels { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.demo-video__divider {
  position: absolute; left: 0; right: 0; top: 57%;
  height: 2px; background: var(--green-400);
  box-shadow: 0 0 16px 1px rgba(31, 194, 133, 0.5);
}
.demo-video__label {
  position: absolute;
  left: clamp(0.7rem, 0.2rem + 1.6vw, 1.5rem);
  white-space: nowrap;
  font-family: var(--font-sans); font-weight: 600;
  font-size: clamp(0.95rem, 0.6rem + 1.3vw, 1.65rem); line-height: 1;
  padding: 0.42em 0.95em; border-radius: var(--r-sm);
}
.demo-video__label--before {
  top: clamp(0.7rem, 0.2rem + 1.6vw, 1.5rem);
  color: var(--cream);
  background: var(--green-950);
  border: 1px solid rgba(234, 244, 236, 0.3);
}
.demo-video__label--after {
  top: 62%;
  color: var(--accent-ink);
  background: var(--green-400);
  border: 1px solid rgba(4, 40, 29, 0.25);
}
.demo-video__sound {
  position: absolute; z-index: 2;
  right: clamp(0.7rem, 0.4rem + 0.8vw, 1.15rem);
  bottom: clamp(0.7rem, 0.4rem + 0.8vw, 1.15rem);
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--cream);
  background: rgba(4, 35, 27, 0.5);
  border: 1px solid rgba(234, 244, 236, 0.28);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: pointer;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.demo-video__sound:hover { background: rgba(4, 35, 27, 0.72); transform: translateY(-1px); }
.demo-video__sound .i-off { display: none; }
.demo-video.is-muted .demo-video__sound .i-on { display: none; }
.demo-video.is-muted .demo-video__sound .i-off { display: block; }

@media (max-width: 640px) {
  .demo-video { height: 160vh; }
  .demo-video__frame { width: 94vw; border-radius: var(--r-lg); transform: scale(0.92); }
}
@media (prefers-reduced-motion: reduce) {
  .demo-video { height: auto; padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
  .demo-video__sticky { position: static; height: auto; min-height: 0; overflow: visible; }
  .demo-video__frame { transform: none; }
}
