@property --tone-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: #020716;
}

@property --tone-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #06143a;
}

@property --tone-3 {
  syntax: "<color>";
  inherits: true;
  initial-value: #052d5c;
}

@property --glow-1 {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(21, 167, 193, 0.34);
}

@property --glow-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(25, 49, 137, 0.82);
}

@property --glow-3 {
  syntax: "<color>";
  inherits: true;
  initial-value: rgba(10, 79, 138, 0.44);
}

:root {
  --ink: #f4fbff;
  --mist: rgba(229, 246, 255, 0.76);
  --tone-1: #020716;
  --tone-2: #06143a;
  --tone-3: #052d5c;
  --glow-1: rgba(21, 167, 193, 0.34);
  --glow-2: rgba(25, 49, 137, 0.82);
  --glow-3: rgba(10, 79, 138, 0.44);
  color-scheme: dark;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--tone-1);
}

body {
  min-height: 100svh;
  cursor: crosshair;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  content: "";
  pointer-events: none;
}

body::before {
  background:
    radial-gradient(circle at 78% 82%, var(--glow-1), transparent 33rem),
    radial-gradient(circle at 9% 7%, var(--glow-2), transparent 35rem),
    radial-gradient(circle at 50% 44%, var(--glow-3), transparent 42rem),
    linear-gradient(137deg, var(--tone-1), var(--tone-2) 46%, var(--tone-3) 100%);
  filter: saturate(var(--sat, 1.02));
  transition:
    background 6800ms cubic-bezier(0.45, 0, 0.15, 1),
    filter 5600ms ease;
}

body::after {
  background:
    radial-gradient(ellipse at center, transparent 0%, transparent 37%, rgba(1, 5, 16, 0.63) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent 13%, transparent 87%, rgba(255, 255, 255, 0.035));
  mix-blend-mode: multiply;
}

#sigil-field {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
}

.identity {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 100svh;
  place-content: center;
  justify-items: center;
  padding: clamp(1.5rem, 5vw, 4rem);
  color: var(--ink);
  text-align: center;
  pointer-events: none;
  isolation: isolate;
}

.identity::before {
  position: absolute;
  width: min(48rem, 82vw);
  aspect-ratio: 1;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgba(205, 243, 255, 0.12), transparent 58%);
  filter: blur(2rem);
  opacity: 0.82;
  transform: translateY(-2%);
  z-index: -1;
}

h1 {
  margin: 0;
  font-family: Didot, "Bodoni 72", "Bodoni 72 Smallcaps", "Iowan Old Style",
    Georgia, serif;
  font-size: clamp(3.32rem, 8.8vw, 8.4rem);
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 0.86;
  text-indent: 0.16em;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.84),
    0 0 36px rgba(101, 199, 242, 0.23),
    0 14px 58px rgba(0, 7, 24, 0.84);
}

.identity__rule {
  width: min(18rem, 42vw);
  height: 1px;
  margin-top: clamp(1.25rem, 2.7vw, 2rem);
  background: linear-gradient(90deg, transparent, rgba(236, 250, 255, 0.72), transparent);
  opacity: 0.58;
  box-shadow: 0 0 18px rgba(96, 210, 237, 0.34);
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 3;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.9) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.55) 0 1px, transparent 1px);
  background-size: 3px 3px, 5px 5px;
  mix-blend-mode: overlay;
  animation: grain-drift 12s steps(8) infinite;
}

@keyframes grain-drift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-4%, 3%, 0);
  }
}

@media (max-width: 720px) {
  body {
    cursor: default;
  }

  h1 {
    font-size: clamp(2.4rem, 13.6vw, 4rem);
    letter-spacing: 0.09em;
    text-indent: 0.09em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grain {
    animation: none;
  }
}
