/* ============================================================
   Askpilot — integration profile pages.
   ------------------------------------------------------------
   A profile page is a spec sheet, not a landing page. The
   pattern is the one Linear, Notion and Zapier all converge on:
   a short header that names the two products, one paragraph of
   what this actually is, an explicit inventory of what the
   integration can do, how to set it up, and a details card.

   It deliberately does NOT retell the product story. The home
   page does that. Someone on this page has already decided they
   want Askpilot and is asking one question: "does it work
   properly with the tool I already run my business on?"

   Built on v8.css tokens so a profile sits inside the site
   rather than beside it. Shared by every /integrations/* page:
   only the content differs.
   ============================================================ */

/* ---------- 1. Profile header ---------- */

.ip-head {
    padding: 96px 0 64px;
}
.ip-head-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 64px;
    align-items: start;
}

/* The lockup names both products as equals, because that is what an
   integration is. The cross is a separator, not a multiplication sign,
   so it is hidden from screen readers. */
.ip-lockup {
    display: flex; align-items: center; gap: 18px;
    margin-bottom: 28px;
}
.ip-lockup-mark {
    width: 64px; height: 64px; flex: none;
    display: grid; place-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(22, 18, 26, 0.06);
}
.ip-lockup-mark img { max-width: 38px; max-height: 38px; display: block; }
.ip-lockup-x {
    font-size: 1.125rem; font-weight: 500; color: var(--muted);
    flex: none;
}

.ip-badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 13px 6px 10px;
    background: var(--ok-bg); color: var(--ok-fg);
    border-radius: 999px;
    font-size: 0.75rem; font-weight: 750; letter-spacing: 0.04em;
    text-transform: uppercase;
}
.ip-badge svg { width: 14px; height: 14px; flex: none; }

.ip-title {
    margin-top: 18px;
    /* Capped at 3.4375rem, not 3.5rem. The headline names a rotating agent and
       this title sits in a 732px column beside the profile card, so the longest
       name sets the ceiling. Measured: "Run your iamproperty workflows from
       OpenClaw" holds two lines at 55px and breaks to three at 56px. */
    font-size: clamp(2.25rem, 4.6vw, 3.4375rem);
    font-weight: 800; line-height: 1.06; letter-spacing: -0.028em;
    color: var(--ink);
    text-wrap: balance;
}
.ip-lede {
    margin-top: 18px; max-width: 34em;
    font-size: 1.1875rem; line-height: 1.6; color: var(--body);
    text-wrap: pretty;
}
.ip-head-cta { margin-top: 32px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- 2. Details card ---------- */

/* Every profile page in the wild carries one of these. It answers the
   questions a buyer asks before they read a word of marketing: who made
   it, is it official, what does it touch, where is the proof. */
.ip-details {
    position: sticky; top: 96px;
    padding: 24px 24px 20px;
    background: var(--surface);
    border: 1px solid var(--ink);
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(22, 18, 26, 0.04), 0 24px 60px -30px rgba(22, 18, 26, 0.18);
}
.ip-details-h {
    font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--muted);
    margin-bottom: 16px;
}
.ip-dl { display: grid; gap: 14px; margin: 0; }
.ip-dl-row { display: grid; gap: 3px; }
.ip-dl-row dt {
    font-size: 0.75rem; color: var(--muted);
}
.ip-dl-row dd {
    margin: 0;
    font-size: 0.9375rem; font-weight: 600; color: var(--ink); line-height: 1.45;
}
.ip-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ip-tag {
    padding: 3px 10px;
    background: var(--soft); color: var(--body);
    border-radius: 999px;
    font-size: 0.75rem; font-weight: 600;
}
.ip-details-foot {
    margin-top: 18px; padding-top: 16px;
    border-top: 1px solid var(--line);
}

/* ---------- 3. Body sections ---------- */

.ip-sec { padding: 76px 0; border-top: 1px solid var(--line); }
/* Same type as a capability-panel headline on the index (.hx-panel
   .pl-title), so a section title reads at the same rank everywhere on the
   site. Left-aligned rather than centred, because this page's body is. */
.ip-sec-h {
    font-size: clamp(1.75rem, 3.4vw, 2.75rem);
    font-weight: 780; line-height: 1.12;
    letter-spacing: -0.024em; color: var(--ink);
    text-wrap: balance;
}
.ip-sec-p {
    margin-top: 14px; max-width: 44em;
    font-size: 1.0625rem; line-height: 1.7; color: var(--body);
    text-wrap: pretty;
}
.ip-sec-p + .ip-sec-p { margin-top: 12px; }

/* ---------- 4. The capability inventory ---------- */

/* The heart of the page, and the thing a marketing page never gives you:
   what actually fires, and what actually gets written. Two columns
   because triggers and actions are the two halves of any integration. */
.ip-caps {
    margin-top: 36px;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
}
.ip-cap {
    padding: 26px 26px 22px;
    background: var(--surface);
    border: 1px solid var(--ink);
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(22, 18, 26, 0.04), 0 24px 60px -30px rgba(22, 18, 26, 0.14);
}
.ip-cap-h {
    display: flex; align-items: center; gap: 9px;
    font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--brand-blue);
}
.ip-cap-h svg { width: 15px; height: 15px; flex: none; }
.ip-cap--write .ip-cap-h { color: var(--brand-magenta); }
/* The list sits straight under the label now, so it carries the whole gap. */
.ip-cap-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 1px; }
.ip-cap-list li {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 9px 0;
    font-size: 0.9375rem; line-height: 1.5; color: var(--ink);
    border-top: 1px solid var(--line);
}
.ip-cap-list li:first-child { border-top: 0; }
.ip-cap-list i {
    flex: none; margin-top: 6px;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--brand-blue);
}
.ip-cap--write .ip-cap-list i { background: var(--brand-magenta); }
.ip-cap-note {
    margin-top: 16px; font-size: 0.8125rem; line-height: 1.5; color: var(--muted);
}

/* ---------- 5. Example workflows ---------- */

.ip-flows {
    margin-top: 36px;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.ip-flow {
    padding: 22px 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    transition: border-color 0.18s ease, transform 0.18s ease;
}
.ip-flow:hover { border-color: var(--ink); transform: translateY(-1px); }
.ip-flow-trigger {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--muted);
}
.ip-flow-trigger svg { width: 12px; height: 12px; flex: none; }
.ip-flow h3 {
    margin-top: 9px;
    font-size: 1.0625rem; font-weight: 700; line-height: 1.35; color: var(--ink);
}
.ip-flow p {
    margin-top: 7px;
    font-size: 0.9375rem; line-height: 1.55; color: var(--body);
}

/* ---------- 6. Setup steps ---------- */

.ip-steps {
    margin-top: 36px; list-style: none; padding: 0;
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px;
    counter-reset: ip-step;
}
.ip-step { counter-increment: ip-step; }
.ip-step::before {
    content: counter(ip-step, decimal-leading-zero);
    display: block; margin-bottom: 12px;
    font-size: 0.75rem; font-weight: 800; letter-spacing: 0.1em;
    color: var(--brand-magenta);
}
.ip-step h3 {
    font-size: 1.0625rem; font-weight: 700; line-height: 1.35; color: var(--ink);
}
.ip-step p {
    margin-top: 7px; font-size: 0.9375rem; line-height: 1.6; color: var(--body);
}

/* ---------- 7. The one product moment ---------- */

/* A profile page earns one animation, not six: the single clearest
   picture of the two products working together. */
.ip-demo { margin-top: 36px; }
.ip-demo .hsd-left,
.ip-demo .hsd-right {
    margin: 12px;
    border-radius: 18px;
    box-shadow:
        0 0 0 10px var(--cream),
        0 0 0 11px var(--ink),
        0 30px 60px -30px rgba(38, 20, 40, 0.24);
}

/* ---------- responsive ---------- */

@media (max-width: 1023px) {
    .ip-head-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .ip-details { position: static; }
    .ip-caps, .ip-flows { grid-template-columns: minmax(0, 1fr); }
    .ip-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
}
@media (max-width: 767px) {
    .ip-head { padding: 64px 0 44px; }
    .ip-sec { padding: 56px 0; }
    .ip-lockup-mark { width: 54px; height: 54px; border-radius: 14px; }
    .ip-lockup-mark img { max-width: 32px; max-height: 32px; }
    .ip-head-cta .btn { flex: 1 1 auto; justify-content: center; }
    .ip-steps { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

/* ---------- 8. Also works with ---------- */

/* The same row the index hero carries, so the agent story reads the same
   everywhere. It is centred there and left-aligned here, because the profile
   header is a left column beside the details card. */
.ip-works { margin-top: 34px; justify-content: flex-start; }
.ip-works .hero-works-list { justify-content: flex-start; }
@media (max-width: 767px) {
    .ip-works { margin-top: 28px; }
}

/* ---------- 9. Corner marks on a demo canvas ---------- */

/* Ported from brand.css, which the profile pages no longer load. The four
   crosshairs that frame a demo stage as a canvas rather than a screenshot. */
.ip-demo .hero-canvas-mark { position: absolute; width: 17px; height: 17px; opacity: 0.45; }
.ip-demo .hero-canvas-mark::before,
.ip-demo .hero-canvas-mark::after { content: ""; position: absolute; background: var(--body); }
.ip-demo .hero-canvas-mark::before { left: 8px; top: 0; width: 1px; height: 17px; }
.ip-demo .hero-canvas-mark::after { left: 0; top: 8px; width: 17px; height: 1px; }
.ip-demo .hero-canvas-mark.is-tl { top: 15px; left: 15px; }
.ip-demo .hero-canvas-mark.is-tr { top: 15px; right: 15px; }
.ip-demo .hero-canvas-mark.is-bl { bottom: 15px; left: 15px; }
.ip-demo .hero-canvas-mark.is-br { right: 15px; bottom: 15px; }

/* An outline button that leaves the site carries the same mark the citation
   cards use, so "this opens somewhere else" reads the same way everywhere. */
.btn-ext {
    width: 15px; height: 15px; flex: none;
    transition: transform 0.2s ease;
}
.btn:hover .btn-ext { transform: translate(2px, -2px); }
@media (prefers-reduced-motion: reduce) {
    .btn-ext { transition: none; }
}
