/* Headquarters by XBuild — homepage.
   Spec: docs/headquarters-style-guide.md. Six chapters, two marks, three motions. */

/* ---------- tokens ---------- */
.hq {
  --ink: #0f0f0f;
  --paper: #f0ece8;
  --stone: #dbd6ce;
  --yellow: #fdc23e;
  --brass: #a57c45;
  --text-2-paper: #5b574f;
  --text-2-ink: #a9a398;
  --glass: rgba(15, 15, 15, .72);
  --glass-line: rgba(240, 236, 232, .16);

  --sans: var(--_typography---font--primary-family, Switzer, Arial, sans-serif);
  --wrap: 90rem;
  --gutter: clamp(1rem, 6.25vw, 5.625rem);
  --section: clamp(6rem, 11vw, 10rem);
  --ease: cubic-bezier(.2, .7, .2, 1);

  background: var(--paper);
}

/* ---------- base ---------- */
.hq-section { padding-block: var(--section); background: var(--paper); color: var(--ink); }
.hq-section--ink { background: var(--ink); color: var(--paper); }
.hq-wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); box-sizing: border-box; }
.hq-section :is(h1, h2, h3, p, ul, figure, blockquote) { margin: 0; }
.hq-section ul { list-style: none; padding: 0; }
.hq-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.hq-label { display: flex; align-items: center; gap: .8rem; font: 600 .74rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--text-2-paper); padding-top: .7rem; align-self: start; }
.hq-label::before { content: ""; width: 2rem; height: 1px; background: var(--brass); }
.hq-section--ink .hq-label { color: var(--text-2-ink); }
.hq-h2 { font: 600 clamp(2rem, 3.6vw, 3.25rem)/1.06 var(--sans); letter-spacing: -.025em; max-width: 20ch; text-wrap: balance; }

.hq-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: 0 1.6rem; border-radius: 999px; font: 600 1rem/1 var(--sans); text-decoration: none; background: var(--yellow); color: var(--ink); transition: background .2s var(--ease), color .2s var(--ease); }
.hq-btn:hover { background: var(--ink); color: var(--yellow); }
.hq-section--ink .hq-btn:hover { background: var(--paper); color: var(--ink); }
.hq-btn:focus-visible, .hq-link:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }
.hq-link { color: inherit; font: 600 .95rem/1.4 var(--sans); text-decoration: none; border-bottom: 1px solid var(--brass); padding-bottom: .15rem; }

/* ---------- lockup (the artifact's nameplate) ---------- */
.hq-lockup { --lk: clamp(11px, 1.45vw, 20px); display: inline-flex; flex-direction: column; align-items: center; gap: .55em; font-size: var(--lk); color: var(--ink); }
.hq-lockup__rule { width: 62%; height: 1px; background: var(--brass); }
.hq-lockup__name { font: 600 2.3em/1 var(--sans); letter-spacing: .34em; text-transform: uppercase; margin-right: -.34em; }
.hq-lockup__by { display: flex; align-items: center; gap: .5em; font: 500 1em/1 var(--sans); letter-spacing: .04em; color: var(--text-2-paper); }
.hq-lockup__by img { height: 1.25em; width: auto; }

/* Navigation uses the shared site component without page-specific overrides. */

/* ---------- 1 · arrival ---------- */
.hq-hero { padding-top: clamp(5.6rem, 10vh, 6.75rem); padding-bottom: clamp(2rem, 5vw, 4rem); text-align: center; overflow: hidden; }
.hq-hero__title { margin-top: clamp(.9rem, 1.9vh, 1.25rem) !important; font: 600 clamp(2.5rem, 4.7vw, 4.4rem)/1.02 var(--sans); letter-spacing: -.035em; }
.hq-hero__actions { margin-top: clamp(.9rem, 1.9vh, 1.25rem); }

.hq-hero > .hq-wrap { opacity: calc(1 - var(--h, 0)); transform: translateY(calc(var(--h, 0) * -28px)); }
.hq-hero .hq-lockup { opacity: clamp(0, calc(1 - var(--h, 0) * 2.6), 1); }
.hq-veil { position: fixed; inset: 0 0 auto 0; height: 112px; z-index: 999; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 60%, rgba(240, 236, 232, 0) 100%); }

/* The film: native 2.39:1, never cropped. At rest it is scaled to the content width (--k < 1, set by
   headquarters.js); it grows to full-bleed by scale, so nothing is clipped. */
.hq-film { --k: 1; --r: 0px; position: relative; width: 100%; aspect-ratio: 2206 / 924; margin-top: clamp(1.25rem, 2.6vh, 1.75rem); }
.hq-film__stage { position: absolute; inset: 0; overflow: hidden; background: #222; transform-origin: 50% 0; transform: scale(var(--k)); border-radius: calc(var(--r) / var(--k)); }
.hq-film__stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hq-film__mobile { display: none; }

/* live prompts (cue timings from headquarters-hero-video-brief.md) */
.hq-cue { position: absolute; left: 4%; bottom: 9%; width: min(36%, 31rem); box-sizing: border-box; display: flex; gap: .7em; align-items: flex-start; padding: .9em 1.1em; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--paper); font: 400 clamp(.8rem, 1.1vw, 1.05rem)/1.45 var(--sans); text-align: left; opacity: 0; transform: translateY(8px); transition: opacity .35s var(--ease), transform .45s var(--ease); }
.hq-cue.is-on { opacity: 1; transform: none; }
.hq-cue.is-sent { opacity: 0; transform: translate(60%, -80%) scale(.4); }
.hq-cue svg { flex: none; width: 1em; margin-top: .25em; fill: var(--yellow); }
.hq-cue__text::after { content: ""; display: inline-block; width: 1px; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: var(--yellow); animation: hq-caret 1s steps(1) infinite; }
.hq-cue.is-typed .hq-cue__text::after { display: none; }
@keyframes hq-caret { 50% { opacity: 0; } }
.hq-pills { position: absolute; top: 4%; right: 2.5%; display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; }
.hq-pill { display: none; align-items: center; gap: .55em; padding: .5em .85em; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--paper); font: 500 clamp(.74rem, 1vw, .95rem)/1 var(--sans); white-space: nowrap; animation: hq-in .4s var(--ease); }
.hq-pill.is-on { display: inline-flex; }
.hq-pill__dot { width: .55em; height: .55em; border-radius: 50%; background: var(--yellow); animation: hq-pulse 1.4s ease-in-out infinite; }
.hq-pill.is-done .hq-pill__dot { width: auto; height: auto; border-radius: 0; background: none; animation: none; color: var(--yellow); }
.hq-pill.is-done .hq-pill__dot::before { content: "✓"; font-weight: 700; }
@keyframes hq-pulse { 50% { opacity: .35; transform: scale(.8); } }
@keyframes hq-in { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- below the fold: the Palantir model in our kit ----------
   Every section opens with a split intro (hairline draws in; title left, paragraph right). */
.hq-section + .hq-section:not(.hq-section--ink) { border-top: 1px solid var(--stone); }
.hq-intro { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.5rem clamp(2rem, 6vw, 6rem); padding-top: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: clamp(3rem, 6vw, 5rem); }
.hq-hairline { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--brass); transform-origin: 0 50%; }
.hq-js .hq-hairline { transform: scaleX(0); transition: transform 1.2s var(--ease); }
.hq-js .hq-intro.is-in .hq-hairline { transform: scaleX(1); }
.hq-intro__lead { display: grid; gap: 1.25rem; align-content: start; }
.hq-intro__title { font: 600 clamp(2.1rem, 3.9vw, 3.6rem)/1.04 var(--sans); letter-spacing: -.03em; max-width: 18ch; text-wrap: balance; }
.hq-intro__body { display: grid; gap: 1rem; align-content: end; font: 400 clamp(1.05rem, 1.3vw, 1.2rem)/1.55 var(--sans); color: var(--text-2-paper); max-width: 34rem; }
.hq-section--ink .hq-intro__body { color: var(--text-2-ink); }
.hq-intro__note { font-size: .85rem; }
.hq-split-char { display: inline-block; }

/* 2 · mosaic of product surfaces */
.hq-mosaic { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: clamp(9rem, 15vw, 14rem); gap: clamp(.6rem, 1vw, .9rem); }
.hq-tile { position: relative; overflow: hidden; border-radius: 18px; background: #1a1a1a; }
.hq-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.hq-tile:hover img { transform: scale(1.03); }
.hq-tile--rex { grid-column: span 7; grid-row: span 2; }
.hq-tile--field, .hq-tile--supplement { grid-column: span 5; }
.hq-tile--moisture, .hq-tile--change, .hq-tile--ar { grid-column: span 4; }
.hq-chip { position: absolute; left: .8rem; bottom: .8rem; padding: .45rem .7rem; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--paper); font: 500 .76rem/1 var(--sans); letter-spacing: .02em; }
.hq-rexline { position: absolute; left: 1.2rem; bottom: 1.2rem; max-width: 24rem; padding: 1.1rem 1.25rem; border-radius: 14px; background: var(--glass); border: 1px solid var(--glass-line); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--paper); }
.hq-rexline__who { display: block; font: 600 .7rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2-ink); margin-bottom: .6rem; }
.hq-rexline__text { font: 400 clamp(.95rem, 1.2vw, 1.12rem)/1.45 var(--sans); }

/* 3 · the Operator diagram: stack → record → rules → Rex, with live question traces */
.hq-op { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.hq-op__q { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 1rem 2rem; align-items: center; padding: 1.25rem 1.5rem; border-radius: 18px; background: var(--ink); color: var(--paper); }
.hq-op__qhead { flex-direction: column; align-items: flex-start; }
.hq-op__fine { grid-column: 2; }
.hq-op__qhead { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.hq-op__qlabel { font: 600 .7rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2-ink); }
.hq-op__dots { display: flex; gap: .3rem; }
.hq-op__dot { appearance: none; cursor: pointer; padding: .3rem .45rem; border-radius: 6px; border: 1px solid rgba(240, 236, 232, .18); background: transparent; color: var(--text-2-ink); font: 500 .7rem/1 var(--sans); }
.hq-op__dot[aria-current="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.hq-op__dot:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.hq-op__traces { list-style: none; margin: 0; padding: 0; min-height: 5.5rem; }
.hq-op__trace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem 1.5rem; align-items: center; animation: hq-in .45s var(--ease); }
.hq-op__trace[hidden] { display: none; }
.hq-op__ask { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 12px; background: rgba(240, 236, 232, .07); border: 1px solid rgba(240, 236, 232, .14); font: 500 clamp(1rem, 1.25vw, 1.15rem)/1.4 var(--sans); }
.hq-op__ask svg { flex: none; width: 1em; margin-top: .2em; fill: var(--yellow); }
.hq-op__ans { display: grid; gap: .35rem; padding-left: 1rem; border-left: 2px solid var(--brass); font: 400 .98rem/1.5 var(--sans); color: rgba(240, 236, 232, .86); }
.hq-op__ans b { font: 600 .68rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.hq-op__fine { font: 400 .75rem/1.45 var(--sans); color: var(--text-2-ink); }
.hq-op__stage { position: relative; }
.hq-op__art { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--sans); }
.hq-op__mobile { display: none; }

.hq-op__art text { font-family: var(--sans); }
/* the terrace: lit parts rise and turn yellow; wires brighten and carry a flow */
.hq-op .hq-mod, .hq-op .hq-tile, .hq-op .hq-tag { transition: transform .5s var(--ease); }
.hq-op .hq-mod.is-lit, .hq-op .hq-tile.is-lit { transform: translateY(-6px); }
.hq-op .hq-tag.is-lit { transform: translateY(-6px); }
.hq-op .is-lit > .b-t { fill: url(#litg); }
.hq-op .hq-guard > .b-t { transition: fill .4s var(--ease); }
.hq-op .hq-guard.is-lit > .b-t { fill: #E9C48A; }
.hq-op .wire { fill: none; stroke: #B48C55; stroke-width: 1.3; stroke-linejoin: round; stroke-linecap: round; transition: stroke .4s var(--ease), stroke-width .4s var(--ease); }
.hq-op .hq-wires.is-lit .wire { stroke: #E8A91E; stroke-width: 2; stroke-dasharray: 7 9; animation: hq-flow 1.1s linear infinite; }
@keyframes hq-flow { to { stroke-dashoffset: -32; } }
.hq-callout__lead { fill: none; stroke: #B48C55; stroke-width: 1.2; transition: stroke-width .3s var(--ease); }
.hq-callout__pin { fill: #B48C55; stroke: #8A6532; stroke-width: .6; }
.hq-callout__disc { fill: #F4F0EA; stroke: #D9D2C7; stroke-width: 1; transition: fill .35s var(--ease); }
.hq-callout.is-lit .hq-callout__disc, .hq-callout.is-lit .hq-callout__pin { fill: var(--yellow); }
.hq-callout.is-lit .hq-callout__lead { stroke-width: 2; }
.hq-tag rect { fill: #fff; stroke: #D9D2C7; stroke-width: 1; transition: fill .35s var(--ease); }
.hq-tag.is-lit rect { fill: var(--ink); stroke: var(--ink); }
.hq-tag.is-lit .t-tag { fill: var(--paper); }
.hq-verb rect { fill: #FBF9F6; stroke: #D9D2C7; stroke-width: 1; transition: fill .35s var(--ease); }
.hq-verb__lead { fill: none; stroke: #C9C1B5; stroke-width: 1; stroke-dasharray: 3 4; }
.hq-verb.is-lit rect { fill: var(--ink); stroke: var(--ink); }
.hq-verb.is-lit .t-verb { fill: var(--yellow); }
.hq-verb.is-lit .hq-verb__lead { stroke: var(--brass); stroke-width: 1.6; stroke-dasharray: none; }
.hq-rexglow { opacity: .7; }
.t-face { font: 600 11.5px/1 var(--sans); letter-spacing: .2em; fill: #CFC7BB; }
.t-lane { font: 600 14px/1 var(--sans); fill: #0f0f0f; }
.t-sys { font: 400 12.5px/1 var(--sans); fill: #5b574f; }
.t-tag { font: 600 12px/1 var(--sans); fill: #0f0f0f; }
.t-verb { font: 600 11.5px/1 var(--sans); letter-spacing: .16em; fill: #0f0f0f; }

/* everything in the drawing is clickable */
.hq-op .hq-hit { cursor: pointer; outline: none; }
.hq-op .hq-mod.hq-hit:hover > .b-t, .hq-op .hq-tile.hq-hit:hover > .b-t, .hq-op .hq-hit:focus-visible > .b-t { stroke: var(--brass); stroke-opacity: 1; stroke-width: .05; }
.hq-op .hq-verb.hq-hit:hover rect, .hq-op .hq-verb.hq-hit:focus-visible rect,
.hq-op .hq-tag.hq-hit:hover rect, .hq-op .hq-tag.hq-hit:focus-visible rect { stroke: var(--ink); stroke-width: 1.4; }
.hq-op .hq-callout.hq-hit:hover .hq-callout__disc, .hq-op .hq-callout.hq-hit:focus-visible .hq-callout__disc { stroke: var(--brass); stroke-width: 2; }
.hq-op .hq-op__key li.hq-hit:hover, .hq-op .hq-op__key li.hq-hit:focus-visible { opacity: 1; }
.hq-op .hq-op__key li.hq-hit:focus-visible, .hq-op .hq-mchip.hq-hit:focus-visible, .hq-op .hq-mlayer--guard.hq-hit:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.hq-op .hq-mchip.hq-hit:hover { border-color: var(--ink); }

/* key: the four layers, read left to right as data moves up the terrace */
.hq-op__key { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--stone); }
.hq-op__key li { position: relative; display: grid; grid-template-columns: auto 1fr; gap: .8rem; padding: 1.1rem 1.2rem 1.1rem 0; transition: opacity .35s var(--ease); }
.hq-op__key li + li { padding-left: 1.2rem; border-left: 1px solid var(--stone); }
.hq-op__key li::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: transparent; transition: background .35s var(--ease); }
.hq-op__key li.is-lit::before { background: var(--yellow); }
.hq-op__key li:not(.is-lit) { opacity: .55; }
.hq-op__keyn { font: 500 .8rem/1.4 var(--sans); color: var(--brass); }
.hq-op__key h3 { font: 600 1rem/1.3 var(--sans); }
.hq-op__key p { margin-top: .3rem !important; font: 400 .9rem/1.45 var(--sans); color: var(--text-2-paper); }
.hq-js .hq-op .hq-mod, .hq-js .hq-op .hq-tile { opacity: 0; }
.hq-js .hq-op.is-in .hq-mod, .hq-js .hq-op.is-in .hq-tile { opacity: 1; transition: opacity .7s var(--ease) .2s, transform .5s var(--ease); }

/* mobile stack */
.hq-mlayer { display: grid; gap: .6rem; padding: 1rem; border-radius: 14px; background: #f7f4f1; border: 1px solid var(--stone); }
.hq-mlayer + .hq-mlayer { margin-top: .5rem; }
.hq-mlayer__t { font: 600 .68rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--text-2-paper); }
.hq-mlayer--guard { background: var(--brass); border-color: var(--brass); }
.hq-mlayer--guard .hq-mlayer__t { color: var(--paper); }
.hq-mlayer--guard.is-lit { background: #c99422; box-shadow: 0 0 0 2px var(--yellow); }
.hq-mlayer--rex { background: #e8dcc7; }
.hq-mchips { display: flex; flex-wrap: wrap; gap: .35rem; }
.hq-mchip { padding: .4rem .6rem; border-radius: 8px; background: #fff; border: 1px solid var(--stone); font: 500 .78rem/1.2 var(--sans); transition: background .35s var(--ease); }
.hq-mchip.is-lit { background: var(--yellow); border-color: #c99422; }

/* 4 · use-case tabs */
.hq-tabs__list { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.hq-tabs__tab { appearance: none; cursor: pointer; padding: .7rem 1.1rem; border-radius: 999px; border: 1px solid rgba(15, 15, 15, .22); background: transparent; color: var(--ink); font: 500 .95rem/1 var(--sans); transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.hq-tabs__tab:hover { border-color: var(--ink); }
.hq-tabs__tab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.hq-tabs__tab:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.hq-tabs__panel { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; animation: hq-in .5s var(--ease); }
.hq-tabs__panel[hidden] { display: none; }
.hq-tabs__name { display: flex; align-items: center; gap: .8rem; padding: 1.1rem 1.3rem; border: 1px solid var(--ink); border-radius: 14px; font: 600 clamp(1.4rem, 2.3vw, 2.1rem)/1.1 var(--sans); letter-spacing: -.02em; }
.hq-tabs__name span { flex: none; width: .7em; height: .7em; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 1px var(--ink); }
.hq-tabs__desc { font: 400 1.05rem/1.55 var(--sans); color: var(--text-2-paper); }
.hq-tabs__caps { display: grid; gap: 1.4rem; }
.hq-tabs__caps li { padding-top: .9rem; border-top: 1px solid var(--stone); }
.hq-tabs__caps h3 { font: 600 1.25rem/1.2 var(--sans); letter-spacing: -.01em; }
.hq-tabs__caps p { margin-top: .4rem !important; font: 400 .95rem/1.5 var(--sans); color: var(--text-2-paper); }

/* modes variant: head | capabilities | asked by owners */
.hq-tabs__panel--modes { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); }
.hq-tabs__head { display: grid; gap: 1rem; align-content: start; }
.hq-tabs__line { font: 600 clamp(1.3rem, 1.9vw, 1.7rem)/1.15 var(--sans); letter-spacing: -.02em; }
.hq-tabs__asks { display: grid; gap: .8rem; align-content: start; padding: 1.1rem; border-radius: 14px; background: var(--ink); color: var(--paper); }
.hq-tabs__askl { font: 600 .68rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--brass); }
.hq-tabs__ask { font: 400 .98rem/1.45 var(--sans); }
.hq-tabs__ask + .hq-tabs__ask { padding-top: .8rem; border-top: 1px solid rgba(240, 236, 232, .14); }

/* 5–7 · proof band (ink) */
.hq-proof .hq-hairline { background: var(--brass); }
.hq-stepper { position: relative; }
/* Proof steps, measured from the reference at 1440px:
   - each step is a two-column grid (563 : 657, 40px gap);
   - the left header (index row + title) is sticky with 106px top padding;
   - the card starts 240px down: 40px padding, 1px solid border, 10px radius, min-height 369px;
   - title 72/77px at -0.03em; metric lines 24/33px, 20px apart;
   - 143px between steps. Steps scroll naturally; only the header sticks. */
.hq-step { display: grid; grid-template-columns: minmax(0, 563fr) minmax(0, 657fr); column-gap: 40px; align-items: start; }
.hq-step + .hq-step { margin-top: 143px; }
.hq-step__head { position: sticky; top: -1px; padding-top: 106px; align-self: start; }
.hq-step__index { position: relative; display: flex; align-items: center; gap: 24px; height: 28px; margin-bottom: 39px; }
.hq-step__line { position: absolute; left: 4px; right: 4px; top: 50%; height: 1px; background: rgba(240, 236, 232, .33); }
.hq-step__item { position: relative; display: flex; }
.hq-step__item.is-active { flex: 1 1 auto; }
.hq-step__num { padding: 0 5px; background: var(--ink); font: 400 20px/1 var(--sans); color: rgba(240, 236, 232, .33); }
.hq-step__item.is-active .hq-step__num { color: var(--paper); }
.hq-step__item.is-active .hq-step__num::before { content: "["; }
.hq-step__item.is-active .hq-step__num::after { content: "]"; }
.hq-step__n { display: none; }
.hq-step__title { font: 500 72px/77px var(--sans); letter-spacing: -.03em; color: var(--paper); text-wrap: balance; }
.hq-step__card { margin-top: 240px; box-sizing: border-box; min-height: 369px; display: flex; flex-direction: column; gap: 20px; padding: 40px; border: 1px solid var(--paper); border-radius: 10px; font: 400 24px/33.33px var(--sans); color: var(--paper); }
.hq-step__who { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-top: auto !important; padding-top: 20px; border-top: 1px solid rgba(240, 236, 232, .16); font: 400 15px/1.4 var(--sans); color: var(--text-2-ink); }
.hq-step__who .hq-link { color: var(--paper); font-size: .85rem; }
.hq-fine { margin-top: 1.5rem !important; font: 400 .8rem/1.5 var(--sans); color: var(--text-2-ink); }

.hq-logos { margin-top: clamp(4rem, 8vw, 7rem); padding-block: clamp(2rem, 4vw, 3rem); border-block: 1px solid rgba(165, 124, 69, .55); }
.hq-logos__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 2rem; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.hq-logos__title { font: 600 clamp(1.3rem, 2vw, 1.75rem)/1.2 var(--sans); letter-spacing: -.015em; }
.hq-logos__sub { font: 400 .95rem/1.4 var(--sans); color: var(--text-2-ink); }
.hq-marquee { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); margin-inline: calc(var(--gutter) * -1); overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.hq-marquee__row { display: flex; width: max-content; animation: hq-marquee 70s linear infinite; }
.hq-marquee__row:nth-child(2) { animation-direction: reverse; animation-duration: 80s; }
.hq-marquee:hover .hq-marquee__row { animation-play-state: paused; }
.hq-marquee .hq-marquee__track { display: flex; align-items: center; gap: clamp(3rem, 5vw, 4.75rem); padding-right: clamp(3rem, 5vw, 4.75rem); list-style: none; margin: 0; }
.hq-marquee__track li { flex: none; display: flex; align-items: center; height: 3.5rem; }
.hq-marquee__track img { width: auto; height: auto; max-height: 3.4rem; max-width: 15rem; filter: invert(1); opacity: .62; transition: opacity .2s var(--ease); }
.hq-marquee__track img:hover { opacity: 1; }
@keyframes hq-marquee { to { transform: translateX(-50%); } }

.hq-voices { margin-top: clamp(4rem, 8vw, 7rem); }
.hq-voices__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem 2rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.hq-voices__title { font: 600 clamp(1.8rem, 3.2vw, 2.8rem)/1.08 var(--sans); letter-spacing: -.025em; }
.hq-voices__nav { display: flex; align-items: center; gap: .8rem; font: 500 .9rem/1 var(--sans); color: var(--text-2-ink); }
.hq-round { appearance: none; -webkit-appearance: none; cursor: pointer; display: inline-grid; place-items: center; flex: none; box-sizing: border-box; width: 2.75rem; height: 2.75rem; min-width: 0; min-height: 0; margin: 0; padding: 0; border-radius: 50%; border: 1px solid rgba(240, 236, 232, .35); background: transparent; color: var(--paper); line-height: 0; text-align: center; -webkit-tap-highlight-color: transparent; transition: background .2s var(--ease), color .2s var(--ease); }
.hq-round svg { display: block; width: 1.15rem; height: 1.15rem; }
@media (hover: hover) { .hq-round:hover { background: var(--paper); color: var(--ink); } }
.hq-round:active { background: var(--paper); color: var(--ink); }
.hq-round:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.hq-voices__track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(18rem, 26rem); gap: clamp(.75rem, 1.5vw, 1.25rem); list-style: none; padding: 0 0 .5rem; margin: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hq-voices__track::-webkit-scrollbar { display: none; }
.hq-voices__track:focus-visible { outline: 2px solid var(--brass); outline-offset: 4px; }
.hq-qcard { scroll-snap-align: start; text-align: left; }
.hq-qcard figure { height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: 1.5rem; padding: 1.5rem 1.6rem 1.6rem; border-radius: 18px; background: #1b1a19; border: 1px solid rgba(240, 236, 232, .08); }
.hq-qcard__top { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(240, 236, 232, .12); font: 600 .7rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2-ink); }
.hq-qcard__n { color: var(--brass); }
.hq-qcard__co { text-align: right; }
.hq-qcard blockquote p { font: 400 clamp(1.05rem, 1.3vw, 1.2rem)/1.5 var(--sans); color: var(--paper); }
.hq-qcard figcaption { text-align: left; font: 400 .9rem/1.4 var(--sans); color: var(--text-2-ink); }
.hq-qcard figcaption b { color: var(--paper); font-weight: 600; }

/* 8 · customer stories */
.hq-stories { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.hq-story { display: grid; grid-template-rows: auto auto auto 1fr auto; gap: .7rem; color: var(--ink); text-decoration: none; }
.hq-story__media { display: block; overflow: hidden; border-radius: 14px; aspect-ratio: 4 / 3; background: var(--stone); }
.hq-story__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.hq-story:hover .hq-story__media img { transform: scale(1.04); }
.hq-story__label { margin-top: .4rem; font: 600 .68rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2-paper); }
.hq-story__title { font: 600 1.3rem/1.2 var(--sans); letter-spacing: -.015em; }
.hq-story__dek { font: 400 .95rem/1.5 var(--sans); color: var(--text-2-paper); }
.hq-story__go { font: 600 .9rem/1 var(--sans); padding-top: .3rem; }
.hq-story:hover .hq-story__go { color: var(--brass); }
.hq-story--all { align-content: end; padding: 1.5rem; border-radius: 14px; background: var(--ink); color: var(--paper); grid-template-rows: 1fr auto; }
.hq-story--all .hq-story__title { font-size: 1.6rem; max-width: 9ch; }
.hq-story--all .hq-story__go { font-size: 1.6rem; color: var(--yellow); }

/* ---------- 6 · close ---------- */
.hq-close { position: relative; overflow: hidden; text-align: center; padding-block: clamp(8rem, 16vw, 13rem); }
.hq-close__bg { position: absolute; inset: 0; }
.hq-close__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hq-close__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--ink) 0%, rgba(15, 15, 15, .3) 45%, var(--ink) 100%); }
.hq-close__inner { position: relative; display: grid; justify-items: center; gap: 2rem; }
.hq-close__seal { width: clamp(4rem, 6vw, 5.25rem); height: auto; }
.hq-close .hq-h2 { max-width: 17ch; }

/* off-screen sections pause their animations (toggled by headquarters.js) */
.hq-section.is-off *, .hq-section.is-off *::before, .hq-section.is-off *::after { animation-play-state: paused !important; }

/* ---------- chapter entry: one fade-up ---------- */
.hq-js .hq-reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.hq-js .hq-reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 991px) {
  .hq-intro, .hq-op, .hq-step { grid-template-columns: 1fr; }
  .hq-step { grid-template-columns: 1fr; }
  .hq-step__head { position: static; padding-top: 0; }
  .hq-step__title { font-size: clamp(2.4rem, 7vw, 3.6rem); line-height: 1.07; }
  .hq-step__card { margin-top: 2rem; min-height: 0; padding: 28px; font-size: 20px; line-height: 1.4; }
  .hq-step + .hq-step { margin-top: 5rem; }
  .hq-op__q, .hq-op__trace { grid-template-columns: 1fr; }
  .hq-op__key { grid-template-columns: 1fr 1fr; }
  .hq-op__key li:nth-child(3) { border-left: 0; padding-left: 0; }
  .hq-op__fine { grid-column: auto; }
  .hq-tabs__panel--modes { grid-template-columns: 1fr 1fr; }
  .hq-tabs__panel--modes .hq-tabs__head { grid-column: 1 / -1; }
  .hq-intro__body { align-content: start; }
  .hq-tabs__panel { grid-template-columns: 1fr 1fr; }
  .hq-tabs__caps { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
  .hq-stories { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767px) {
  .hq-hero { padding-top: 6.25rem; }
  .hq-film { aspect-ratio: 4 / 5; }
  .hq-film__desktop { display: none; }
  .hq-film__mobile { display: block; }
  .hq-cue { left: 4%; right: 4%; bottom: 4%; width: auto; font-size: .82rem; }
  .hq-cue.is-sent { transform: translate(0, -120%) scale(.6); }
  .hq-film__stage video { object-position: 50% 50%; }
  .hq-pills { top: 3%; right: 3%; }
  .hq-pill { font-size: .66rem; }
  .hq-mosaic { grid-template-columns: 1fr 1fr; grid-auto-rows: 8.5rem; }
  .hq-tile--rex { grid-column: 1 / -1; grid-row: span 3; }
  .hq-tile--field, .hq-tile--supplement { grid-column: 1 / -1; grid-row: span 1; }
  .hq-tile--moisture, .hq-tile--change, .hq-tile--ar { grid-column: span 1; }
  .hq-tile--ar { grid-column: 1 / -1; }
  .hq-rexline { left: .75rem; right: .75rem; bottom: .75rem; }
  .hq-chip { font-size: .68rem; }
  .hq-op__art { display: none; }
  .hq-op__key { grid-template-columns: 1fr; }
  .hq-op__key li, .hq-op__key li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--stone); }
  .hq-op__mobile { display: block; }
  .hq-op__traces { min-height: 13rem; }
  .hq-tabs__panel--modes { grid-template-columns: 1fr; }
  .hq-marquee__track img { max-height: 2.4rem; max-width: 10rem; }
  .hq-marquee .hq-marquee__track { gap: 2.25rem; padding-right: 2.25rem; }
  .hq-tabs__list { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .hq-tabs__tab { flex: none; }
  .hq-tabs__panel, .hq-tabs__caps { grid-template-columns: 1fr; }
  .hq-step__index { display: none; }
  .hq-step__card { padding: 22px; font-size: 18px; }
  .hq-step + .hq-step { margin-top: 3.5rem; }
  .hq-step__n { display: block; font: 500 .9rem/1 var(--sans); color: var(--brass); margin-bottom: .9rem !important; }
  .hq-voices__track { grid-auto-columns: 84%; }
  .hq-stories { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .hq-js .hq-reveal { opacity: 1; transform: none; transition: none; }
  .hq-cue, .hq-pill, .hq-pill__dot, .hq-cue__text::after { animation: none; transition: none; }
  .hq-marquee__row { animation: none; width: auto; }
  .hq-op .hq-wires.is-lit .wire { animation: none; stroke-dasharray: none; }
  .hq-op .hq-mod, .hq-op .hq-tile, .hq-op .hq-tag { transition: none; }
  .hq-marquee__track { flex-wrap: wrap; justify-content: center; gap: 2rem 3rem; padding: 0; }
  .hq-marquee__track[aria-hidden] { display: none; }
  .hq-js .hq-hairline { transform: none; }
}
