@property --ring-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  color-scheme: dark;
  font-family: "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: #f4f4f6;
  background: #080808;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; -webkit-user-select: none; user-select: none; }
html, body { margin: 0; padding: 0; min-height: 100%; }
a { color: inherit; }

.shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 18% 0%, #ffffff0e 0%, #ffffff05 34%, #ffffff00 70%),
    linear-gradient(180deg, #101010, #080808);
}

.shell::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: url("/site-assets/grain.svg") repeat;
  opacity: .025;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 31px 44px 0;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  width: 133px;
  flex-shrink: 0;
  cursor: default;
  -webkit-touch-callout: none;
}
.brand img { display: block; width: 100%; height: auto; pointer-events: none; -webkit-user-drag: none; }
.brand-caption { padding: 3px 0 0 7px; font-size: 9px; font-weight: 400; letter-spacing: 7px; color: #b9b9c0; }
.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid #383838;
  border-radius: 10px;
  background: #151515;
  color: #c7c7ce;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.download-button svg { width: 18px; height: 18px; }
.download-button:not(:disabled):hover { background: #202020; border-color: #535353; color: #fff; }
.download-button:not(:disabled):active { background: #101010; }
.download-button:disabled { opacity: .45; cursor: default; }
main { display: grid; place-items: center; padding: 48px 24px 116px; }
.not-found-page { grid-template-rows: 1fr; padding: 24px; }
.not-found-page h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 500; letter-spacing: -.025em; }
.oauth-callback-page { grid-template-rows: 1fr; padding: 24px; }
.oauth-callback-card {
  width: min(100%, 620px);
  padding: 40px 32px;
  border: 1px solid #383838;
  border-radius: 12px;
  background: #151515;
  box-shadow: 0 18px 60px #00000040;
  text-align: center;
}
.oauth-callback-card::before {
  display: block;
  width: 48px;
  height: 3px;
  margin: 0 auto 24px;
  border-radius: 2px;
  background: linear-gradient(110deg, #c90000, #b60000 48%, #920000);
  content: "";
}
.oauth-callback-card h1 { margin: 0 0 14px; font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.15; color: #f4f4f6; }
.oauth-callback-card.is-failure h1 { color: #f39191; }
.oauth-callback-card p { margin: 0; color: #b9b9c0; font-size: 16px; line-height: 1.6; }
.hero { width: min(100%, 760px); text-align: center; animation: arrive 650ms cubic-bezier(.2,.7,.2,1) both; }
h1 { margin: 0 0 38px; font-size: clamp(2.5rem, 4.7vw, 4.25rem); line-height: 1.12; letter-spacing: -.04em; font-weight: 600; }
h1 > span { color: #98989c; }

.discord-button {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 14px 32px;
  border: 1px solid #be2d2d;
  border-radius: 12px;
  background: linear-gradient(110deg, #c90000, #b60000 48%, #920000);
  box-shadow: 0 0 9px #a000001a, inset 0 1px 0 #ffffff15;
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
.discord-button::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: -2px;
  padding: 1px;
  border-radius: 14px;
  background: conic-gradient(from var(--ring-angle), transparent 0% 62%, #ce414130 72%, #ffaeae 82%, #ce414130 88%, transparent 96%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: .4;
  animation: ring-trace 6s linear infinite;
  transition: opacity 180ms ease;
}
.discord-button:hover::after { opacity: .7; }
.discord-button svg { width: 23px; height: 23px; flex-shrink: 0; }
.discord-button:hover {
  filter: brightness(1.13);
  border-color: #e15252;
  box-shadow: 0 0 13px #b6000029, inset 0 1px 0 #ffffff20;
  transform: translateY(-2px);
}
.discord-button:active { transform: translateY(0); filter: brightness(.95); }
a:focus-visible, button:focus-visible { outline: 2px solid #f39191; outline-offset: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@keyframes arrive { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ring-trace { to { --ring-angle: 360deg; } }

@media (max-width: 600px) {
  .site-header { padding: 24px 22px 0; gap: 16px; }
  .brand { width: 112px; }
  .download-button { padding-inline: 13px; gap: 7px; font-size: 13px; }
  main { padding: 48px 18px 105px; }
  h1 { font-size: clamp(1.75rem, 6.7vw, 2.6rem); line-height: 1.18; margin-bottom: 32px; }
  .discord-button { min-height: 56px; padding-inline: 28px; }
  main.oauth-callback-page { padding: 24px 18px; }
  .oauth-callback-card { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero { animation: none; }
  .discord-button, .download-button { transition: none; }
  .discord-button::after { animation: none; transition: none; }
  .discord-button:hover { transform: none; }
}
