@font-face {
  font-family: Sora;
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/fonts/sora-latin.woff2") format("woff2");
}

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

html,
body {
  margin: 0;
  height: 100%;
  background: #07040c;
  color: #f4f1ff;
  font-family: Sora, sans-serif;
}

body {
  overflow: hidden;
}

canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  touch-action: none;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

#sky.arm {
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M0 14h11v4H0zm21 0h11v4H21zM14 0h4v11h-4zm0 21h4v11h-4z'/%3E%3Cpath fill='%23fff' d='M1 15h9v2H1zm21 0h9v2h-9zM15 1h2v9h-2zm0 21h2v9h-2z'/%3E%3C/svg%3E")
    16 16,
    crosshair;
}

.core {
  position: fixed;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  text-align: center;
  pointer-events: none;
}

h1,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.35rem, 4.6vw, 3.15rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.08;
  text-wrap: balance;
}

p {
  margin-top: 0.7rem;
  max-width: 28em;
  color: rgba(236, 230, 255, 0.78);
  font-size: clamp(0.84rem, 2.1vw, 1.05rem);
  font-weight: 400;
  line-height: 1.45;
  text-wrap: balance;
}

.badge,
.mark {
  position: fixed;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 32px;
  padding: 7px;
  border-radius: 999px;
  font: 500 13px/1 Sora, sans-serif;
  letter-spacing: -0.01em;
  text-decoration: none;
  left: 50%;
  top: 50%;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translate(-50%, -50%);
  will-change: transform;
}

.badge svg,
.mark svg,
.badge .label,
.mark .label {
  display: block;
  width: 16px;
  height: 16px;
  flex: none;
}

.badge .label,
.mark .label {
  width: auto;
  line-height: 16px;
}

.badge {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 10px 28px rgba(0, 0, 0, 0.28);
  color: #f7f4ff;
}

.badge:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.55);
}

.mark {
  border: 1px solid rgba(168, 173, 221, 0.55);
  background: rgba(27, 30, 72, 0.62);
  box-shadow:
    inset 0 1px 0 rgba(197, 201, 234, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.28);
  color: #f2f2f5;
}

.mark-read {
  color: #a8addd;
}

.mark:hover {
  background: rgba(47, 51, 115, 0.78);
  border-color: rgba(197, 201, 234, 0.8);
}

.thrensy {
  border-color: rgba(231, 182, 112, 0.5);
  background: rgba(30, 27, 46, 0.66);
  box-shadow:
    inset 0 1px 0 rgba(231, 182, 112, 0.3),
    0 10px 28px rgba(0, 0, 0, 0.28);
  color: #f2f0fa;
}

.thrensy:hover {
  background: rgba(46, 40, 62, 0.8);
  border-color: rgba(231, 182, 112, 0.85);
}

/* Mascot: blinks at rest, happy eyes and one hop on hover (brand/mascot in the Thrensy repo). */
.thrensy svg {
  overflow: visible;
}

.thrensy .eyes {
  transform-origin: 32px 28px;
  animation: thrensy-blink 4.6s infinite;
}

.thrensy .happy {
  opacity: 0;
}

.thrensy:hover .eyes,
.thrensy:focus-visible .eyes {
  opacity: 0;
}

.thrensy:hover .happy,
.thrensy:focus-visible .happy {
  opacity: 1;
}

.thrensy:hover svg {
  animation: thrensy-hop 0.42s ease-out;
}

@keyframes thrensy-blink {
  0%,
  94%,
  100% {
    transform: scaleY(1);
  }
  97% {
    transform: scaleY(0.1);
  }
}

@keyframes thrensy-hop {
  40% {
    transform: translateY(-3px) scaleY(1.06);
  }
  75% {
    transform: translateY(0) scaleY(0.94);
  }
}

@media (prefers-reduced-motion: reduce) {
  .thrensy .eyes,
  .thrensy:hover svg {
    animation: none;
  }
}

.badge:focus-visible,
.mark:focus-visible,
.spin:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.spin {
  position: fixed;
  z-index: 4;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(8, 6, 14, 0.4);
  color: rgba(244, 241, 255, 0.72);
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.spin:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.12);
}

.spin svg {
  display: block;
  width: 14px;
  height: 14px;
  transition: transform 0.45s ease;
}

@media (max-width: 720px) {
  p {
    margin-top: 0.45rem;
  }
}
