/* Priorai landing page - dark-mode-first, aligned with the dashboard design
   system (see DESIGN.md + frontend/src/assets/tokens.css). Standalone static
   marketing site (Cloudflare Pages), separate from the /frontend app.

   The page is dark by default using the app's DARK token values, so the
   landing and the product feel like one brand. */

/* ---------------------------------------------------------------------------
   Theming: LIGHT is the default (:root). DARK is opt-in via
   <html data-theme="dark">, toggled by the nav switch (persisted in
   localStorage, applied before paint in index.html's head). Theme-agnostic
   tokens (gradient, radii, fonts) live once in :root; only colour/shadow
   tokens are overridden per theme.
   --------------------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* Backgrounds (light) */
  --bg-primary: #ffffff;
  --bg-secondary: #f6f7f9;
  --bg-tertiary: #f1f3f7;
  --bg-elevated: #ffffff;
  --bg-hover: #eceef3;

  /* Text (light) */
  --text-primary: #16181f;
  --text-secondary: #5b6270;
  --text-tertiary: #8a8f9c;

  /* Brand - deepened violet so it reads on white */
  --brand-primary: #6d5ae6;
  --brand-primary-hover: #5b48d6;
  --brand-primary-light: #f1eeff;
  --brand-primary-subtle: #d8d0fb;

  /* Signature gradient + warm "agent" accent (theme-agnostic) - used ONLY for
     brand/agent moments (logomark, the Priorai summary, the primary CTA). */
  --brand-gradient: linear-gradient(135deg, #7b62f0 0%, #a85cee 48%, #ff8e80 100%);
  --agent-accent: #ff8e80;
  --agent-accent-bg: #fff1ee;

  /* Status (light) */
  --status-success: #0c9d61;
  --status-success-bg: #d8f5e6;
  --status-warning: #c77a09;
  --status-warning-bg: #fdf0d2;
  --status-danger: #dc2626;
  --status-danger-bg: #fde4e4;
  --status-info: #2563eb;
  --status-info-bg: #dbeafe;

  /* Borders (light) */
  --border-primary: #e5e7ec;
  --border-secondary: #eef0f3;
  --border-focus: #6d5ae6;

  /* Shadows - soft, cool-grey for light surfaces */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 10px -2px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 14px 30px -8px rgba(16, 24, 40, 0.12);
  --shadow-xl: 0 30px 60px -22px rgba(16, 24, 40, 0.18);

  /* Theme-agnostic */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Sora", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  /* Backgrounds (dark) */
  --bg-primary: #0f1117;
  --bg-secondary: #161922;
  --bg-tertiary: #1e2130;
  --bg-elevated: #1e2130;
  --bg-hover: #252839;

  /* Text (dark) */
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;

  /* Brand - lighter violet on dark, matching the app's dark theme */
  --brand-primary: #9286ff;
  --brand-primary-hover: #a99fff;
  --brand-primary-light: #241f45;
  --brand-primary-subtle: #3a327a;

  --agent-accent-bg: #3a2420;

  /* Status (dark) */
  --status-success: #34d399;
  --status-success-bg: #064e3b;
  --status-warning: #fbbf24;
  --status-warning-bg: #78350f;
  --status-danger: #f87171;
  --status-danger-bg: #7f1d1d;
  --status-info: #60a5fa;
  --status-info-bg: #1e3a5f;

  /* Borders (dark) */
  --border-primary: #2d3141;
  --border-secondary: #252839;
  --border-focus: #9286ff;

  /* Shadows - deep for dark surfaces */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 30px 60px -15px rgba(0, 0, 0, 0.7);
}

/* Dark-theme overrides for the few rules that hard-code colours outside the
   token system (glassy nav, hero wash + glows, chat accents, page grain).
   These mirror the dark originals; the base rules above now hold the light
   values. */
[data-theme="dark"] body::after { opacity: 0.04; }
[data-theme="dark"] .nav { background: rgba(15, 17, 23, 0.72); }
[data-theme="dark"] .nav--scrolled { background: rgba(15, 17, 23, 0.9); }
[data-theme="dark"] .btn--ghost-light { background: rgba(255, 255, 255, 0.04); }
[data-theme="dark"] .hero {
  background:
    radial-gradient(72% 90% at 10% -15%, rgba(123, 98, 240, 0.22), transparent 55%),
    radial-gradient(60% 75% at 102% -5%, rgba(255, 142, 128, 0.14), transparent 52%),
    radial-gradient(55% 65% at 55% 118%, rgba(168, 92, 238, 0.14), transparent 60%);
}
[data-theme="dark"] .hero::before { background: radial-gradient(circle, rgba(146, 134, 255, 0.3), transparent 70%); }
[data-theme="dark"] .hero::after { background: radial-gradient(circle, rgba(255, 142, 128, 0.16), transparent 70%); }
[data-theme="dark"] .bubble__ai { color: #d7d2ff; }
[data-theme="dark"] .bubble--sys { color: #a7f3d0; border-color: rgba(52, 211, 153, 0.25); }
[data-theme="dark"] .ch-typing span { background: rgba(255, 255, 255, 0.5); }

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

/* Page-wide film grain - a subtle premium texture over everything.
   pointer-events:none keeps it click-through, so it never blocks the UI. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 560px; }

a { color: inherit; text-decoration: none; }

/* Shared display-face + gradient text helpers */
h1, h2, h3, .brand__word { font-family: var(--font-display); }
.grad-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ---------------- Inline icon system ----------------
   Consistent line icons (currentColor, 1.75 stroke) replace emoji used as UI
   chrome. Authentic emoji inside the simulated chat threads are kept. */
.ico {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}
.ico--lg { width: 26px; height: 26px; }
.ico--brand { color: var(--brand-primary); }
.ico--solid { fill: currentColor; stroke: none; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn--sm { padding: 8px 14px; }
.btn--lg { padding: 13px 22px; font-size: 1rem; }
.btn--block { width: 100%; }

/* Primary CTA = the signature gradient (a brand/agent moment). */
.btn--primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 6px 20px -6px rgba(123, 98, 240, 0.6);
}
.btn--primary:hover { box-shadow: 0 8px 26px -6px rgba(168, 92, 238, 0.7); transform: translateY(-1px); }
.btn--primary:active { transform: scale(0.98); }

.btn--ghost-light {
  background: rgba(17, 24, 39, 0.03);
  color: var(--text-primary);
  border-color: var(--border-primary);
}
.btn--ghost-light:hover { background: var(--bg-hover); border-color: var(--brand-primary-subtle); }

/* ---------------- Nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: background-color 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
/* Gains definition once you scroll off the hero (class toggled in main.js). */
.nav--scrolled {
  background: rgba(255, 255, 255, 0.9);
  border-bottom-color: var(--border-primary);
  box-shadow: var(--shadow-md);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.nav__links { display: flex; gap: 28px; }
.nav__links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 150ms ease;
}
.nav__links a:hover { color: var(--text-primary); }

.nav__cta { display: inline-flex; align-items: center; gap: 18px; }
.nav__login {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 150ms ease;
}
.nav__login:hover { color: var(--text-primary); }

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--brand-primary-subtle); background: var(--bg-hover); }
.theme-toggle .ico { width: 18px; height: 18px; vertical-align: 0; }
/* Moon shows in light (click → dark); sun shows in dark (click → light).
   Keyed off .js-theme-toggle (not .theme-toggle) so BOTH the bar toggle and
   the hamburger-menu toggle swap their icon together. */
.js-theme-toggle .ico--sun { display: none; }
[data-theme="dark"] .js-theme-toggle .ico--moon { display: none; }
[data-theme="dark"] .js-theme-toggle .ico--sun { display: inline-block; }

/* Hamburger + phone dropdown menu (Log in + dark-mode toggle). Hidden on
   desktop; the bar shows the full controls there. Shown only on phones. */
.nav__burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}
.nav__burger:hover { border-color: var(--brand-primary-subtle); background: var(--bg-hover); }
.nav__burger .ico { width: 20px; height: 20px; vertical-align: 0; }
.nav__menu {
  display: none; /* never on desktop; ≤520 :not([hidden]) reveals it */
  position: absolute;
  top: calc(100% + 8px);
  right: 16px;
  min-width: 190px;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 60;
}
.nav__menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}
.nav__menu-item:hover { background: var(--bg-hover); }
.nav__menu-item .ico { width: 18px; height: 18px; vertical-align: 0; color: var(--text-secondary); }
/* Menu toggle label tracks the action: "Dark mode" in light, "Light mode" in dark. */
.theme-label--light { display: none; }
[data-theme="dark"] .theme-label--dark { display: none; }
[data-theme="dark"] .theme-label--light { display: inline; }

.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand__mark { display: block; width: 24px; height: 24px; flex-shrink: 0; }
.brand__word {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: 104px 0 112px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-secondary);
  background:
    radial-gradient(72% 90% at 10% -15%, rgba(123, 98, 240, 0.10), transparent 55%),
    radial-gradient(60% 75% at 102% -5%, rgba(255, 142, 128, 0.08), transparent 52%),
    radial-gradient(55% 65% at 55% 118%, rgba(168, 92, 238, 0.07), transparent 60%);
}
/* Two soft brand glows that drift slowly - ambient life behind the hero. */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}
.hero::before {
  width: 560px;
  height: 560px;
  top: -180px;
  right: -100px;
  background: radial-gradient(circle, rgba(146, 134, 255, 0.18), transparent 70%);
  animation: heroDrift1 22s ease-in-out infinite alternate;
}
.hero::after {
  width: 480px;
  height: 480px;
  top: 30px;
  left: -140px;
  background: radial-gradient(circle, rgba(255, 142, 128, 0.12), transparent 70%);
  animation: heroDrift2 27s ease-in-out infinite alternate;
}
.hero .container { position: relative; z-index: 1; }
@keyframes heroDrift1 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-44px, 34px) scale(1.12); }
}
@keyframes heroDrift2 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(52px, -22px) scale(1.1); }
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.badge-float {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--brand-primary);
  background: var(--brand-primary-light);
  border: 1px solid var(--brand-primary-subtle);
  padding: 5px 13px;
  border-radius: var(--radius-full);
  margin-bottom: 22px;
}
.hero__title {
  font-size: clamp(2.5rem, 5.6vw, 4rem);
  line-height: 1.03;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  text-wrap: balance;
}
.hero__sub {
  margin-top: 22px;
  font-size: 1.1875rem;
  line-height: 1.62;
  color: var(--text-secondary);
  max-width: 40ch;
  text-wrap: pretty;
}
.hero__cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }

/* Hero mockup (faux WhatsApp thread) - sits on an elevated dark card */
.hero__mock { display: flex; justify-content: center; }
.chat {
  width: 100%;
  max-width: 384px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat__head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  font-family: var(--font-display);
  padding-bottom: 6px;
}
.chat__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--status-success);
  animation: dotPulse 2.4s ease-out infinite;
}
@keyframes dotPulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* Live-replay states. JS adds .chat-anim, hides the bubbles, then reveals them
   one by one (each starts hidden + offset, .is-shown animates it in). */
.chat-anim .bubble {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 380ms ease, transform 420ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.chat-anim .bubble--me { transform: translateY(10px) translateX(14px); }
.chat-anim .bubble.is-shown { opacity: 1; transform: none; }

/* "Priorai is typing…" indicator */
.typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: 12px;
  padding: 13px 14px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 240ms ease, transform 240ms ease;
}
.typing.is-shown { opacity: 1; transform: none; }
.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
  animation: typingBlink 1.2s infinite both;
}
.typing span:nth-child(2) { animation-delay: 0.18s; }
.typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typingBlink {
  0%, 75%, 100% { opacity: 0.25; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}
.bubble {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-secondary);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.84rem;
  box-shadow: var(--shadow-sm);
}
.bubble__title { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 6px; }
.bubble__title .ico { color: var(--brand-primary); }
.bubble__line { color: var(--text-secondary); }
.bubble__list { list-style: none; margin: 6px 0; }
.bubble__list li { padding: 1px 0; color: var(--text-secondary); }
.bubble__list strong { color: var(--text-primary); }
.bubble__ai {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 8px;
  padding: 9px 11px;
  background: var(--brand-primary-light);
  border: 1px solid var(--brand-primary-subtle);
  border-radius: 8px;
  color: var(--brand-primary);
  font-size: 0.8rem;
}
.bubble__ai .ico { margin-top: 1px; }
.bubble__actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  background: var(--bg-hover);
  color: var(--text-secondary);
}
.pill .ico { width: 0.95em; height: 0.95em; vertical-align: 0; }
.pill--ok { background: var(--status-success-bg); color: var(--status-success); }
.pill--no { background: var(--status-danger-bg); color: var(--status-danger); }
.bubble--me {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 600;
  max-width: 60%;
  border-color: transparent;
}
.bubble--sys {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  background: var(--status-success-bg);
  color: #047857;
  border: 1px solid rgba(12, 157, 97, 0.28);
}
.bubble--sys .ico { margin-top: 1px; color: var(--status-success); }

/* ---------------- Sections ---------------- */
.section { padding: 92px 0; }
.section--alt { background: var(--bg-secondary); }
.section__title {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-align: center;
  color: var(--text-primary);
  text-wrap: balance;
}
.section__lede {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 52ch;
  margin: 12px auto 48px;
  text-wrap: pretty;
}

/* How it works */
.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms ease, transform 150ms ease, border-color 150ms ease;
}
/* !important so the hover lift beats the scroll-reveal's transform:none. */
.step:hover { box-shadow: var(--shadow-md); transform: translateY(-2px) !important; border-color: var(--brand-primary-subtle); }
.step:hover .step__icon { transform: translateY(-2px) scale(1.06); }
.step__icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--brand-primary);
  background: var(--brand-primary-light);
  border: 1px solid var(--brand-primary-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  transition: transform 200ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.step h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.step p { color: var(--text-secondary); font-size: 0.9375rem; }

/* Features */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 36px 24px;
}
.feature--reverse .feature__text { order: 2; }
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 10px;
}
.feature__text h3 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.feature__text p { color: var(--text-secondary); font-size: 1rem; }

.feature__art {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
/* "Priorai Summary" - an agent moment: gradient top edge + sparkle accent */
.mini-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--brand-primary-light);
  border: 1px solid var(--brand-primary-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.mini-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--brand-gradient);
}
.mini-card__head { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 8px; color: var(--text-primary); }
.mini-card__head .ico { color: var(--brand-primary); }
.mini-card p { font-size: 0.9375rem; color: var(--text-secondary); }
.mini-card strong { color: var(--text-primary); }
.bar {
  margin-top: 14px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--status-success), var(--status-warning));
}
/* Feature art panels (nudge log + lifecycle) - neutral elevated cards so they
   carry the same visual weight as the hero mockup, while the brand-tinted
   budget "Priorai Summary" card stays the standout agent moment of the three. */
.nudge-card,
.pipe-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 18px;
}
.nudge-card { display: flex; flex-direction: column; gap: 10px; }
.nudge-card__head,
.pipe-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
  padding-bottom: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.chip .ico { color: var(--brand-primary); }
.chip--up .ico { color: var(--status-warning); }
.nudge-card .chip { width: 100%; }
.chip--up { color: var(--status-warning); border-color: rgba(251, 191, 36, 0.4); background: var(--status-warning-bg); }

.pipe-card__track { display: flex; flex-wrap: wrap; gap: 8px; }
.stage {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-secondary);
}
.stage--done { background: var(--status-success-bg); color: var(--status-success); border-color: transparent; }
.stage--now { background: var(--status-info-bg); color: var(--status-info); box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18); border-color: transparent; }

/* Pricing tiers */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
  max-width: 920px;
  margin: 0 auto;
}
.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 30px 26px;
  text-align: center;
  overflow: hidden;
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.tier:hover {
  transform: translateY(-3px) !important; /* beats scroll-reveal transform:none */
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--brand-primary-subtle);
  border-color: var(--brand-primary-subtle);
}
.tier--featured {
  border-color: var(--brand-primary-subtle);
  box-shadow: var(--shadow-lg);
}
.tier--featured::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--brand-gradient);
}
.tier__badge {
  align-self: center;
  margin-bottom: 12px;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--brand-gradient);
  border-radius: 999px;
}
.tier__name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; }
.tier__users { color: var(--text-tertiary); font-size: 0.85rem; font-weight: 600; margin-top: 4px; }
.tier__price {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 16px 0 4px;
}
.tier__price .unit { font-family: var(--font); font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); }
.tier__from { font-family: var(--font); font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); }
.tier__note { color: var(--text-secondary); font-size: 0.8rem; min-height: 1.2em; margin-bottom: 4px; }
.tier .btn { margin-top: auto; }

.tiers__features {
  list-style: none;
  max-width: 600px;
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 28px;
  text-align: left;
}
.tiers__features li {
  position: relative;
  padding-left: 28px;
  font-size: 0.9375rem;
  color: var(--text-primary);
}
.tiers__features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--status-success);
  font-weight: 700;
}
.tiers__pilot {
  margin: 28px auto 0;
  max-width: 600px;
  text-align: center;
  background: var(--brand-primary-light);
  border: 1px solid var(--brand-primary-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 0.9375rem;
  color: var(--text-primary);
}
.tiers__pilot a {
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tiers__pilot a:hover { color: var(--brand-primary-hover, var(--brand-primary)); opacity: 0.85; }

/* Trust */
.section--trust { background: var(--bg-secondary); }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.trust {
  text-align: center;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 150ms ease, transform 150ms ease, border-color 150ms ease;
}
.trust:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px) !important; /* beats scroll-reveal transform:none */
  border-color: var(--brand-primary-subtle);
}
.trust span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--brand-primary);
  background: var(--brand-primary-light);
  border: 1px solid var(--brand-primary-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}
.trust p { font-size: 0.875rem; color: var(--text-secondary); }
.trust strong { color: var(--text-primary); font-weight: 600; }

/* Proof bar - slim credibility strip under the hero */
.proofbar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-secondary);
}
.proofbar__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 30px;
  padding: 18px 24px;
}
.proofbar__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.proofbar__item .ico { width: 1.05em; height: 1.05em; color: var(--brand-primary); }

/* Founder notes - two co-founders, side by side */
.founders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 940px;
  margin: 0 auto;
}
.founder {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  text-align: left;
}
.founder__mark {
  width: 32px;
  height: 32px;
  display: block;
  margin-bottom: 12px;
  color: var(--brand-primary);
  opacity: 0.5;
}
.founder__quote {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  text-wrap: pretty;
}
.founder__by {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
}
.founder__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 2px; /* gradient ring thickness */
  flex-shrink: 0;
  background: var(--brand-gradient);
  box-shadow: var(--shadow-md), 0 0 0 4px rgba(146, 134, 255, 0.12);
}
.founder__face {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  /* soft top-lit cream so the portrait reads as framed, not flat */
  background: radial-gradient(120% 120% at 50% 0%, #fbf8f2 0%, #f1ebdf 100%);
}
.founder__face g[stroke] { stroke-width: 2.2; }
.founder__who { display: flex; flex-direction: column; text-align: left; line-height: 1.3; }
.founder__who strong { color: var(--text-primary); font-size: 0.95rem; }
.founder__who small { color: var(--text-secondary); font-size: 0.8125rem; }

/* CTA / waitlist */
.section--cta { background: var(--bg-primary); }
.form { margin-top: 8px; display: flex; flex-direction: column; gap: 16px; }
.form__row { display: flex; flex-direction: column; gap: 6px; }
.form__row label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-secondary);
}
.form input,
.form select {
  height: 44px;
  padding: 0 14px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.form input::placeholder { color: var(--text-tertiary); }
.form input:focus,
.form select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(146, 134, 255, 0.25);
}
.form input.is-error,
.form select.is-error { border-color: var(--status-danger); }
.form__msg { font-size: 0.9375rem; text-align: center; min-height: 1.4em; }
.form__msg.is-ok { color: var(--status-success); }
.form__msg.is-bad { color: var(--status-danger); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------------- Channels (interactive showcase) ---------------- */
.channels {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 44px;
  align-items: center;
  margin-top: 44px;
}
.channels__tabs { display: flex; flex-direction: column; gap: 14px; }

.ch-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, background-color 150ms ease;
}
.ch-tab:hover { border-color: var(--brand-primary-subtle); transform: translateY(-1px); }
.ch-tab.is-active {
  border-color: var(--brand-primary);
  background: var(--brand-primary-light);
  box-shadow: var(--shadow-md), 0 0 0 1px var(--brand-primary-subtle);
}
.ch-tab__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
}
.ch-tab__icon--email { background: var(--brand-primary); border-color: transparent; }
.ch-tab__body { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.ch-tab__name { font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; }
.ch-tab__desc { font-size: 0.8125rem; color: var(--text-secondary); }
.ch-tab__badge {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.ch-tab__badge--live { color: var(--status-success); background: var(--status-success-bg); }
.ch-tab__badge--soon { color: var(--status-warning); background: var(--status-warning-bg); }

/* Each channel renders as its own app UI; only the active panel is shown and
   replays its conversation. Height is locked so switching panels never jumps. */
.channels__demo {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 560px;
}
.ch-stage { display: flex; justify-content: center; width: 100%; }
.ch-stage[hidden] { display: none; }

.ch-panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-xl);
  background: var(--bg-secondary);
}
.ch-panel[hidden] { display: none; }

/* Phone frame around the chat apps (Telegram, WhatsApp) */
.phone {
  position: relative;
  width: 320px;
  padding: 12px;
  border-radius: 40px;
  background: #05070b;
  border: 1px solid #2a2f3a;
  box-shadow: var(--shadow-xl), inset 0 0 0 2px rgba(255, 255, 255, 0.03);
}
.phone__notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 116px;
  height: 22px;
  background: #05070b;
  border-radius: 0 0 14px 14px;
  z-index: 3;
}
.phone__screen { border-radius: 30px; overflow: hidden; background: #0e1621; }
.phone__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 20px 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
}
.phone__status svg { display: block; }
.phone__home {
  width: 110px;
  height: 5px;
  margin: 9px auto 1px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.22);
}
/* Inside the phone the app fills the screen edge-to-edge (no own chrome) */
.phone .ch-panel {
  max-width: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
/* Status-bar tint matches each app's header */
.ch-stage[data-channel="telegram"] .phone__status { background: #1f2c3a; }
.ch-stage[data-channel="whatsapp"] .phone__status { background: #202c33; }

/* Header bar (shared skeleton; colour is set per app below) */
.ch-panel__bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  color: #fff;
}
.ch-panel__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  background: var(--brand-gradient);
  color: #fff;
  flex-shrink: 0;
}
.ch-panel__avatar--wa { background: #25d366; color: #04331d; }
.ch-panel__id { display: flex; flex-direction: column; line-height: 1.25; flex: 1 1 auto; min-width: 0; }
.ch-panel__id strong { font-size: 0.9rem; font-weight: 600; }
.ch-panel__id small { font-size: 0.72rem; opacity: 0.72; }
.ch-panel__app { display: inline-flex; opacity: 0.9; }
.ch-panel__app svg { display: block; }
.ch-panel__app--email {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  background: var(--brand-primary);
  opacity: 1;
}

/* Message list (chat body) */
.ch-panel__body {
  height: 380px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 14px;
}

/* Generic chat bubble */
.msg {
  max-width: 84%;
  padding: 8px 11px;
  font-size: 0.84rem;
  line-height: 1.45;
  border-radius: 12px;
  word-wrap: break-word;
}
.msg--in { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg--out { align-self: flex-end; border-bottom-right-radius: 4px; }
.msg__t { display: block; margin-top: 4px; font-size: 0.65rem; opacity: 0.6; text-align: right; }
.tick { color: #53bdeb; letter-spacing: -1px; }

/* Telegram skin */
.ch-panel--telegram .ch-panel__bar { background: #1f2c3a; }
.ch-panel--telegram .ch-panel__body { background: #0e1621; }
.ch-panel--telegram .msg--in { background: #182533; color: #e7eef5; }
.ch-panel--telegram .msg--out { background: #2b5278; color: #fff; }

/* WhatsApp skin */
.ch-panel--whatsapp .ch-panel__bar { background: #202c33; }
.ch-panel--whatsapp .ch-panel__body--wa { background: #0b141a; }
.ch-panel--whatsapp .msg--in { background: #202c33; color: #e9edef; }
.ch-panel--whatsapp .msg--out { background: #005c4b; color: #e9edef; }

/* Coming-soon banner (WhatsApp panel only) */
.ch-panel__soon {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--status-warning);
  background: var(--status-warning-bg);
  border-bottom: 1px solid rgba(251, 191, 36, 0.3);
  padding: 8px 12px;
}

/* Email skin - an inbox thread rather than chat bubbles, in a desktop window */
.ch-panel--email .ch-panel__bar--email { background: #2a2f3a; }
.windots { display: inline-flex; gap: 6px; margin-right: 4px; }
.windots i { width: 11px; height: 11px; border-radius: 50%; background: #5a6273; }
.windots i:nth-child(1) { background: #ff5f57; }
.windots i:nth-child(2) { background: #febc2e; }
.windots i:nth-child(3) { background: #28c840; }
.mail__attach {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 6px 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
}
.ch-panel__body--email {
  height: auto;
  min-height: 260px;
  overflow: visible;
  justify-content: flex-start;
  gap: 12px;
  background: var(--bg-primary);
}
.mail {
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.mail--reply { border-left: 3px solid var(--brand-primary); }
.mail__row { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.mail__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--bg-hover);
  color: var(--text-secondary);
  flex-shrink: 0;
}
.mail__avatar--p { background: var(--brand-gradient); color: #fff; }
.mail__from { display: flex; flex-direction: column; line-height: 1.2; flex: 1 1 auto; min-width: 0; }
.mail__from strong { font-size: 0.85rem; color: var(--text-primary); }
.mail__from small { font-size: 0.72rem; color: var(--text-tertiary); }
.mail__t { font-size: 0.7rem; color: var(--text-tertiary); }
.mail__subject { font-weight: 600; font-size: 0.875rem; color: var(--text-primary); margin-bottom: 4px; }
.mail__text { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* Typing indicator (created by JS, appended to the active body) */
.ch-typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
}
.ch-panel--telegram .ch-typing { background: #182533; }
.ch-panel--whatsapp .ch-typing { background: #202c33; }
.ch-typing span { width: 6px; height: 6px; border-radius: 50%; background: rgba(17, 24, 39, 0.35); animation: typingBlink 1.2s infinite both; }
.ch-typing span:nth-child(2) { animation-delay: 0.18s; }
.ch-typing span:nth-child(3) { animation-delay: 0.36s; }
.ch-typing--mail {
  align-self: stretch;
  background: var(--bg-elevated);
  border: 1px dashed var(--border-primary);
  color: var(--text-secondary);
  font-size: 0.8rem;
  border-radius: var(--radius-md);
}

/* Animated reveal - gated by .js so no-JS / reduced-motion shows the full thread */
.js .ch-panel__body .msg,
.js .ch-panel__body .mail,
.js .ch-typing {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.js .ch-panel__body .is-shown { opacity: 1; transform: none; }

/* ---------------- Dashboard showcase (browser-framed mockup) ---------- */
.browser {
  position: relative;
  max-width: 920px;
  margin: 8px auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-xl);
  background: var(--bg-secondary);
}

/* Live demo cursor - moves, clicks, and "approves" a request */
.dash-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 6;
  width: 22px;
  height: 22px;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
  transition: transform 1.1s cubic-bezier(0.5, 0, 0.2, 1), opacity 0.4s ease;
  will-change: transform;
}
.dash-cursor.is-on { opacity: 1; }
.dash-cursor svg { display: block; transition: transform 0.18s ease; }
.dash-cursor.is-press svg { transform: scale(0.8); }

/* Source card being approved */
.js-appr-src {
  max-height: 140px;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.4s ease, margin 0.4s ease,
    padding 0.4s ease, border-width 0.3s ease, transform 0.4s ease, box-shadow 0.25s ease;
}
.js-appr-src.is-clicking { transform: scale(0.97); }
.js-appr-src.is-approving { box-shadow: 0 0 0 2px var(--status-success); border-left-color: var(--status-success); }
.js-appr-src.is-removed {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  transform: translateX(10px);
}

/* Destination card sliding into the Approved column */
.js-appr-dst {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  transform: translateY(-6px);
  transition: max-height 0.5s ease, opacity 0.45s ease, margin 0.4s ease,
    padding 0.4s ease, border-width 0.3s ease, transform 0.45s ease;
}
.js-appr-dst.is-added {
  max-height: 140px;
  opacity: 1;
  margin-bottom: 8px;
  padding-top: 9px;
  padding-bottom: 9px;
  border-width: 1px;
  border-left-width: 3px;
  transform: none;
}

/* Counter pop when a number changes */
.dnum-pop { display: inline-block; animation: dnumPop 0.45s ease; }
@keyframes dnumPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.28); color: var(--brand-primary); }
  100% { transform: scale(1); }
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 14px;
  background: #2a2f3a;
  border-bottom: 1px solid var(--border-primary);
}
.browser__url {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.28);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  flex: 1 1 auto;
  max-width: 340px;
}
.browser__url .ico { width: 0.9em; height: 0.9em; color: var(--status-success); }
.browser__view { padding: 20px; background: var(--bg-primary); }

.dash__cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.dcard {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  padding: 14px 14px 14px 16px;
  overflow: hidden;
}
.dcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.dcard--a::before { background: var(--brand-primary); }
.dcard--b::before { background: var(--status-info); }
.dcard--c::before { background: var(--status-warning); }
.dcard--d::before { background: var(--status-success); }
.dcard__label { display: block; font-size: 0.7rem; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.04em; }
.dcard__num { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin-top: 4px; }
.dcard__num em { font-style: normal; font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
.dcard__bar { display: block; height: 5px; border-radius: var(--radius-full); background: var(--bg-tertiary); margin-top: 8px; overflow: hidden; }
.dcard__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--status-success), var(--status-warning)); }

.dash__board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dcol { background: var(--bg-secondary); border: 1px solid var(--border-secondary); border-radius: var(--radius-md); padding: 10px; }
.dcol__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.dcol__head span { background: var(--bg-hover); color: var(--text-secondary); border-radius: var(--radius-full); padding: 1px 8px; font-size: 0.68rem; }
.rcard {
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-left: 3px solid var(--border-primary);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  margin-bottom: 8px;
}
.rcard:last-child { margin-bottom: 0; }
.rcard--urg { border-left-color: var(--status-danger); }
.rcard--reg { border-left-color: var(--status-info); }
.rcard--ok { border-left-color: var(--status-success); }
.rcard__top { display: flex; justify-content: space-between; align-items: center; }
.rcard__id { font-size: 0.7rem; font-weight: 700; color: var(--brand-primary); letter-spacing: 0.02em; }
.rcard__amt { font-size: 0.78rem; font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.rcard__title { font-size: 0.8rem; color: var(--text-primary); margin: 4px 0 6px; line-height: 1.35; }
.rcard__meta { display: flex; align-items: center; gap: 6px; font-size: 0.7rem; color: var(--text-tertiary); }
.rcard__who { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-primary-light); color: var(--brand-primary); font-size: 0.58rem; font-weight: 700; }
.rcard__tag { background: var(--status-success-bg); color: var(--status-success); border-radius: var(--radius-full); padding: 1px 8px; font-size: 0.65rem; font-weight: 600; }
.rcard__tag--paid { background: var(--brand-primary-light); color: var(--brand-primary); }

/* ---------------- Dashboard: board ⇄ request-detail navigation ---------- */
.dscreens { position: relative; overflow: hidden; min-height: 420px; transition: height 0.42s ease; }
.dscreen { position: absolute; top: 0; left: 0; right: 0; transition: opacity 0.4s ease, transform 0.45s ease; }
.dscreen--detail { opacity: 0; transform: translateX(28px); pointer-events: none; }
.dscreens.show-detail .dscreen--board { opacity: 0; transform: translateX(-28px); pointer-events: none; }
.dscreens.show-detail .dscreen--detail { opacity: 1; transform: none; pointer-events: auto; }

.dt-back { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 14px; }
.dt-back .ico { width: 1em; height: 1em; }
.dt-head__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dt-id { font-size: 0.72rem; font-weight: 700; color: var(--text-tertiary); letter-spacing: 0.03em; }
.dt-badge { font-size: 0.68rem; font-weight: 600; padding: 2px 9px; border-radius: var(--radius-full); background: var(--status-warning-bg); color: var(--status-warning); }
.dt-badge.is-approved { background: var(--status-success-bg); color: var(--status-success); }
.dt-badge--reg { background: var(--status-info-bg); color: var(--status-info); }
.dt-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); margin: 8px 0 2px; }
.dt-amount { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.dt-actions { display: flex; gap: 10px; margin: 16px 0; }
.dbtn { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; padding: 8px 16px; border-radius: var(--radius-sm); }
.dbtn .ico { width: 1em; height: 1em; }
.dbtn--ok { background: var(--status-success); color: #04210f; }
.dbtn--ghost { background: transparent; border: 1px solid var(--status-danger); color: var(--status-danger); }
.dbtn--plain { background: transparent; color: var(--text-secondary); }
.dt-agent { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--brand-primary-light); border: 1px solid var(--brand-primary-subtle); border-radius: var(--radius-md); margin-bottom: 16px; }
.dt-agent__mark { width: 26px; height: 26px; flex-shrink: 0; border-radius: 7px; display: grid; place-items: center; background: var(--brand-gradient); }
.dt-agent__mark svg { width: 15px; height: 15px; }
.dt-agent__who { font-size: 0.72rem; font-weight: 600; color: var(--brand-primary); }
.dt-agent__line { font-size: 0.85rem; color: var(--text-primary); }
.dt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dt-panel { background: var(--bg-secondary); border: 1px solid var(--border-secondary); border-radius: var(--radius-md); padding: 14px; }
.dt-panel__title { font-size: 0.8rem; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.dt-kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 0.8rem; }
.dt-kv dt { color: var(--text-tertiary); }
.dt-kv dd { margin: 0; color: var(--text-primary); font-weight: 500; }
.dt-chain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.dt-chain__step { display: flex; gap: 10px; align-items: flex-start; }
.dt-chain__dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border-primary); margin-top: 2px; flex-shrink: 0; transition: background 0.3s, border-color 0.3s, box-shadow 0.3s; }
.dt-chain__step--active .dt-chain__dot { border-color: var(--brand-primary); background: var(--brand-primary); box-shadow: 0 0 0 3px var(--brand-primary-light); }
.dt-chain__step.is-done .dt-chain__dot { border-color: var(--status-success); background: var(--status-success); box-shadow: none; }
.dt-chain__role { font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.dt-chain__state { font-size: 0.74rem; color: var(--text-tertiary); }

.ddialog-wrap {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 7, 11, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.ddialog-wrap.is-open { opacity: 1; }
.ddialog {
  width: 300px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 20px;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.3s ease;
}
.ddialog-wrap.is-open .ddialog { transform: none; }
.ddialog__title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; color: var(--text-primary); margin-bottom: 8px; }
.ddialog__body { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; }
.ddialog__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.dtoast {
  position: absolute;
  left: 50%;
  bottom: 16px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--status-success-bg);
  color: var(--status-success);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.dtoast.is-on { opacity: 1; transform: translate(-50%, 0); }
.dtoast .ico { width: 1em; height: 1em; }

/* ---------------- Savings / ROI ---------------- */
.savings__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 34px;
}
.sstat {
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sstat__num {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.03em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.sstat__num span {
  -webkit-text-fill-color: initial;
  color: var(--text-tertiary);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
}
.sstat p { margin-top: 10px; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }
.sstat cite {
  display: block;
  margin-top: 12px;
  font-size: 0.7rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.roi {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-xl);
  padding: 30px 32px;
}
.roi__label { display: block; font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 14px; }
.roi__label strong { color: var(--brand-primary); font-size: 1.05rem; }
.roi__control input[type="range"] {
  width: 100%;
  height: 6px;
  accent-color: var(--brand-primary);
  cursor: pointer;
}
.roi__scale { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-tertiary); margin-top: 6px; }
.roi__out { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.roi__metric { display: flex; flex-direction: column; }
.roi__big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.roi__unit { font-size: 0.8rem; color: var(--text-secondary); }
.roi__divider { width: 1px; align-self: stretch; background: var(--border-primary); }
.roi__year { flex-basis: 100%; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border-secondary); font-size: 0.95rem; color: var(--text-secondary); }
.roi__year strong { color: var(--brand-primary); }
.savings__note {
  max-width: 72ch;
  margin: 20px auto 0;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-tertiary);
  text-align: center;
}

/* ---------------- Footer ---------------- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-primary);
  color: var(--text-secondary);
  padding: 48px 0;
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer .brand__word { color: var(--text-primary); }
.footer__links { display: flex; gap: 24px; }
.footer__links a { color: var(--text-secondary); font-size: 0.9375rem; transition: color 150ms ease; }
.footer__links a:hover { color: var(--text-primary); }
.footer__fine { font-size: 0.8125rem; color: var(--text-tertiary); width: 100%; }

/* ---------------- Scroll reveal (Tier 1) + in-view demos (Tier 2) ---------- */
/* Gated by .js (set before paint) so no-JS shows everything; JS adds .is-in
   when each element scrolls into view. */
.js .section__title,
.js .section__lede,
.js .step,
.js .feature__text,
.js .feature__art--summary,
.js .tier,
.js .trust {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.is-in { opacity: 1 !important; transform: none !important; }

/* Budget bar fills from 0 on reveal */
.js .mini-card .bar span { width: 0; transition: width 1.1s cubic-bezier(0.2, 0.7, 0.3, 1); }

/* Nudge chips fade in one by one on reveal */
.js .feature__art--chips .chip {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.js .feature__art--chips .chip.is-in { opacity: 1; transform: none; }

/* Pipeline stages animate their colour as they light up in sequence */
.stage { transition: background-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease; }

/* ---------------- Responsive ---------------- */
@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__sub { max-width: none; }
  .feature { grid-template-columns: 1fr; gap: 24px; }
  .feature--reverse .feature__text { order: 0; }
  .channels { grid-template-columns: 1fr; gap: 28px; }
  .cols-3 { grid-template-columns: 1fr; }
  .dash__cards { grid-template-columns: repeat(2, 1fr); }
  .dash__board { grid-template-columns: repeat(2, 1fr); }
  .founders { grid-template-columns: 1fr; }
  .savings__stats { grid-template-columns: 1fr; }
  .tiers { grid-template-columns: 1fr; max-width: 420px; }
  .tiers__features { grid-template-columns: 1fr; }
  .roi { grid-template-columns: 1fr; gap: 24px; }
  .dt-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .nav__links { display: none; }
}

@media (max-width: 520px) {
  .section { padding: 60px 0; }
  .hero { padding: 64px 0 72px; }

  /* Phone nav: brand + waitlist CTA + hamburger. The bar theme toggle and
     Log in move into the hamburger menu so the bar never crams/wraps. */
  .nav__cta > .theme-toggle,
  .nav__login { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__menu:not([hidden]) { display: flex; }
  .nav__cta { gap: 12px; }
  .btn--sm { padding: 7px 12px; }

  /* Proof bar: a compact, centred trust strip rather than three sparse rows. */
  .proofbar__row { gap: 8px 16px; padding: 14px 16px; }
  .proofbar__item { font-size: 0.8rem; }
  .proofbar__item .ico { width: 1em; height: 1em; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; animation: none !important; }
}
