/* home_3d.css: the homepage 3D layer (2.49.0). Homepage only, loaded after home.css.
 *
 * A decorative stage behind the hero report: an extruded shield (nine stacked layers give it real
 * thickness), rings on a perspective floor and a scan sweep; under it a flat row naming the check areas
 * the passive assessment covers. Pure CSS: no images, no WebGL, no script needed to draw it.
 * Everything is aria-hidden and absolutely positioned, so it cannot shift layout or reach screen readers.
 * The stage is drawn in 3D for everyone; it MOVES only for visitors without a reduced-motion
 * preference, and pauses when off screen (home_motion.js adds .hx3d-off).
 */
.hx .hx3d { --s: clamp(220px, 24vw, 320px); position: relative; isolation: isolate; perspective: 1400px; padding-top: calc(var(--s) * .68); }
.hx .hx3d > .hx-sheet { position: relative; z-index: 2; }

.hx .hx3d-stage {
  --c1: #5aa9ff; --c2: #2e6fe0; --c3: #9d74ff;
  position: absolute; z-index: 1; pointer-events: none;
  width: var(--s); height: var(--s);
  right: 50%; margin-right: calc(var(--s) * -.5); top: calc(var(--s) * -0.06);
  transform-style: preserve-3d; perspective: 900px;
  transform: rotateX(var(--hx3d-rx, 0deg)) rotateY(var(--hx3d-ry, 0deg));
  transition: transform .4s ease-out;
}

/* floor: a disc seen at an angle, with three rings and a radar-style sweep */
.hx .hx3d-floor {
  position: absolute; inset: 8% 0 -6% 0;
  transform: translateY(26%) rotateX(72deg);
  transform-style: preserve-3d;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(90,169,255,.20), rgba(46,111,224,.06) 62%, transparent 72%);
}
.hx .hx3d-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(90,169,255,.45); }
.hx .hx3d-ring--1 { inset: 12%; }
.hx .hx3d-ring--2 { inset: 26%; border-style: dashed; border-color: rgba(157,116,255,.45); }
.hx .hx3d-ring--3 { inset: 0; border-color: rgba(90,169,255,.22); }
.hx .hx3d-scan {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(90,169,255,.38), rgba(90,169,255,0) 22%, transparent 100%);
  -webkit-mask: radial-gradient(closest-side, transparent 18%, #000 20%, #000 98%, transparent 100%);
          mask: radial-gradient(closest-side, transparent 18%, #000 20%, #000 98%, transparent 100%);
  opacity: .8;
}

/* shield: nine layers stacked in depth, then a lit front face */
.hx .hx3d-shield {
  position: absolute; left: 29%; top: 6%; width: 42%; height: 48%;
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateX(6deg);
}
.hx .hx3d-layer, .hx .hx3d-face {
  position: absolute; inset: 0;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 116'%3E%3Cpath d='M50 2 L94 18 V54 C94 82 75 104 50 114 C25 104 6 82 6 54 V18 Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 116'%3E%3Cpath d='M50 2 L94 18 V54 C94 82 75 104 50 114 C25 104 6 82 6 54 V18 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hx .hx3d-layer {
  transform: translateZ(calc(var(--z) * -2.2px));
  background: linear-gradient(160deg, #1b3f86, #0d1f45);
  filter: brightness(calc(1 - var(--z) * .06));
}
.hx .hx3d-face {
  transform: translateZ(2px);
  background:
    radial-gradient(120% 80% at 30% 15%, rgba(255,255,255,.35), transparent 45%),
    linear-gradient(160deg, var(--c1), var(--c2) 55%, #1c3f9a);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.2);
}
.hx .hx3d-face svg { display: block; }
.hx .hx3d-check { stroke: #fff; filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }

/* check areas: a flat row under the shield (no 3D on text, so it stays sharp), lit one after another */
.hx .hx3d-tags {
  list-style: none; margin: 0; padding: 0;
  position: absolute; z-index: 3; pointer-events: none;
  top: calc(var(--s) * .68 - 46px); left: 0; right: 0;
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center;
}
.hx .hx3d-tags span {
  display: block; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  font: 600 12px/1.35 var(--hx-sans, system-ui, -apple-system, "Segoe UI", sans-serif);
  color: #d6e6ff; background: #0f1b31; border: 1px solid rgba(90,169,255,.35);
}
/* motion: only without a reduced-motion preference */
@media screen and (prefers-reduced-motion: no-preference) {
  .hx .hx3d-shield { animation: hx3d-sway 9s ease-in-out infinite alternate; }
  .hx .hx3d-tags span { animation: hx3d-tag 10s ease-in-out infinite; animation-delay: calc(var(--i) * 2s); }
  .hx .hx3d-ring--2 { animation: hx3d-spin 48s linear infinite reverse; }
  .hx .hx3d-scan   { animation: hx3d-spin 6s linear infinite; }
  .hx .hx3d-stage  { animation: hx3d-in 1.1s cubic-bezier(.2,.7,.2,1) .2s backwards; }
  .hx .hx3d.hx3d-off * { animation-play-state: paused !important; }
}
@keyframes hx3d-sway { from { transform: rotateY(-20deg) rotateX(6deg) translateY(0); } to { transform: rotateY(16deg) rotateX(2deg) translateY(-6px); } }
@keyframes hx3d-tag { 0%, 22%, 100% { border-color: rgba(90,169,255,.35); background: #0f1b31; color: #d6e6ff; } 6%, 16% { border-color: #5aa9ff; background: #173563; color: #fff; } }
@keyframes hx3d-spin { to { transform: rotate(360deg); } }
@keyframes hx3d-in { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }

/* smaller screens: a smaller stage above the report, no labels */
@media (max-width: 899px) {
  .hx .hx3d { --s: clamp(150px, 42vw, 210px); padding-top: calc(var(--s) * .52); }
  .hx .hx3d-stage { top: calc(var(--s) * -0.08); }
  .hx .hx3d-tags { display: none; }
}
@media print { .hx .hx3d-stage { display: none; } }
@media (forced-colors: active) { .hx .hx3d-stage { display: none; } }
