/* ============================================================
   Shared styles for conversion landing pages:
     /integrations/zendesk
     /use-cases/msp-ticket-notes
     /compare/casemargin-vs-manual-summaries

   These are deliberately NOT articles. Articles use articles.css
   and are built as a reading column; these are sales surfaces with
   hero → problem → mechanism → proof → CTA structure. They share
   base.css tokens so both still look like one product.
   ============================================================ */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--font-sans);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 36px); }
.wrap-tight { max-width: 720px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 36px); }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.enter { opacity: 0; animation: rise 760ms var(--ease-expo) forwards; }
.d1 { animation-delay: 40ms; }
.d2 { animation-delay: 140ms; }
.d3 { animation-delay: 250ms; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 760ms var(--ease-expo), transform 760ms var(--ease-expo); }
.reveal.inview { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .enter { animation: none !important; opacity: 1 !important; }
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------------- nav ---------------- */
nav.site {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; padding: clamp(20px, 3vw, 30px) 0; flex-wrap: wrap;
}
.wordmark {
    font-family: var(--font-serif); font-weight: 500; font-size: 1.25rem;
    letter-spacing: -0.01em; color: var(--ink); text-decoration: none;
}
.nav-links { display: flex; gap: clamp(14px, 3vw, 28px); align-items: baseline; flex-wrap: wrap; }
.nav-links a { font-size: 0.85rem; color: var(--ink-muted); text-decoration: none; transition: color 140ms ease; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { font-weight: 500; color: var(--ink) !important; border-bottom: 1px solid var(--ink); padding-bottom: 1px; }

/* ---------------- hero ---------------- */
.hero { padding: clamp(26px, 6vh, 60px) 0 clamp(28px, 6vh, 56px); }
.eyebrow {
    font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--ink-muted); margin: 0 0 16px;
    display: flex; align-items: center; gap: 10px;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--border); }
h1 {
    font-family: var(--font-serif); font-weight: 500;
    font-size: clamp(2.05rem, 5.2vw, 3.1rem); line-height: 1.08;
    letter-spacing: -0.025em; margin: 0 0 18px;
}
h1 em { font-style: italic; font-weight: 400; }
.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.12rem); color: var(--ink-muted);
    max-width: 58ch; margin: 0 0 28px;
}
.hero-ctas { display: flex; gap: 13px; flex-wrap: wrap; align-items: center; }
.btn {
    display: inline-block; font-family: var(--font-sans); font-size: 0.92rem;
    font-weight: 500; text-decoration: none; border: none; border-radius: 9px;
    padding: 12px 24px; cursor: pointer;
    transition: background 160ms ease, transform 160ms var(--ease-expo), box-shadow 160ms ease;
}
.btn-ink { color: var(--surface); background: var(--ink); }
.btn-ink:hover { background: #37342C; box-shadow: 0 4px 14px rgba(35,33,28,0.18); transform: translateY(-1px); }
.btn-ghost { color: var(--ink); background: transparent; border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--surface); }
.hero-note { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-muted); margin: 16px 0 0; }

/* ---------------- generic section ---------------- */
section.block { padding: clamp(34px, 7vh, 68px) 0; }
section.block + section.block { border-top: 1px solid var(--border); }
.section-head {
    font-family: var(--font-serif); font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2.05rem); letter-spacing: -0.02em;
    line-height: 1.2; margin: 0 0 12px;
}
.section-sub { color: var(--ink-muted); font-size: 0.98rem; max-width: 58ch; margin: 0 0 32px; }
.prose-block { max-width: 62ch; }
.prose-block p { margin: 0 0 1.05em; }
.prose-block p:last-child { margin-bottom: 0; }
.prose-block a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

/* ---------------- numbered steps ---------------- */
.steps { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.step { background: var(--surface); padding: clamp(18px, 3vw, 26px); display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.step-n {
    font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em;
    color: var(--ink-muted); background: var(--canvas); border: 1px solid var(--border);
    border-radius: 8px; padding: 5px 9px; line-height: 1;
}
.step h3 { font-size: 0.98rem; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.005em; }
.step p { margin: 0; font-size: 0.9rem; color: var(--ink-muted); line-height: 1.6; }

/* ---------------- feature / value grid ---------------- */
.grid-3 {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1px; background: var(--border); border: 1px solid var(--border);
    border-radius: 12px; overflow: hidden;
}
.cell { background: var(--surface); padding: clamp(18px, 3vw, 24px); }
.cell h3 { font-size: 0.95rem; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.005em; }
.cell p { margin: 0; font-size: 0.87rem; color: var(--ink-muted); line-height: 1.6; }
.cell .num {
    display: block; font-family: var(--font-mono); font-size: 0.64rem;
    letter-spacing: 0.1em; color: var(--ink-muted); margin-bottom: 9px;
}

/* ---------------- comparison table ---------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.cmp {
    width: 100%; border-collapse: collapse; font-size: 0.9rem;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
}
table.cmp th, table.cmp td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
table.cmp thead th {
    font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--ink-muted); font-weight: 500;
    background: var(--canvas); white-space: nowrap;
}
table.cmp tbody tr:last-child td { border-bottom: none; }
table.cmp td:first-child { font-weight: 500; }
table.cmp .col-manual { color: var(--ink-muted); }
table.cmp .col-brief { color: var(--ink); }
.cmp-mark { font-family: var(--font-mono); font-size: 0.78rem; }

/* ---------------- brief output mock ---------------- */
.brief-mock {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 2px 8px rgba(35,33,28,0.05), 0 12px 40px rgba(35,33,28,0.06);
    padding: 24px; font-size: 0.88rem;
}
.bm-title { font-family: var(--font-serif); font-size: 1.05rem; font-weight: 500; margin: 0 0 16px; letter-spacing: -0.01em; }
.bm-label {
    font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--ink-muted); margin: 16px 0 7px;
}
.bm-label:first-of-type { margin-top: 0; }
.bm-item { margin: 0 0 6px; padding-left: 15px; position: relative; line-height: 1.55; color: var(--ink); }
.bm-item::before { content: "\00b7"; position: absolute; left: 3px; color: var(--accent); font-weight: 700; }
.bm-scan { background: var(--canvas); border: 1px solid var(--border); border-radius: 9px; padding: 14px 16px; margin-bottom: 16px; }
.bm-scan .bm-label { margin-top: 12px; }
.bm-scan .bm-label:first-child { margin-top: 0; }
.bm-scan p { margin: 0; line-height: 1.55; }
.bm-hi { background: var(--pill-bg); box-shadow: 0 0 0 3px var(--pill-bg); border-radius: 2px; }
.bm-foot {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border);
    font-family: var(--font-mono); font-size: 0.64rem; color: var(--ink-muted);
}
.bm-pill { background: var(--ok-bg); color: var(--ok-ink); border-radius: 999px; padding: 3px 9px; }
.mock-caption { font-family: var(--font-mono); font-size: 0.66rem; color: var(--ink-muted); margin: 12px 0 0; text-align: center; }

/* two-column: copy + visual */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: center; }
/* A grid item's automatic minimum size is its min-content width, so a column
   holding an unwrappable line (a code block's longest line) blows its track
   past the container and scrolls the whole page sideways. min-width:0 lets the
   track win and leaves the overflow to the code block's own scroller. */
.split > * { min-width: 0; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

/* ---------------- callout ---------------- */
.callout {
    background: var(--surface); border: 1px solid var(--border);
    border-left: 3px solid var(--accent); border-radius: 10px;
    padding: 18px 20px; margin: 26px 0; max-width: 62ch;
}
.callout p { margin: 0; font-size: 0.92rem; line-height: 1.65; }
.callout strong { font-weight: 600; }
/* A callout that follows a table or a card grid is commenting ON that block,
   so it should share its width. The 62ch default above is for callouts that
   sit next to prose, where a full-width box would overrun the reading column.
   Adjacency handles it automatically — no extra class needed in the markup. */
.table-scroll + .callout,
.grid-3 + .callout,
.steps + .callout { max-width: none; }

/* ---------------- stat row ---------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: clamp(16px, 3vw, 30px); }
.stat .v {
    font-family: var(--font-serif); font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 500; letter-spacing: -0.03em; line-height: 1; display: block;
    font-variant-numeric: tabular-nums;
}
.stat .k { font-size: 0.85rem; color: var(--ink-muted); margin-top: 8px; display: block; line-height: 1.5; }

/* ---------------- FAQ ---------------- */
.faq { max-width: 62ch; }
.faq h3 { font-size: 0.98rem; font-weight: 600; margin: 22px 0 6px; letter-spacing: -0.005em; }
.faq h3:first-child { margin-top: 0; }
.faq p { margin: 0; font-size: 0.91rem; color: var(--ink-muted); line-height: 1.65; }

/* ---------------- closing CTA ---------------- */
.cta-final { background: var(--ink); color: var(--canvas); border-radius: 14px; padding: clamp(28px, 5vw, 46px); }
.cta-final h2 {
    font-family: var(--font-serif); font-weight: 400; font-size: clamp(1.4rem, 3vw, 2rem);
    letter-spacing: -0.02em; line-height: 1.25; margin: 0 0 12px; color: #FBFAF8;
}
.cta-final p { color: rgba(247,246,243,0.68); margin: 0 0 24px; max-width: 54ch; font-size: 0.95rem; }
.btn-paper { color: var(--ink); background: var(--canvas); }
.btn-paper:hover { background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,0.28); transform: translateY(-1px); }
.btn-outline { color: var(--canvas); background: transparent; border: 1px solid rgba(247,246,243,0.28); }
.btn-outline:hover { background: rgba(247,246,243,0.08); border-color: rgba(247,246,243,0.45); }
.cta-fine { font-family: var(--font-mono); font-size: 0.68rem; color: rgba(247,246,243,0.42); margin: 18px 0 0 !important; }

/* ---------------- breadcrumb + footer ---------------- */
.crumb { font-family: var(--font-mono); font-size: 0.68rem; color: var(--ink-muted); padding-bottom: 4px; }
.crumb a { color: var(--ink-muted); text-decoration: none; }
.crumb a:hover { color: var(--ink); }

footer.site { margin-top: clamp(40px, 8vh, 76px); border-top: 1px solid var(--border); padding: 28px 0 46px; }
.foot-row { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; flex-wrap: wrap; }
.foot-brand { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.05em; color: var(--ink-muted); }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { font-family: var(--font-mono); font-size: 0.7rem; color: var(--ink-muted); text-decoration: none; }
.foot-links a:hover { color: var(--ink); }

/* ---------------- code blocks (MCP integration page) ----------------
   Config snippets and shell commands. Dark on the warm canvas, same
   ink as .cta-final so a page can carry both without looking spliced.
   Long lines scroll inside the block — the page body never does. */
.codeblock {
    background: var(--ink); border-radius: 10px; padding: 16px 18px;
    overflow-x: auto; margin: 0; -webkit-overflow-scrolling: touch;
}
.codeblock code {
    display: block; white-space: pre; font-family: var(--font-mono);
    font-size: 0.76rem; line-height: 1.75; color: #E8E5DE;
}
.codeblock .c-key { color: #9DB4C8; }
.codeblock .c-str { color: #C9BE93; }
.codeblock .c-dim { color: rgba(232,229,222,0.45); }
.code-label {
    font-family: var(--font-mono); font-size: 0.63rem; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--ink-muted); margin: 0 0 8px;
}
.code-note { font-size: 0.86rem; color: var(--ink-muted); margin: 10px 0 0; }

/* ---------------- tool cards (MCP integration page) ---------------- */
.tool-card {
    background: var(--surface); border: 1px solid var(--border);
    border-left: 3px solid var(--accent); border-radius: 12px; padding: 22px 24px;
}
.tool-card + .tool-card { margin-top: 18px; }
.tool-card h3 { font-family: var(--font-mono); font-size: 0.92rem; font-weight: 500; margin: 0 0 10px; letter-spacing: -0.01em; }
.tool-card p { margin: 0 0 12px; font-size: 0.94rem; line-height: 1.6; }
.tool-card p:last-child { margin-bottom: 0; }
.tool-io {
    display: flex; gap: 8px; flex-wrap: wrap; font-family: var(--font-mono);
    font-size: 0.64rem; color: var(--ink-muted);
}
.tool-io span { background: var(--canvas); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
