/* One shared animated background, extracted from the existing Home. */
/* A blue, fluid opening; typography, spacing and content retain their layout. */
:is(.hero, .nyd-hero) {
  isolation: isolate;
  color: #f5faff;
  background: #102e52;
}
:is(.hero, .nyd-hero)::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, #081e3b55 0%, #102e5220 40%, transparent 72%);
}
:is(.hero, .nyd-hero)::after {
  z-index: 0;
  top: auto;
  height: 1px;
  background: #90b4d2;
  mask-image: none;
  opacity: .6;
}
:is(.hero, .nyd-hero) .hero-glow {
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: none;
  pointer-events: none;
  overflow: hidden;
  background: #102e52;
}
.hero-glow::before,
.hero-glow::after {
  content: "";
  position: absolute;
  inset: -25%;
  background:
    radial-gradient(ellipse at 68% 30%, #347abd99, transparent 46%),
    radial-gradient(ellipse at 25% 68%, #275db3a3, transparent 55%),
    linear-gradient(135deg, #0d2442, #1f497b);
  filter: blur(46px);
  animation: nyd-blue-flow 12s ease-in-out infinite alternate;
}
.hero-glow::after {
  opacity: .6;
  background: radial-gradient(ellipse at 35% 50%, #5599d080, transparent 35%), radial-gradient(ellipse at 78% 66%, #275b96aa, transparent 45%);
  animation: nyd-blue-flow 17s -7s ease-in-out infinite alternate-reverse;
}
:is(.hero, .nyd-hero) .visual-canvas { display: block; width: 100%; height: 100%; position: relative; opacity: 0; }
:is(.hero, .nyd-hero).visual-shader-ready .visual-canvas { opacity: 1; }
:is(.hero, .nyd-hero).visual-shader-ready .hero-glow::before,
:is(.hero, .nyd-hero).visual-shader-ready .hero-glow::after { opacity: 0; animation: none; }
/* Compact background-only control, placed within the existing bottom padding. */
.visual-motion {
  position: absolute;
  z-index: 2;
  right: max(24px, calc((100% - 1200px) / 2));
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid #689bcc60;
  border-radius: 12px;
  background: #e9f5ffb3;
  color: #214a76;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  transition: background .2s, border-color .2s;
}
.visual-motion:hover { background: #eff8ff; border-color: #608ebb; }
.visual-motion svg { width: 15px; height: 15px; flex: none; }
:is(.hero, .nyd-hero).visual-still .hero-glow::before,
:is(.hero, .nyd-hero).visual-still .hero-glow::after { animation-play-state: paused; }
@keyframes nyd-blue-flow {
  from { transform: translate(-5%, -6%) rotate(-14deg) scale(1.02); }
  to { transform: translate(8%, 7%) rotate(19deg) scale(1.18); }
}

/* Existing page grids retain their geometry above the decorative surface. */
.nyd-hero { position: relative; overflow: hidden; }
.nyd-hero > .container { position: relative; z-index: 1; }
@media (max-width: 600px) {
  .visual-motion { right: 16px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-glow::before, .hero-glow::after { animation: none; }
  .visual-motion { display: none; }
}
