/* ════════════════════════════════════════════════════════════════════════
   Qyverix — "Foundry / Press" homepage system (Nov 2026)

   Two independently art-directed worlds on one structure:
     [data-theme="ink"]   Foundry · ink-black, brass, copper traces, chrome
     [data-theme="paper"] Press   · paper + white + cobalt/vermilion colour fields,
                                    ink registration offset, torn field edges
   Type: Archivo variable (wdth 62–125, wght 100–900) — width is the kinetic axis.
         Instrument Serif italic — the human voice. JetBrains Mono — labels.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Kinetic type system ─────────────────────────────────────────────── */
.kin { display: inline-flex; white-space: nowrap; }
.kin__c { display: inline-block; font-stretch: calc(var(--w, 100) * 1%); transform-origin: 50% 100%; transform: translateY(var(--y, 0%)) scale(var(--sx, 1), var(--sy, 1)); transition: transform .45s var(--ease); will-change: transform; }
/* Intro: pure CSS so the headline is painted at first frame (no wait for JS).
   Letters rise and their stretch settles — transform only, so nothing reflows. */
.hx .kin__c { animation: kin-rise 1.25s var(--ease) backwards; animation-delay: calc(var(--i) * 26ms + var(--d, 80ms)); }
.hx__l--2 { --d: 260ms; } .hx__l--3 { --d: 420ms; }
@keyframes kin-rise { 0% { transform: translateY(108%) scale(1.55, 1); } 62% { transform: translateY(0) scale(.94, 1.02); } 100% { transform: translateY(0) scale(1, 1); } }
.hx__serif { animation: kin-rise 1.2s var(--ease) .38s backwards; }
.ticker, .hx__marks { animation: fade-up 1s var(--ease) .9s backwards; }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } }
.kin--accent .kin__c { color: var(--a1); }

/* ── 01 · Hero ───────────────────────────────────────────────────────── */
.hx { position: relative; height: 100svh; min-height: 600px; display: grid; grid-template-rows: minmax(0, 1fr) auto auto; padding: 92px var(--gut) 0; overflow: hidden; isolation: isolate; }
.hx__atmos { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
[data-theme="ink"] .hx__atmos { background:
  radial-gradient(42% 46% at 66% 46%, rgba(217,165,74,.16), transparent 70%),
  radial-gradient(30% 30% at 74% 60%, rgba(255,106,43,.10), transparent 70%),
  linear-gradient(to right, rgba(241,235,223,.045) 1px, transparent 1px) 0 0 / 96px 96px,
  linear-gradient(to bottom, rgba(241,235,223,.045) 1px, transparent 1px) 0 0 / 96px 96px; }
[data-theme="paper"] .hx__atmos { background:
  radial-gradient(46% 50% at 66% 46%, rgba(255,255,255,.9), transparent 70%),
  repeating-linear-gradient(0deg, transparent 0 31px, rgba(35,55,198,.09) 31px 32px); }
/* Hero object: the mark as an engineering specimen (index.php .hx__spec) */
[data-theme="ink"]   { --q-circ: #ff6a2b; --q-spark: #ffe1b8; }
[data-theme="paper"] { --q-circ: #e2401f; --q-spark: #ffd3c4; }
.hx__stage { position: absolute; z-index: -1; right: -3vw; top: 47%; width: min(74vh, 54vw); aspect-ratio: 1; transform: translateY(-50%); pointer-events: none; }
.hx__spec { width: 100%; height: 100%; overflow: visible; }
.hx__gl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s var(--ease); }
.has-3d .hx__gl { opacity: 1; }
.hx__fallback { position: absolute; inset: 0; transition: opacity .8s; }
.has-3d .hx__fallback { opacity: 0; }
.hx__q { transform: translate(var(--qx, 0px), var(--qy, 0px)); transition: transform .9s var(--ease); }
.hx__wipe { transform-box: fill-box; transform-origin: 0 50%; animation: hx-wipe 1.5s cubic-bezier(.7,0,.2,1) .25s backwards; }
.hx__q-ink { fill: var(--fg); display: none; }
[data-theme="paper"] .hx__q-ink { display: inline; }
[data-theme="paper"] .hx__q-metal { display: none; }
@keyframes hx-draw { to { stroke-dashoffset: 0; } }
@keyframes hx-fade { from { opacity: 0; } }
@keyframes hx-wipe { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .hx__wipe { animation: none !important; } }
.hx__title { align-self: center; display: grid; font: 800 clamp(3.2rem, min(13.4vw, 18.5svh), 15.5rem)/.8 var(--f-sans); letter-spacing: -.045em; text-shadow: var(--reg); padding: 3vh 0; position: relative; z-index: 2; }
.hx__l { display: block; overflow: hidden; padding: .04em .02em .19em; margin-bottom: -.19em; }
.hx__l--1 .kin__c { --w: 64; }
.hx__l--2 { padding-left: 34vw; }
.hx__l--2 .kin__c { --w: 92; }
.hx__l--3 { display: flex; align-items: baseline; gap: .18em; }
.hx__l--3 .kin__c { --w: 70; }
.hx__serif { font: italic 400 .62em/1 var(--f-serif); letter-spacing: -.02em; color: var(--a1); text-shadow: none; transform: translateY(var(--y, 0%)); display: inline-block; }
.hx__foot { display: grid; grid-template-columns: minmax(0, 470px) auto; justify-content: space-between; align-items: end; gap: 28px; padding-bottom: clamp(18px, 3.4svh, 34px); position: relative; z-index: 2; }
.hx__lede { font-size: clamp(1.02rem, 1.25vw, 1.2rem); color: var(--fg-2); }
.hx__ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.ticker { margin: 0 calc(var(--gut) * -1); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; position: relative; z-index: 2; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.ticker__track { display: flex; gap: 28px; align-items: center; width: max-content; padding: 14px 0; animation: tick 34s linear infinite; font: 600 clamp(1.1rem, 2vw, 1.6rem)/1 var(--f-sans); font-stretch: 112%; text-transform: uppercase; letter-spacing: -.01em; }
.ticker__track i { font-style: normal; color: var(--a2); }
@keyframes tick { to { transform: translateX(-50%); } }
@media (max-width: 860px) {
  .hx { padding-top: 88px; }
  .hx__stage { right: -18vw; top: 34%; width: 92vw; opacity: .5; }
  .hx__title { font-size: clamp(3rem, 19vw, 7rem); }
  .hx__l--2 { padding-left: 0; text-align: right; }
  .hx__l--3 { flex-direction: column; align-items: flex-start; gap: 0; }
  .hx__foot { grid-template-columns: 1fr; }
}

/* ── Fields & torn edges (paper tears; foundry cuts clean) ────────── */
.field { position: relative; }
/* the next section's torn edge reaches 22px up: leave it room below the hero marquee */
[data-theme="paper"] .hx { padding-bottom: 26px; }
[data-theme="paper"] .field::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 24px; background: inherit; -webkit-mask: var(--torn) top / 100% 100% no-repeat; mask: var(--torn) top / 100% 100% no-repeat; z-index: 1; }
[data-theme="ink"] .field { border-top: 1px solid var(--line); }

/* ── 02 · Manifesto ──────────────────────────────────────────────────── */
.mf { background: var(--bg-2); padding: clamp(96px, 14vw, 200px) 0; }
.mf__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: clamp(32px, 6vw, 110px); align-items: end; }
.mf__grid > .label { grid-column: 1 / -1; }
.mf__text { font: 600 clamp(1.8rem, 3.9vw, 3.9rem)/1.06 var(--f-sans); font-stretch: 86%; letter-spacing: -.028em; }
.mf__text .w { opacity: var(--o, 1); transition: opacity .2s linear; }
.js .mf__text .w { --o: .14; }
.mf__text .mark { position: relative; white-space: nowrap; font-family: var(--f-serif); font-style: italic; font-weight: 400; font-stretch: 100%; color: var(--a1); }
.mf__quote { font: italic 400 clamp(1.5rem, 2.2vw, 2rem)/1.15 var(--f-serif); }
.mf__quote cite { display: block; margin-top: 12px; font-style: normal; color: var(--fg-3); }
.mf__name { display: flex; gap: 14px; margin-top: 34px; color: var(--a2); }
.mf__name span + span::before { content: "·"; margin-right: 14px; color: var(--fg-3); }
.mf__name-note { margin-top: 8px; font-size: 14px; color: var(--fg-3); }
@media (max-width: 860px) { .mf__grid { grid-template-columns: 1fr; } }

/* ── 03 · Capabilities ───────────────────────────────────────────────── */
.cx { padding: clamp(96px, 12vw, 180px) 0; }
.cx__list { border-top: 1px solid var(--line-2); counter-reset: cx; }
.cx__link { position: relative; isolation: isolate; display: grid; grid-template-columns: 60px minmax(0, 1.25fr) minmax(0, 1fr) 140px 40px; gap: 24px; align-items: center; padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none; overflow: hidden; }
.cx__link::before { content: ""; position: absolute; inset: 0; background: var(--a1); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); z-index: -1; }
.cx__link:hover::before, .cx__link:focus-visible::before { transform: scaleY(1); }
.cx__link:hover, .cx__link:focus-visible { color: var(--a1-ink); }
.cx__n { color: var(--fg-3); transition: color .3s; }
.cx__t { font: 700 clamp(1.8rem, 4.4vw, 4.2rem)/.95 var(--f-sans); font-stretch: 72%; letter-spacing: -.03em; transition: transform .6s var(--ease); }
.cx__link:hover .cx__t { transform: translateX(14px); }
.cx__d { color: var(--fg-2); font-size: 15px; transition: color .3s; }
.cx__link:hover .cx__n, .cx__link:hover .cx__d { color: inherit; }
.cx__art { width: 140px; color: var(--fg-2); transition: color .3s; }
.cx__link:hover .cx__art { color: var(--a1-ink); }
.cg :is(path, rect, circle) { stroke-dasharray: 1; stroke-dashoffset: 0; }
/* Hover: each stroke redraws in sequence, then the accent shape pops in */
.cx__link:hover .cg :is(path, rect, circle), .cx__link:focus-visible .cg :is(path, rect, circle) { animation: redraw .85s cubic-bezier(.65, 0, .35, 1) both; }
.cg > :nth-child(2) { animation-delay: .05s !important; } .cg > :nth-child(3) { animation-delay: .1s !important; } .cg > :nth-child(4) { animation-delay: .15s !important; }
.cg > :nth-child(5) { animation-delay: .2s !important; } .cg > :nth-child(6) { animation-delay: .25s !important; } .cg > :nth-child(n+7) { animation-delay: .3s !important; }
.cx__link:hover .cg .cg-a, .cx__link:focus-visible .cg .cg-a { animation: redraw .85s cubic-bezier(.65, 0, .35, 1) both, cg-pop .5s .5s var(--ease) both !important; transform-box: fill-box; transform-origin: center; }
@keyframes redraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes cg-pop { from { fill-opacity: 0; transform: scale(.5); } to { fill-opacity: 1; transform: none; } }
.cg .cg-a { fill: var(--a2); stroke: var(--a2); }
.cx__link:hover .cg .cg-a { fill: var(--a1-ink); stroke: var(--a1-ink); }
.cx__go { font-size: 28px; transition: transform .5s var(--ease); }
.cx__link:hover .cx__go { transform: translateX(6px) rotate(-45deg); }
@media (max-width: 960px) { .cx__link { grid-template-columns: 40px minmax(0, 1fr) 40px; } .cx__d, .cx__art { display: none; } }

/* ── 04 · Build modes (live CMS demo) ────────────────────────────────── */
.bm { padding: clamp(96px, 12vw, 180px) 0; background: var(--bg-3); }
.bm__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 100px); align-items: center; }
.bm__desc { margin: 22px 0 28px; color: var(--fg-2); max-width: 42ch; font-size: 1.1rem; }
.bm__tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.qx-cms__tab { padding: 11px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--fg); font: 600 14px/1 var(--f-sans); cursor: pointer; transition: background .3s, color .3s; }
.qx-cms__tab.is-active { background: var(--fg); color: var(--bg); }
.bm__hint { margin-top: 22px; color: var(--fg-3); }
.bm__device { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; background: var(--bg); box-shadow: 0 50px 90px -40px rgba(0,0,0,.6); }
.bm__admin { border-right: 1px solid var(--line); }
.bm__bar { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--fg-3); font-size: 10.5px; }
.bm__live { color: var(--a2); } .bm__live::before { content: "● "; }
.bm__form { padding: 18px 16px; display: grid; gap: 14px; }
.qx-cms__field label { display: block; margin-bottom: 6px; font: 500 10.5px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }
.qx-cms__field input { width: 100%; height: 42px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg); font: 500 15px/1 var(--f-sans); }
.qx-cms__save { height: 44px; border-radius: 999px; border: 0; background: var(--a1); color: var(--a1-ink); font: 700 14px/1 var(--f-sans); cursor: pointer; }
.qx-cms__status { min-height: 18px; font: 500 12px/1.4 var(--f-mono); color: var(--a2); }
.bm__preview { position: relative; padding: 22px; min-height: 360px; background: var(--bg-2); overflow: hidden; }
.qx-cms__preview-flash { position: absolute; inset: 0; background: var(--a1); opacity: 0; pointer-events: none; transition: opacity .9s; }
.qx-cms__preview-flash.is-live { opacity: .18; transition: none; }
.qx-cms__preview-static-nav { display: flex; gap: 6px; margin-bottom: 30px; } .qx-cms__preview-static-nav span { width: 30px; height: 6px; border-radius: 3px; background: var(--line-2); }
.qx-cms__preview-static-hero { font: 800 2.2rem/1 var(--f-sans); font-stretch: 80%; letter-spacing: -.03em; }
.qx-cms__preview-static-hero a, .qx-cms__preview-static-hero span[data-out-cta] { display: inline-block; margin-top: 18px; padding: 10px 16px; border-radius: 999px; background: var(--fg); color: var(--bg); font: 600 13px/1 var(--f-sans); }
.qx-cms__preview-static-foot { margin-top: 40px; font: 500 11px/1 var(--f-mono); letter-spacing: .1em; color: var(--fg-3); text-transform: uppercase; }
.qx-cms__preview-hero { padding: 26px 18px; border-radius: 10px; background: linear-gradient(135deg, var(--a1), var(--a2)); color: var(--a1-ink); }
.qx-cms__preview-name { font: 800 2rem/1 var(--f-sans); font-stretch: 80%; }
.qx-cms__preview-body { padding-top: 18px; display: grid; gap: 12px; }
.qx-cms__preview-tagline { font: italic 400 1.5rem/1.2 var(--f-serif); }
.qx-cms__preview-feature span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; }
.qx-cms__preview-seo { font: 500 11px/1.5 var(--f-mono); color: var(--fg-3); }
.qx-cms__preview-erp { display: grid; gap: 14px; }
.qx-cms__preview-erp-head { display: flex; justify-content: space-between; font: 600 13px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--fg-3); }
.qx-cms__preview-erp-live { color: var(--a2); }
.qx-cms__preview-erp-metric { font: 800 2.4rem/1 var(--f-sans); font-stretch: 78%; letter-spacing: -.03em; }
.qx-cms__preview-erp-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.qx-cms__preview-erp-alert { padding: 12px; border-radius: var(--r); border: 1px dashed var(--a2); color: var(--a2); font-size: 13px; }
@media (max-width: 960px) { .bm__grid, .bm__device { grid-template-columns: 1fr; } .bm__admin { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ── 05 · Work (pinned horizontal) ───────────────────────────────────── */
.wk { background: var(--field-work); }
.wk__pin { height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 84px 0 4svh; overflow: hidden; }
.wk__head { position: relative; width: 100%; margin-bottom: 3.5svh; }
.wk__count { position: absolute; right: var(--gut); bottom: 6px; color: var(--fg-3); font-size: 13px; }
.wk__count span { color: var(--fg); }
.wk__track { display: flex; gap: clamp(18px, 2.4vw, 36px); padding: 0 var(--gut); width: max-content; will-change: transform; }
.wk__card { flex: 0 0 auto; display: grid; grid-template-columns: auto 320px; gap: 26px; align-items: end; }
.wk__fig { position: relative; overflow: hidden; border-radius: 6px; height: min(50svh, 520px); aspect-ratio: 16 / 10; background: var(--bg-3); border: 1px solid var(--line); }
.wk__fig img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transform: scale(var(--zs, 1)); transform-origin: 50% 0; transition: transform 1.2s var(--ease); }
.wk__card:hover .wk__fig img { --zs: 1.03; }
.wk__n { color: var(--a2); }
.wk__t { margin-top: 10px; font: 800 clamp(1.8rem, 3vw, 2.9rem)/.95 var(--f-sans); font-stretch: 76%; letter-spacing: -.03em; }
.wk__m { margin-top: 12px; color: var(--fg-3); }
.wk__d { margin-top: 12px; color: var(--fg-2); font-size: 15px; }
.wk__links { margin-top: 16px; display: flex; gap: 18px; font-weight: 600; font-size: 14px; }
.wk__links a { text-decoration: none; border-bottom: 1px solid var(--line-2); padding-bottom: 3px; }
.wk__links a:hover { color: var(--a2); border-color: var(--a2); }
.wk__card--end { flex: 0 0 min(40vw, 420px); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px; }
.wk__card--end p { font: italic 400 clamp(2rem, 4vw, 3.6rem)/1 var(--f-serif); }
@media (max-width: 860px) {
  .wk__pin { min-height: 0; }
  .wk__track { width: auto; flex-direction: column; gap: 56px; transform: none !important; }
  .wk__card, .wk__card--end { flex: none; grid-template-columns: 1fr; }
  .wk__count { display: none; }
}

/* ── 06 · Products (stacked) ─────────────────────────────────────────── */
.pd { background: var(--field-prod); padding: clamp(96px, 12vw, 180px) 0; }
[data-theme="paper"] .pd { --fg: #f6f3ec; --fg-2: rgba(246,243,236,.82); --fg-3: rgba(246,243,236,.6); --line: rgba(246,243,236,.22); --line-2: rgba(246,243,236,.45); --a1: #ffd33d; --a1-ink: #141210; --a2: #ffd33d; color: var(--fg); }
.pd__stack { display: grid; gap: 28px; }
.pd__card { position: sticky; top: calc(96px + var(--k) * 26px); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 64px); align-items: center; padding: clamp(24px, 3.4vw, 48px); border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); box-shadow: 0 -30px 60px -40px rgba(0,0,0,.6); transform-origin: 50% 0; min-height: min(72svh, 640px); }
.pd__card::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: #000; opacity: var(--dim, 0); pointer-events: none; }
[data-theme="paper"] .pd__card { background: #2a3fd6; }
.pd__status { display: inline-flex; align-items: center; gap: 8px; color: var(--fg-2); }
.pd__status i { width: 8px; height: 8px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a2) 25%, transparent); }
.pd__card--dev .pd__status i { background: transparent; border: 1.5px dashed var(--fg-3); box-shadow: none; }
.pd__t { margin-top: 16px; font: 800 clamp(2rem, 4.2vw, 4rem)/.92 var(--f-sans); font-stretch: 74%; letter-spacing: -.035em; }
.pd__idea { margin-top: 12px; font: italic 400 clamp(1.4rem, 2.2vw, 2.1rem)/1.1 var(--f-serif); color: var(--a1); }
.pd__d { margin-top: 16px; color: var(--fg-2); max-width: 46ch; }
.pd__links { margin-top: 24px; display: flex; gap: 10px; flex-wrap: wrap; }
.pd__shot { border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: #000; }
.pd__chrome { display: flex; align-items: center; gap: 6px; padding: 9px 12px; color: #9a9184; background: #15130f; font-size: 10.5px; }
.pd__chrome i { width: 8px; height: 8px; border-radius: 50%; background: #3a342b; }
.pd__chrome i:last-of-type { margin-right: 10px; }
.pd__shot img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
@media (max-width: 860px) { .pd__card { grid-template-columns: 1fr; position: relative; top: 0; } }

/* ── 07 · Process (one trace) ────────────────────────────────────────── */
.pr { padding: clamp(96px, 12vw, 180px) 0; }
.pr__board { position: relative; isolation: isolate; }
.pr__trace { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 120px; overflow: visible; }
.pr__trace path { fill: none; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pr__trace-bg { stroke: var(--line-2); stroke-width: 1.5; stroke-dasharray: 4 6; }
.pr__trace-fg { stroke: var(--a2); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: var(--draw, 1); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--a2) 60%, transparent)); }
[data-theme="paper"] .pr__trace-fg { filter: none; }
.pr__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 36px); padding-top: 130px; }
.pr__step { position: relative; opacity: var(--on, .35); transition: opacity .5s; }
.pr__step.is-on { --on: 1; }
.pr__pad { position: absolute; top: -50px; left: 0; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-2); background: var(--bg); transition: border-color .4s, background .4s, transform .5s var(--ease); }
.pr__step.is-on .pr__pad { border-color: var(--a2); background: var(--a2); transform: scale(1.2); }
.pr__wk { color: var(--fg-3); }
.pr__t { margin-top: 12px; font: 800 clamp(2rem, 3.6vw, 3.4rem)/.92 var(--f-sans); font-stretch: 76%; letter-spacing: -.035em; }
.pr__d { margin-top: 12px; color: var(--fg-2); font-size: 15px; }
.pr__del { margin-top: 16px; display: grid; gap: 6px; color: var(--fg-2); font-size: 11px; }
.pr__del li::before { content: "▸ "; color: var(--a2); }
@media (max-width: 960px) { .pr__trace { display: none; } .pr__steps { grid-template-columns: 1fr 1fr; padding-top: 0; gap: 40px 24px; } .pr__pad { display: none; } .pr__step { --on: 1; } }
@media (max-width: 560px) { .pr__steps { grid-template-columns: 1fr; } }

/* ── 08 · People ─────────────────────────────────────────────────────── */
.tm { background: var(--field-team); padding: clamp(96px, 12vw, 180px) 0; }
.tm__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 36px) clamp(14px, 2vw, 28px); }
.tm__p:nth-child(4n+2) { margin-top: 48px; } .tm__p:nth-child(4n+4) { margin-top: 24px; }
.tm__fig { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: var(--bg-3); }
.tm__fig img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.06); transition: filter .7s var(--ease), transform 1.2s var(--ease); }
.tm__p:hover .tm__fig img { filter: none; transform: scale(1.04); }
[data-theme="paper"] .tm__fig { background: #fff; padding: 8px 8px 0; box-shadow: 0 1px 2px rgba(0,0,0,.15), 0 18px 30px -18px rgba(0,0,0,.45); transform: rotate(calc((var(--k) - 3) * .7deg)); }
.tm__n { margin-top: 14px; font: 700 1.2rem/1.1 var(--f-sans); font-stretch: 90%; letter-spacing: -.01em; }
.tm__r { margin-top: 4px; color: var(--fg-2); font-size: 14px; }
.tm__in { display: inline-block; margin-top: 8px; color: var(--fg-3); text-decoration: none; }
.tm__in:hover { color: var(--a2); }
@media (max-width: 860px) { .tm__grid { grid-template-columns: 1fr 1fr; } .tm__p:nth-child(n) { margin-top: 0; } }

/* ── 09 · Sectors ────────────────────────────────────────────────────── */
.sx { padding: clamp(96px, 12vw, 160px) 0; }


/* ── FAQ ─────────────────────────────────────────────────────────────── */
.fq { padding: 0 0 clamp(96px, 12vw, 160px); }
.fq__grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); }
.fq__item { border-top: 1px solid var(--line); }
.fq__item:last-child { border-bottom: 1px solid var(--line); }
.fq__item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font: 700 clamp(1.1rem, 1.6vw, 1.4rem)/1.2 var(--f-sans); font-stretch: 92%; }
.fq__item summary::-webkit-details-marker { display: none; }
.fq__item summary::after { content: "+"; font-family: var(--f-mono); color: var(--a2); transition: transform .4s var(--ease); }
.fq__item[open] summary::after { transform: rotate(45deg); }
.fq__item p { padding: 0 0 24px; color: var(--fg-2); max-width: 62ch; }
@media (max-width: 860px) { .fq__grid { grid-template-columns: 1fr; } }

/* ── Finale ──────────────────────────────────────────────────────────── */
.fn { background: var(--field-fn); color: var(--field-fn-fg); padding: clamp(96px, 14vw, 200px) 0; overflow: hidden; }
.fn .label { color: color-mix(in srgb, var(--field-fn-fg) 70%, transparent); } .fn .label b { color: var(--field-fn-fg); }
.fn .label::after { background: color-mix(in srgb, var(--field-fn-fg) 40%, transparent); }
.fn__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 40px; align-items: center; }
.fn__title { display: grid; font: 800 clamp(3rem, 9.4vw, 10rem)/.84 var(--f-sans); letter-spacing: -.045em; }
.fn__l { display: flex; gap: .2em; align-items: baseline; overflow: hidden; padding: .04em 0 .19em; margin-bottom: -.19em; }
.fn__l .kin__c { --w: 68; }
.fn__title .hx__serif { color: inherit; font-size: .6em; }
.fn__lede { margin-top: 28px; font-size: 1.15rem; max-width: 44ch; }
.fn__ctas { margin-top: 30px; display: flex; gap: 10px; flex-wrap: wrap; }
.fn .btn--solid { background: var(--field-fn-fg); color: var(--field-fn); }
.fn .btn--solid:hover { background: transparent; color: var(--field-fn-fg); border-color: var(--field-fn-fg); }
.fn .btn--line { border-color: color-mix(in srgb, var(--field-fn-fg) 45%, transparent); color: var(--field-fn-fg); }
.fn__seal { position: relative; aspect-ratio: 1; max-width: 340px; justify-self: end; width: 100%; }
@media (max-width: 860px) { .fn__grid { grid-template-columns: 1fr; } .fn__seal { justify-self: start; max-width: 220px; margin-left: 40px; } }

/* seal (lib/ephemera.php qx_seal) */
.eph-seal { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; color: var(--field-fn-fg); line-height: 0; }
.eph-seal__body { position: absolute; inset: 0; z-index: 2; will-change: transform; }
.eph-seal__body svg { width: 100%; height: 100%; overflow: visible; }
.eph-seal__impression { position: absolute; inset: 4%; z-index: 1; opacity: 0; }
.eph-seal__impression svg { width: 100%; height: 100%; }
.eph-seal__impression-mark { position: absolute; left: 50%; top: 50%; width: 38%; transform: translate(-50%, -50%); filter: url(#qx-ink); fill: currentColor; }
.eph-seal__ring { font: 700 11px var(--f-mono); letter-spacing: .16em; }
.eph-seal.is-stamped .eph-seal__impression { opacity: .9; }
.eph-seal__hint { position: absolute; right: 0; bottom: -26px; font: italic 400 18px/1 var(--f-serif); }
.eph-seal:focus-visible { outline: 2px dashed currentColor; outline-offset: 8px; border-radius: 50%; }
.qx-wax { width: 100%; height: auto; }

/* ── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .ticker__track { animation: none; }
  .hx .kin__c, .hx__serif, .ticker, .hx__marks, .hx__fallback, .hx__fb-circ { animation: none; }
  .js .mf__text .w { --o: 1; }
  .pr__trace-fg { --draw: 0; }
  .cg * { animation: none !important; }
  .pr__step { --on: 1; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
@media print { body::after, .hd, .hx__stage, .ticker, .qx-wa { display: none !important; } }

/* Foundry finale: black wax pressed onto the brass field */
[data-theme="ink"] .fn { --wax-diffuse: #3b3530; --wax-spec: #fff6e0; --wax-shadow: #050403; }
/* keep the WhatsApp pill off the hero CTAs */
.in-hero .qx-wa { opacity: 0; transform: translateY(140%); pointer-events: none; }
[data-theme="paper"] .pd .btn--solid { background: #fff8f0; color: #2337c6; }
[data-theme="paper"] .pd .btn--solid:hover { background: #ffd33d; color: #141210; }
[data-theme="paper"] .qx-cms__save { background: #141210; color: #fff8f0; }

/* ── Graphic systems (js/home-gfx.js; experiments in /lab) ─────────── */
/* Survey terrain: the delivery trace runs along a generated ridge */
.pr__terrain { position: absolute; left: 0; width: 100%; top: -150px; height: 300px; overflow: visible; pointer-events: none; z-index: -1;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent), linear-gradient(transparent, #000 30%, #000 72%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent), linear-gradient(transparent, #000 30%, #000 72%, transparent);
  mask-composite: intersect; }
.pr__terrain path { fill: none; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.4s var(--ease); transition-delay: calc(var(--o) * 900ms); }
.pr__terrain.is-drawn path { stroke-dashoffset: 0; }
.tr-min path { stroke: var(--topo, var(--fg-3)); stroke-width: .7; opacity: .34; }
.tr-idx path { stroke: var(--topo-idx, var(--a1)); stroke-width: 1.2; opacity: .7; }
.tr-lab text, .tr-ref text, .tr-north text { font: 500 9px/1 var(--f-mono); letter-spacing: .12em; fill: var(--topo-idx, var(--a1)); }
.tr-lab text { paint-order: stroke; stroke: var(--bg); stroke-width: 5px; text-anchor: middle; dominant-baseline: middle; opacity: 0; transition: opacity 1s 1.6s; }
.is-drawn .tr-lab text { opacity: .9; }
.tr-ref line { stroke: var(--fg-3); } .tr-ref text { fill: var(--fg-3); }
.tr-north path { fill: var(--fg-3); }
[data-theme="paper"] .pr { --topo: #2337c6; --topo-idx: #2337c6; }
[data-theme="paper"] .tr-min path { opacity: .32; }
@media (max-width: 960px) { .pr__terrain { display: none; } }

/* Darkroom prints: two-ink screen over each portrait; the pointer develops the photo */
.tm__fig { position: relative; }
.tm__dz { position: absolute; pointer-events: none; image-rendering: pixelated; --r: 0px;
  -webkit-mask: radial-gradient(circle var(--r) at var(--mx, 50%) var(--my, 40%), transparent 96%, #000 100%);
  mask: radial-gradient(circle var(--r) at var(--mx, 50%) var(--my, 40%), transparent 96%, #000 100%);
  transition: --r .6s var(--ease); }
@property --r { syntax: '<length>'; inherits: false; initial-value: 0px; }
.has-dz img { transform: none !important; }
.tm__p:hover .tm__dz { --r: 92px; }
@media (hover: none) { .tm__p:focus-within .tm__dz { --r: 999px; } }

/* Security rosette: engine-turned guilloché behind the seal, two plates off-register */
.fn__seal { isolation: isolate; }
.fn__rose { position: absolute; left: 50%; top: 50%; width: 250%; height: 250%; max-width: none; translate: -50% -50%; z-index: -1; overflow: visible; pointer-events: none; }
.gr-plate { transform: rotate(var(--spin, 0deg)); transform-origin: 0 0; }
.gr-plate--b { transform: translate(5px, 3px) rotate(calc(var(--spin, 0deg) * -1 + 3deg)); }
.fn__rose path { fill: none; stroke: currentColor; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.8s var(--ease); transition-delay: calc(var(--i) * 40ms); }
.fn__rose.is-drawn path { stroke-dashoffset: 0; }
.gr-plate--a { color: color-mix(in srgb, var(--field-fn-fg) 46%, transparent); }
.gr-plate--b { color: color-mix(in srgb, var(--fg-on-field, #fff8f0) 30%, transparent); mix-blend-mode: overlay; }
.gr-band path, .gr-inner path { stroke-width: .75; } .gr-core path { stroke-width: .6; } .gr-rim path { stroke-width: 1.4; }
[data-theme="ink"] .gr-plate--b { color: rgba(255, 106, 43, .35); mix-blend-mode: normal; }
@media (prefers-reduced-motion: reduce) { .pr__terrain path, .fn__rose path { transition: none; stroke-dashoffset: 0; } .tr-lab text { transition: none; } }
@media (max-width: 860px) { .fn__rose { width: 150%; height: 150%; } .fn__seal { margin-top: 24px; } }

/* ── 09 · Sectors: a fitted index; a tile opens to the full row, the rest re-flow ── */
.sx__head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 32px; align-items: end; margin-bottom: clamp(32px, 5vw, 64px); }
.sx__head .sec-sub { justify-self: end; max-width: 40ch; }
.sx { min-height: 100svh; display: flex; align-items: center; padding: clamp(48px, 8svh, 120px) 0 !important; }
.sx > .wrap { width: 100%; }
.sx__deck { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(28px, 4vw, 72px); align-items: stretch; }
.sx__left { display: flex; flex-direction: column; gap: clamp(22px, 3vw, 36px); }
.sx__left .sx__head { display: block; margin: 0; }
.sx__left .sx__head .sec-sub { margin: 14px 0 0; justify-self: auto; padding: 0; max-width: 46ch; }
.sx__pills { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px; }
.sx__pill { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 20px 0 16px; border: 1px solid var(--line-2); border-radius: 999px; cursor: pointer;
  font: 600 clamp(.98rem, 1.15vw, 1.12rem)/1 var(--f-sans); letter-spacing: -.01em; color: var(--fg); background: transparent;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease); }
.sx__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg-3); transition: background .3s, transform .4s var(--ease); }
.sx__pill:hover { border-color: var(--fg); transform: translateY(-2px); }
.sx__pill:hover .sx__dot { background: var(--a1); transform: scale(1.3); }
.sx__pill:focus-visible { outline: 2px solid var(--a2); outline-offset: 3px; }
.sx__pill[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.sx__pill[aria-selected="true"] .sx__dot { background: var(--a1); transform: scale(1.3); }
/* All panels share one grid cell: the card is as tall as the longest brief, never scrolls inside, and keeps its height between tabs */
.sx__stage { position: relative; display: grid; border: 1px solid var(--line-2); border-radius: 18px; background: var(--bg-2); overflow: hidden; }
.sx__panel { grid-area: 1 / 1; display: flex; flex-direction: column; gap: clamp(12px, 1.9svh, 22px); padding: clamp(22px, 2.6vw, 38px); }
.sx__panel[hidden] { display: flex; visibility: hidden; pointer-events: none; }
.sx__panel:focus-visible { outline: 2px solid var(--a2); outline-offset: -4px; }
.sx__kick { display: flex; gap: 14px; color: var(--fg-3); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.sx__kick span { color: var(--a2); }
.sx__name { font: 800 clamp(2.4rem, min(4.6vw, 8svh), 4.4rem)/.9 var(--f-sans); font-stretch: 72%; letter-spacing: -.035em; }
.sx__blurb { font: italic 400 clamp(1.15rem, 1.55vw, 1.5rem)/1.2 var(--f-serif); color: var(--fg); max-width: 40ch; }
.sx__needs ol { margin-top: 10px; padding: 0; list-style: none; counter-reset: nd; display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.sx__needs li { counter-increment: nd; display: grid; grid-template-columns: 28px 1fr; font-size: 14.5px; color: var(--fg-2); padding: clamp(5px, .9svh, 8px) 0; border-top: 1px solid var(--line); }
.sx__needs li::before { content: counter(nd, decimal-leading-zero); font: 500 11px/1.6 var(--f-mono); color: var(--a2); }
.sx__plan { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.sx__plan-t { margin: 8px 0 0; font-weight: 600; font-size: 1.02rem; max-width: 36ch; }
.sx__panel:not([hidden]) > * { animation: fade-up .6s var(--ease) backwards; }
.sx__panel > :nth-child(2) { animation-delay: .05s; } .sx__panel > :nth-child(3) { animation-delay: .1s; } .sx__panel > :nth-child(4) { animation-delay: .15s; } .sx__panel > :nth-child(5) { animation-delay: .2s; }
@media (max-width: 960px) { .sx { min-height: 0; } .sx__deck { grid-template-columns: 1fr; } .sx__stage { min-height: 0; } }
@media (max-width: 860px) { .sx__head { grid-template-columns: 1fr; } .sx__head .sec-sub { justify-self: start; } .sx__needs ol { grid-template-columns: 1fr; } .sx__pill { min-height: 40px; padding: 0 14px 0 12px; } }


/* ── Hero registration marks (paper) ── */
.hx__marks { position: absolute; inset: 82px 14px 70px; pointer-events: none; z-index: -1; display: none; }
[data-theme="paper"] .hx__marks { display: block; }
.hx__marks i { position: absolute; width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(20,18,16,.5);
  background: linear-gradient(rgba(20,18,16,.5), rgba(20,18,16,.5)) 50% 50% / 1px 150% no-repeat, linear-gradient(rgba(20,18,16,.5), rgba(20,18,16,.5)) 50% 50% / 150% 1px no-repeat; }
.hx__marks i:nth-child(1) { left: 0; top: 0; } .hx__marks i:nth-child(2) { right: 0; top: 0; } .hx__marks i:nth-child(3) { left: 0; bottom: 0; } .hx__marks i:nth-child(4) { right: 0; bottom: 0; }
.hx__marks i:nth-child(4)::after { content: ""; position: absolute; right: 44px; top: 8px; width: 120px; height: 11px; background: linear-gradient(90deg, #141210 0 16.6%, #2337c6 0 33.3%, #e2401f 0 50%, #ffd33d 0 66.6%, rgba(20,18,16,.5) 0 83.3%, rgba(20,18,16,.18) 0); }
@media (max-width: 860px) { .hx__marks { display: none !important; } }

/* Sectors on short laptop screens (≤ 820px tall, two columns): tighter card so the deck fits one screen */
@media (min-width: 961px) and (max-height: 820px) {
  .sx__panel { padding: 22px 28px; gap: 12px; }
  .sx__blurb { font-size: 1.12rem; }
  .sx__needs li { font-size: 13.5px; padding: 5px 0; }
  .sx__plan { padding-top: 12px; }
  .sx__left { gap: 18px; }
  .sx__left .sx__head .sec-title { font-size: clamp(2.2rem, 8.5svh, 4.6rem); }
}
