/* Cairn homepage. Plain CSS, no build step. Light + dark follow the system. */

:root {
  --bg: #fbfbfd;
  --bg-alt: #f4f3f8;
  --paper: #ffffff;
  --text: #1d1d1f;
  --text-2: #5f5f66;
  --text-3: #8e8e95;
  --line: rgba(20, 10, 40, 0.09);
  --brand: #7c3aed;
  --brand-2: #a855f7;
  --brand-ink: #6d28d9;
  --brand-soft: color-mix(in srgb, var(--brand) 11%, transparent);
  --side-bg: #f3f1f8;
  --chip-bg: #f1eff6;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-rim: rgba(255, 255, 255, 0.9);
  --shadow-win: 0 40px 90px -30px rgba(50, 20, 110, 0.35), 0 12px 32px -12px rgba(0, 0, 0, 0.18), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px -12px rgba(40, 20, 80, 0.16);
  --stone-0: #c9c3d6;
  --stone-1: #b3a9c9;
  --stone-2: #9c8cc0;
  --stone-3: #8b5cf6;
  --c-blue: #1a8cff;
  --c-yellow: #f5b800;
  --c-red: #ff3b5c;
  --c-teal: #14b8a6;
  --c-sand: #c19a5b;
  --c-green: #22b357;
  --c-orange: #ff8a00;
  --rose: #e11d48;
  --radius: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "PingFang TC", "Hiragino Sans", "Apple SD Gothic Neo", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "PingFang SC", "PingFang TC", "Hiragino Sans", "Apple SD Gothic Neo", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0a10;
    --bg-alt: #121119;
    --paper: #1b1a22;
    --text: #f5f5f7;
    --text-2: #a8a7b0;
    --text-3: #75747d;
    --line: rgba(255, 255, 255, 0.1);
    --brand: #8b5cf6;
    --brand-2: #c084fc;
    --brand-ink: #c4b5fd;
    --side-bg: #15141c;
    --chip-bg: #2a2833;
    --glass: rgba(30, 28, 38, 0.66);
    --glass-rim: rgba(255, 255, 255, 0.14);
    --shadow-win: 0 40px 90px -30px rgba(0, 0, 0, 0.8), 0 0 0 0.5px rgba(255, 255, 255, 0.12);
    --shadow-card: 0 0 0 0.5px rgba(255, 255, 255, 0.08);
    --stone-0: #3b3747;
    --stone-1: #4c4560;
    --stone-2: #62558a;
    --stone-3: #8b5cf6;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; text-wrap: balance; word-break: keep-all; overflow-wrap: anywhere; }
.lede, .steps p, .card p { text-wrap: pretty; }
p { margin: 0; }
svg { width: 1em; height: 1em; flex: none; }
.sprite { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.wrap { width: min(1120px, 100% - 48px); margin: 0 auto; }
.narrow { width: min(760px, 100% - 48px); }
.center { text-align: center; }

.c-blue { color: var(--c-blue); } .c-yellow { color: var(--c-yellow); } .c-red { color: var(--c-red); }
.c-teal { color: var(--c-teal); } .c-sand { color: var(--c-sand); } .c-green { color: var(--c-green); }

/* ── Nav ─────────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 0.5px solid transparent;
  transition: border-color 0.3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 56px; width: min(1120px, 100% - 32px); margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.brand img { border-radius: 7px; }
.brand.small { font-weight: 400; font-size: 14px; color: var(--text-2); gap: 8px; }
.nav-links { display: flex; gap: 26px; font-size: 14px; color: var(--text-2); }
.nav-links a:hover { color: var(--text); }
.nav-end { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: 13px; color: var(--text-2);
  background: transparent; border: 0.5px solid var(--line); border-radius: 999px;
  padding: 5px 12px; cursor: pointer;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, box-shadow 0.2s;
}
.btn:active { transform: scale(0.95); }
.btn-sm { height: 32px; padding: 0 16px; font-size: 13px; }
.btn-brand { background: var(--brand); color: #fff; box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-brand:hover { background: var(--brand-ink); }
@media (prefers-color-scheme: dark) { .btn-brand:hover { background: #7c3aed; } }
.btn-ghost { border: 1px solid var(--line); background: var(--paper); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--brand) 40%, transparent); }

/* Official Apple badges: used unmodified, ≥40px tall, clear space ≥ ¼ badge height. */
.badge { display: inline-block; line-height: 0; border-radius: 9px; transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s; }
.badge img { height: 48px; width: auto; }
.badge:hover { opacity: 0.85; }
.badge:active { transform: scale(0.96); }

/* ── Type helpers ────────────────────────────────────────────────────── */
.eyebrow, .kicker { font-size: 15px; font-weight: 600; color: var(--brand-ink); margin-bottom: 14px; letter-spacing: 0; }
.kicker-ai { display: inline-flex; gap: 6px; align-items: center; background: linear-gradient(90deg, var(--brand), #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker-ai svg { color: var(--brand); }
h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.1; font-weight: 700; white-space: pre-line; letter-spacing: -0.035em; }
h2 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.1; font-weight: 700; }
.lede { font-size: clamp(18px, 1.7vw, 21px); color: var(--text-2); max-width: 640px; line-height: 1.5; }
.fine { font-size: 13px; color: var(--text-3); }
.sec-intro { text-align: center; max-width: 780px; margin: 0 auto 56px; }
.sec-intro .lede { margin: 18px auto 0; }
section { position: relative; }

/* ── Reveal on scroll ────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero { padding: 84px 0 40px; text-align: center; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -10% -20% auto; height: 900px; pointer-events: none;
  background:
    radial-gradient(40% 40% at 30% 30%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 70%),
    radial-gradient(35% 35% at 72% 40%, color-mix(in srgb, #ec4899 14%, transparent), transparent 70%),
    radial-gradient(30% 30% at 50% 70%, color-mix(in srgb, var(--c-blue) 10%, transparent), transparent 70%);
  filter: blur(20px);
}
.hero-copy { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero .lede { margin-top: 24px; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 16px; margin: 36px 0 14px; }


/* Shared mini-UI pieces */
.row { display: flex; align-items: center; gap: 10px; height: 38px; font-size: 14px; border-bottom: 0.5px solid var(--line); white-space: nowrap; min-width: 0; }
.row > span:not(.box):not(.chip) { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.box { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid color-mix(in srgb, var(--text-3) 70%, transparent); flex: none; display: grid; place-items: center; color: #fff; }
.box svg { width: 12px; height: 12px; opacity: 0; }
.box.done { background: var(--brand); border-color: var(--brand); }
.box.done svg { opacity: 1; }
.struck { text-decoration: line-through; color: var(--text-3); }
.chip { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 2px 8px; border-radius: 6px; background: var(--chip-bg); color: var(--text-2); font-size: 12px; flex: none; }
.chip svg { width: 11px; height: 11px; }
.chip.due { color: var(--c-red); background: color-mix(in srgb, var(--c-red) 12%, transparent); }
.chip.tag { color: var(--c-teal); background: color-mix(in srgb, var(--c-teal) 13%, transparent); }
.chip.today { color: var(--c-yellow); background: color-mix(in srgb, var(--c-yellow) 15%, transparent); }
.chip.date { color: var(--brand-ink); background: var(--brand-soft); }
.chip.proj { color: var(--text-2); }
.ring { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--brand); flex: none; display: inline-block; }

.side-item { display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 8px; border-radius: 7px; font-size: 13px; color: var(--text); white-space: nowrap; }
.side-item svg { width: 15px; height: 15px; }
.side-item span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.side-item em { margin-left: auto; font-style: normal; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.side-item.on { background: color-mix(in srgb, var(--text) 8%, transparent); }
.side-sep { height: 14px; }



/* Hero stage: real screenshots, AI tools wired in over MCP, a Cairn AI card on top */
.hero-stage { position: relative; width: min(1240px, 100% - 32px); height: 700px; margin: 64px auto 0; text-align: left; }
.wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.wires path { fill: none; stroke: color-mix(in srgb, var(--brand-2) 80%, transparent); stroke-width: 2; stroke-dasharray: 5 7; animation: wire 1.1s linear infinite; }
.wires circle { fill: var(--brand-2); filter: drop-shadow(0 0 6px var(--brand)); }
@keyframes wire { to { stroke-dashoffset: -24; } }
.agents { position: absolute; left: 0; top: 130px; width: 160px; display: grid; gap: 14px; z-index: 2; }
.agent { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--glass); backdrop-filter: blur(24px) saturate(185%); -webkit-backdrop-filter: blur(24px) saturate(185%); box-shadow: var(--shadow-card), inset 0 0 0 0.5px var(--line); font-size: 14px; white-space: nowrap; }
.agent-logo { width: 38px; height: 38px; border-radius: 10px; background: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.1); }
.agent-logo img { width: 24px; height: 24px; }
.agents-cap { font-size: 12px; color: var(--text-3); line-height: 1.4; padding: 0 4px; }
.mcp-pill { position: absolute; z-index: 3; transform: translate(-50%, -50%); font: 600 11px/1 var(--mono); letter-spacing: 0.04em; color: #fff; padding: 6px 9px; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #ec4899); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent), 0 8px 20px -6px var(--brand); }
.shot-mac { position: absolute; margin: 0; left: 270px; right: 110px; top: 0; z-index: 2; }
.shot-mac img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: var(--shadow-win); }
.shot-phone { position: absolute; margin: 0; right: 0; top: 170px; width: 250px; padding: 8px; border-radius: 44px; background: #0a0a0a; box-shadow: var(--shadow-win), inset 0 0 0 1.5px #3a3a3c; z-index: 3; }
.shot-phone img { display: block; width: 100%; height: auto; border-radius: 36px; }
.ai-float {
  position: absolute; z-index: 4; left: 34%; top: 300px; width: 340px; padding: 14px; border-radius: 22px;
  background: var(--glass); backdrop-filter: blur(30px) saturate(200%); -webkit-backdrop-filter: blur(30px) saturate(200%);
  box-shadow: 0 30px 70px -24px rgba(40, 20, 90, 0.55), inset 0 0 0 0.5px var(--glass-rim);
  display: flex; flex-direction: column; gap: 10px; transform: rotate(-2deg);
}
.ai-float-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ai-float-h svg { color: var(--brand); }
.ai-float .bubble { font-size: 14px; }
.ai-float .reply-line { font-size: 14px; }
.ai-float .rcard { background: color-mix(in srgb, var(--paper) 70%, transparent); }
.ai-float .row { height: 34px; font-size: 13px; }
.ai-float .row:last-child { border-bottom: 0; }
.ai-float .row .box { border-radius: 50%; }
.ai-float > * { opacity: 0; }
.hero-stage.in .ai-float > * { animation: rise 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.hero-stage.in .ai-float > :nth-child(1) { animation-delay: 0.5s; }
.hero-stage.in .ai-float > :nth-child(2) { animation-delay: 0.8s; }
.hero-stage.in .ai-float > :nth-child(3) { animation-delay: 1.5s; }
.hero-stage.in .ai-float > :nth-child(4) { animation-delay: 1.8s; }
.ai-float .rcard .row { opacity: 0; }
.hero-stage.in .ai-float .rcard .row { animation: rise 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
.hero-stage.in .ai-float .rcard .row:nth-child(2) { animation-delay: 2.0s; }
.hero-stage.in .ai-float .rcard .row:nth-child(3) { animation-delay: 2.2s; }
.hero-stage.in .ai-float .rcard .row:nth-child(4) { animation-delay: 2.4s; }

/* ── Flow (scroll-scrubbed) ──────────────────────────────────────────── */
.flow { height: 520vh; margin-top: 60px; }
.flow-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; padding-top: 56px; display: flex; align-items: center; overflow: hidden; }
.flow-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.flow-copy h2 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 36px; }
.steps { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; display: grid; gap: 22px; }
.steps::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--line); }
.steps li { position: relative; opacity: 0.32; transition: opacity 0.45s, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1); transform: translateX(-4px); }
.steps li::before { content: ""; position: absolute; left: -26px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); transition: all 0.35s; }
.steps li.on { opacity: 1; transform: none; }
.steps li.on::before, .steps li.past::before { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.steps li.past { opacity: 0.55; }
.steps b { font-size: 20px; font-family: var(--font-display); }
.steps p { color: var(--text-2); font-size: 16px; margin-top: 4px; max-width: 420px; }
.flow-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; }
.flow-progress i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--brand), #ec4899); }

.stage-fit { position: relative; width: 100%; aspect-ratio: 560 / 460; }
.stage { position: absolute; left: 0; top: 0; width: 560px; height: 460px; transform-origin: 0 0; }
.win {
  position: absolute; inset: 0 0 20px 0; border-radius: 14px; background: var(--paper);
  box-shadow: var(--shadow-win); overflow: hidden;
}
.win-side { position: absolute; left: 0; top: 0; bottom: 0; width: 158px; padding: 48px 8px 0; background: var(--side-bg); border-right: 0.5px solid var(--line); }
.win-side .side-item.on { background: color-mix(in srgb, var(--text) 8%, transparent); }
.win-bar { position: absolute; top: 0; left: 0; height: 40px; display: flex; gap: 8px; align-items: center; padding: 0 16px; z-index: 2; }
.win-bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.win-bar i:nth-child(2) { background: #febc2e; }
.win-bar i:nth-child(3) { background: #28c840; }
.win-title { position: absolute; left: 182px; top: 30px; height: 34px; display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; margin: 0; }
.win-title > span { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.win-title svg { width: 20px; height: 20px; }
.sec-head { position: absolute; left: 182px; font-size: 13px; font-weight: 700; color: var(--text-2); opacity: 0; padding-bottom: 4px; width: 354px; border-bottom: 0.5px solid var(--line); }
.sec-head[data-sec="upcoming"] { top: 214px; }
.sec-head[data-sec="someday"] { top: 330px; }
.sweep { position: absolute; left: 158px; top: 0; bottom: 0; width: 140px; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--brand) 16%, transparent), transparent); }

.task {
  --card: 0;
  position: absolute; left: 0; top: 0; width: 354px; height: 36px;
  display: flex; align-items: center; gap: 10px; padding: 0 10px;
  font-size: 14px; white-space: nowrap; border-radius: 10px;
  background: color-mix(in srgb, var(--paper) calc(var(--card) * 100%), transparent);
  box-shadow: 0 calc(var(--card) * 10px) calc(var(--card) * 28px) -8px rgba(40, 20, 80, calc(var(--card) * 0.28)), 0 0 0 calc(var(--card) * 0.5px) var(--line);
  will-change: transform;
}
.task .tt { overflow: hidden; text-overflow: ellipsis; min-width: 0; transition: color 0.3s; }
.task .meta { margin-left: auto; display: flex; gap: 6px; flex: none; }
.task .meta .chip { margin: 0; }
.task .box { border-radius: 50%; transition: background 0.25s, border-color 0.25s; }
.task.done .box { background: var(--brand); border-color: var(--brand); }
.task.done .box svg { opacity: 1; }
.task.done .tt { color: var(--text-3); text-decoration: line-through; }
.task.ghost { opacity: 0.32; }

.hint { position: absolute; left: 182px; top: 330px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); opacity: 0; }
.cairn {
  position: absolute; left: -26px; bottom: -8px; z-index: 5; width: 150px; padding: 12px 14px 10px; border-radius: 22px;
  background: var(--glass); backdrop-filter: blur(24px) saturate(185%); -webkit-backdrop-filter: blur(24px) saturate(185%);
  box-shadow: var(--shadow-card), inset 0 1px 0 var(--glass-rim);
  text-align: center; opacity: 0; transform: translateY(16px) scale(0.92);
}
.cairn svg { width: 120px; height: 104px; display: block; margin: 0 auto; overflow: visible; }
.stone { transform-box: fill-box; transform-origin: 50% 100%; }
.s0 { fill: var(--stone-0); } .s1 { fill: var(--stone-1); } .s2 { fill: var(--stone-2); } .s3 { fill: var(--stone-3); }
#cairn-label { font-size: 12px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ── AI ──────────────────────────────────────────────────────────────── */
.ai { padding: 140px 0 120px; background: linear-gradient(180deg, var(--bg), var(--bg-alt)); }
.ai-demo { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; max-width: 940px; margin: 0 auto; align-items: start; }
.ai-tabs { display: grid; gap: 8px; padding-top: 12px; }
.ai-tabs button {
  position: relative; overflow: hidden; text-align: left; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--text-2);
  background: transparent; border: 0; border-radius: 14px; padding: 14px 18px;
  transition: background 0.25s, color 0.25s;
}
.ai-tabs button:hover { color: var(--text); }
.ai-tabs button.on { background: var(--paper); color: var(--text); box-shadow: var(--shadow-card); }
.ai-tabs button i { position: absolute; left: 18px; right: 18px; bottom: 8px; height: 2px; border-radius: 2px; background: var(--brand-soft); opacity: 0; }
.ai-tabs button.on i { opacity: 1; }
.ai-tabs button i::after { content: ""; position: absolute; inset: 0; background: var(--brand); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }

.ai-win { background: var(--paper); border-radius: 24px; box-shadow: var(--shadow-win); height: 520px; display: flex; flex-direction: column; overflow: hidden; }
.ai-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 0.5px solid var(--line); }
.ai-name { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 15px; }
.ai-name svg { color: var(--brand); }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--chip-bg); font-size: 12px; }
.seg span { padding: 4px 10px; border-radius: 7px; color: var(--text-2); }
.seg span.on { background: var(--paper); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); }
.ai-thread { flex: 1; padding: 22px 22px 8px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; justify-content: flex-end; }
.bubble { align-self: flex-end; max-width: 82%; padding: 10px 15px; border-radius: 20px 20px 6px 20px; background: var(--brand); color: #fff; font-size: 15px; line-height: 1.45; }
.reply { display: flex; flex-direction: column; gap: 10px; }
.reply-line { display: inline-flex; gap: 8px; align-items: flex-start; font-size: 15px; }
.reply-line svg { color: var(--brand); margin-top: 3px; }
.pop { animation: pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.96); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
.rcard { border-radius: 16px; background: var(--bg-alt); padding: 10px 14px; box-shadow: inset 0 0 0 0.5px var(--line); }
.rcard-h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; height: 30px; }
.rcard-h svg { width: 15px; height: 15px; }
.rcard .row { height: 36px; font-size: 14px; }
.rcard .row:last-child { border-bottom: 0; }
.rcard .row .box { border-radius: 50%; }
.slot { overflow: hidden; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 110px; padding: 8px 4px 0; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars b { flex: 1; width: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--brand-2), var(--brand)); transform-origin: 50% 100%; transform: scaleY(0); transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.bars span { font-size: 11px; color: var(--text-3); }
.composer { margin: 8px 16px 16px; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 999px; background: var(--bg-alt); box-shadow: inset 0 0 0 0.5px var(--line); }
.composer-plus { color: var(--text-2); display: grid; place-items: center; }
.composer-field { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: ltr; }
.composer-field .ph { color: var(--text-3); }
.composer-field .caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -0.18em; background: var(--brand); margin-left: 1px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.composer-send { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--text-3) 40%, transparent); color: #fff; transition: background 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.composer-send.ready { background: var(--brand); }
.composer-send.press { transform: scale(0.85); }
.ai .fine { margin-top: 28px; }

/* ── Features (bento) ────────────────────────────────────────────────── */
.features { padding: 140px 0 80px; }
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 28px;
  background: var(--paper); box-shadow: var(--shadow-card); min-height: 240px;
  display: flex; flex-direction: column;
}
.card h3 { font-size: 21px; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card p { color: var(--text-2); font-size: 15px; }
.c-wide { grid-column: span 2; flex-direction: row; gap: 28px; align-items: center; }
.c-wide .card-text { flex: 1; min-width: 0; }
.c-wide2 { grid-column: span 2; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--paper)), var(--paper) 60%); }
.c-dark { background: #121018; color: #f5f5f7; }
.c-dark p { color: #a8a7b0; }
.ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 21px; }
.ic-violet { background: linear-gradient(135deg, var(--brand-2), var(--brand)); }
.ic-red { background: var(--c-red); } .ic-blue { background: var(--c-blue); } .ic-orange { background: var(--c-orange); }
.ic-teal { background: var(--c-teal); } .ic-green { background: var(--c-green); } .ic-mono { background: #2a2833; }
.pro { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #fff; background: linear-gradient(90deg, var(--brand), #ec4899); letter-spacing: 0.02em; }
.widgets { display: flex; gap: 14px; flex: none; align-items: flex-start; }
.widget { border-radius: 22px; background: var(--bg-alt); box-shadow: inset 0 0 0 0.5px var(--line); padding: 14px 16px; }
.widget b { font-size: 13px; color: var(--c-yellow); display: block; margin-bottom: 4px; }
.w-md { width: 250px; }
.w-row { display: flex; gap: 8px; align-items: center; font-size: 13px; height: 28px; white-space: nowrap; min-width: 0; }
.w-row > span:not(.box) { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.w-row .box { width: 14px; height: 14px; border-radius: 50%; }
.w-row .flag { color: var(--c-red); width: 12px; height: 12px; margin-left: auto; }
.w-sm { width: 110px; height: 110px; display: flex; flex-direction: column; justify-content: space-between; }
.w-sm b { font-size: 40px; color: var(--text); line-height: 1; margin: 0; }
.w-sm span { font-size: 13px; color: var(--c-yellow); font-weight: 600; }
.mini-cal { margin-top: auto; padding-top: 16px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px 4px; }
.mini-cal span { height: 24px; border-radius: 7px; font-size: 11px; display: grid; place-items: center; color: var(--text-3); position: relative; }
.mini-cal span.has::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); }
.mini-cal span.due::after { background: var(--c-red); }
.mini-cal span.now { background: var(--brand); color: #fff; font-weight: 700; }
.wave { margin-top: auto; padding-top: 20px; display: flex; align-items: center; gap: 4px; height: 70px; }
.wave i { flex: 1; border-radius: 3px; background: var(--c-blue); height: 20%; animation: wave 1.2s ease-in-out infinite; }
.wave i:nth-child(3n) { animation-delay: -0.3s; } .wave i:nth-child(3n+1) { animation-delay: -0.7s; } .wave i:nth-child(4n) { animation-delay: -0.5s; }
@keyframes wave { 50% { height: 90%; } }
.banner { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 16px; background: var(--glass); box-shadow: var(--shadow-card), inset 0 0 0 0.5px var(--line); font-size: 13px; transform: translateY(8px); transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s; }
.card.in .banner { transform: none; }
.banner img { border-radius: 5px; }
.banner > span { display: flex; flex-direction: column; min-width: 0; }
.banner > span span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.term { margin: auto 0 0; padding-top: 18px; font: 12.5px/1.75 var(--mono); color: #d8d6e0; white-space: pre; overflow: hidden; }
.term .d { color: #a78bfa; } .term .m { color: #75747d; } .term .g { color: #4ade80; }

/* ── Compare ─────────────────────────────────────────────────────────── */
.compare { padding: 80px 0; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-card); }
.cmp { width: 100%; border-collapse: collapse; min-width: 640px; font-size: 15px; }
.cmp th, .cmp td { padding: 16px 18px; text-align: center; border-bottom: 0.5px solid var(--line); }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp thead th { font-size: 13px; font-weight: 600; color: var(--text-2); vertical-align: bottom; }
.cmp thead th.me { color: var(--text); font-size: 15px; }
.cmp thead th.me img { display: block; margin: 0 auto 6px; border-radius: 6px; }
.cmp tbody th { text-align: left; font-weight: 500; }
.cmp td.me { background: var(--brand-soft); }
.mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.mark svg { width: 15px; height: 15px; }
.mark.yes { color: #fff; background: var(--c-green); }
.me .mark.yes { background: var(--brand); }
.mark.partial { color: var(--c-orange); background: color-mix(in srgb, var(--c-orange) 15%, transparent); }
.mark.no { color: var(--text-3); }

/* ── Pricing ─────────────────────────────────────────────────────────── */
.pricing { padding: 80px 0; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 880px; margin: 0 auto; }
.plan { border-radius: 26px; padding: 34px; background: var(--paper); box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.plan h3 { font-size: 20px; }
.plan .price { font-size: 34px; font-weight: 700; font-family: var(--font-display); letter-spacing: -0.02em; margin: 10px 0 2px; }
.plan .trial { color: var(--brand-ink); font-weight: 600; font-size: 15px; }
.plan ul { list-style: none; padding: 0; margin: 24px 0 28px; display: grid; gap: 12px; flex: 1; }
.plan li { position: relative; padding-left: 28px; font-size: 15px; }
.plan li::before { content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-soft); }
.plan li::after { content: ""; position: absolute; left: 6px; top: 7px; width: 6px; height: 8px; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.plan-pro { position: relative; box-shadow: var(--shadow-card), 0 0 0 1.5px color-mix(in srgb, var(--brand) 45%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 9%, var(--paper)), var(--paper) 50%); }
.plan .terms { font-size: 12px; color: var(--text-3); margin-top: 14px; line-height: 1.55; }

/* ── FAQ ─────────────────────────────────────────────────────────────── */
.faq { padding: 60px 0 40px; }
.faq h2 { text-align: center; margin-bottom: 32px; }
details { border-bottom: 0.5px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 22px 36px 22px 0; font-size: 18px; font-weight: 600; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border: solid var(--text-3); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); transition: transform 0.3s; }
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details p { color: var(--text-2); padding: 0 0 22px; }

/* ── Final ───────────────────────────────────────────────────────────── */
.final { padding: 120px 0 140px; text-align: center; }
.final-icon { border-radius: 22px; filter: drop-shadow(0 18px 30px color-mix(in srgb, var(--brand) 40%, transparent)); margin-bottom: 28px; }
.final h2 { max-width: 760px; margin: 0 auto; }
.foot { border-top: 0.5px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 22px; font-size: 14px; color: var(--text-2); }
.foot nav a:hover { color: var(--text); }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .c-wide { flex-direction: column; align-items: stretch; }
  .widgets { overflow: hidden; }
}
@media (max-width: 860px) {
  .flow { height: 560vh; }
  .flow-grid { grid-template-columns: 1fr; gap: 20px; }
  .flow-copy h2 { font-size: 28px; margin-bottom: 18px; }
  .steps { padding: 0; display: block; position: relative; min-height: 96px; }
  .steps::before { display: none; }
  .steps li { position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(10px); }
  .steps li::before { display: none; }
  .steps li.on { opacity: 1; transform: none; }
  .steps li.past { opacity: 0; transform: translateY(-10px); }
  .stage-fit { width: min(100%, 520px); margin: 0 auto; }
  .cairn { left: 10px; bottom: 28px; }
  .ai-demo { grid-template-columns: 1fr; gap: 14px; }
  .ai-tabs { grid-template-columns: repeat(3, 1fr); padding: 0; }
  .ai-tabs button { text-align: center; padding: 12px 8px; font-size: 15px; }
  .ai-win { height: 500px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { padding-top: 56px; }
  .bento { grid-template-columns: 1fr; }
  .c-wide, .c-wide2 { grid-column: auto; }
  .plans { grid-template-columns: 1fr; }
  .ai-win { height: 470px; }
  .bubble, .reply-line { font-size: 14px; }
}

@media (max-width: 980px) {
  .hero-stage { height: auto; padding-top: 0; }
  .agents { position: static; width: auto; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin-bottom: 22px; }
  .agents-cap { width: 100%; text-align: center; order: 3; }
  .wires, .mcp-pill { display: none; }
  .shot-mac { position: relative; left: 0; right: 0; width: 88%; }
  .shot-phone { width: 24%; min-width: 120px; top: auto; bottom: -30px; padding: 5px; border-radius: 28px; }
  .shot-phone img { border-radius: 23px; }
  .ai-float { left: 4%; top: auto; bottom: -60px; width: min(320px, 62%); }
  .hero { padding-bottom: 90px; }
}
@media (max-width: 640px) {
  .ai-float { width: 74%; left: 0; bottom: -90px; padding: 10px; gap: 7px; }
  .ai-float .row { height: 30px; font-size: 12px; }
  .ai-float .bubble, .ai-float .reply-line { font-size: 12.5px; }
  .shot-mac { width: 100%; }
  .shot-phone { width: 30%; right: -2%; bottom: 10px; }
  .hero { padding-bottom: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .wave i { animation: none; height: 50%; }
  .pop { animation: none; }
  .ai-float > *, .ai-float .rcard .row { opacity: 1 !important; animation: none !important; }
  .wires path { animation: none; }
}

/* ── Legal pages (/privacy, /terms) ──────────────────────────────────── */
.legal-main { padding: 64px 0 96px; }
.legal-doc h1 { font-size: clamp(32px, 4vw, 44px); line-height: 1.15; margin-bottom: 8px; }
.legal-doc .effective { color: var(--text-3); font-size: 14px; margin-bottom: 36px; }
.legal-doc h2 { font-size: 21px; line-height: 1.3; margin: 40px 0 12px; letter-spacing: -0.01em; }
.legal-doc p, .legal-doc li { color: var(--text-2); font-size: 16px; line-height: 1.7; }
.legal-doc p + p { margin-top: 12px; }
.legal-doc ul { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 8px; }
.legal-doc strong { color: var(--text); font-weight: 600; }
.legal-doc a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 2px; }
.legal-doc mark.todo { background: color-mix(in srgb, #f59e0b 30%, transparent); color: inherit; padding: 0 4px; border-radius: 4px; }
.legal-doc h2 + ul { margin-top: 0; }
