/* Home hero: the ORYNX AXIOM emblem floating in front of the website wall, with beams of light (emblem-rays.js) that
   spread across the wall. The wall stays, dimmed, with a dark pool behind the crystal so it stands out.
   The emblem steps aside while a wall card is open (the wall's .is-open / .is-build). No pointer events: the wall cards
   underneath stay clickable. */
.director-scene .hx-emblem {
  --hx-w: min(41vw, 800px);
  --hx-x: 47%;              /* centre of the crystal, across the field */
  position: absolute; z-index: 6; top: 0; bottom: 0; left: 40%; right: 0;
  pointer-events: none;
  opacity: 0; animation: hx-in .7s cubic-bezier(.2, .7, .2, 1) .15s forwards;
  transition: opacity .5s ease, visibility .5s;
}
@keyframes hx-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
/* the wall hides the scene's older layers (#home .director-scene > :not(.nlf8c)); the emblem is not one of them */
html:root body #home .director-scene > .hx-emblem.hx-emblem { visibility: visible !important; }
html:root body #home .director-scene:has(.nlf8:is(.is-open, .is-build)) > .hx-emblem.hx-emblem { opacity: 0 !important; visibility: hidden !important; animation: none; }

/* the wall dimmed, darkest right behind the crystal */
.hx-emblem .hx-scrim {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 40% 46% at var(--hx-x) 50%, rgb(2 6 14 / .86) 0%, rgb(2 6 14 / .62) 42%, rgb(2 6 14 / 0) 80%),
    linear-gradient(90deg, rgb(3 7 15 / 0), rgb(3 7 15 / .26) 18%, rgb(3 7 15 / .26));
}

/* the floating layer: crystal and beams move together; the layer is the beams' whole field */
.hx-emblem .oa-float {
  position: absolute; inset: 0;
  transform-origin: var(--hx-x) 50%;
  animation: hx-float 11s ease-in-out infinite;
}
@keyframes hx-float {
  0%, 100% { transform: translate3d(0, -.9%, 0) scale(1); }
  50%      { transform: translate3d(0, .9%, 0) scale(1.012); }
}
.hx-emblem img.oa-mark {
  position: absolute; z-index: 0;
  width: var(--hx-w); height: auto; max-width: none;
  left: calc(var(--hx-x) - var(--hx-w) / 2);
  top: calc(50% - var(--hx-w) * .33);
  filter: drop-shadow(0 30px 60px rgb(0 0 0 / .55)) drop-shadow(0 0 40px rgb(40 130 255 / .22));
}
.hx-emblem .oa-rays {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%;
  mix-blend-mode: screen; opacity: 0; transition: opacity 1.8s ease;
}
.hx-emblem .oa-rays.is-on { opacity: 1; }

/* a soft halo that breathes with the light */
.hx-emblem .hx-halo {
  position: absolute; z-index: 0; pointer-events: none;
  width: calc(var(--hx-w) * 1.1); aspect-ratio: 1.5;
  left: calc(var(--hx-x) - var(--hx-w) * .55); top: calc(50% - var(--hx-w) * .367);
  background: radial-gradient(ellipse at 52% 50%, rgb(50 150 255 / .30), rgb(30 90 220 / .10) 45%, transparent 70%);
  animation: hx-breathe 6.5s ease-in-out infinite;
}
@keyframes hx-breathe { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

/* laptops: a little smaller, a little further right of the copy */
@media (max-width: 1280px) {
  .director-scene .hx-emblem { --hx-w: min(44vw, 620px); --hx-x: 52%; }
}
/* tablets and phones: the copy takes the top; the crystal floats over the wall below it */
@media (max-width: 800px) {
  .director-scene .hx-emblem { left: 0; right: 0; top: 50%; bottom: 5%; --hx-w: min(84vw, 460px); --hx-x: 50%; }
  .hx-emblem .hx-scrim { background: radial-gradient(ellipse 62% 58% at 50% 50%, rgb(2 6 14 / .8), rgb(2 6 14 / .45) 50%, rgb(2 6 14 / 0) 85%); }
}

/* take-off (hero-emblem-dock.js): the emblem leaves as a flying copy; beams, halo and dark pool fade; the wall returns */
.hx-emblem.is-launched img.oa-mark { opacity: 0; }
.hx-emblem.is-launched .oa-rays.oa-rays,
.hx-emblem.is-launched .hx-halo,
.hx-emblem.is-launched .hx-scrim { opacity: 0 !important; transition: opacity .7s ease; }
html:root body #home .director-scene > .hx-emblem.is-gone { display: none; }

.hx-flier {
  position: fixed; z-index: 600; margin: 0; max-width: none; pointer-events: none;
  transform-origin: 50% 50%; will-change: transform, opacity;
  filter: drop-shadow(0 0 22px rgb(60 160 255 / .55));
}
.hx-flier--echo { filter: blur(3px) drop-shadow(0 0 18px rgb(60 160 255 / .5)); }
.hx-flier--echo2 { filter: blur(6px); }

/* the docked mark, just left of the logo; part of the home link */
.master-brand.oa-brand { position: relative; }
.oa-dock {
  position: absolute; right: calc(100% + 14px); top: 50%;
  width: 56px; aspect-ratio: 176 / 116; transform: translateY(-50%);
  pointer-events: none; opacity: 0; transition: opacity .35s ease;
}
.oa-dock img { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 6px rgb(70 165 255 / .55)); }
/* the logo's own sizing (body .master-brand img { width: 220px !important } and smaller steps) is not for the mark */
html:root body .master-header .master-brand .oa-dock img { width: 100% !important; max-width: none !important; height: auto !important; }
.oa-dock.is-docked { opacity: 1; animation: oa-dock-in .7s cubic-bezier(.2, .9, .25, 1.25); }
.oa-dock.is-docked img { animation: oa-dock-glow 4.5s ease-in-out .7s infinite; }
.oa-dock.is-hidden { display: none; }
@keyframes oa-dock-in { from { transform: translateY(-50%) scale(1.25); } to { transform: translateY(-50%) scale(1); } }
@keyframes oa-dock-glow {
  0%, 100% { filter: drop-shadow(0 0 5px rgb(70 165 255 / .45)); }
  50%      { filter: drop-shadow(0 0 11px rgb(90 185 255 / .85)) brightness(1.12); }
}
.master-brand.oa-brand:hover .oa-dock img { filter: drop-shadow(0 0 12px rgb(110 200 255 / .9)) brightness(1.15); }

/* narrow screens: the emblem merges into the logo with a flash */
.master-brand.oa-merge img:not(.oa-dock img) { animation: oa-merge 1.1s ease-out; }
@keyframes oa-merge {
  0%   { filter: drop-shadow(0 0 0 rgb(90 185 255 / 0)); }
  25%  { filter: drop-shadow(0 0 14px rgb(110 200 255 / .95)) brightness(1.6); }
  100% { filter: drop-shadow(0 0 0 rgb(90 185 255 / 0)); }
}

@media (prefers-reduced-motion: reduce) {
  .director-scene .hx-emblem { animation: none; opacity: 1; }
  .hx-emblem .oa-float, .hx-emblem .hx-halo { animation: none; }
}
