/* ============================================================
   RETAINLY — landing styles
   Backbone: Wynter (off-white canvas, near-black ink, big display)
   Blend:    Petal (product visual, friendly icon grids)
   Type:     Space Grotesk display · Hanken Grotesk body · JetBrains Mono labels
   ============================================================ */

:root {
  /* canvas + ink */
  --paper: #F3F1EA;
  --paper-2: #ECE9DF;
  --card: #FFFFFF;
  --ink: #16160F;
  --ink-2: #4B4A40;
  --ink-3: #87867A;
  --line: #DEDACE;
  --line-2: #E8E5DA;

  /* accent — driven by [data-dir]; default = editorial lime */
  --accent: #C2EE2B;
  --accent-ink: #16160F;     /* text that sits on the accent */
  --accent-soft: #EAF7BD;
  --accent-deep: #6f8a0a;

  /* semantic risk colors */
  --risk-high: #E5484D;
  --risk-high-soft: #FBE3E4;
  --risk-mid: #E8A317;
  --risk-mid-soft: #FBF0D6;
  --safe: #15B886;
  --safe-soft: #D6F2E8;

  /* brand integration colors */
  --stripe: #635BFF;
  --supabase: #3ECF8E;

  --radius: 18px;
  --radius-lg: 26px;
  --radius-sm: 11px;

  --shadow-sm: 0 1px 2px rgba(22,22,15,.05), 0 2px 6px rgba(22,22,15,.04);
  --shadow-md: 0 4px 14px rgba(22,22,15,.06), 0 18px 40px rgba(22,22,15,.07);
  --shadow-lg: 0 10px 30px rgba(22,22,15,.08), 0 40px 80px rgba(22,22,15,.10);

  --maxw: 1200px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
  transition: background .5s ease;
}

::selection { background: var(--accent); color: var(--accent-ink); }

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

img, svg { display: block; max-width: 100%; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* ---------- typography utilities ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.eyebrow.no-dot::before { display: none; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; line-height: 1.02; }

.display {
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.h2 { font-size: clamp(32px, 4.2vw, 56px); letter-spacing: -0.03em; line-height: 1.0; }
.h3 { font-size: clamp(21px, 2vw, 27px); letter-spacing: -0.02em; }

.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-2); line-height: 1.55; max-width: 56ch; }

.mono { font-family: var(--font-mono); }
.accentword { color: var(--accent-deep); }

/* highlight marker behind text */
.mark {
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0 .12em;
  border-radius: 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15.5px;
  padding: 14px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease, color .18s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; transition: transform .2s ease; }
.btn:hover svg.arrow { transform: translateX(3px); }

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: color-mix(in oklab, var(--accent), #000 8%);
}
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 10px 24px color-mix(in oklab, var(--accent), transparent 60%); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { background: var(--card); border-color: var(--ink); transform: translateY(-2px); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--paper), transparent 12%);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .5s;
}
.nav.scrolled { border-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.03em; }
.brand .glyph {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--ink);
  display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.brand .glyph svg { width: 18px; height: 18px; }
.nav-links { display: flex; align-items: center; gap: 34px; }
.nav-links a { font-size: 15px; color: var(--ink-2); font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }

/* ---------- sections ---------- */
section { position: relative; }
.section-pad { padding: clamp(72px, 10vw, 140px) 0; }
.section-head { max-width: 760px; }
.section-head .h2 { margin: 18px 0 0; }
.section-head .lead { margin-top: 20px; }

.divider { height: 1px; background: var(--line); }

/* ---------- HERO ---------- */
.hero { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(60px, 7vw, 96px); overflow: hidden; }

/* Direction A — editorial split */
.heroA { display: grid; grid-template-columns: 1.04fr 0.96fr; gap: 56px; align-items: center; }
.heroA .copy { max-width: 600px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line);
  padding: 7px 7px 7px 14px; border-radius: 999px;
  font-size: 13px; color: var(--ink-2); font-weight: 500;
  box-shadow: var(--shadow-sm);
}
.hero-badge .pill {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  background: var(--accent); color: var(--accent-ink);
  padding: 3px 9px; border-radius: 999px; letter-spacing: .04em;
}
.heroA .display { margin: 26px 0 0; }
.heroA .lead { margin-top: 24px; }
.hero-actions { display: flex; align-items: center; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.hero-proof { display: flex; align-items: center; gap: 22px; margin-top: 30px; flex-wrap: wrap; }
.hero-proof .stat .n { font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -0.02em; }
.hero-proof .stat .l { font-size: 12.5px; color: var(--ink-3); font-family: var(--font-mono); letter-spacing: .03em; }
.hero-proof .vr { width: 1px; height: 34px; background: var(--line); }

/* ---------- dashboard mock ---------- */
.dash-wrap { position: relative; }
.dash {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.dash-top {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px; border-bottom: 1px solid var(--line-2);
  background: color-mix(in oklab, var(--card), var(--paper) 40%);
}
.dash-top .dots { display: flex; gap: 6px; }
.dash-top .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
.dash-top .addr {
  margin-left: 10px; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 7px; padding: 4px 11px;
}
.dash-top .live { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--safe); display: flex; align-items: center; gap: 6px; font-weight: 600; }
.dash-top .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 0 3px var(--safe-soft); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.dash-body { padding: 18px; }
.dash-statrow { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 16px; }
.stat-tile { background: var(--paper); border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; }
.stat-tile .lab { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; color: var(--ink-3); text-transform: uppercase; }
.stat-tile .val { font-family: var(--font-display); font-weight: 600; font-size: 27px; letter-spacing: -0.02em; margin-top: 7px; }
.stat-tile .val small { font-size: 15px; color: var(--ink-3); font-weight: 500; }
.stat-tile .delta { font-family: var(--font-mono); font-size: 11px; font-weight: 600; margin-top: 4px; display: inline-flex; align-items: center; gap: 4px; }
.stat-tile .delta.up { color: var(--safe); }
.stat-tile .delta.down { color: var(--risk-high); }

.dash-list { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; }
.dl-head { display: grid; grid-template-columns: 1.7fr .9fr .8fr 1fr; gap: 10px; padding: 10px 14px; background: var(--paper); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .04em; color: var(--ink-3); text-transform: uppercase; border-bottom: 1px solid var(--line-2); }
.dl-row { display: grid; grid-template-columns: 1.7fr .9fr .8fr 1fr; gap: 10px; padding: 12px 14px; align-items: center; border-bottom: 1px solid var(--line-2); transition: background .15s; }
.dl-row:last-child { border-bottom: none; }
.dl-row:hover { background: color-mix(in oklab, var(--accent-soft), transparent 55%); }
.cust { display: flex; align-items: center; gap: 11px; }
.cust .av { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 13px; color: #fff; flex-shrink: 0; }
.cust .nm { font-weight: 600; font-size: 14px; }
.cust .pl { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.score-pill { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 8px; }
.score-pill.high { background: var(--risk-high-soft); color: var(--risk-high); }
.score-pill.mid { background: var(--risk-mid-soft); color: #9a6a04; }
.score-pill.safe { background: var(--safe-soft); color: #0c7a5a; }
.spark { width: 56px; height: 22px; }
.action-tag { font-family: var(--font-mono); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 7px; background: var(--ink); color: var(--paper); }
.action-tag.draft { background: var(--paper); color: var(--ink-2); border: 1px solid var(--line); }

/* floating mini cards on hero dash */
.float-card {
  position: absolute; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-md); padding: 13px 15px;
  font-size: 13px;
}
.float-card .fc-lab { font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.fc-saved { right: -26px; top: -26px; }
.fc-saved .fc-val { font-family: var(--font-display); font-weight: 600; font-size: 23px; margin-top: 3px; color: var(--safe); }
.fc-agent { left: -34px; bottom: 38px; display: flex; gap: 11px; align-items: center; max-width: 220px; }
.fc-agent .ic { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex-shrink: 0; }
.fc-agent .t1 { font-weight: 600; font-size: 13px; }
.fc-agent .t2 { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

/* ---------- logo / trust strip ---------- */
.trust { padding: 30px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.trust-inner { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; justify-content: space-between; }
.trust-lab { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); letter-spacing: .04em; text-transform: uppercase; }
.trust-logos { display: flex; align-items: center; gap: 38px; flex-wrap: wrap; }
.trust-logos .lg { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--ink-2); letter-spacing: -0.02em; opacity: .72; display: flex; align-items: center; gap: 8px; }

/* ---------- problem ---------- */
.problem-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 56px; }
.symptom {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.symptom:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--ink); }
.symptom .num { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.symptom .sym { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.02em; margin: 14px 0 0; line-height: 1.12; }
.symptom .arrow-down { color: var(--risk-high); margin: 14px 0 10px; }
.symptom .conseq { font-size: 13.5px; color: var(--ink-2); }
.symptom .conseq b { color: var(--risk-high); font-weight: 600; }

.lossbar { margin-top: 18px; display: flex; align-items: stretch; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.lossbar .seg { padding: 26px 28px; flex: 1; border-right: 1px solid var(--line-2); }
.lossbar .seg:last-child { border-right: none; }
.lossbar .seg.hl { background: var(--ink); color: var(--paper); }
.lossbar .seg .k { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.lossbar .seg .v { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px,3vw,40px); letter-spacing: -0.02em; margin-top: 8px; }
.lossbar .seg.hl .v { color: var(--accent); }

/* ---------- how it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 56px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; position: relative; transition: transform .2s, box-shadow .2s; }
.step:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.step .stepn { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--accent-deep); letter-spacing: .08em; }
.step .ic-box { width: 50px; height: 50px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line-2); display: grid; place-items: center; margin: 18px 0 0; }
.step .ic-box svg { width: 24px; height: 24px; color: var(--ink); }
.step h3 { margin: 18px 0 0; }
.step p { margin-top: 10px; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.step .flow-line { position: absolute; top: 48px; right: -8px; z-index: 2; color: var(--ink-3); }
.steps .step:last-child .flow-line { display: none; }

/* ---------- churn score explainer ---------- */
.ml-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; margin-top: 48px; }
.feature-list { display: flex; flex-direction: column; gap: 12px; }
.feature-row { display: flex; align-items: center; gap: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.feature-row .fcat { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); width: 110px; flex-shrink: 0; }
.feature-row .fbar { flex: 1; height: 8px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.feature-row .fbar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); width: 0; transition: width 1.1s cubic-bezier(.2,.8,.2,1); }
.feature-row .fweight { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--ink); width: 42px; text-align: right; }

.scorecard { background: var(--ink); color: var(--paper); border-radius: var(--radius-lg); padding: 30px; position: relative; overflow: hidden; }
.scorecard .sc-head { display: flex; align-items: center; justify-content: space-between; }
.scorecard .sc-cust { display: flex; align-items: center; gap: 12px; }
.scorecard .sc-cust .av { width: 40px; height: 40px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; }
.scorecard .sc-cust .nm { font-weight: 600; font-size: 16px; }
.scorecard .sc-cust .pl { font-family: var(--font-mono); font-size: 11.5px; color: rgba(255,255,255,.5); }
.gauge { display: flex; align-items: center; gap: 22px; margin: 26px 0; }
.gauge .ring { position: relative; width: 116px; height: 116px; flex-shrink: 0; }
.gauge .ring .gv { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.gauge .ring .gv b { font-family: var(--font-display); font-weight: 600; font-size: 32px; line-height: 1; }
.gauge .ring .gv span { font-family: var(--font-mono); font-size: 9.5px; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .06em; margin-top: 4px; }
.gauge .gmeta .glab { font-family: var(--font-mono); font-size: 11px; color: var(--risk-high); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.gauge .gmeta .gwin { font-family: var(--font-display); font-size: 18px; font-weight: 500; margin-top: 6px; line-height: 1.25; color: #fff; }
.reasons { border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; }
.reasons .rl { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: rgba(255,255,255,.5); margin-bottom: 12px; }
.reason { display: flex; align-items: center; gap: 11px; font-size: 13.5px; padding: 6px 0; color: rgba(255,255,255,.85); }
.reason .rn { font-family: var(--font-mono); color: var(--accent); font-weight: 700; font-size: 12px; }

/* ---------- AI agent ---------- */
.agent-wrap { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 48px; align-items: center; margin-top: 48px; }
.agent-rules { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.rule { display: flex; align-items: flex-start; gap: 13px; }
.rule .chk { width: 22px; height: 22px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.rule .chk svg { width: 13px; height: 13px; }
.rule .rt { font-size: 15px; color: var(--ink-2); }
.rule .rt b { color: var(--ink); font-weight: 600; }

.email-mock { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); overflow: hidden; }
.play-tabs { display: flex; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); background: color-mix(in oklab, var(--card), var(--paper) 45%); }
.play-tab {
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  letter-spacing: .02em; border: 1px solid transparent; background: transparent;
  color: var(--ink-3); padding: 7px 13px; border-radius: 8px; cursor: pointer;
  transition: color .18s, background .18s, border-color .18s;
}
.play-tab:hover { color: var(--ink); background: var(--card); }
.play-tab.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.email-head { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 12px; }
.email-head .ag-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.email-head .et { font-weight: 600; font-size: 14px; }
.email-head .es { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); }
.email-head .badge-auto { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--accent-deep); background: var(--accent-soft); padding: 4px 9px; border-radius: 7px; letter-spacing: .03em; }
.email-meta { padding: 14px 20px; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.email-meta .ln { display: flex; gap: 10px; }
.email-meta .ln b { color: var(--ink); width: 52px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-3); }
.email-body { padding: 22px 20px; font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.email-body p { margin-bottom: 12px; }
.email-body .typed-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 13.5px; margin-top: 6px; }
.email-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; align-items: center; }
.email-foot .ef-btn { font-family: var(--font-body); font-size: 13px; font-weight: 600; padding: 9px 15px; border-radius: 9px; cursor: pointer; border: 1px solid var(--line); background: var(--paper); color: var(--ink); transition: transform .15s, background .15s, color .15s, border-color .15s; }
.email-foot .ef-btn:hover { transform: translateY(-1px); }
.email-foot .ef-btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.email-foot .ef-btn.primary:hover { box-shadow: var(--shadow-sm); }
.email-foot .ef-btn.active { background: var(--accent); color: var(--accent-ink); border-color: color-mix(in oklab, var(--accent), #000 8%); }
.email-foot .ef-chip {
  margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 9px;
  border: 1px dashed var(--line); background: var(--paper); color: var(--ink-3); cursor: pointer;
  transition: color .18s, background .18s, border-color .18s;
}
.email-foot .ef-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.email-foot .ef-chip.on { color: var(--accent-deep); background: var(--accent-soft); border-style: solid; border-color: color-mix(in oklab, var(--accent), transparent 40%); }

/* edit mode */
.email-mock.editing #agBody, .email-mock.editing #agSubj { outline: 2px solid color-mix(in oklab, var(--accent), transparent 35%); outline-offset: 3px; border-radius: 6px; background: color-mix(in oklab, var(--accent-soft), transparent 55%); }
.email-mock.editing #agBody [contenteditable], .email-mock.editing #agSubj { cursor: text; }
[contenteditable]:focus { outline: none; }

/* sent state */
.email-sent { padding: 30px 20px; text-align: center; display: none; }
.email-mock.sent .email-meta, .email-mock.sent .email-body, .email-mock.sent .email-foot, .email-mock.sent .play-tabs { display: none; }
.email-mock.sent .email-sent { display: block; }
.email-sent .check { width: 52px; height: 52px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; margin: 0 auto 16px; animation: popIn .4s cubic-bezier(.2,1.4,.4,1); }
.email-sent .check svg { width: 26px; height: 26px; }
@keyframes popIn { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.email-sent .st1 { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.email-sent .st2 { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.email-sent .undo { margin-top: 18px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--ink-3); background: none; border: none; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.email-sent .undo:hover { color: var(--ink); }

/* ---------- integrations ---------- */
.intg { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; margin-top: 52px; }
.intg-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; transition: transform .2s, box-shadow .2s; }
.intg-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.intg-card .ih { display: flex; align-items: center; gap: 14px; }
.intg-card .ilogo { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.intg-card .ilogo.stripe { background: var(--stripe); }
.intg-card .ilogo.supa { background: #1c1c1c; }
.intg-card .iname { font-family: var(--font-display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.intg-card .ikind { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.intg-card p { margin-top: 18px; font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.intg-card .ifields { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.intg-card .chip { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-2); background: var(--paper); border: 1px solid var(--line-2); padding: 5px 10px; border-radius: 7px; }
.intg-conn { display: flex; align-items: center; gap: 8px; margin-top: 20px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--safe); }
.intg-conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--safe); box-shadow: 0 0 0 3px var(--safe-soft); }

.intg-note { text-align: center; margin-top: 22px; font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 48px auto 0; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 4px; cursor: pointer; font-family: var(--font-display); font-weight: 500; font-size: clamp(17px,1.7vw,21px); letter-spacing: -0.02em; }
.faq-q .pm { width: 26px; height: 26px; flex-shrink: 0; position: relative; border: 1px solid var(--line); border-radius: 8px; transition: background .2s, border-color .2s; }
.faq-q .pm::before, .faq-q .pm::after { content: ""; position: absolute; background: var(--ink); border-radius: 2px; left: 50%; top: 50%; transition: transform .25s ease, background .2s; }
.faq-q .pm::before { width: 11px; height: 2px; transform: translate(-50%,-50%); }
.faq-q .pm::after { width: 2px; height: 11px; transform: translate(-50%,-50%); }
.faq-item.open .pm { background: var(--accent); border-color: var(--accent); }
.faq-item.open .pm::before, .faq-item.open .pm::after { background: var(--accent-ink); }
.faq-item.open .pm::after { transform: translate(-50%,-50%) scaleY(0); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a .inner { padding: 0 4px 26px; font-size: 15.5px; color: var(--ink-2); line-height: 1.6; max-width: 68ch; }

/* ---------- final CTA ---------- */
.final { background: var(--ink); color: var(--paper); border-radius: 32px; padding: clamp(48px,7vw,90px) clamp(32px,5vw,80px); position: relative; overflow: hidden; }
.final .display { color: var(--paper); position: relative; }
.final .lead { color: rgba(255,255,255,.66); position: relative; }
.final .glow { position: absolute; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklab, var(--accent), transparent 35%), transparent 65%); right: -120px; top: -160px; filter: blur(20px); opacity: .55; }
.waitlist { display: flex; gap: 10px; margin-top: 36px; max-width: 480px; position: relative; flex-wrap: wrap; }
.waitlist input { flex: 1; min-width: 220px; font-family: var(--font-body); font-size: 15px; padding: 15px 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; outline: none; transition: border-color .2s, background .2s; }
.waitlist input::placeholder { color: rgba(255,255,255,.4); }
.waitlist input:focus { border-color: var(--accent); background: rgba(255,255,255,.1); }
.waitlist .btn-accent { padding: 15px 24px; }
.waitlist .btn-accent[disabled] { opacity: .6; cursor: progress; }
.waitlist input[disabled] { opacity: .55; }
.wl-status { position: relative; margin-top: 14px; min-height: 20px; font-size: 14px; display: flex; align-items: center; gap: 9px; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.wl-status.show { opacity: 1; transform: none; }
.wl-status .si { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; }
.wl-status .si svg { width: 13px; height: 13px; }
.wl-status.ok { color: #fff; }
.wl-status.ok .si { background: var(--accent); color: var(--accent-ink); }
.wl-status.info { color: rgba(255,255,255,.82); }
.wl-status.info .si { background: rgba(255,255,255,.14); color: #fff; }
.wl-status.err { color: #FFB4B4; }
.wl-status.err .si { background: rgba(229,72,77,.22); color: #FF8A8E; }
.wl-status .mono { color: var(--accent); }
.final-meta { display: flex; gap: 24px; margin-top: 22px; position: relative; flex-wrap: wrap; }
.final-meta .fm { font-family: var(--font-mono); font-size: 12.5px; color: rgba(255,255,255,.6); display: flex; align-items: center; gap: 8px; }
.final-meta .fm svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------- footer ---------- */
.footer { padding: 44px 0 40px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.footer .brand { margin-bottom: 12px; }
.footer .ftag { font-size: 14px; color: var(--ink-2); max-width: 38ch; line-height: 1.5; }
.footer-nav { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.footer-nav a { font-size: 14px; color: var(--ink-2); transition: color .15s; }
.footer-nav a:hover { color: var(--ink); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; flex-wrap: wrap; gap: 14px; }
.footer-bottom .cp { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }

/* ---------- scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .07s; }
.reveal.d2 { transition-delay: .14s; }
.reveal.d3 { transition-delay: .21s; }
.reveal.d4 { transition-delay: .28s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .heroA { grid-template-columns: 1fr; gap: 44px; }
  .ml-grid, .agent-wrap { grid-template-columns: 1fr; gap: 36px; }
  .problem-grid { grid-template-columns: repeat(2,1fr); }
  .steps { grid-template-columns: 1fr; }
  .step .flow-line { display: none; }
  .intg { grid-template-columns: 1fr; }
  .lossbar { flex-direction: column; }
  .lossbar .seg { border-right: none; border-bottom: 1px solid var(--line-2); }
  .nav-links { display: none; }
  .fc-agent { left: -10px; }
  .fc-saved { right: 4px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .problem-grid { grid-template-columns: 1fr; }
  .dash-statrow { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .hero-proof .vr { display: none; }
  .dl-head, .dl-row { grid-template-columns: 1.6fr .9fr 1fr; }
  .dl-head .c-trend, .dl-row .c-trend { display: none; }
  .float-card { display: none; }
}
