/* ARC Edge statement hero — the PROLOGUE of the scan section on 3.0b (source: arc-scan/hero-terrain.html).
   The scan section reserves a lead-in (data-lead, vh) and the hero is an overlay inside its sticky
   stage: the sentence is acquired through the operator's HUD, then a diamond wipe opens from the
   words onto the scan's first frame beneath, and the scan's headline fades in. Tokens, the stage,
   the link-state panel and the cue come from scan.css; everything the hero adds is scoped to
   .hx-embed. The look-test chrome (rail, captions, play) is out. */

.sc-embed.has-prologue { height: 1220vh; }   /* 1100vh of scan + the 120vh lead-in */

.hx-embed {
  --halo-acc: 0 0 10px rgba(247,102,17,.55), 0 0 28px rgba(247,102,17,.25);
  --hud-top: 96px;   /* the HUD's top row clears the site nav */
  position: absolute; inset: 0; z-index: 6; pointer-events: none; will-change: opacity;
}
.hx-embed.is-done, .hx-embed.is-static { display: none; }

/* the scan beneath: its headline, scrim, panel and cue ride in on the crossfade (--hxf, set by
   hero.js from scroll), then the normal rules take over once the prologue is done */
.sc-embed.is-prologue .sc-h.is-on { opacity: var(--hxf, 0); transform: translateY(calc((1 - var(--hxf, 0)) * 16px)); transition: none; }
.sc-embed.is-prologue .sc-h:not(.is-on) { opacity: 0; }
.sc-embed.is-prologue .sc-scrim { opacity: var(--hxf, 0); transition: none; }
.sc-embed.is-prologue > .sc-stage > .sc-read, .sc-embed.is-prologue > .sc-stage > .sc-cue { opacity: var(--hxf, 0); transition: none; }

/* ---- the view: canvas + HUD chrome; it fades and eases forward on the crossfade ---- */
.hx-embed .sc-view { position: absolute; inset: 0; z-index: 1; overflow: hidden; background: #06090c; transform-origin: 50% 50%; will-change: transform; }
/* background: HorizonX Shader R (js/shader-r.js) in the Orb palette. It replaces the hero's own
   terrain render; if WebGL fails for it, .no-shader brings the terrain canvas back. A scrim keeps the
   HUD and the sentence legible over the shader's light fields (scrims for legibility only). */
.hx-embed .hx-shader { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hx-embed .hx-shade { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(11,11,10,.62), rgba(11,11,10,.28) 70%, rgba(11,11,10,.18)); }
.hx-embed:not(.no-shader) .sc-view > .sc-gl { display: none; }
.hx-embed.no-shader .hx-shader, .hx-embed.no-shader .hx-shade { display: none; }
.hx-embed .sc-read { transition: opacity .6s var(--ease); }
.hx-embed .sc-read.is-off { opacity: 0; }
.hx-embed .sc-state span.is-lit { text-shadow: var(--halo-ink); }

/* boot splash: the emblem at centre before the chrome powers up (opacity from hero.js) */
.hx-boot { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 14px; opacity: 0; pointer-events: none; z-index: 2; }
.hx-boot img { height: 56px; width: auto; filter: drop-shadow(0 0 14px rgba(241,241,237,.35)); }
.hx-boot .sc-lab { color: var(--dim); }
.hx-embed .hud-tl .sc-plate b { font: 700 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }

/* the sentence sits above the view and goes first; it and the intro fade up on load */
.hx-words { position: absolute; inset: 0; z-index: 3; animation: hxIn .9s var(--ease) .2s both; }

/* the first screen answers "what is this": one plain line, the button, the partners */
.hx-intro { position: absolute; left: 50%; top: 60%; z-index: 4; width: min(700px, calc(100% - 2 * var(--pad))); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; animation: hxIn .9s var(--ease) .45s both; }
.hx-intro.is-gone { pointer-events: none; }
.hx-intro__line { margin: 0; max-width: 560px; font: 400 clamp(15px, 1.15vw, 18px)/1.45 var(--sans); color: rgba(241,241,237,.86); text-shadow: 0 1px 14px rgba(11,11,10,.55); }
.hx-embed .hx-intro__cta { pointer-events: auto; display: inline-flex; align-items: center; justify-content: center; padding: 15px 24px; border-radius: 12px; background: var(--ink); color: #0B0B0A; font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; transition: background .3s var(--ease), transform .3s var(--ease); }
.hx-embed .hx-intro__cta:hover { background: #fff; transform: translateY(-1px); }
.hx-intro__cta:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
.hx-intro__logos { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 28px; margin-top: 6px; }
.hx-intro__lab { font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: rgba(241,241,237,.6); }
.hx-intro__logos img { height: 20px; width: auto; max-width: 160px; object-fit: contain; opacity: .78; }
@keyframes hxIn { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: 0 0; } }
.hx-words { animation-name: hxInWords; }
@keyframes hxInWords { from { opacity: 0; } to { opacity: 1; } }

/* ---- HUD: the operator's sensor chrome. --boot (0..1) powers the pieces up in sequence ---- */
.hx-embed .hud { position: absolute; inset: 0; pointer-events: none; opacity: 0; --boot: 0; font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.hx-embed .hud.is-on { opacity: 1; }
.hx-embed .hud-br { position: absolute; width: 30px; height: 30px; border: 1px solid var(--line-2); opacity: clamp(0, calc(var(--boot) * 5), 1); }
.hx-embed .hud-br.tl { left: calc(var(--pad) - 6px); top: var(--hud-top); border-right: 0; border-bottom: 0; }
.hx-embed .hud-br.tr { right: calc(var(--pad) - 6px); top: var(--hud-top); border-left: 0; border-bottom: 0; }
.hx-embed .hud-br.bl { left: calc(var(--pad) - 6px); bottom: calc(var(--pad) - 6px); border-right: 0; border-top: 0; }
.hx-embed .hud-br.br { right: calc(var(--pad) - 6px); bottom: calc(var(--pad) - 6px); border-left: 0; border-top: 0; }

.hx-embed .hud-az { position: absolute; left: 50%; top: calc(var(--hud-top) + 36px); width: 380px; height: 30px; transform: translateX(-50%); overflow: hidden; opacity: clamp(0, calc((var(--boot) - .35) * 5), 1);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent); }
.hx-embed .hud-azc { position: absolute; left: 50%; top: 0; height: 100%; }
.hx-embed .hud-azs { position: absolute; left: 0; top: 0; height: 100%; }
.hx-embed .hud-azs i { position: absolute; bottom: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 3px; font-style: normal; font-size: 10px; color: var(--faint); }
.hx-embed .hud-azs i::after { content: ''; width: 1px; height: 6px; background: var(--line-2); }
.hx-embed .hud-azs i.maj { color: var(--dim); }
.hx-embed .hud-azs i.maj::after { height: 10px; background: var(--dim); }
.hx-embed .hud-azi { position: absolute; left: 50%; top: 0; width: 1px; height: 100%; background: var(--ink); }

.hx-embed .hud-pl { position: absolute; left: 50%; top: 0; width: 260px; height: 100%; transform: translateX(-50%); opacity: clamp(0, calc((var(--boot) - .5) * 5), 1); }
.hx-embed .hud-pl .rung { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: center; gap: 12px; transition: opacity .3s var(--ease); }
.hx-embed .hud-pl .rung b { flex: 0 0 70px; height: 1px; background: var(--line-2); }
.hx-embed .hud-pl .rung span { font-size: 10px; color: var(--faint); min-width: 26px; text-align: center; }
.hx-embed .hud-pl .rung.hz b { flex-basis: 46vw; background: var(--ink); opacity: .6; }

.hx-embed .hud-tl, .hx-embed .hud-tr, .hx-embed .hud-bl { position: absolute; display: flex; flex-direction: column; gap: 5px; white-space: nowrap; }
.hx-embed .hud-tl { left: var(--pad); top: calc(var(--hud-top) + 40px); opacity: clamp(0, calc((var(--boot) - .15) * 5), 1); }
.hx-embed .hud-tr { right: var(--pad); top: calc(var(--hud-top) + 40px); align-items: flex-end; opacity: clamp(0, calc((var(--boot) - .25) * 5), 1); }
.hx-embed .hud-bl { left: var(--pad); bottom: calc(var(--pad) + 36px); opacity: clamp(0, calc((var(--boot) - .45) * 5), 1); }
.hx-embed .hud-tl b, .hx-embed .hud-tr b, .hx-embed .hud-bl b { font-weight: 500; color: var(--ink); }

.hx-embed .hud-sweep { position: absolute; left: 50%; top: 50%; width: 170vmax; height: 170vmax; --a: 0deg; transform: translate(-50%, -50%) rotate(var(--a)); opacity: 0; transition: opacity .3s;
  background: conic-gradient(from 270deg, rgba(255,220,170,0) 0deg, rgba(255,220,170,0) 290deg, rgba(255,220,170,.06) 345deg, rgba(255,220,170,.22) 359deg, rgba(255,220,170,0) 360deg); }
.hx-embed .hud-sweep.is-on { opacity: 1; }

.hx-embed .hud-lines { position: absolute; inset: 0; }
.hx-embed .hud-lines .ln { position: absolute; left: 0; top: 0; white-space: nowrap; font-family: var(--mono); font-weight: 500; letter-spacing: .06em; color: var(--ink); opacity: 0; text-transform: uppercase; }
.hx-embed .hud-lines .ln.is-locked { font-family: var(--sans); font-weight: 600; letter-spacing: .04em; color: var(--ink); text-shadow: var(--halo-ink); }

.hx-embed .hud-ret { position: absolute; left: 0; top: 0; opacity: 0; transition: opacity .2s, transform .38s var(--ease-k), width .38s var(--ease-k), height .38s var(--ease-k); }
.hx-embed .hud-ret.is-on { opacity: 1; }
.hx-embed .hud-ret .c { position: absolute; width: 9px; height: 9px; border: 1px solid var(--ink); }
.hx-embed .hud-ret .c.tl { left: -6px; top: -6px; border-right: 0; border-bottom: 0; }
.hx-embed .hud-ret .c.tr { right: -6px; top: -6px; border-left: 0; border-bottom: 0; }
.hx-embed .hud-ret .c.bl { left: -6px; bottom: -6px; border-right: 0; border-top: 0; }
.hx-embed .hud-ret .c.br { right: -6px; bottom: -6px; border-left: 0; border-top: 0; }
.hx-embed .hud-ret.acc .c { border-color: var(--acc); }
.hx-embed .hud-ret.is-locked .c { box-shadow: var(--halo-ink); }
.hx-embed .hud-ret.is-locked.acc .c { box-shadow: var(--halo-acc); }
.hx-embed .hud-lead { position: absolute; left: 0; top: 0; height: 1px; background: var(--line-2); transform-origin: 0 0; opacity: 0; transition: opacity .2s; }
.hx-embed .hud-lead.is-on { opacity: 1; }
.hx-embed .hud-tag { position: absolute; left: var(--pad); top: calc(var(--hud-top) + 104px); display: flex; gap: 14px; opacity: 0; transition: opacity .2s; white-space: nowrap; }
.hx-embed .hud-tag.is-on { opacity: 1; }
.hx-embed .hud-tag b { font-weight: 500; color: var(--ink); }

/* no reticle corners or leader line on the paragraph (David, 2026-11-09) */
.hx-embed .hud-ret, .hx-embed .hud-lead { display: none; }

/* the sentence as real text: for readers, search and the no-WebGL fallback */
.hx-embed .sc-sent { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; margin: 0; padding: var(--pad); text-align: center; pointer-events: none; clip: rect(0 0 0 0); clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.hx-embed.no-gl .sc-sent { clip: auto; clip-path: none; width: auto; height: auto; overflow: visible; white-space: normal; }
.hx-embed .sc-sent span { display: block; font: 600 clamp(22px, 2.2vw, 34px)/1.08 var(--sans); letter-spacing: .04em; text-transform: uppercase; }
.hx-embed .sc-sent em { font-style: normal; }
.hx-embed.no-gl .sc-view, .hx-embed.no-gl .hud, .hx-embed.no-gl .hx-words { display: none; }

@media (max-width: 767px) {
  .hx-embed { --hud-top: 84px; }
  .hx-intro { gap: 16px; }
  .hx-embed .hud-bl, .hx-embed .sc-cue { display: none; }   /* phones: room for the intro under the statement */
  .hx-intro__logos { gap: 10px 18px; }
  .hx-intro__logos img { height: 14px; }
  .hx-embed .hud-tl, .hx-embed .hud-tr { display: none; }
  .hx-embed .hud-az { width: 240px; }
  .hx-embed .hud-pl { width: 180px; }
  .hx-embed .hud-pl .rung.hz b { flex-basis: 60vw; }
  .hx-embed .hud-bl { bottom: calc(var(--pad) + 220px); }
  .hx-embed .hud-tag { top: calc(var(--hud-top) + 44px); flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-embed .sc-read, .hx-embed .hud-ret, .hx-embed .hud-tag, .hx-embed .hud-lead { transition: none; }
  .hx-words, .hx-intro { animation: none; }
}
