/* ==========================================================================
   PULSE ANALYTICS — editorial data-intelligence redesign
   Type: Bricolage Grotesque (display) · Hanken Grotesk (body)
   Palette: warm paper neutrals · ember signature accent · pine data color
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Surfaces — warm-tinted neutrals (hue ~80–85, very low chroma) */
  --paper:      oklch(98.3% 0.006 85);
  --paper-2:    oklch(96.4% 0.009 85);
  --paper-3:    oklch(94.6% 0.013 84);
  --surface:    oklch(99.3% 0.004 85);
  --ink:        oklch(25% 0.022 58);
  --ink-soft:   oklch(37% 0.02 60);
  --ink-mute:   oklch(46% 0.016 62);
  --line:       oklch(90.5% 0.012 85);
  --line-strong:oklch(86% 0.014 84);

  /* Signature accent — ember/tangerine (used rarely) */
  --ember:        oklch(63% 0.165 45);
  --ember-deep:   oklch(47% 0.16 39);
  --ember-bright: oklch(71% 0.15 50);
  --ember-soft:   oklch(95% 0.04 55);
  --ember-btn-1:  oklch(53% 0.16 41);
  --ember-btn-2:  oklch(43% 0.165 36);

  /* Functional data color — calm pine/teal (charts, positive deltas) */
  --pine:      oklch(52% 0.09 172);
  --pine-deep: oklch(42% 0.085 172);
  --pine-soft: oklch(94% 0.03 172);

  /* Dark moments — warm ink night (not blue-black) */
  --night:        oklch(22% 0.018 55);
  --night-2:      oklch(26% 0.018 55);
  --night-3:      oklch(30% 0.016 55);
  --on-night:     oklch(91% 0.012 80);
  --on-night-mute:oklch(70% 0.02 75);
  --night-line:   oklch(40% 0.02 60 / .6);

  /* Type scale */
  --step--2: 0.8125rem;   /* 13 — fine print, labels */
  --step--1: 0.9375rem;   /* 15 — secondary */
  --step-0:  1.0625rem;   /* 17 — body */
  --step-1:  1.25rem;     /* 20 */
  --step-2:  clamp(1.4rem, 1.2rem + 1vw, 1.75rem);
  --step-3:  clamp(1.9rem, 1.45rem + 2.1vw, 2.7rem);
  --step-4:  clamp(2.6rem, 1.7rem + 3.8vw, 4.1rem);

  --lh-tight: 1.06;
  --lh-snug: 1.22;
  --lh-body: 1.65;
  --lh-loose: 1.75;

  /* Spacing scale (4pt, semantic) */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;

  --max: 1180px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px oklch(22% 0.02 60 / .05);
  --shadow-md: 0 6px 16px -4px oklch(22% 0.02 60 / .10), 0 2px 6px -2px oklch(22% 0.02 60 / .06);
  --shadow-lg: 0 22px 48px -16px oklch(22% 0.02 60 / .20), 0 6px 14px -6px oklch(22% 0.02 60 / .10);
  --shadow-xl: 0 50px 90px -28px oklch(22% 0.02 60 / .28);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);

  --font-display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  --header-h: 72px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv01";
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }
:focus-visible { outline: 2.5px solid var(--ember); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--ember-soft); color: var(--ember-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: -0.025em;
  color: var(--ink);
  text-wrap: balance;
}
em { font-style: normal; color: var(--ember-deep); }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.section { padding: var(--space-3xl) 0; scroll-margin-top: 96px; }
.section.tint { background: var(--paper-2); border-block: 1px solid var(--line); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 1000; top: 12px; left: 12px;
  transform: translateY(-160%); padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--ink); color: #fff; font-weight: 700; font-size: var(--step--1);
  transition: transform .2s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--header-h);
  transition: background .3s var(--ease-soft), box-shadow .3s var(--ease-soft), border-color .3s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in oklch, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 oklch(22% 0.02 60 / .03);
}
.nav-wrap {
  height: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-md);
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-size: 1.0625rem; font-weight: 700;
  letter-spacing: -0.03em; color: var(--ink);
}
.brand-accent { color: var(--ink-mute); font-weight: 600; }
.brand-mark {
  position: relative; display: inline-flex; align-items: flex-end; gap: 2px;
  width: 22px; height: 22px; padding: 4px;
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface);
}
.brand-mark i {
  width: 2.5px; border-radius: 2px;
  background: linear-gradient(var(--ember-bright), var(--ember-deep));
}
.brand-mark i:nth-child(1) { height: 5px; }
.brand-mark i:nth-child(2) { height: 11px; }
.brand-mark i:nth-child(3) { height: 7px; }

.primary-nav { display: flex; align-items: center; gap: 0.4rem; }
.primary-nav > a:not(.btn) {
  padding: 0.5rem 0.85rem; border-radius: var(--r-sm);
  font-size: var(--step--1); font-weight: 600; color: var(--ink-soft);
  transition: color .2s, background .2s;
}
.primary-nav > a:not(.btn):hover { color: var(--ink); background: var(--paper-2); }
.menu-toggle {
  display: none; width: 44px; height: 44px; padding: 10px;
  border: 0; background: transparent; cursor: pointer;
}
.menu-toggle > span:not(.sr-only) {
  display: block; height: 2px; margin: 5px 0; border-radius: 2px; background: var(--ink);
  transition: transform .3s var(--ease-out), opacity .2s;
}
.menu-toggle[aria-expanded="true"] > span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] > span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] > span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.4rem;
  border: 1px solid transparent; border-radius: var(--r-sm);
  font-family: var(--font-display); font-size: var(--step--1); font-weight: 700;
  letter-spacing: -0.01em; cursor: pointer; text-align: center;
  transition: transform .25s var(--ease-out), box-shadow .25s, background .25s, border-color .25s, color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-sm { min-height: 40px; padding: 0 1rem; font-size: var(--step--2); border-radius: 8px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--ember-btn-1), var(--ember-btn-2));
  box-shadow: var(--shadow-md), inset 0 1px 0 oklch(96% 0.08 60 / .5);
}
.btn-primary:hover { box-shadow: var(--shadow-lg), inset 0 1px 0 oklch(96% 0.08 60 / .5); }
.btn-ghost {
  border-color: var(--line-strong); color: var(--ink); background: var(--surface);
}
.btn-ghost:hover { border-color: var(--ink-soft); background: var(--paper); }
.btn-outline {
  width: 100%; background: var(--surface); border-color: var(--line-strong); color: var(--ink);
}
.btn-outline:hover { border-color: var(--ember); color: var(--ember-deep); background: var(--ember-soft); }
.btn-white {
  color: var(--ink); background: #fff; box-shadow: var(--shadow-md);
}
.btn-white:hover { box-shadow: var(--shadow-lg); }
.btn-ghost-dark {
  border-color: var(--night-line); color: var(--on-night); background: transparent;
}
.btn-ghost-dark:hover { border-color: var(--on-night-mute); background: oklch(100% 0 0 / .06); }

/* ---------- Section heading ---------- */
.section-head { max-width: 46rem; margin-bottom: var(--space-xl); }
.section-head:not(.section-head-light) { color: var(--ink); }
.section-kicker {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-size: var(--step--2); font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ember-deep);
  margin-bottom: var(--space-sm);
}
.section-kicker::before {
  content: ""; width: 1.6rem; height: 2px; background: var(--ember); border-radius: 2px;
}
.section-head h2 { font-size: var(--step-3); }
.section-sub {
  margin-top: var(--space-sm); max-width: 40rem;
  color: var(--ink-mute); font-size: var(--step-0); line-height: var(--lh-body);
}
.section-head-light h2 { color: var(--on-night); }
.section-head-light .section-kicker { color: var(--ember-bright); }
.section-head-light .section-kicker::before { background: var(--ember-bright); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero { position: relative; padding-top: calc(var(--header-h) + var(--space-xl)); padding-bottom: var(--space-3xl); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-glow {
  position: absolute; top: -18%; right: -10%;
  width: 46rem; height: 46rem; border-radius: 50%;
  background: radial-gradient(circle, var(--ember-soft), transparent 62%);
  filter: blur(8px);
}
.grid-fade {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000, transparent 72%);
  opacity: .5;
}
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: var(--space-2xl);
}
.hero-copy { max-width: 36rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-size: var(--step--2); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: var(--space-md);
}
.eyebrow-mark { width: 1.6rem; height: 2px; background: var(--ember); border-radius: 2px; }
.hero h1 {
  font-size: var(--step-4);
  line-height: var(--lh-tight);
  letter-spacing: -0.035em;
  margin-bottom: var(--space-md);
}
.hero-lede {
  font-size: var(--step-1); line-height: var(--lh-body);
  color: var(--ink-soft); max-width: 32rem; margin-bottom: var(--space-lg);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-xl); }
.trust-row { display: flex; align-items: center; gap: var(--space-md); }
.avatar-stack { display: flex; }
.avatar-stack img {
  width: 38px; height: 38px; border-radius: 50%;
  border: 2px solid var(--paper); object-fit: cover;
  margin-left: -12px; box-shadow: var(--shadow-sm);
}
.avatar-stack img:first-child { margin-left: 0; }
.trust-row p { font-size: var(--step--1); color: var(--ink-mute); }
.trust-row strong { color: var(--ink); font-weight: 700; }

/* Hero visual — floating data cards (purposeful, not a glowing orb) */
.hero-visual { position: relative; min-height: 420px; }
.float-card {
  position: absolute; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
}
.float-card--main {
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(100%, 26rem); padding: var(--space-md);
  animation: floatA 7s ease-in-out infinite;
}
.fc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-sm); }
.fc-live {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: var(--step--2); font-weight: 700; color: var(--ink-soft);
  font-family: var(--font-display);
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--pine);
  box-shadow: 0 0 0 3px var(--pine-soft); animation: pulse 2s ease-in-out infinite;
}
.fc-chip {
  font-size: var(--step--2); font-weight: 600; color: var(--ink-mute);
  padding: 0.25rem 0.6rem; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--paper);
}
.fc-metric { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: var(--space-sm); }
.fc-metric b {
  font-family: var(--font-display); font-size: 2rem; font-weight: 800;
  letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums;
}
.fc-delta {
  font-size: var(--step--2); font-weight: 700; color: var(--pine-deep);
  background: var(--pine-soft); padding: 0.2rem 0.5rem; border-radius: var(--r-pill);
}
.fc-chart { width: 100%; height: 84px; overflow: visible; }
.fc-line { fill: none; stroke: var(--pine); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.fc-dot { fill: var(--pine); stroke: var(--surface); stroke-width: 2; }
.fc-foot { display: flex; gap: var(--space-md); margin-top: var(--space-xs); }
.fc-foot span { display: inline-flex; align-items: center; gap: 0.4rem; font-size: var(--step--2); color: var(--ink-mute); font-weight: 600; }
.fc-foot i { width: 0.55rem; height: 0.55rem; border-radius: 2px; background: var(--c); display: inline-block; }

.float-card--mini {
  bottom: 2%; left: -4%;
  padding: var(--space-sm) var(--space-md); border-radius: var(--r-md);
  animation: floatB 6s ease-in-out infinite;
}
.fc-mini-label { font-size: var(--step--2); font-weight: 600; color: var(--ink-mute); }
.fc-mini-val { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.fc-mini-val span { font-size: 0.9rem; color: var(--ink-mute); font-weight: 600; }
.fc-mini-spark { width: 5rem; height: 1.4rem; margin-top: 0.2rem; }
.fc-mini-spark path { fill: none; stroke: var(--ember); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }

.float-card--pill {
  top: 4%; right: -6%;
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1rem; border-radius: var(--r-pill);
  font-size: var(--step--2); font-weight: 700; color: var(--ink);
  background: var(--surface);
  animation: floatA 8s ease-in-out infinite reverse;
}
.ai-bolt { color: var(--ember); font-size: 1rem; }

@keyframes floatA { 50% { transform: translate(-50%, calc(-50% - 12px)); } }
.float-card--mini { /* override transform origin for floatB */ }
@keyframes floatB { 50% { transform: translateY(10px); } }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px var(--pine-soft); opacity: .85; } }

/* ==========================================================================
   LOGO STRIP
   ========================================================================== */
.logo-strip { padding: var(--space-xl) 0; border-bottom: 1px solid var(--line); }
.logo-strip-label {
  text-align: center; font-size: var(--step--2); font-weight: 600;
  letter-spacing: 0.04em; color: var(--ink-mute); margin-bottom: var(--space-lg);
}
.logo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-xl) var(--space-2xl); }
.client-logo {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-display); font-size: 1.0625rem; font-weight: 700;
  letter-spacing: -0.02em; color: var(--ink-mute);
  transition: color .2s;
}
.client-logo:hover { color: var(--ink-soft); }
.logo-glyph { width: 18px; height: 18px; opacity: .7; flex: none; }
.gt-1 { background: var(--ink-mute); border-radius: 4px; }
.gt-2 { border: 2px solid var(--ink-mute); border-bottom: 0; border-radius: 4px 4px 0 0; height: 12px; align-self: flex-end; }
.gt-3 { border: 2px solid var(--ink-mute); border-radius: 50%; }
.gt-4 { border: 2px solid var(--ink-mute); border-radius: 50%; position: relative; }
.gt-4::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--ink-mute); }
.gt-5 { width: 16px; height: 16px; border: 2px solid var(--ink-mute); transform: rotate(45deg); }
.gt-6 { border: 2px dashed var(--ink-mute); border-radius: 50%; }

/* ==========================================================================
   FEATURES — asymmetric bento (breaks the identical-card-grid pattern)
   ========================================================================== */
.feature-bento {
  display: grid; grid-template-columns: 1.35fr 1fr; grid-template-rows: auto auto;
  gap: var(--space-md);
}
.feature-card {
  position: relative; overflow: hidden;
  padding: var(--space-lg) var(--space-lg) var(--space-xl);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
  transition: transform .35s var(--ease-out), box-shadow .35s, border-color .35s;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-lg); }
.feature-card--lead {
  grid-row: span 2;
  background:
    radial-gradient(120% 80% at 100% 0%, var(--ember-soft), transparent 55%),
    var(--surface);
  border-color: color-mix(in oklch, var(--ember) 22%, var(--line));
}
.fc-num {
  font-family: var(--font-display); font-size: var(--step--1); font-weight: 800;
  color: var(--ember); letter-spacing: 0.04em; margin-bottom: var(--space-md);
}
.feature-icon {
  width: 56px; height: 56px; margin-bottom: var(--space-md);
  display: grid; place-items: center; color: var(--ember-deep);
  background: var(--ember-soft); border-radius: var(--r-md);
}
.feature-card--lead .feature-icon { width: 64px; height: 64px; }
.feature-icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature-card--lead .feature-icon svg { width: 34px; height: 34px; }
.feature-card h3 { font-size: var(--step-1); margin-bottom: var(--space-2xs); }
.feature-card--lead h3 { font-size: var(--step-2); max-width: 16rem; }
.feature-card p { color: var(--ink-soft); font-size: var(--step-0); line-height: var(--lh-body); max-width: 38ch; }
.feature-tag {
  position: absolute; top: var(--space-md); right: var(--space-md);
  font-family: var(--font-display); font-size: var(--step--2); font-weight: 700;
  color: var(--ember-deep); background: var(--surface);
  padding: 0.3rem 0.7rem; border: 1px solid color-mix(in oklch, var(--ember) 25%, var(--line));
  border-radius: var(--r-pill);
}

/* ==========================================================================
   DASHBOARD PREVIEW
   ========================================================================== */
.preview-section { padding-top: 0; }
.preview-head { max-width: 40rem; margin-bottom: var(--space-xl); }
.dashboard-shell {
  padding: clamp(var(--space-sm), 2vw, var(--space-lg));
  border-radius: var(--r-xl);
  background: linear-gradient(145deg, var(--paper-2), var(--paper-3));
  box-shadow: var(--shadow-xl), inset 0 1px 0 var(--surface);
  border: 1px solid var(--line);
}
.dashboard {
  display: grid; grid-template-columns: 64px 1fr;
  overflow: hidden; min-height: 520px;
  border: 1px solid var(--night-3); border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.dash-sidebar {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-md);
  padding: var(--space-md) 0; background: var(--night);
}
.dash-logo { display: flex; align-items: flex-end; gap: 2px; height: 18px; }
.dash-logo span { width: 3px; border-radius: 3px; background: var(--ember-bright); }
.dash-logo span:nth-child(1) { height: 8px; }
.dash-logo span:nth-child(2) { height: 15px; }
.dash-logo span:nth-child(3) { height: 11px; }
.side-dot {
  width: 10px; height: 10px; border: 1.5px solid oklch(60% 0.02 60); border-radius: 3px;
  transition: all .2s;
}
.side-dot.active { border-color: var(--ember-bright); background: var(--ember); box-shadow: 0 0 10px var(--ember); }
.side-avatar { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--night-3); background: linear-gradient(145deg, oklch(80% 0.05 50), oklch(45% 0.04 40)); }
.side-spacer { flex: 1; }
.dash-avatar {
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(145deg, oklch(80% 0.05 50), oklch(45% 0.04 40));
  border: 1.5px solid var(--night-3);
}
.dash-main { padding: 0 var(--space-md) var(--space-md); overflow: hidden; }
.dash-topbar {
  display: grid; grid-template-columns: 1fr auto 26px; align-items: center; gap: var(--space-md);
  height: 56px; border-bottom: 1px solid var(--line);
}
.dash-crumb b { font-family: var(--font-display); font-size: var(--step--1); color: var(--ink); }
.dash-crumb span { margin-left: 0.4rem; font-size: var(--step--2); color: var(--ink-mute); }
.dash-search {
  height: 24px; width: 120px; border-radius: 6px; background: var(--paper-2);
  border: 1px solid var(--line); display: grid; place-items: center;
}
.dash-search span { font-size: 9px; color: var(--ink-mute); }
.dash-topbar .dash-avatar { width: 22px; height: 22px; }
.dash-title-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--space-md) var(--space-2xs);
}
.dash-title-row strong {
  display: block; font-family: var(--font-display); font-size: var(--step-1);
  font-weight: 700; color: var(--ink); letter-spacing: -0.02em;
}
.dash-title-row span { display: block; margin-top: 2px; font-size: var(--step--2); color: var(--ink-mute); }
.dash-title-row button {
  padding: 0.45rem 0.75rem; border: 1px solid var(--line-strong); border-radius: 7px;
  background: var(--surface); color: var(--ink-soft); font-size: var(--step--2); font-weight: 600;
}
.dash-grid { display: grid; gap: var(--space-sm); }
.dash-grid-top { grid-template-columns: 2.2fr 1.2fr 0.95fr; }
.dash-grid-bottom { grid-template-columns: 1fr 1fr 0.75fr; margin-top: var(--space-sm); }
.chart-card, .mini-stat { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.chart-card { padding: var(--space-sm) var(--space-md); }
.card-label { display: flex; align-items: center; justify-content: space-between; }
.card-label span { font-size: var(--step--2); color: var(--ink-mute); font-weight: 600; }
.card-label b { font-family: var(--font-display); font-size: var(--step-1); color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.line-chart { width: 100%; height: 150px; margin-top: var(--space-sm); overflow: visible; }
.line-chart .gridline { fill: none; stroke: var(--line); stroke-width: 1; }
/* var() doesn't resolve inside SVG attributes — set gradient stop colors here */
#fcFill stop, #chartFill stop { stop-color: var(--pine); }

.line-chart .area { fill: url(#chartFill); }
.line-chart .primary-line { fill: none; stroke: var(--pine); stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.line-chart .secondary-line { fill: none; stroke: var(--ember); stroke-width: 2; stroke-dasharray: 0; opacity: .55; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-marker { fill: var(--pine); stroke: var(--surface); stroke-width: 2; }
.bar-chart {
  display: flex; height: 150px; align-items: end; justify-content: space-around; gap: 6px;
  padding: var(--space-md) 4px 0; border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, var(--paper-2) 32px);
}
.bar-chart i {
  width: 11%; height: var(--h); border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, var(--pine-deep), var(--pine));
  animation: barsIn .7s calc(var(--d) * .06s) both var(--ease-out); transform-origin: bottom;
}
.bar-chart i:nth-child(6) { background: linear-gradient(to top, var(--ember-deep), var(--ember-bright)); }
@keyframes barsIn { from { transform: scaleY(0); } }
.stats-stack { display: grid; gap: var(--space-sm); }
.mini-stat { position: relative; overflow: hidden; padding: var(--space-sm) var(--space-md); }
.mini-stat span { display: block; font-size: var(--step--2); color: var(--ink-mute); font-weight: 600; }
.mini-stat b { display: block; margin-top: 4px; font-family: var(--font-display); font-size: var(--step-1); color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.mini-stat em { color: var(--pine-deep); font-size: var(--step--2); font-style: normal; font-weight: 700; }
.mini-stat svg { position: absolute; width: 56%; right: -2px; bottom: 6px; fill: none; stroke: var(--ember); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.compact-bars { min-height: 110px; }
.multi-bars { height: 66px; display: flex; align-items: end; justify-content: space-around; gap: 7px; padding-top: var(--space-sm); border-bottom: 1px solid var(--line); }
.multi-bars i { width: 9%; border-radius: 3px 3px 0 0; background: linear-gradient(to top, var(--pine-deep) 0 48%, var(--pine) 48%); }
.multi-bars i:nth-child(1){height:50%}.multi-bars i:nth-child(2){height:78%}.multi-bars i:nth-child(3){height:63%}.multi-bars i:nth-child(4){height:91%}.multi-bars i:nth-child(5){height:70%}.multi-bars i:nth-child(6){height:85%}
.multi-bars.alt i { background: linear-gradient(to top, var(--ember-deep) 0 55%, var(--ember-bright) 55%); }
.compact-list { display: grid; gap: var(--space-2xs); align-content: start; }
.compact-list div {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: var(--space-2xs); border-bottom: 1px solid var(--paper-2); font-size: var(--step--2);
}
.compact-list div:last-child { border-bottom: 0; }
.compact-list div span { color: var(--ink-mute); font-weight: 600; }
.compact-list b { font-family: var(--font-display); font-size: var(--step-1); color: var(--ink); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   HOW IT WORKS — editorial numbered steps
   ========================================================================== */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; counter-reset: step; }
.step-card {
  position: relative; padding: var(--space-lg) var(--space-lg) var(--space-2xl) 0;
}
.step-card + .step-card { padding-left: var(--space-lg); border-left: 1px solid var(--line); }
.step-num {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: var(--space-md);
  font-family: var(--font-display); font-size: var(--step--1); font-weight: 800; color: var(--ember-deep);
  background: var(--surface); border: 1px solid color-mix(in oklch, var(--ember) 25%, var(--line));
  border-radius: var(--r-sm);
}
.step-card h3 { font-size: var(--step-1); margin-bottom: var(--space-2xs); }
.step-card p { color: var(--ink-soft); font-size: var(--step-0); line-height: var(--lh-body); max-width: 32ch; }

/* ==========================================================================
   TESTIMONIALS — warm ink dark moment
   ========================================================================== */
.testimonials { position: relative; overflow: hidden; color: var(--on-night); background: var(--night); }
.testimonials::before {
  content: ""; position: absolute; top: -40%; left: 50%; transform: translateX(-50%);
  width: 50rem; height: 50rem; border-radius: 50%;
  background: radial-gradient(circle, oklch(40% 0.12 45 / .5), transparent 60%);
  filter: blur(40px); pointer-events: none;
}
.testimonials .container { position: relative; }
.testimonial-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); align-items: stretch;
}
.testimonial-card {
  position: relative; display: flex; flex-direction: column; gap: var(--space-md);
  padding: var(--space-lg); border: 1px solid var(--night-line); border-radius: var(--r-lg);
  background: oklch(100% 0 0 / .035);
  backdrop-filter: blur(4px);
}
.testimonial-card.tc-lead {
  background: oklch(100% 0 0 / .06);
  border-color: color-mix(in oklch, var(--ember) 40%, var(--night-line));
}
.rating { display: flex; gap: 3px; }
.rating svg { width: 17px; height: 17px; fill: oklch(82% 0.13 75); }
.testimonial-card blockquote {
  font-family: var(--font-display); font-size: var(--step-1); font-weight: 500;
  line-height: var(--lh-snug); letter-spacing: -0.015em; color: var(--on-night);
  margin-top: auto;
}
.testimonial-card figcaption { display: flex; align-items: center; gap: var(--space-sm); padding-top: var(--space-md); border-top: 1px solid var(--night-line); }
.testimonial-card img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--night-3); }
.testimonial-card b { display: block; font-family: var(--font-display); font-size: var(--step-0); color: var(--on-night); }
.testimonial-card em { display: block; font-style: normal; margin-top: 2px; font-size: var(--step--2); color: var(--on-night-mute); }
.tc-badge {
  position: absolute; top: var(--space-md); right: var(--space-md);
  font-family: var(--font-display); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ember-bright); padding: 0.3rem 0.6rem; border: 1px solid color-mix(in oklch, var(--ember) 45%, transparent);
  border-radius: var(--r-pill); background: oklch(100% 0 0 / .04);
}

/* ==========================================================================
   PRICING
   ========================================================================== */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); align-items: stretch; }
.price-card {
  position: relative; display: flex; flex-direction: column;
  padding: var(--space-lg); border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--surface);
}
.price-card--featured {
  border-color: var(--ember); border-width: 2px;
  box-shadow: var(--shadow-lg);
  background:
    radial-gradient(100% 60% at 50% 0%, var(--ember-soft), transparent 50%),
    var(--surface);
}
.popular {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  padding: 0.35rem 0.85rem; border-radius: var(--r-pill);
  color: #fff; background: linear-gradient(180deg, var(--ember-btn-1), var(--ember-btn-2));
  font-family: var(--font-display); font-size: var(--step--2); font-weight: 700; white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.price-tier { font-family: var(--font-display); font-size: var(--step-0); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.price-amount {
  display: flex; align-items: baseline; gap: 0.2rem; margin: var(--space-sm) 0 var(--space-2xs);
  font-family: var(--font-display); color: var(--ink); letter-spacing: -0.03em;
}
.price-amount .cur { font-size: var(--step-1); font-weight: 700; color: var(--ink-soft); }
.price-amount b { font-size: 2.75rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.price-amount .per { font-size: var(--step-0); font-weight: 600; color: var(--ink-mute); }
.price-amount--custom b { font-size: 2.25rem; }
.price-copy { min-height: 3rem; color: var(--ink-mute); font-size: var(--step--1); line-height: var(--lh-body); margin-bottom: var(--space-md); }
.price-list { display: grid; gap: var(--space-sm); margin-bottom: var(--space-lg); flex: 1; }
.price-list li { position: relative; padding-left: 1.6rem; font-size: var(--step--1); color: var(--ink-soft); }
.price-list li::before {
  content: ""; position: absolute; left: 0; top: 0.35em;
  width: 0.85rem; height: 0.85rem; border-radius: 50%;
  background: var(--ember-soft);
}
.price-list li::after {
  content: ""; position: absolute; left: 0.27rem; top: 0.62em;
  width: 0.3rem; height: 0.55rem;
  border: solid var(--ember-deep); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ==========================================================================
   CTA — ink stage that bleeds into footer
   ========================================================================== */
.cta-section { padding: 0 0 var(--space-xl); }
.cta-card {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-xl);
  padding: clamp(var(--space-xl), 5vw, var(--space-3xl));
  border-radius: var(--r-xl);
  color: var(--on-night); background: var(--night);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--night-3);
}
.cta-glow {
  position: absolute; top: -60%; right: -10%;
  width: 40rem; height: 40rem; border-radius: 50%;
  background: radial-gradient(circle, oklch(45% 0.16 45 / .55), transparent 60%);
  filter: blur(30px); pointer-events: none;
}
.cta-copy { position: relative; max-width: 34rem; }
.cta-copy > p:first-child {
  font-family: var(--font-display); font-size: var(--step--2); font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ember-bright); margin-bottom: var(--space-sm);
}
.cta-copy h2 { color: var(--on-night); font-size: var(--step-3); }
.cta-sub { margin-top: var(--space-sm); color: var(--on-night-mute); font-size: var(--step-0); }
.cta-action { position: relative; display: flex; flex-direction: column; gap: var(--space-sm); align-items: flex-start; }
.cta-action .btn { min-width: 200px; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { padding: var(--space-3xl) 0 var(--space-xl); color: var(--on-night); background: var(--night); }
.footer-grid {
  display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: var(--space-xl);
  padding-bottom: var(--space-2xl); border-bottom: 1px solid var(--night-line);
}
.brand--on-dark { color: var(--on-night); }
.brand--on-dark .brand-accent { color: var(--on-night-mute); }
.brand--on-dark .brand-mark { background: oklch(100% 0 0 / .05); border-color: var(--night-line); }
.footer-about p { margin-top: var(--space-md); color: var(--on-night-mute); font-size: var(--step--1); max-width: 22ch; }
.socials { display: flex; gap: var(--space-2xs); margin-top: var(--space-lg); }
.socials a {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid var(--night-line); border-radius: 50%;
  font-size: var(--step--1); font-weight: 700; color: var(--on-night-mute);
  transition: all .2s;
}
.socials a:hover { color: var(--on-night); border-color: var(--ember); background: oklch(100% 0 0 / .06); }
.footer-col h3 { font-size: var(--step--1); font-weight: 700; color: var(--on-night); margin-bottom: var(--space-md); letter-spacing: -0.01em; }
.footer-col a { display: block; padding: 0.35rem 0; color: var(--on-night-mute); font-size: var(--step--1); transition: color .2s; }
.footer-col a:hover { color: var(--on-night); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-md);
  padding-top: var(--space-lg); color: var(--on-night-mute); font-size: var(--step--2);
}
.footer-legal { display: flex; gap: var(--space-lg); }
.footer-legal a:hover { color: var(--on-night); }

/* ==========================================================================
   REVEAL ANIMATIONS
   ========================================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-sm { transition-delay: .09s; }
.reveal-delay { transition-delay: .18s; }
.reveal-delay-lg { transition-delay: .27s; }

/* Hero load orchestration */
.hero-copy > * { opacity: 0; transform: translateY(18px); animation: heroIn .7s var(--ease-out) forwards; }
.hero-copy > :nth-child(1) { animation-delay: .05s; }
.hero-copy > :nth-child(2) { animation-delay: .13s; }
.hero-copy > :nth-child(3) { animation-delay: .21s; }
.hero-copy > :nth-child(4) { animation-delay: .29s; }
.hero-copy > :nth-child(5) { animation-delay: .37s; }
.hero-visual { opacity: 0; transform: translateY(20px) scale(.98); animation: heroIn .9s .25s var(--ease-out) forwards; }
@keyframes heroIn { to { opacity: 1; transform: none; } }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  :root { --header-h: 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-2xl); }
  .hero-visual { min-height: 380px; max-width: 30rem; }
  .feature-bento { grid-template-columns: 1fr; }
  .feature-card--lead { grid-row: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-xl) var(--space-lg); }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .container { width: min(100% - 2rem, var(--max)); }
  .section { padding: var(--space-2xl) 0; }
  .menu-toggle { display: block; }
  .primary-nav {
    position: absolute; top: calc(var(--header-h) - 8px); left: 1rem; right: 1rem;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--space-2xs); border: 1px solid var(--line); border-radius: var(--r-md);
    background: var(--paper); box-shadow: var(--shadow-lg);
    opacity: 0; transform: translateY(-10px); pointer-events: none;
    transition: opacity .2s var(--ease-out), transform .2s var(--ease-out);
  }
  .primary-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .primary-nav > a:not(.btn) { padding: 0.85rem 1rem; border-radius: 8px; }
  .primary-nav > a:not(.btn):hover { background: var(--paper-2); }
  .primary-nav .btn { margin-top: var(--space-2xs); }

  .hero { padding-top: calc(var(--header-h) + var(--space-xl)); }
  .hero-actions .btn { flex: 1; }

  .logo-row { gap: var(--space-lg) var(--space-xl); }

  .steps-grid { grid-template-columns: 1fr; }
  .step-card + .step-card { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: var(--space-lg); margin-top: var(--space-lg); }

  .testimonial-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 26rem; margin-inline: auto; }

  .cta-card { flex-direction: column; align-items: flex-start; }
  .cta-action { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .cta-action .btn { flex: 1; min-width: 0; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-sm); }
}

@media (max-width: 520px) {
  .hero h1 { letter-spacing: -0.03em; }
  .hero-visual { min-height: 340px; }
  .float-card--main { width: 100%; }
  .float-card--pill { right: 0; }
  .float-card--mini { left: 0; }
  .dashboard { grid-template-columns: 48px 1fr; }
  .dash-grid-top { grid-template-columns: 1fr; }
  .stats-stack { display: none; }
  .dash-grid-bottom { grid-template-columns: 1fr 1fr; }
  .compact-list { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-about { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
  .reveal, .hero-copy > *, .hero-visual { opacity: 1; transform: none; }
}
