@font-face {
  font-family: "Proto Mono";
  src: url("/fonts/protomono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Proto Mono";
  src: url("/fonts/protomono-semibold.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Proto Mono", ui-monospace, monospace;
  font-synthesis: none;
  background: #09090b;
  color: oklch(0.985 0 0);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 280px;
  background: radial-gradient(ellipse at 50% 48%, oklch(0.75 0.183 55.934 / 5%), transparent 50%);
}

#ascii-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.36;
  mask-image: radial-gradient(ellipse 27% 30% at 50% 47%, transparent 35%, #000 100%);
}

main {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 20px;
  text-align: center;
}

@media (scripting: enabled) {
  main:not([data-ready]) {
    visibility: hidden;
  }
}

.logo {
  position: relative;
  width: 48px;
  height: 48px;
  display: block;
  filter: drop-shadow(0 0 32px oklch(0.75 0.183 55.934 / 12%));
}

.logo-layer,
.logo-static,
.logo-animated {
  position: absolute;
  inset: 0;
}

.logo-static,
.logo-animated {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

h1 {
  position: relative;
  margin: 0;
  font-size: clamp(14px, 2.2vw, 18px);
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: -0.025em;
}

h1[data-scramble] {
  color: transparent;
}

h1[data-scramble]::after {
  content: attr(data-scramble);
  position: absolute;
  inset: 0;
  color: oklch(0.985 0 0);
}

#tribute-stars {
  position: fixed;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}

.tribute-star {
  --target-size: 24px;
  --hit-size: 12px;
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: var(--target-size);
  height: var(--target-size);
  margin: calc(var(--target-size) / -2) 0 0 calc(var(--target-size) / -2);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: oklch(0.82 0.12 65);
  font: inherit;
  font-size: 13.2px;
  line-height: 1;
  opacity: 0.72;
  cursor: default;
  pointer-events: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.tribute-star[data-tier="10"] {
  --target-size: 44px;
  --hit-size: 24px;
  font-size: 33.6px;
}

.tribute-star[data-tier="25"] {
  --target-size: 36px;
  --hit-size: 20px;
  font-size: 25.2px;
}

.tribute-star[data-tier="50"] {
  --target-size: 28px;
  --hit-size: 16px;
  font-size: 19.2px;
}

.star-mark {
  pointer-events: none;
  text-shadow: 0 0 14px oklch(0.75 0.183 55.934 / 45%);
}

.tribute-star::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid oklch(0.85 0.14 65 / 45%);
  border-radius: 50%;
  box-shadow: 0 0 12px oklch(0.75 0.183 55.934 / 20%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.tribute-star::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--hit-size);
  height: var(--hit-size);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

@media (pointer: coarse) {
  .tribute-star {
    pointer-events: auto;
  }
}

.star-name {
  position: absolute;
  top: calc(100% + 4px);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  max-width: min(240px, calc(100vw - 48px));
  padding: 0 10px 0 0;
  border: 0;
  background: rgb(0 0 0 / 15%);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  color: oklch(0.9 0.06 65);
  font-size: 11px;
  line-height: 1.6;
  text-align: left;
  overflow-wrap: anywhere;
  visibility: hidden;
  opacity: 0;
}

.star-portrait {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: oklch(0.269 0 0);
  object-fit: contain;
}

.star-name > span {
  min-width: 0;
}

.star-name-text {
  position: relative;
  text-shadow: 0 1px 8px #09090b;
}

.star-name-text[data-scramble] {
  color: transparent;
}

.star-name-text[data-scramble]::after {
  content: attr(data-scramble);
  position: absolute;
  inset: 0;
  color: oklch(0.9 0.06 65);
}

.tribute-star[data-above] .star-name {
  top: auto;
  bottom: calc(100% + 4px);
}

.tribute-star[data-revealed] {
  z-index: 1;
  opacity: 1;
  color: oklch(0.93 0.1 75);
}

.tribute-star[data-revealed]::before {
  opacity: 1;
}

.tribute-star[data-revealed] .star-mark {
  text-shadow:
    0 0 10px oklch(0.82 0.12 65 / 80%),
    0 0 22px oklch(0.75 0.183 55.934 / 30%);
}

.tribute-star[data-revealed] .star-name {
  visibility: visible;
  opacity: 1;
  animation: card-materialize 260ms ease-out both;
}

.tribute-star[data-revealed] .star-portrait {
  animation: portrait-materialize 420ms 35ms ease-out both;
}

.tribute-star[data-revealed] .star-name-text {
  animation: name-materialize 600ms 80ms ease-out both;
}

@keyframes card-materialize {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes portrait-materialize {
  from {
    opacity: 0;
    filter: blur(2px);
  }

  to {
    opacity: 1;
    filter: blur(0);
  }
}

@keyframes name-materialize {
  from {
    filter: blur(1px);
  }

  to {
    filter: blur(0);
  }
}

.tribute-star:focus-visible {
  outline: 2px solid oklch(0.75 0.183 55.934 / 65%);
  outline-offset: 2px;
}

@media (max-width: 600px) {
  #ascii-background {
    mask-image: radial-gradient(ellipse 58% 24% at 50% 47%, transparent 30%, #000 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  h1[data-scramble] {
    color: inherit;
  }

  h1[data-scramble]::after {
    content: none;
  }

  .tribute-star::before {
    transition: none;
  }

  .tribute-star[data-revealed] .star-name,
  .tribute-star[data-revealed] .star-name-text,
  .tribute-star[data-revealed] .star-portrait {
    animation: none;
  }

  .star-name-text[data-scramble] {
    color: inherit;
  }

  .star-name-text[data-scramble]::after {
    content: none;
  }
}
