@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("./assets/fonts/manrope-latin-variable.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --discord-canvas: rgb(16, 17, 20);
  --discord-surface: rgb(31, 31, 33);
  --discord-surface-raised: rgb(37, 38, 43);
  --discord-border: rgb(62, 64, 70);
  --discord-border-strong: rgb(85, 88, 97);
  --discord-primary: rgb(241, 242, 244);
  --discord-muted: rgb(181, 186, 193);
  --discord-footer: rgb(128, 132, 142);
  --discord-brand: rgb(88, 101, 242);
  --discord-brand-hover: rgb(75, 85, 214);
  --discord-brand-soft: rgba(88, 101, 242, 0.14);
  --discord-green: rgb(10, 168, 82);
  --discord-green-hover: rgb(0, 147, 69);
  --error: rgb(248, 118, 122);
}

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

html {
  background: var(--discord-canvas);
  line-height: 1.5;
}

body {
  display: flex;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  flex-direction: column;
  background: var(--discord-canvas);
  color: var(--discord-primary);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.template-orbit {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 30rem;
  overflow: hidden;
  perspective: 75rem;
}

.template-orbit-track {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 78%;
  height: 40%;
  border: 1px solid var(--discord-border-strong);
  border-radius: 50%;
  opacity: 0.56;
  transform: translate(-50%, -50%) rotate(-14deg);
}

.template-orbit-track::before {
  position: absolute;
  inset: 1.5rem;
  border: 1px solid var(--discord-border);
  border-radius: inherit;
  content: "";
}

.template-orbit-center {
  position: absolute;
  z-index: 7;
  top: 50%;
  left: 50%;
  display: flex;
  width: 11rem;
  height: 7rem;
  padding: 1.5rem;
  border: 1px solid var(--discord-border-strong);
  border-radius: 1rem;
  flex-direction: column;
  justify-content: center;
  background: var(--discord-canvas);
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 0.32);
  transform: translate(-50%, -50%);
}

.template-orbit-center span,
.template-orbit-center small {
  color: var(--discord-footer);
  font-size: 0.6875rem;
  font-weight: 700;
}

.template-orbit-center span {
  color: var(--discord-brand);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.template-orbit-center strong {
  margin-block: 0.25rem;
  font-size: 0.9375rem;
  line-height: 1.25rem;
}

.template-orbit-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12rem;
  min-height: 8rem;
  padding: 1rem;
  border: 1px solid var(--discord-border-strong);
  border-radius: 1rem;
  opacity: 0;
  overflow: hidden;
  backface-visibility: hidden;
  background: var(--discord-surface-raised);
  box-shadow: 0 1rem 2.5rem rgb(0 0 0 / 0.28);
  contain: layout paint style;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
  transform-origin: center;
  will-change: transform, opacity;
}

.template-orbit-card-heading {
  display: flex;
  min-width: 0;
  margin-bottom: 0.75rem;
  align-items: center;
  gap: 0.75rem;
}

.template-orbit-card-heading span {
  display: grid;
  width: 2rem;
  height: 2rem;
  border-radius: 0.625rem;
  flex: 0 0 auto;
  background: var(--discord-brand-soft);
  color: var(--discord-brand);
  font-size: 0.6875rem;
  font-weight: 800;
  place-items: center;
}

.template-orbit-card-heading strong {
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-orbit-card p,
.template-orbit-card small {
  display: block;
  margin: 0;
  color: var(--discord-muted);
  font-size: 0.6875rem;
  line-height: 1.125rem;
}

.template-orbit-card small {
  margin-top: 0.25rem;
  color: var(--discord-footer);
}

@media (max-width: 63.99rem) {
  .template-orbit {
    max-width: 40rem;
    height: 24rem;
    margin-inline: auto;
  }
}

@media (max-width: 31.99rem) {
  .template-orbit {
    height: 20rem;
  }

  .template-orbit [data-orbit-secondary] {
    display: none;
  }

  .template-orbit-center {
    width: 4rem;
    height: 4rem;
    padding: 0;
    border-radius: 50%;
    align-items: center;
  }

  .template-orbit-center strong,
  .template-orbit-center small {
    display: none;
  }

  .template-orbit-card {
    width: 9rem;
    min-height: 6rem;
    padding: 0.75rem;
  }

  .template-orbit-card-heading {
    margin-bottom: 0.5rem;
    gap: 0.5rem;
  }

  .template-orbit-card-heading span {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.5rem;
    font-size: 0.625rem;
  }
}

main {
  flex: 1;
  width: 100%;
  padding: 0 1.25rem 4rem;
}

.site-header {
  display: flex;
  width: min(100% - 2.5rem, 72rem);
  min-height: 5rem;
  margin: 0 auto;
  border-bottom: 1px solid var(--discord-border);
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  color: var(--discord-primary);
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-header nav a {
  color: var(--discord-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  color: var(--discord-primary);
}

.site-header a:focus-visible {
  outline: 2px solid var(--discord-brand);
  outline-offset: 0.25rem;
}

.tool {
  display: flex;
  width: 100%;
  max-width: 36rem;
  min-height: calc(100vh - 4rem);
  margin: 0 auto;
  padding: 3.5rem 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

h1 {
  margin: 0;
  color: var(--discord-primary);
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 2.25rem;
}

#profile {
  display: flex;
  margin-top: 2.25rem;
  flex-direction: column;
  align-items: center;
}

#avatar-button {
  padding: 0.25rem;
  border-radius: 50%;
  background: transparent;
  cursor: zoom-in;
}

#avatar {
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  object-fit: cover;
  transition: box-shadow 150ms ease;
}

#avatar-button:hover #avatar {
  box-shadow:
    0 0 0 4px rgba(88, 101, 242, 0.4),
    0 25px 50px -12px rgba(0, 0, 0, 0.3);
}

#username {
  margin: 1.25rem 0 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.75rem;
  text-underline-offset: 0.25rem;
}

#lookup-form {
  width: 100%;
  max-width: 32rem;
  margin-top: 2rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#discord-user-id,
#lookup-button,
#download-button {
  height: 3.5rem;
  border-radius: 0.5rem;
}

#discord-user-id {
  width: 100%;
  border: 1px solid var(--discord-border);
  outline: none;
  background: var(--discord-surface);
  padding: 0 1rem;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

#discord-user-id::placeholder {
  color: var(--discord-muted);
}

#discord-user-id:focus {
  border-color: var(--discord-brand);
  box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
}

#lookup-button,
#download-button {
  padding: 0 1.5rem;
  color: #fff;
  font-weight: 600;
  transition:
    background-color 150ms ease,
    transform 150ms ease;
}

#lookup-button {
  background: var(--discord-brand);
  cursor: pointer;
}

#lookup-button:hover {
  background: var(--discord-brand-hover);
}

#lookup-button:active,
#download-button:active {
  transform: translateY(1px);
}

#lookup-button:disabled,
#discord-user-id:disabled {
  cursor: wait;
  opacity: 0.6;
}

#lookup-error {
  margin: 0;
  padding-top: 0.5rem;
  color: var(--error);
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-align: left;
}

#download-button {
  display: inline-flex;
  width: 100%;
  max-width: 32rem;
  margin-top: 1.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--discord-green);
  text-decoration: none;
}

#download-button:hover {
  background: var(--discord-green-hover);
}

#download-button img {
  width: 1.25rem;
  height: 1.25rem;
  filter: brightness(0) invert(1);
}

#avatar-button:focus-visible,
#lookup-button:focus-visible,
#download-button:focus-visible,
#avatar-dialog-close:focus-visible,
#tutorial-toggle:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--discord-brand);
  outline-offset: 2px;
}

#avatar-button:focus-visible {
  outline-offset: 4px;
}

#download-button:focus-visible {
  outline-color: var(--discord-green);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tutorial {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  border-top: 1px solid var(--discord-border);
  padding: 6rem 0 2rem;
}

.tutorial-heading {
  max-width: 58rem;
  margin: 0 auto 4rem;
}

.tutorial-kicker {
  margin: 0 0 0.75rem;
  color: var(--discord-brand);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tutorial-heading h2 {
  max-width: 46rem;
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.tutorial-intro {
  max-width: 43rem;
  margin: 1.25rem 0 0;
  color: var(--discord-muted);
  font-size: 1.0625rem;
  line-height: 1.75rem;
}

.tutorial-layout {
  display: block;
}

.tutorial-player {
  width: 100%;
  max-width: 58rem;
  min-width: 0;
  margin: 0 auto;
}

.tutorial-window {
  overflow: hidden;
  border: 1px solid var(--discord-border);
  border-radius: 1rem;
  background: var(--discord-surface);
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, 0.8);
}

.tutorial-window-bar {
  display: grid;
  min-height: 3.5rem;
  border-bottom: 1px solid var(--discord-border);
  padding: 0.75rem 1rem;
  align-items: center;
  grid-template-columns: 1fr auto 1fr;
  color: var(--discord-muted);
  font-size: 0.75rem;
}

.window-dots {
  display: flex;
  gap: 0.35rem;
}

.window-dots i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--discord-border);
}

.window-dots i:first-child {
  background: var(--error);
}

.window-dots i:nth-child(2) {
  background: #f0b232;
}

.window-dots i:last-child {
  background: var(--discord-green);
}

#tutorial-toggle {
  justify-self: end;
  border: 1px solid var(--discord-border);
  border-radius: 0.375rem;
  background: transparent;
  padding: 0.25rem 0.625rem;
  color: var(--discord-primary);
  cursor: pointer;
  font-size: 0.75rem;
}

#tutorial-toggle:hover {
  border-color: var(--discord-muted);
  background: #2b2d31;
}

.demo-flow {
  position: relative;
  display: grid;
  min-height: 18rem;
  padding: 2.5rem;
  place-items: center;
}

.demo-card {
  position: absolute;
  display: grid;
  width: calc(100% - 4rem);
  max-width: 30rem;
  min-height: 9rem;
  border: 1px solid var(--discord-brand);
  border-radius: 0.75rem;
  opacity: 0;
  background: var(--discord-canvas);
  padding: 2rem;
  align-items: center;
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.14);
  transform: translateY(0.75rem) scale(0.98);
}

.demo-number {
  position: absolute;
  top: -0.75rem;
  left: -0.75rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--discord-brand);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  place-items: center;
}

.demo-card strong,
.demo-card small {
  display: block;
}

.demo-card strong {
  font-size: 1rem;
}

.demo-card small {
  margin-top: 0.3rem;
  color: var(--discord-muted);
  font-size: 0.8125rem;
}

.demo-copy {
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  animation: demo-copy-step 9s infinite ease;
}

.demo-avatar {
  width: 4.5rem;
  height: 4.5rem;
  border: 0.25rem solid #232428;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 38%, #f2f3f5 0 18%, transparent 19%),
    radial-gradient(circle at 50% 110%, #b5bac1 0 48%, transparent 49%),
    var(--discord-brand);
}

.demo-copy-text small {
  display: inline-block;
  border-radius: 0.25rem;
  background: #2b2d31;
  padding: 0.375rem 0.625rem;
}

.demo-lookup {
  grid-template-columns: 1fr auto;
  gap: 0.625rem;
  animation: demo-lookup-step 9s infinite ease;
}

.demo-input,
.demo-lookup-button {
  display: flex;
  min-height: 3.25rem;
  border-radius: 0.4rem;
  align-items: center;
}

.demo-input {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--discord-border);
  padding: 0 1rem;
  color: var(--discord-muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-lookup-button {
  background: var(--discord-brand);
  padding: 0 1.125rem;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
}

.demo-download {
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  animation: demo-download-step 9s infinite ease;
}

.demo-download-icon {
  display: grid;
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: var(--discord-green);
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  place-items: center;
}

.demo-arrow {
  display: none;
}

.demo-progress {
  height: 0.25rem;
  background: #2b2d31;
}

.demo-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--discord-brand);
  animation: demo-progress 9s infinite linear;
}

.tutorial-window.is-paused .demo-card,
.tutorial-window.is-paused .demo-progress span {
  animation-play-state: paused;
}

.tutorial-player figcaption {
  margin-top: 1rem;
  color: var(--discord-footer);
  font-size: 0.8125rem;
  text-align: center;
}

.tutorial-steps {
  display: grid;
  max-width: 58rem;
  margin: 4.5rem auto 0;
  padding: 0;
  gap: 2.5rem;
  list-style: none;
}

.tutorial-steps li {
  display: grid;
  border-top: 1px solid var(--discord-border);
  padding-top: 1.5rem;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.25rem;
}

.step-number {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--discord-brand);
  border-radius: 0.625rem;
  color: #aeb5ff;
  font-size: 1rem;
  font-weight: 700;
  place-items: center;
}

.tutorial-steps h3,
.how-it-works h3 {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.625rem;
}

.tutorial-steps p,
.how-it-works p {
  margin: 0.625rem 0 0;
  color: var(--discord-muted);
  font-size: 0.9375rem;
  line-height: 1.75rem;
}

.tutorial-steps strong,
.how-it-works strong {
  color: var(--discord-primary);
}

.how-it-works {
  max-width: 58rem;
  margin: 5rem auto 0;
  border: 1px solid var(--discord-border);
  border-left: 3px solid var(--discord-brand);
  border-radius: 0.75rem;
  background: var(--discord-surface);
  padding: 2rem;
}

.how-it-works-copy {
  max-width: 44rem;
}

.how-it-works-copy p:first-child {
  margin-top: 0.75rem;
}

.how-it-works-copy p + p {
  margin-top: 1rem;
}

.coming-soon {
  width: 100%;
  max-width: 928px;
  margin: 96px auto 0;
  border-top: 1px solid var(--discord-border);
  padding: 96px 0 64px;
}

.coming-soon-heading {
  margin-bottom: 48px;
}

.coming-soon-heading h2 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.025em;
  line-height: 40px;
}

.coming-soon-heading > p:last-child {
  margin: 16px 0 0;
  color: var(--discord-muted);
  font-size: 16px;
  line-height: 24px;
}

.coming-soon-list {
  margin: 0;
  border-top: 1px solid var(--discord-border);
  padding: 0;
  list-style: none;
}

.coming-soon-list li {
  border-bottom: 1px solid var(--discord-border);
  padding: 40px 0;
}

.coming-soon-list h3 {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.coming-soon-list p {
  margin: 16px 0 0;
  color: var(--discord-muted);
  font-size: 16px;
  line-height: 24px;
}

@keyframes demo-copy-step {
  0%,
  29% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  33%,
  100% {
    opacity: 0;
    transform: translateY(-0.75rem) scale(0.98);
  }
}

@keyframes demo-lookup-step {
  0%,
  30% {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.98);
  }

  34%,
  62% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  66%,
  100% {
    opacity: 0;
    transform: translateY(-0.75rem) scale(0.98);
  }
}

@keyframes demo-download-step {
  0%,
  63% {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.98);
  }

  67%,
  96% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-0.75rem) scale(0.98);
  }
}

@keyframes demo-progress {
  to {
    width: 100%;
  }
}

footer {
  padding: 0 1.25rem 1.5rem;
  color: var(--discord-footer);
  font-size: 0.75rem;
  line-height: 1.25rem;
  text-align: center;
}

footer p {
  margin: 0;
}

footer details {
  width: 100%;
  max-width: 36rem;
  margin: 0.25rem auto 0;
}

footer summary {
  border-radius: 0.5rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--discord-border);
  text-underline-offset: 0.25rem;
}

footer summary:hover {
  color: var(--discord-primary);
}

.terms {
  margin-top: 0.75rem;
  border: 1px solid var(--discord-border);
  border-radius: 0.5rem;
  background: var(--discord-surface);
  padding: 1rem;
  text-align: left;
}

.terms p + p {
  margin-top: 0.75rem;
}

.terms a {
  color: var(--discord-primary);
  text-decoration: underline;
  text-underline-offset: 0.125rem;
}

#avatar-dialog {
  width: min(64rem, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100vh - 2rem);
  margin: auto;
  overflow: visible;
  border: 1px solid var(--discord-border);
  border-radius: 0.75rem;
  background: #0b0c0e;
  padding: 3.25rem 1rem 1rem;
}

#avatar-dialog::backdrop {
  background: rgba(0, 0, 0, 0.86);
}

#full-avatar {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 6.25rem);
  margin: auto;
  border-radius: 0.5rem;
  object-fit: contain;
}

#avatar-dialog-close {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--discord-surface);
  color: var(--discord-primary);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  place-items: center;
}

#avatar-dialog-close:hover {
  background: var(--discord-border);
}

@media (min-width: 40rem) {
  .tool {
    min-height: calc(100vh - 3rem);
    padding-block: 5rem;
  }

  h1 {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }

  #avatar {
    width: 11rem;
    height: 11rem;
  }

  .form-row {
    flex-direction: row;
  }

  #discord-user-id {
    min-width: 0;
    flex: 1;
  }

  .tutorial-heading h2 {
    font-size: 2.5rem;
  }

}

@media (min-width: 52rem) {
  .tutorial {
    padding-top: 7rem;
  }

  .tutorial-heading {
    margin-bottom: 5rem;
  }

  .tutorial-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem;
  }

  .tutorial-steps li {
    display: block;
  }

  .step-number {
    margin-bottom: 1.5rem;
  }

  .how-it-works {
    display: grid;
    padding: 2.25rem 2.5rem;
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: 2.5rem;
  }

  .how-it-works-copy p:first-child {
    margin-top: 0;
  }

  .coming-soon-list li {
    display: grid;
    grid-template-columns: 256px minmax(0, 1fr);
    gap: 48px;
  }

  .coming-soon-list p {
    margin: 0;
  }
}

@media (max-width: 47.99rem) {
  .site-header {
    width: min(100% - 2rem, 72rem);
  }

  .site-header nav {
    gap: 1rem;
  }

  .site-header nav a {
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  #tutorial-toggle {
    display: none;
  }

  .demo-flow {
    min-height: 0;
    gap: 0.75rem;
  }

  .demo-card {
    position: static;
    width: 100%;
    max-width: none;
    min-height: 5.5rem;
    opacity: 1;
    animation: none;
    transform: none;
  }

  .demo-progress span {
    width: 100%;
    animation: none;
  }
}
