/* Fyzis hero visualisation. Loaded after main.css. */

.hero__eyebrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s-5); }
.hero .display { font-size: clamp(2.25rem, 1.05rem + 2.9vw, 4.1rem); max-width: 11.5em; }

.hero__figure.fz { aspect-ratio: auto; align-self: center; }
.fz { display: flex; flex-direction: column; }

/* ---------- live stage ---------- */
.fz__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 0.94;
  max-height: calc(100svh - var(--nav-h) - 132px);
  min-height: 460px;
  overflow: hidden;
  isolation: isolate;
}
.fz__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; z-index: 0; }
.fz__canvas:active { cursor: grabbing; }
.fz__stage::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
  background: linear-gradient(to top, rgb(16 17 22 / .86), rgb(16 17 22 / 0));
  pointer-events: none; z-index: 1;
}
.fz__labels, .fz__fly { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.fz__fly { z-index: 5; }

.fz-label { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; will-change: transform, opacity; }
.fz-label i {
  position: absolute; left: -3.5px; top: -3.5px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--copper-2); box-shadow: 0 0 0 3px rgb(224 173 120 / .16);
}
.fz-label span {
  position: absolute; left: 13px; top: 0; transform: translateY(-50%);
  padding: 4px 8px; white-space: nowrap;
  font: 400 var(--fs-micro)/1.2 var(--font-mono); letter-spacing: .03em; color: var(--ivory);
  background: rgb(16 17 22 / .78); border: 1px solid var(--line-2); border-radius: 2px;
}
.fz-label--left span { left: auto; right: 13px; }
.fz-label--result i { background: var(--ivory); box-shadow: 0 0 0 3px rgb(233 229 220 / .14); }
.fz-label--result span { border-color: var(--copper-line); }
.fz-label.is-emit i { animation: fz-emit .9s ease-out; }
@keyframes fz-emit {
  0% { box-shadow: 0 0 0 0 rgb(224 173 120 / .75); }
  100% { box-shadow: 0 0 0 16px rgb(224 173 120 / 0); }
}

.fz__hud { position: absolute; left: 0; top: 0; right: 0; z-index: 4; pointer-events: none; }
.fz__steps {
  display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none;
  font: 400 var(--fs-micro)/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ash-2);
}
.fz__steps li { position: relative; padding-bottom: 8px; transition: color .4s; }
.fz__steps li i { position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--line-3); }
.fz__steps li.is-done { color: var(--ash); }
.fz__steps li.is-done i { width: 100%; }
.fz__steps li.is-on { color: var(--ivory); }
.fz__steps li.is-on i { width: calc(var(--p, 0) * 100%); background: var(--copper); }
.fz__n { color: var(--copper); margin-right: 6px; letter-spacing: .02em; }
.fz__caption {
  margin: 12px 0 0; max-width: 30em;
  font: 400 var(--fs-small)/1.45 var(--font-sans); color: var(--ivory-2);
}
.fz__caption.is-in { animation: fz-in .7s var(--ease) both; }
@keyframes fz-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.fz__eqs {
  position: absolute; left: 0; bottom: 0; width: 70%; z-index: 4; pointer-events: none;
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
  font-size: clamp(12px, .35rem + .62vw, 15.5px); color: var(--ivory);
}
.fz-eq { max-width: 100%; opacity: 0; transform: translateY(6px); transition: opacity .6s, transform .7s var(--ease); }
.fz-eq.is-in { opacity: 1; transform: none; }
.fz-eq svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.fz-eq g[class*="fzt"] { fill: var(--copper-2); stroke: var(--copper-2); transition: opacity .25s; }
.fz-flyterm { position: absolute; left: 0; top: 0; transform-origin: 50% 50%; color: var(--copper-2); fill: var(--copper-2); will-change: transform, opacity; }
.fz-flyterm svg { display: block; overflow: visible; filter: drop-shadow(0 0 6px rgb(224 173 120 / .45)); }

.fz__legend {
  position: absolute; right: 0; bottom: 2px; width: min(196px, 27%); z-index: 4; pointer-events: none; opacity: 0;
  font: 400 var(--fs-micro)/1.2 var(--font-mono); letter-spacing: .03em; color: var(--ivory-2);
}
.fz__legend-title { display: block; margin-bottom: 7px; }
.fz__legend-bar { display: block; height: 6px; border-radius: 1px; }
.fz__legend-ticks { display: flex; justify-content: space-between; margin-top: 6px; color: var(--ash); }

.fz__bar {
  padding-right: var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  margin-top: 16px;
}
.fz__tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.fz__tab {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px;
  font: 400 var(--fs-small)/1 var(--font-sans); color: var(--ash);
  background: transparent; border: 1px solid var(--line-2); border-radius: 2px; cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.fz__tab:hover { color: var(--ivory); border-color: var(--line-3); }
.fz__tab[aria-pressed="true"] { color: var(--ivory); border-color: var(--copper-line); background: var(--copper-wash); }
.fz__tab:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }
.fz__hint { margin: 0; font: 400 var(--fs-micro)/1.3 var(--font-mono); letter-spacing: .03em; color: var(--ash-2); }
.fz__hint kbd { font: inherit; padding: 1px 5px; border: 1px solid var(--line-2); border-radius: 2px; color: var(--ash); }

.fz__note { padding-right: var(--gutter); margin-top: 10px; font: 400 var(--fs-micro)/1.4 var(--font-mono); letter-spacing: .03em; color: var(--ash-2); }

/* ---------- static fallback (phones, tablets, reduced motion) ---------- */
.fz__stills {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 12px;
  margin: 0; padding: 0; list-style: none;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.fz__stills::-webkit-scrollbar { display: none; }
.fz__stills li { scroll-snap-align: start; }
.fz__stills img { display: block; width: 100%; height: auto; }
.fz__stills span {
  display: block; margin-top: 8px;
  font: 400 var(--fs-micro)/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ash);
}
.fz--live .fz__static { display: none; }

/* wide screens with motion: the live stage replaces the stills before they load */
html.fz-wide .fz__static { display: none; }
.fz__steps, .fz__caption { text-shadow: 0 0 10px var(--void), 0 0 18px var(--void); }

/* technology item title */
.flagship__sub {
  margin-top: var(--s-4); max-width: 24em;
  font: 400 var(--fs-h3)/1.25 var(--font-display); color: var(--ivory-2);
}
@media (max-width: 1023px) {
  .hero__figure.fz { margin-bottom: var(--s-7); }
}
@media (min-width: 1024px) {
  .hero__figure.fz .fz__static { padding-right: var(--gutter); }
}
