/* Xerovi theme: patterns.css (S7 A2, agent s7-a2-templates; merged by main-session 2026-11-28, D66).
   Template-level patterns for the page templates (06-build/gallery/templates/), built on the A1
   layers. Was a2-pending.css (archived as _archive/06-build/theme-xerovi/assets/css/a2-pending-2026-11-28.css).
   Loads after components.css. Same rules as A1: colours only through --xv- tokens, movement only
   through transform and opacity and the --xv-move-* switches (D42), hover behind (hover: hover).

   Contents
     1 Hero entrance (once on load)   2 Home hero and junction     3 Section head and bands
     4 Process stack (S-DELIVERY)     5 Journey (S-ILLUS)          6 Tabs (journeys)
     7 Case row with picture          8 Product screen and XeroviLink illustration
     9 Plans and quotes (product)    10 Article layout (case, legal, post)
    11 Contact layout                12 Closing CTA band           13 Small helpers */

/* =============================================================== 1 Hero entrance
   The hero's children rise into place once on load. Under reduced motion and Pause motion
   base.css sets animation: none, so everything stands in place at once. */
/* Transform only: text stays painted from the first frame, so the entrance never delays LCP
   (measured: an opacity fade on the hero lead added 0.45-0.75 s of LCP in Lighthouse mobile). */
@keyframes xv-enter { from { transform: translateY(18px); } to { transform: none; } }
.m-enter [data-enter] .xv-hero__inner > *,
.m-enter [data-enter] .xv-hero__art {
  animation: xv-enter var(--xv-duration-slow) var(--xv-ease-out) both;
}
.m-enter [data-enter] .xv-hero__inner > :nth-child(2) { animation-delay: 60ms; }
.m-enter [data-enter] .xv-hero__inner > :nth-child(3) { animation-delay: 120ms; }
.m-enter [data-enter] .xv-hero__inner > :nth-child(4) { animation-delay: 180ms; }
.m-enter [data-enter] .xv-hero__inner > :nth-child(n+5) { animation-delay: 240ms; }
.m-enter [data-enter] .xv-hero__art { animation-delay: 200ms; }

/* =============================================================== 2 Home hero (junction and mark)
   One screen (DESIGN.md Layout, Heroes). Phones: the junction sits below the actions and stays
   under 40svh so the H1 starts in the first 60% of the screen (C15). */
.xv-hero--home { display: grid; align-items: center; min-height: 100svh; padding-bottom: var(--xv-space-14); }
.xv-hero--home .xv-hero__grid { width: var(--xv-wrap); margin-inline: auto; display: grid; gap: var(--xv-space-10); align-items: center; }
.xv-hero--home .xv-hero__inner { width: auto; margin: 0; }
.xv-hero--home .xv-hero__title { max-width: 12ch; }
@media (min-width: 1024px) {
  .xv-hero--home .xv-hero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 4vw, 72px); }
}
.xv-hero__art { min-width: 0; }
.xv-junction { display: block; width: 100%; height: auto; max-height: 40svh; overflow: visible; }
@media (min-width: 1024px) { .xv-junction { max-height: 62svh; } }
.xv-junction__wire { fill: none; stroke: var(--xv-hero-wire); stroke-width: 1.25; }
.xv-junction__chip rect { fill: var(--xv-hero-chip-bg); stroke: var(--xv-line); stroke-width: 1; }
.xv-junction__chip text { fill: var(--xv-hero-text); font-family: var(--xv-font-sans); font-weight: 500; }
.xv-junction__chip--in text { fill: var(--xv-hero-lead); }
.xv-junction__state { fill: var(--xv-line); }
.xv-junction__done { fill: var(--xv-accent); }
.xv-junction .xv-mark__a { stroke: var(--xv-text); stroke-width: 56; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.xv-junction .xv-mark__b { stroke: var(--xv-accent); stroke-width: 82; stroke-linecap: round; stroke-linejoin: round; fill: none; }
/* One pass: wires appear, the mark settles, then each finished output lights in turn. Ends at rest. */
@keyframes xv-junction-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes xv-junction-mark { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
@keyframes xv-junction-done { 0% { opacity: 0; transform: scale(.4); } 100% { opacity: 1; transform: none; } }
.xv-junction__wire { animation: xv-junction-in var(--xv-duration-reveal) var(--xv-ease-out) both; animation-delay: calc(300ms + var(--i, 0) * 90ms); }
.xv-junction__mark { transform-box: fill-box; transform-origin: center; animation: xv-junction-mark var(--xv-duration-reveal) var(--xv-ease-out) 250ms both; }
.xv-junction__done { transform-box: fill-box; transform-origin: center; animation: xv-junction-done var(--xv-duration-base) var(--xv-ease-out) both; animation-delay: calc(1100ms + var(--i, 0) * 260ms); }

/* =============================================================== 3 Section head and bands */
.xv-section-heading > .xv-h2-section + .xv-lead,
.xv-section-heading > .xv-h2-section + .xv-body { margin-top: var(--xv-space-5); }
.xv-band-actions { margin-top: var(--xv-space-10); }
.xv-subhead { margin: var(--xv-space-14) 0 var(--xv-space-6); }
.xv-subhead:first-child { margin-top: 0; }

/* =============================================================== 4 Process stack (S-DELIVERY)
   Cards stack while scrolling on wide screens; every title stays readable (step >= 72px, C17). */
.xv-process { display: grid; gap: var(--xv-space-4); counter-reset: none; }
.xv-process__item {
  display: grid;
  gap: var(--xv-space-3);
  padding: var(--xv-card-padding);
  border: 1px solid var(--xv-card-border);
  border-radius: var(--xv-card-radius);
  background: var(--xv-card-bg);
}
.xv-process__num { color: var(--xv-accent); font-size: var(--xv-size-small); font-weight: 500; font-variant-numeric: tabular-nums; }
.xv-process__title { color: var(--xv-card-title-text); }
.xv-process__text { color: var(--xv-card-body-text); max-width: var(--xv-measure); }
@media (min-width: 1024px) {
  .xv-process__item { position: sticky; top: calc(var(--xv-header-height) + var(--xv-space-6) + var(--n, 0) * 72px); grid-template-columns: 80px minmax(0, 4fr) minmax(0, 6fr); align-items: start; gap: var(--xv-space-8); box-shadow: var(--xv-shadow-stack); }
}

/* =============================================================== 5 Journey (S-ILLUS)
   An illustrative step list. Its caption says it is illustrative; it is never a proof slot. */
.xv-journey { display: grid; gap: var(--xv-space-6); padding: var(--xv-card-padding); border: 1px solid var(--xv-card-border); border-radius: var(--xv-card-radius); background: var(--xv-card-bg); }
.xv-journey__kicker { color: var(--xv-text-muted); }
.xv-journey__steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--xv-space-3); }
@media (min-width: 1024px) { .xv-journey__steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.xv-journey__step { display: grid; align-content: start; gap: var(--xv-space-2); min-width: 0; padding: var(--xv-space-5); border-radius: var(--xv-radius-md); background: var(--xv-surface-2); }
.xv-journey__num { color: var(--xv-accent); font-size: var(--xv-size-small); font-weight: 500; font-variant-numeric: tabular-nums; }
.xv-journey__label { color: var(--xv-text); font-size: var(--xv-size-ui); font-weight: 500; }
.xv-journey__text { color: var(--xv-text-soft); overflow-wrap: anywhere; }
.xv-journey__meta { color: var(--xv-text-muted); font-size: var(--xv-size-small); }
.xv-journey__caption { color: var(--xv-text-caption); font-size: var(--xv-size-small); }
.xv-steps-plain { display: grid; gap: var(--xv-space-2); margin-top: var(--xv-space-3); padding-left: 1.25em; list-style: disc; color: var(--xv-text-soft); }

/* =============================================================== 6 Tabs (journeys on the pillar hub)
   role=tablist with arrow keys (patterns.js). Without JS every panel shows and the tab row hides. */
.xv-tabs__list { display: none; }
.xv-js .xv-tabs__list { display: flex; flex-wrap: wrap; gap: var(--xv-space-2); margin-bottom: var(--xv-space-6); }
.xv-tabs__panel + .xv-tabs__panel { margin-top: var(--xv-space-6); }
.xv-js .xv-tabs__panel + .xv-tabs__panel { margin-top: 0; }
.xv-tab[aria-selected="true"] { background: var(--xv-fill); color: var(--xv-on-fill); border-color: var(--xv-fill); }

/* =============================================================== 7 Case row with picture
   The case list row with a 4:3 picture in place of the number (DESIGN.md Case card). */
@media (min-width: 1024px) { .xv-case--pic { grid-template-columns: 200px minmax(0, 6fr) minmax(0, 4fr); } }
.xv-case__pic { display: block; width: 100%; max-width: 420px; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: var(--xv-case-image-radius); overflow: hidden; }
@media (max-width: 1023px) { .xv-case__pic { aspect-ratio: 16 / 10; max-width: none; } }
.xv-case__picwrap { display: block; overflow: hidden; border-radius: var(--xv-case-image-radius); }
.xv-case__picwrap .xv-case__pic { transition: transform var(--xv-duration-reveal) var(--xv-ease-out); }
@media (hover: hover) and (pointer: fine) { .xv-case:hover .xv-case__picwrap .xv-case__pic { transform: scale(calc(1 + (var(--xv-move-zoom) - 1) / 3)); } }

/* =============================================================== 8 Product screen and XeroviLink illustration */
.xv-window__img { display: block; width: 100%; height: auto; }
.xv-window__body--flush { padding: 0; }
.xv-screen { margin: 0; display: grid; gap: var(--xv-space-4); }
.xv-screen__frame { border-radius: var(--xv-card-radius); padding: clamp(16px, 3vw, 40px); background: var(--xv-product-stage-bg); }
.xv-screen__caption { color: var(--xv-text-caption); font-size: var(--xv-size-small); }
.xv-xlink { display: grid; gap: var(--xv-space-4); color: var(--xv-product-paper-text); font-size: var(--xv-size-label); }
@media (min-width: 600px) { .xv-xlink { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.xv-xlink__doc, .xv-xlink__sheet { display: grid; gap: var(--xv-space-2); min-width: 0; padding: var(--xv-space-4); border-radius: var(--xv-radius-md); background: var(--xv-product-paper-bg); box-shadow: var(--xv-shadow-paper); }
.xv-xlink__title { color: var(--xv-product-paper-muted); font-weight: 500; }
.xv-xlink__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--xv-space-2); }
.xv-xlink__region { padding: var(--xv-space-2) var(--xv-space-3); border-radius: var(--xv-radius-sm); box-shadow: inset 0 0 0 1px var(--xv-product-evidence-border); background: var(--xv-product-evidence-bg); color: var(--xv-product-evidence-text); }
.xv-xlink__btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--xv-target-min); padding: 4px 10px;
  border: 1px solid var(--xv-border-control); border-radius: var(--xv-radius-sm);
  background: var(--xv-product-paper-bg); color: var(--xv-product-paper-text);
  font: inherit; font-weight: 500; cursor: pointer;
}
@media (pointer: coarse) { .xv-xlink__btn { min-height: var(--xv-target-touch); } }
.xv-xlink__btn--cell { background: var(--xv-product-evidence-bg); color: var(--xv-product-evidence-text); border-color: var(--xv-product-evidence-border); font-variant-numeric: tabular-nums; }
.xv-xlink__grid { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(0, 1fr); gap: 2px; align-items: stretch; }
.xv-xlink__grid > span, .xv-xlink__grid > button { min-height: var(--xv-target-min); padding: 4px 8px; background: var(--xv-bone-150); overflow-wrap: anywhere; }
.xv-xlink__grid > .is-head { color: var(--xv-product-paper-muted); }
.xv-xlink.is-linked .xv-xlink__region { transform: scale(1.02); }
.xv-xlink__region { transition: transform var(--xv-duration-base) var(--xv-ease-out); }
.xv-xlink__note { color: var(--xv-product-caption-text); }

/* =============================================================== 9 Plans and quotes (product page, D52 keeps the plan prices) */
.xv-plan__price { color: var(--xv-card-title-text); font-size: var(--xv-size-h3-display); line-height: var(--xv-leading-title); letter-spacing: var(--xv-tracking-h3); font-variant-numeric: tabular-nums; }
.xv-plan .xv-link { margin-top: auto; }
.xv-quotes { display: grid; gap: var(--xv-space-4); }
@media (min-width: 1024px) { .xv-quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.xv-quote { display: grid; gap: var(--xv-space-4); align-content: start; margin: 0; padding: var(--xv-card-padding); border-left: 2px solid var(--xv-accent); background: var(--xv-card-bg); border-radius: 0 var(--xv-card-radius) var(--xv-card-radius) 0; }
.xv-quote p { color: var(--xv-text); font-size: var(--xv-size-lead); line-height: var(--xv-leading-lead); }
.xv-quote footer { color: var(--xv-text-muted); font-size: var(--xv-size-small); font-weight: 500; }
.xv-tags { display: flex; flex-wrap: wrap; gap: var(--xv-space-2); }
.xv-tags > li { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border: 1px solid var(--xv-border-control); border-radius: var(--xv-radius-pill); color: var(--xv-text); font-size: var(--xv-size-small); font-weight: 500; }
.xv-feature { display: grid; gap: var(--xv-space-3); padding: var(--xv-space-8) 0; border-top: 1px solid var(--xv-line); }
@media (min-width: 1024px) { .xv-feature { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--xv-space-8); } }
.xv-feature__name { color: var(--xv-accent); }
.xv-feature__text { color: var(--xv-text-soft); max-width: var(--xv-measure); }

/* =============================================================== 10 Article layout (case study, legal, blog post)
   A reading column with the contents list beside it on wide screens; source order unchanged. */
.xv-article { display: grid; gap: var(--xv-space-10); }
@media (min-width: 1024px) {
  .xv-article { grid-template-columns: minmax(0, 3fr) minmax(0, 8fr); gap: clamp(40px, 6vw, 104px); align-items: start; }
  .xv-article__aside { position: sticky; top: calc(var(--xv-header-height) + var(--xv-space-6)); }
}
.xv-prose h4 { font-size: var(--xv-size-h4); font-weight: 500; line-height: var(--xv-leading-ui); color: var(--xv-text); margin-top: 1.4em; }
.xv-prose :is(h2, h3) { color: var(--xv-text); }
.xv-prose blockquote { margin: 0; padding-left: var(--xv-space-5); border-left: 2px solid var(--xv-accent); }
.xv-prose .xv-table { font-size: var(--xv-size-body); }
.xv-page-head { padding: calc(var(--xv-header-height) + var(--xv-space-14)) 0 var(--xv-space-12); }
.xv-page-head .xv-breadcrumbs { margin-bottom: var(--xv-space-8); }
.xv-meta { color: var(--xv-text-muted); font-size: var(--xv-size-small); font-weight: 500; }
.xv-figure { margin: 0; }
.xv-figure img { display: block; width: 100%; height: auto; border-radius: var(--xv-card-radius); }
.xv-pull { color: var(--xv-text); font-size: var(--xv-size-lead); line-height: var(--xv-leading-lead); }

/* =============================================================== 11 Contact layout */
.xv-contact { display: grid; gap: var(--xv-space-10); }
@media (min-width: 1024px) { .xv-contact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 104px); align-items: start; } }
.xv-contact__direct { display: grid; gap: var(--xv-space-2); }

/* =============================================================== 12 Closing CTA band (S-CTA)
   The template's one primary action once more. Its H2 and line are S6 copy (page specs §0.8);
   until S6 the band holds the button only. */
.xv-cta-band { padding-block: var(--xv-space-14); border-top: 1px solid var(--xv-line); }
.xv-cta-band .xv-actions { margin-top: 0; }

/* =============================================================== 13 Small helpers */
.xv-eyebrow-line { color: var(--xv-text-muted); }
.xv-plain-list { display: grid; gap: var(--xv-space-2); padding-left: 1.25em; list-style: disc; color: var(--xv-text-soft); }
.xv-plain-list li::marker { color: var(--xv-accent); }
.xv-placeholder { padding: var(--xv-card-padding); border: 1px dashed var(--xv-border-control); border-radius: var(--xv-card-radius); color: var(--xv-text-soft); }
.xv-placeholder__tag { display: inline-block; margin-bottom: var(--xv-space-3); padding: 2px 10px; border-radius: var(--xv-radius-pill); background: var(--xv-tonal); color: var(--xv-text); font-size: var(--xv-size-label); font-weight: 500; letter-spacing: var(--xv-tracking-caps); }
.xv-links-row { display: flex; flex-wrap: wrap; gap: var(--xv-space-2) var(--xv-space-8); margin-top: var(--xv-space-8); }

/* Pages without an ink hero (legal, blog post: page head on paper) keep the header solid from
   the top, so its bone text never sits on paper. */
.xv-header[data-xv-solid]::before { opacity: 1; }

/* Card detail lines (capability cards: "Practical examples", "What a scoped implementation
   provides", "For example", "What you receive"): label-style terms, body values. */
.xv-card__dl { display: grid; gap: var(--xv-space-2); margin: 0; }
.xv-card__dl dt { margin-top: var(--xv-space-2); color: var(--xv-text-muted); font-size: var(--xv-size-label); font-weight: 500; letter-spacing: var(--xv-tracking-caps); text-transform: uppercase; }
.xv-card__dl dd { margin: 0; color: var(--xv-card-body-text); }

/* Built by Xerovi on Home: text, then the illustration, then the links (source order kept). */
.xv-built { display: grid; gap: var(--xv-space-8); padding-block: var(--xv-space-12); border-top: 1px solid var(--xv-line); }
@media (min-width: 1024px) {
  .xv-built { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: clamp(40px, 6vw, 104px); align-items: start; }
  .xv-built__text { grid-column: 1; grid-row: 1; }
  .xv-built__stage { grid-column: 2; grid-row: 1 / span 2; }
  .xv-built__links { grid-column: 1; grid-row: 2; align-self: start; }
}
.xv-built__text { display: grid; gap: var(--xv-space-4); align-content: start; }
.xv-built__stage { display: grid; gap: var(--xv-space-3); padding: clamp(16px, 3vw, 40px); border-radius: var(--xv-card-radius); background: var(--xv-product-stage-bg); }
.xv-built__stage .xv-product__caption { margin-top: 0; }
.xv-built__links { display: flex; flex-wrap: wrap; gap: var(--xv-space-2) var(--xv-space-6); }

/* Junction: the wide drawing from 600px, the phone drawing below (labels stay ~13px, C15). */
.xv-junction--narrow { display: none; }
@media (max-width: 600px) { .xv-junction--wide { display: none; } .xv-junction--narrow { display: block; } }

/* Home function rows: the name, then its tag line on its own line. */
.xv-faq--rows .xv-faq__q-text > .xv-small { display: block; margin-top: var(--xv-space-1); }

/* Closing band: the button, and the mark as a quiet decorative close (aria-hidden). */
.xv-cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--xv-space-8); }
.xv-cta-band__mark { flex: 0 0 auto; width: clamp(56px, 7vw, 104px); }
.xv-cta-band__mark .xv-mark { display: block; width: 100%; height: auto; }
.xv-cta-band__mark .xv-mark path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 600px) { .xv-cta-band__inner { flex-direction: column; align-items: stretch; } .xv-cta-band__mark { display: none; } }

/* Demo frame ring (fix for A1 components.css §22): while keyboard focus is inside the embedded
   document the iframe matches :focus-within, not :focus (measured in Chrome), so the A1 rule
   .xv-demo__frame:has(iframe:focus) showed no ring. */
.xv-demo__frame:has(iframe:focus-within) { outline: var(--xv-focus-ring-width) solid var(--xv-focus-ring-color); outline-offset: var(--xv-focus-ring-offset); }

/* Home hero: text and junction top-aligned (a split's columns share a top line). */
.xv-hero--home .xv-hero__grid { align-items: start; }
/* Case rows with a picture: a larger picture column on wide screens. */
@media (min-width: 1024px) { .xv-case--pic { grid-template-columns: 320px minmax(0, 6fr) minmax(0, 4fr); } }
/* Home hero split on the 12-column lines: the junction column starts at column 8 (7 of 12 for the text). */
@media (min-width: 1024px) {
  .xv-hero--home .xv-hero__grid { grid-template-columns: calc((100% + 24px) * 7 / 12 - 24px) minmax(0, 1fr); column-gap: 24px; }
}
/* Article column: the first heading starts on the aside's top line (split columns top-aligned). */
.xv-prose > :first-child { margin-top: 0; }
/* Demo frame: the iframe itself shows the ring when it takes focus (the frame card's ring follows from
   the :has rules; this keeps a visible change on the focused element too). */
.xv-demo__frame iframe:focus-visible { outline: var(--xv-focus-ring-width) solid var(--xv-focus-ring-color); outline-offset: calc(-1 * var(--xv-focus-ring-width)); }
