:root {
  color-scheme: dark;
  background: #120f19;
  color: #efe5ff;
  --accent: #c297ff;
  --frame-inset: clamp(16px, 3.6vw, 56px);
}

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

body { margin: 0; }

.home {
  display: grid;
  place-items: center;
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--frame-inset) + 48px) 20px;
  background:
    repeating-linear-gradient(0deg, #0a070e1f 0 1px, transparent 1px 4px),
    radial-gradient(ellipse at 50% 44%, #261b37, #1a1325 44%, #120f19 76%);
}

.frame {
  position: absolute;
  inset: var(--frame-inset);
  pointer-events: none;
  border: 1px solid #382b49;
}

.frame span {
  position: absolute;
  width: 16px;
  height: 16px;
  background:
    linear-gradient(#8061a5, #8061a5) top left / 16px 2px,
    linear-gradient(#8061a5, #8061a5) top left / 2px 16px,
    linear-gradient(#a17bc8, #a17bc8) 5px 5px / 3px 3px;
  background-repeat: no-repeat;
}

.frame span:nth-child(1) { top: -1px; left: -1px; }
.frame span:nth-child(2) { top: -1px; right: -1px; transform: scaleX(-1); }
.frame span:nth-child(3) { bottom: -1px; left: -1px; transform: scaleY(-1); }
.frame span:nth-child(4) { bottom: -1px; right: -1px; transform: scale(-1); }

.hero {
  width: min(100%, 672px);
  display: grid;
  justify-items: center;
  gap: clamp(12px, 3vw, 26px);
  padding-bottom: clamp(30px, 7vh, 70px);
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

h1 { margin: 0; line-height: 0; }

h1 img {
  display: block;
  width: clamp(180px, 30vw, 360px);
  height: auto;
  image-rendering: pixelated;
}

.motion-toggle:not([hidden]) {
  position: absolute;
  bottom: calc(var(--frame-inset) + 9px);
  right: calc(var(--frame-inset) + 9px);
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  color: #b4a3c8;
  background: transparent;
  cursor: pointer;
}

.motion-toggle:hover, .motion-toggle:focus-visible {
  border-color: #694f86;
  color: var(--accent);
}

.motion-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.motion-toggle span {
  width: 10px;
  height: 12px;
  border-inline: 3px solid currentColor;
}

.motion-toggle[data-paused] span {
  width: 12px;
  height: 15px;
  border: 0;
  background: currentColor;
  clip-path: polygon(0 0, 3px 0, 3px 3px, 6px 3px, 6px 6px, 12px 6px, 12px 9px, 6px 9px, 6px 12px, 3px 12px, 3px 15px, 0 15px);
}

@media (max-height: 560px) and (min-width: 681px) {
  .hero { width: min(100%, 104vh); padding-bottom: 0; }
  h1 img { width: clamp(180px, 44vh, 360px); }
}
