/* ============================================================
   Message Polly v3 — Linear-faithful flow, light off-white.
   Loads after tokens.css + v2.css (reuses .stmt, .figs, .subs).
   ============================================================ */

/* full-bleed hairline between sections (Linear's Bleed dividers) */
.lrule { border-top: 1px solid var(--hairline); }

/* ---------- typeface: Linear-style Inter (toggle via Tweaks) ---------- */
body[data-type="inter"] {
  --display: "Inter", "SF Pro Display", -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv05", "cv11";
}
/* Inter sits wider than General Sans at display sizes — tighten */
body[data-type="inter"] .hero-h1 { letter-spacing: -0.035em; }
body[data-type="inter"] .lhead h2,
body[data-type="inter"] .lcopy h2,
body[data-type="inter"] .stmt,
body[data-type="inter"] .lquote blockquote { letter-spacing: -0.033em; }
body[data-type="inter"] .num-big { letter-spacing: -0.04em; }

/* ---------- statement + FIG benefits ---------- */
.lstmt-sect { padding: 108px 0 92px; }
.lstmt-sect .stmt { padding: 0 0 72px; max-width: 30em; font-size: clamp(26px, 3.5vw, 43px); line-height: 1.18; }
.fig-ill { min-height: 196px; display: flex; align-items: center; justify-content: center; margin: 18px 0 6px; }
/* illustration entrance: a calm fade + gentle rise, all three together */
.fig .fig-ill { opacity: 0; transform: translateY(14px);
  transition: opacity .8s ease, transform .85s cubic-bezier(.22,.61,.36,1); will-change: transform, opacity; }
.fig.in .fig-ill { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fig .fig-ill { opacity: 1; transform: none; } }
.fig-ill svg { display: block; height: 196px; width: auto; max-width: 100%; }
.lstmt-sect .fig h3 { font-size: 20px; }
.lstmt-sect .fig p { font-size: 15px; }

/* ---------- 5.0 Results — Korendy proof, full-width, primary blue ---------- */
.rz-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--hairline); }
.rz-stat { padding: 40px 40px 4px; border-left: 1px solid var(--hairline); }
.rz-stat:first-child { padding-left: 0; border-left: none; }
.rz-stat:last-child { padding-right: 0; }
.rz-num { font-family: var(--display); font-weight: 600; font-size: clamp(54px, 7vw, 96px); line-height: 0.8; letter-spacing: -0.05em; color: var(--blue); white-space: nowrap; }
.rz-num span { font-size: 0.36em; vertical-align: 0.72em; margin-left: 0.02em; letter-spacing: -0.02em; }
.rz-lab { margin-top: 20px; font-size: 16px; font-weight: 500; color: var(--ink); letter-spacing: -0.006em; }
/* Measure proof callout: figure + caption on a hairline */
.m-proof { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 16px; margin-top: 28px; border-top: 1px solid var(--hairline); padding-top: 18px; }
.m-proof-n { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1; letter-spacing: -0.03em; color: var(--blue); white-space: nowrap; }
.lcopy .m-proof p, .lsec-cols .lcopy .m-proof p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--slate); max-width: 44ch; text-wrap: pretty; }

/* escalation line — sits under the section headline, quiet */
.rz-esc { margin-top: 22px; font-size: 16px; line-height: 1.6; color: var(--slate); max-width: 40ch; text-wrap: pretty; }
.rz-esc b { color: var(--ink); font-weight: 600; }

/* split-test board: header row attached to the stat ledger */
.rz-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  border-top: 1px solid var(--hairline); padding: 16px 0 26px;
}
.rz-head-vs { display: inline-flex; align-items: baseline; gap: 9px; font-size: 15px; color: var(--slate); letter-spacing: -0.006em; }
.rz-head-vs b { color: var(--ink); font-weight: 600; display: inline-flex; align-items: baseline; gap: 6px; }
.rz-head-vs svg { align-self: center; }
.rz-head-vs em { font-style: normal; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #B5AFA3; }
.rz-head-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: #B5AFA3; white-space: nowrap; }
.rz-board + .candor { margin-top: 44px; }
@media (max-width: 620px) {
  .rz-head { flex-direction: column; gap: 6px; padding-bottom: 18px; }
}

.rz-cred { display: inline-flex; align-items: center; gap: 13px; margin-top: 48px; font-size: 15px; color: var(--slate); text-decoration: none; transition: color .15s ease; }
.rz-cred .rz-logo { width: 34px; height: 34px; border-radius: 9px; overflow: hidden; background: #FBDCE5; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(27,26,23,0.06); }
.rz-cred .rz-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rz-cred b { color: var(--ink); font-weight: 600; }
.rz-cred .rz-cred-ar { width: 14px; height: 14px; color: #B5AFA3; transition: transform .18s ease, color .15s ease; }
.rz-cred:hover { color: var(--ink); }
.rz-cred:hover .rz-cred-ar { color: var(--blue); transform: translate(2px, -2px); }
.rz-cred .muted { color: #B5AFA3; }
.rz-cred-lead { margin-top: 0; margin-bottom: 18px; }

@media (max-width: 620px) {
  .rz-grid { grid-template-columns: 1fr; }
  .rz-stat, .rz-stat:first-child, .rz-stat:last-child { padding: 36px 0 4px; border-left: none; }
  .rz-stat + .rz-stat { border-top: 1px solid var(--hairline); }
}

/* ---------- canvas-demo iframe embed (moved from cursor-demo.css) ---------- */
.hero-canvas-demo {
  position: relative; z-index: 2; width: 100%; margin-top: 56px;
  border-radius: 14px; overflow: hidden;
}
/* fade the bottom of the demo into the page, matching the hero background */
.hero-canvas-demo::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 20%; pointer-events: none; z-index: 3;
  background: linear-gradient(to bottom, transparent 0%, color-mix(in srgb, var(--paper) 55%, transparent) 60%, var(--paper) 100%);
}
@media (max-width: 760px) {
  .hero-canvas-demo { margin-top: 36px; }
}

/* ---------- canvas demo replay (icon-only, appears on hover after the run) ---------- */
.cdemo-replay {
  position: absolute; right: 12px; bottom: 12px; z-index: 4;
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border: 1px solid var(--hairline); color: var(--slate);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
  transition: opacity .22s ease, transform .12s ease, color .15s ease, border-color .15s ease, background .15s ease;
}
.cdemo-replay:hover { color: var(--ink); border-color: #CFC9BE; background: var(--surface); }
.cdemo-replay:active { transform: scale(0.92); }
.cdemo-replay svg { width: 16px; height: 16px; }

/* ---------- hero proof chip (under Request access) ---------- */
.hero-proof-chip {
  margin-top: 14px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em;
  color: var(--slate); white-space: nowrap;
}
@media (max-width: 560px) { .hero-proof-chip { white-space: normal; text-align: center; max-width: 30ch; } }


/* ---------- Linear page sections ---------- */
.lsec { padding: 88px 0 92px; }
.lhead { display: grid; grid-template-columns: minmax(0, 6.5fr) minmax(0, 5.5fr); gap: 56px; align-items: start; margin-bottom: 60px; }
@media (max-width: 800px) { .lhead { grid-template-columns: 1fr; gap: 20px; } }
.lhead h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(30px, 4.3vw, 54px); letter-spacing: -0.028em; line-height: 1.05;
  max-width: 16ch; text-wrap: balance; margin: 0;
}
.lh-right p { color: var(--slate); font-size: 16.5px; line-height: 1.55; max-width: 46ch; text-wrap: pretty; }
.lh-right p strong { color: var(--ink); font-weight: 600; }
.lact { display: inline-flex; align-items: baseline; gap: 10px; margin-top: 22px; font-size: 15.5px; }
.lact .la-n { font-family: var(--mono); font-size: 12.5px; color: #B5AFA3; }
.lact .la-t { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
.lact .la-a { display: inline-block; transition: transform 0.2s ease; }
.lsec:hover .la-a { transform: translateX(3px); }

.lviz-inner { max-width: 660px; margin: 0 auto; }

/* ---------- 2-col chapter layout: copy left (sticky), thread right ---------- */
.lsec-cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.lsec-cols.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.lsec-cols.rev .lcopy { order: 2; }
.lsec-cols.rev .lviz { order: 1; }
@media (max-width: 880px) { .lsec-cols.rev .lcopy { order: 1; } .lsec-cols.rev .lviz { order: 2; } }
@media (max-width: 880px) { .lsec-cols, .lsec-cols.rev { grid-template-columns: 1fr; gap: 32px; } }
.lsec-cols .lcopy { position: sticky; top: 110px; }
@media (max-width: 880px) { .lsec-cols .lcopy { position: static; } }
.lsec-cols .lcopy h2 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(28px, 3.2vw, 42px); letter-spacing: -0.026em; line-height: 1.07;
  max-width: 14ch; text-wrap: balance; margin: 0;
}
.lsec-cols .lcopy p { margin-top: 16px; color: var(--slate); font-size: 16px; line-height: 1.55; max-width: 44ch; text-wrap: pretty; }
.lsec-cols .lcopy p strong { color: var(--ink); font-weight: 600; }
.lsec-cols .lviz .thread-solo { margin: 0; max-width: none; }
.lsec-cols .lviz .wachat { max-width: none; }
.lsec .subs { margin-top: 60px; }
.lsec .sub-h .st { white-space: nowrap; }

/* Approve section: canvas dot-grid backdrop, faded out over the text column.
   No overflow:hidden here — the copy column is position:sticky. */
#approve { position: relative; }
#approve::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle at center, rgba(27,26,23,0.11) 1.1px, transparent 1.2px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to right, transparent 33%, #000 68%), linear-gradient(to bottom, transparent 0, #000 13%, #000 87%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 33%, #000 68%), linear-gradient(to bottom, transparent 0, #000 13%, #000 87%, transparent 100%);
  mask-composite: intersect;
}
#approve > .container { position: relative; z-index: 1; }
@media (max-width: 880px) {
  /* single column: fade the dots in from the top instead of the side */
  #approve::before {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 92%, transparent 100%);
    -webkit-mask-composite: source-over;
    mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 92%, transparent 100%);
    mask-composite: add;
    opacity: 0.7;
  }
}

/* Understand ("message") section: WhatsApp doodle backdrop behind the chat,
   faded out over the text column. This section is reversed (chat left, copy
   right), so the fade runs to-left. */
#understand { position: relative; }
#understand::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("wa-main-background.png");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: auto 100%;
  opacity: 0.5;
  -webkit-mask-image: linear-gradient(to left, transparent 36%, #000 58%), linear-gradient(to bottom, transparent 0, #000 13%, #000 87%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to left, transparent 36%, #000 58%), linear-gradient(to bottom, transparent 0, #000 13%, #000 87%, transparent 100%);
  mask-composite: intersect;
}
#understand > .container { position: relative; z-index: 1; }
@media (max-width: 880px) {
  /* single column: fade the doodles in from the top instead of the side */
  #understand::before {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 92%, transparent 100%);
    -webkit-mask-composite: source-over;
    mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 92%, transparent 100%);
    mask-composite: add;
    opacity: 0.45;
  }
}

/* ---------- changelog ---------- */
.chlog { padding: 88px 0 92px; }
.chlog-head { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; margin-bottom: 42px; }
.chlog-head h2 { font-family: var(--display); font-weight: 600; font-size: clamp(26px, 3vw, 38px); letter-spacing: -0.024em; margin: 0; }
.chlog-head a { font-size: 14.5px; font-weight: 500; color: var(--slate); text-decoration: none; }
.chlog-head a:hover { color: var(--ink); }
.ch-item { display: grid; grid-template-columns: 150px 1fr; gap: 28px; padding: 26px 0; border-top: 1px solid var(--hairline); }
@media (max-width: 640px) { .ch-item { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; } }
.ch-date { font-family: var(--mono); font-size: 11px; letter-spacing: 0.07em; color: #B5AFA3; text-transform: uppercase; padding-top: 4px; white-space: nowrap; }
.ch-item h3 { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -0.012em; margin: 0; }
.ch-item p { font-size: 14.5px; color: var(--slate); line-height: 1.55; max-width: 64ch; margin-top: 6px; text-wrap: pretty; }

/* ---------- big quote ---------- */
.lquote { padding: 124px 0; text-align: center; }
.lquote blockquote {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(26px, 3.6vw, 44px); letter-spacing: -0.026em; line-height: 1.15;
  max-width: 24ch; margin: 0 auto; text-wrap: balance;
}
.lq-attr { margin-top: 28px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--slate); }

/* ---------- Meta Business Partner badge ---------- */
.meta-badge {
  gap: 9px; padding: 6px 7px 6px 12px; font-family: var(--body);
  background: var(--surface);
  border-color: var(--hairline);
  box-shadow: 0 1px 2px rgba(27, 26, 23, 0.05);
}
.meta-badge .meta-glyph { flex-shrink: 0; }
.meta-badge .meta-lockup { flex-shrink: 0; height: 13px; width: auto; display: block; }
.meta-badge .meta-word {
  font-weight: 600; font-size: 13px; letter-spacing: -0.01em;
  color: #0866FF; text-transform: none;
}
.meta-badge .meta-div { width: 1px; height: 13px; background: var(--hairline); }
.meta-badge .meta-role {
  font-weight: 500; font-size: 12.5px; letter-spacing: 0; color: var(--slate); text-transform: none;
}
.meta-badge .meta-verified { flex-shrink: 0; margin-left: -1px; display: block; height: 15px; width: 15px; }
