:root {
  --void: #030304;
  --gold: #e3b45c;
  --silver: #c9ced8;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--void);
}

body {
  position: fixed;
  inset: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(ellipse 60% 45% at 50% 50%, rgba(160, 112, 40, 0.16), transparent 70%),
    radial-gradient(ellipse 120% 90% at 50% 50%, #0b0b0f, var(--void) 70%);
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.6s ease;
  outline: none;
}

html.gl canvas {
  opacity: 1;
}

/* ---- Still gate: shown without WebGL / JS ---- */

.still {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: opacity 1.2s ease;
}

html.gl .still {
  opacity: 0;
}

.still svg {
  width: min(100vw, 100dvh);
  height: min(100vw, 100dvh);
  max-height: 100dvh;
  overflow: visible;
}

.still .mandala {
  opacity: 0.35;
  transform-origin: 0 0;
  animation: turn 120s linear infinite;
}

.still .halo {
  animation: breathe 6s ease-in-out infinite;
}

.still .rim {
  stroke-dasharray: 40 6 12 6;
  animation: flow 14s linear infinite;
}

@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.85;
  }
}

@keyframes flow {
  to {
    stroke-dashoffset: -256;
  }
}

@media (prefers-reduced-motion: reduce) {
  .still .mandala,
  .still .rim {
    animation-duration: 600s;
  }
}
