:root {
  color-scheme: dark;
  --screen: #09091e;
  --stage-ratio: 1.344155844;
  font-family: ui-rounded, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--screen); overflow: hidden; }
.splash {
  position: fixed;
  inset: 0;
  isolation: isolate;
  overflow: hidden;
  background: #11102b;
  min-height: 100svh;
}
/* Blurred extension fills widescreen margins without stretching a moon into an oval. */
.ambient {
  position: absolute;
  inset: -10%;
  background: #11102b url('assets/scene-poster.webp') center / cover no-repeat;
  filter: blur(clamp(28px, 4.4vw, 85px)) brightness(.62) saturate(1.15);
  transform: scale(1.08);
  pointer-events: none;
}
.ambient-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9,7,28,.22), transparent 21%, transparent 75%,rgba(9,7,28,.14));
  pointer-events: none;
}
/* The actual approved video is never stretched disproportionately. */
.scene-frame {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: min(100vw, 134.415584dvh);
  aspect-ratio: 414 / 308;
  transform: translate(-50%, -50%);
  overflow: hidden;
  isolation: isolate;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
  pointer-events: none;
}
.scene-video, .gif-fallback {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill;
  pointer-events: none;
}
.gif-fallback[hidden] { display: none; }
.site-header {
  position: fixed;
  top: max(13px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  z-index: 5;
  pointer-events: none;
}
.brand {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px 7px 7px;
  border: 1px solid rgba(242,220,255,.26);
  border-radius: 999px;
  background: rgba(15,9,43,.58);
  box-shadow: 0 3px 28px rgba(10,7,25,.26);
  color: #fff2ff;
  text-decoration: none;
  text-shadow: 0 2px 16px rgba(182,97,252,.58);
  font-weight: 750;
  font-size: clamp(17px, 1.65vw, 22px);
  letter-spacing: .015em;
  -webkit-backdrop-filter: blur(11px);
  backdrop-filter: blur(11px);
}
.brand img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; }
.brand:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
/* On portrait phones, zoom only the scene (not its proportions) to keep Twiggy visible. */
@media (max-aspect-ratio: 4 / 5) {
  .scene-frame {
    width: min(185vw, 113dvh);
    left: 51%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 5%, #000 95%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 5%, #000 95%, transparent 100%);
  }
  .brand { padding: 5px 14px 5px 5px; font-size: 17px; }
  .brand img { width: 33px; height: 33px; }
  .ambient { filter: blur(33px) brightness(.54) saturate(1.2); }
}
/* Optional preview: add ?view=full to retain the whole artwork on narrow screens. */
[data-view="full"] .scene-frame { width: min(100vw, 134.415584dvh); left: 50%; }
/* Optional preview: add ?view=cover for edge-to-edge crop without oval-shaped moon. */
[data-view="cover"] .scene-frame { width: max(100vw, 134.415584dvh); left: 50%; }
/* Respect the user's reduced-motion accessibility setting. */
@media (prefers-reduced-motion: reduce) { .scene-video { animation: none; } }
.scene-video[hidden] { display:none; }

/* The full-frame query setting intentionally exposes all edges on mobile. */
@media (max-aspect-ratio: 4 / 5) {
  [data-view="full"] .scene-frame { -webkit-mask-image: none; mask-image: none; }
}
