.spatial-scene {
  --scene-accent: #4f46e5;
  position: relative;
  isolation: isolate;
  min-height: clamp(500px, 68vw, 720px);
  overflow: hidden;
  contain: layout paint style;
  background:
    radial-gradient(circle at 62% 44%, rgba(79, 70, 229, .14), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8f9fc 100%);
  border-block: 1px solid #e5e7eb;
}
.spatial-scene--compact { min-height: clamp(420px, 48vw, 560px); }
.spatial-scene__canvas,
.spatial-scene__fallback { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.spatial-scene__canvas { z-index: 1; display: block; }
.spatial-scene__fallback {
  z-index: 0;
  opacity: .78;
  background:
    radial-gradient(circle at 68% 45%, rgba(34, 211, 238, .16) 0 2px, transparent 3px),
    radial-gradient(circle at 73% 52%, rgba(124, 58, 237, .22) 0 4px, transparent 5px),
    linear-gradient(135deg, transparent 44%, rgba(79, 70, 229, .09) 45% 45.5%, transparent 46%);
  background-size: 82px 82px, 126px 126px, 100% 100%;
}
.spatial-scene__fallback::before,
.spatial-scene__fallback::after {
  content: "";
  position: absolute;
  right: clamp(7%, 11vw, 15%);
  top: 50%;
  width: clamp(220px, 32vw, 470px);
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(79, 70, 229, .32);
  border-radius: 28px;
  transform: translateY(-50%) perspective(900px) rotateY(-12deg) rotateX(5deg);
  box-shadow: 28px 32px 80px rgba(79, 70, 229, .13), inset 0 0 50px rgba(34, 211, 238, .08);
}
.spatial-scene__fallback::after { transform: translate(8%, -43%) perspective(900px) rotateY(-12deg) rotateX(5deg); opacity: .42; }
.spatial-scene__content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: inherit;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 560px;
  margin-inline: max(5vw, calc((100vw - 1200px) / 2));
  pointer-events: none;
}
.spatial-scene__eyebrow { margin: 0 0 14px; color: #4f46e5; font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.spatial-scene__content h2 { margin: 0; color: #111827; font-size: clamp(2.4rem, 5vw, 5.3rem); line-height: .98; letter-spacing: -.055em; }
.spatial-scene__content > p:last-child { max-width: 500px; margin: 24px 0 0; color: #475569; font-size: clamp(1rem, 1.5vw, 1.22rem); line-height: 1.75; }
.spatial-scene[data-mode="webgl"] .spatial-scene__fallback { opacity: .22; }
.spatial-scene[data-mode="fallback"] .spatial-scene__canvas { display: none; }

@media (max-width: 760px) {
  .spatial-scene,
  .spatial-scene--compact { min-height: 500px; }
  .spatial-scene__canvas { opacity: .52; }
  .spatial-scene__content { margin-inline: 24px; max-width: calc(100% - 48px); justify-content: flex-end; padding-bottom: 64px; }
  .spatial-scene__content h2 { font-size: clamp(2.25rem, 12vw, 4rem); }
  .spatial-scene__fallback::before,
  .spatial-scene__fallback::after { top: 32%; right: 8%; width: 72vw; }
}

@media (hover: none), (pointer: coarse) {
  .spatial-scene { transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .spatial-scene,
  .spatial-scene * { animation: none !important; transition: none !important; }
  .spatial-scene__canvas { display: none !important; }
  .spatial-scene__fallback { opacity: .9; }
}
