/* ==========================================================================
   Home — the long-form editorial landing page.
   Composes site.css primitives; adds the hero stage, the workflow stage,
   specimen artefacts, the pricing band and the closing horizon.
   ========================================================================== */

.home { --home-sticky-top: calc(var(--header-h) + var(--s7)); }
.home-sticky { min-width: 0; }
@media (min-width: 48.01rem) {
  .home-sticky { position: sticky; top: var(--home-sticky-top); align-self: start; }
}

/* ── hero ───────────────────────────────────────────────────────────── */
.home-hero { row-gap: clamp(2.5rem, 5vw, 4.5rem); padding-block: clamp(3.5rem, 2rem + 6vw, 8rem) clamp(4rem, 3rem + 5vw, 8rem); align-items: start; }
.home-hero > .home-hero-title { grid-column: 1 / -1; }
.site-page main .home-hero h1 { font-size: var(--type-hero); line-height: .9; letter-spacing: -.038em; max-width: 13ch; }
.home-hero h1 em { padding-right: .06em; }
.home-hero > .home-hero-intro { grid-column: 1 / span 5; padding-top: var(--s3); }
.home-hero .site-lede { max-width: 38ch; margin-top: 0; font-size: clamp(1.1rem, 1rem + .5vw, 1.42rem); color: var(--fog); }
.home-hero .site-actions { margin-top: var(--s6); }
.home-hero > .home-hero-stage { grid-column: 6 / -1; position: relative; isolation: isolate; }
.home-hero-art {
  position: absolute; z-index: -1; left: 50%; top: 6%; width: min(150%, 60rem); height: auto;
  transform: translate(-50%, -50%); pointer-events: none;
}
.home-hero-art .ha-grid { stroke: rgb(236 233 244 / .045); }
.home-hero-art .ha-ring { stroke: rgb(236 233 244 / .1); }
.home-hero-art .ha-ticks { stroke: rgb(182 171 255 / .22); }
.home-hero-art .ha-dot { fill: var(--violet-hi); }
.home-hero .site-proof { margin-top: clamp(0rem, 2vw, 1.5rem); }
.home-hero .site-proof::before {
  /* a single line of light along the top edge of the window */
  content: ""; position: absolute; inset: -1px 18% auto; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(182 171 255 / .75), transparent);
}

/* ── spec band ──────────────────────────────────────────────────────── */
.home .precision-strip { margin-bottom: 0; }

/* ── the cost of a single pass ──────────────────────────────────────── */
.home-cost .editorial-list { counter-reset: risk; }
.home-cost .editorial-list > div { counter-increment: risk; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); column-gap: var(--s4); padding-block: var(--s6); }
.home-cost .editorial-list > div::before {
  content: counter(risk, lower-roman) "."; grid-row: span 2; padding-top: .2em;
  font: italic 400 1.35rem/1 var(--site-serif); color: var(--violet-hi);
}
.home-cost .editorial-list dt { font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.5rem); }

/* ── workflow showcase ──────────────────────────────────────────────── */
.home-flow .home-sticky .site-lede { max-width: 40ch; }
.flow-stage { margin: var(--s7) 0 0; max-width: 34rem; }
.flow-stage svg { display: block; width: 100%; height: auto; overflow: visible; }
.flow-stage .fs-frame { fill: rgb(13 13 19 / .8); stroke: var(--line-2); }
.flow-stage .fs-rule { stroke: var(--line); }
.flow-stage .fs-dot { fill: rgb(236 233 244 / .14); }
.flow-stage .fs-page { fill: #12121a; stroke: var(--line-2); }
.flow-stage .fs-page.back { fill: #0e0e15; }
.flow-stage .fs-ln { stroke: rgb(236 233 244 / .2); stroke-width: 6; stroke-linecap: round; fill: none; }
.flow-stage .fs-ln-hi { stroke: rgb(236 233 244 / .62); stroke-width: 6; stroke-linecap: round; fill: none; }
.flow-stage .fs-beam { fill: rgb(143 125 255 / .12); }
.flow-stage .fs-beam-edge, .flow-stage .fs-bracket, .flow-stage .fs-band { stroke: var(--violet-hi); stroke-width: 1.5; fill: none; }
.flow-stage .fs-band { stroke-width: 6; stroke-linecap: round; }
.flow-stage .fs-cell { fill: none; stroke: rgb(236 233 244 / .2); }
.flow-stage .fs-cell-rule { stroke: rgb(236 233 244 / .14); fill: none; }
.flow-stage .fs-hit { fill: rgb(143 125 255 / .2); stroke: var(--violet-hi); }
.flow-stage .fs-arrow { stroke: var(--violet-hi); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.flow-stage .fs-del { fill: rgb(255 128 128 / .1); }
.flow-stage .fs-strike { stroke: rgb(255 163 163 / .75); stroke-width: 1.5; }
.flow-stage .fs-ins { fill: rgb(143 125 255 / .2); }
.flow-stage .fs-under { stroke: var(--violet-hi); stroke-width: 1.5; }
.flow-stage .fs-pin { fill: rgb(143 125 255 / .16); stroke: var(--violet-line); }
.flow-stage .fs-open { fill: none; stroke: rgb(236 233 244 / .3); stroke-dasharray: 3 3; }
.flow-stage .fs-check { stroke: var(--violet-hi); stroke-width: 1.8; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.flow-stage .fs-heat { fill: var(--violet); }
.flow-stage .fs-heat.h1 { fill-opacity: .12; } .flow-stage .fs-heat.h2 { fill-opacity: .26; }
.flow-stage .fs-heat.h3 { fill-opacity: .44; } .flow-stage .fs-heat.h4 { fill-opacity: .7; }
.flow-stage .fs-rate circle { fill: var(--violet-hi); }
.flow-stage .fs-rate circle.off { fill: none; stroke: rgb(236 233 244 / .24); }
.flow-stage .st { opacity: 0; transform: translateY(10px); transform-box: view-box; transition: opacity var(--dur-3) var(--motion-curve), transform var(--dur-3) var(--motion-curve); }
.flow-ticks { display: flex; gap: 6px; margin-top: var(--s4); }
.flow-ticks i { flex: 1; height: 2px; border-radius: 2px; background: var(--line-2); transform-origin: left; }
.flow-ticks i::after { content: ""; display: block; height: 100%; border-radius: inherit; background: var(--violet-hi); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-3) var(--motion-curve); }
/* the stage follows whichever step is open — pure CSS, no script */
.home-flow:has(details:nth-child(1)[open]) .st1, .home-flow:has(details:nth-child(2)[open]) .st2,
.home-flow:has(details:nth-child(3)[open]) .st3, .home-flow:has(details:nth-child(4)[open]) .st4,
.home-flow:has(details:nth-child(5)[open]) .st5, .home-flow:has(details:nth-child(6)[open]) .st6,
.home-flow:has(details:nth-child(7)[open]) .st7, .home-flow:not(:has(details[open])) .st1 { opacity: 1; transform: none; }
.home-flow:has(details:nth-child(1)[open]) .flow-ticks i:nth-child(-n+1)::after, .home-flow:has(details:nth-child(2)[open]) .flow-ticks i:nth-child(-n+2)::after,
.home-flow:has(details:nth-child(3)[open]) .flow-ticks i:nth-child(-n+3)::after, .home-flow:has(details:nth-child(4)[open]) .flow-ticks i:nth-child(-n+4)::after,
.home-flow:has(details:nth-child(5)[open]) .flow-ticks i:nth-child(-n+5)::after, .home-flow:has(details:nth-child(6)[open]) .flow-ticks i:nth-child(-n+6)::after,
.home-flow:has(details:nth-child(7)[open]) .flow-ticks i:nth-child(-n+7)::after { transform: scaleX(1); }
@supports not selector(:has(*)) { .flow-stage .st1 { opacity: 1; transform: none; } }

.home-flow .pipeline { counter-reset: none; }
.home-flow .pipeline details { position: relative; padding-left: var(--s5); }
.home-flow .pipeline details::before {
  content: ""; position: absolute; left: 0; top: -1px; bottom: -1px; width: 1px; background: var(--violet-hi);
  transform: scaleY(0); transform-origin: top; transition: transform var(--dur-3) var(--motion-curve);
}
.home-flow .pipeline details[open]::before { transform: scaleY(1); }
.home-flow .pipeline summary { align-items: center; }
.home-flow .pipeline .folio { min-width: 2.25rem; color: var(--mist); }
.home-flow .pipeline details[open] .folio { color: var(--violet-hi); }
.home-flow .pipeline details:not([open]) summary > span { color: var(--fog); }
.home-flow .pipeline details:not([open]) summary:hover > span { color: var(--bone); }
.home-flow .pipeline p, .home-flow .pipeline a { margin-left: calc(2.25rem + var(--s4)); }
.home-flow > .pipeline { grid-column: 7 / -1; min-width: 0; }
.home-inline-cta { grid-column: 7 / -1; margin-top: var(--s6); }

/* ── specimen artefacts ─────────────────────────────────────────────── */
.home-guides > h2 { max-width: 16ch; }
.home-guides .feature-row h3 { font-size: clamp(1.75rem, 1.4rem + 1.3vw, 2.75rem); line-height: 1.04; letter-spacing: -.022em; }
.specimen--scan {
  background:
    repeating-linear-gradient(180deg, transparent 0 31px, rgb(236 233 244 / .035) 31px 32px),
    var(--surface), var(--ink-2);
}
.specimen--scan blockquote { position: relative; padding: var(--s4) var(--s5); margin-inline: calc(-1 * var(--s5)); background: rgb(143 125 255 / .07); border-radius: var(--r-xs); }
.specimen--scan blockquote::before, .specimen--scan blockquote::after { content: ""; position: absolute; width: 14px; height: 14px; border: solid var(--violet-hi); }
.specimen--scan blockquote::before { left: 0; top: 0; border-width: 1px 0 0 1px; }
.specimen--scan blockquote::after { right: 0; bottom: 0; border-width: 0 1px 1px 0; }
.specimen--ref blockquote { padding-left: 2.2em; text-indent: -2.2em; }
.specimen--ref small { font-style: italic; font-family: var(--site-serif); font-size: 1.15rem; }
.specimen--path small { display: inline-flex; padding: .45rem .85rem; border: 1px solid var(--line-2); border-radius: var(--r-pill); font: 400 .78rem/1.4 var(--site-mono); letter-spacing: .02em; background: rgb(255 255 255 / .025); }
.specimen--card { overflow: visible; margin-right: 14px; margin-bottom: 14px;
  box-shadow: var(--shadow), 7px 7px 0 -1px var(--ink-3), 7px 7px 0 0 var(--line-2), 14px 14px 0 -1px #101017, 14px 14px 0 0 var(--line); }
.specimen--card blockquote { font-size: clamp(1.65rem, 1.3rem + 1.3vw, 2.5rem); }

/* ── comparison ─────────────────────────────────────────────────────── */
.home-compare .home-head h2 { max-width: 16ch; }
.home-compare-actions { margin-top: var(--s4); }

/* ── pricing band ───────────────────────────────────────────────────── */
.home-pricing { position: relative; }
.home-pricing::before {
  content: ""; position: absolute; z-index: -1; inset: 0 calc(50% - 50vw); pointer-events: none;
  background: radial-gradient(48rem 22rem at 50% 0, rgb(143 125 255 / .06), transparent 70%), linear-gradient(180deg, rgb(255 255 255 / .012), transparent 60%);
  border-top: 1px solid var(--line);
}
.home-pricing-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--s6); }
.home-pricing-head h2 { max-width: 14ch; }
.home-pricing-head p:not(.site-label) { color: var(--fog); max-width: 52ch; }
.home-pricing-head .site-tabs { margin: 0; }
.home-pricing .price-ledger { margin-top: var(--s7); }
.home-pricing .price-ledger > p { padding: var(--s6); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.home-pricing-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s3) var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.home-pricing-foot p { color: var(--fog); font-size: var(--type-small); max-width: 70ch; }
.home-pricing-foot a { color: var(--bone); font-size: var(--type-small); white-space: nowrap; }

/* ── security seal ──────────────────────────────────────────────────── */
.home-seal { display: block; width: clamp(9rem, 16vw, 13rem); height: auto; margin-top: var(--s7); }
.home-seal .sl-ring { fill: none; stroke: var(--line-2); }
.home-seal .sl-ticks { fill: none; stroke: rgb(182 171 255 / .3); stroke-width: 6; }
.home-seal .sl-lock { fill: none; stroke: var(--bone); stroke-width: 1.5; stroke-linejoin: round; }
.home-seal .sl-key { fill: var(--violet-hi); stroke: var(--violet-hi); stroke-width: 2; stroke-linecap: round; }
.home-seal .sl-arc { fill: none; stroke: var(--violet-hi); stroke-width: 1.5; stroke-linecap: round; }
.home-security .site-actions { margin-top: var(--s6); }
.home-security > div:last-child > p { font-size: var(--type-lede); color: var(--fog); }
.home-security > div:last-child > p:first-child { color: var(--bone); }

/* ── closing horizon ────────────────────────────────────────────────── */
.home-closing { position: relative; isolation: isolate; text-align: center; padding-block: clamp(6rem, 4rem + 9vw, 12rem) clamp(9rem, 6rem + 14vw, 19rem); }
.home-closing::before {
  content: ""; position: absolute; z-index: -2; inset: 45% calc(50% - 50vw) 0;
  background: radial-gradient(50% 60% at 50% 100%, rgb(143 125 255 / .13), transparent 72%);
}
.home-horizon { position: absolute; z-index: -1; left: calc(50% - 50vw); bottom: 0; width: 100vw; height: clamp(7rem, 4rem + 12vw, 15rem); pointer-events: none; }
.home-closing-inner { display: grid; justify-items: center; }
.home-closing .site-label { justify-content: center; }
.site-page main .home-closing h2 { font-size: var(--type-display); max-width: 14ch; line-height: .95; }
.home-closing p:not(.site-label) { margin-inline: auto; color: var(--fog); font-size: var(--type-lede); }
.home-closing .site-actions { justify-content: center; }

/* ── responsive ─────────────────────────────────────────────────────── */
@media (max-width: 64rem) {
  .home-hero > .home-hero-intro { grid-column: 1 / span 6; }
  .home-hero > .home-hero-stage { grid-column: 7 / -1; }
}
@media (max-width: 58rem) {
  .home-hero > .home-hero-intro, .home-hero > .home-hero-stage { grid-column: 1 / -1; }
  .home-hero-art { width: 120%; }
  .home-pricing-head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 48rem) {
  .home-inline-cta, .home-flow > .pipeline { grid-column: 1 / -1; }
  .flow-stage { max-width: 26rem; margin-top: var(--s6); }
  .home-flow .pipeline p, .home-flow .pipeline a { margin-left: 0; }
  .home-cost .editorial-list > div { grid-template-columns: 2.25rem minmax(0, 1fr); }
  .home-seal { width: 8rem; margin-top: var(--s6); }
  .specimen--scan blockquote { margin-inline: 0; }
}
