@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&display=swap");

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050506;
  --text: #e6edf3;
  --muted: #7d8a99;
  --hover: #ffffff;
  --glow: rgba(255, 32, 36, 0.07);
  --accent: #ff2024;
  --verify: #5a8a3c;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #efece6;
  --text: #14161a;
  --muted: #5a6470;
  --hover: #111111;
  --glow: rgba(255, 32, 36, 0.1);
  --accent: #e0181c;
  --verify: #3d6328;
}

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

html {
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
}

body {
  max-width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  padding: 2.4rem max(1rem, env(safe-area-inset-right, 0px)) 2rem max(1rem, env(safe-area-inset-left, 0px));
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(42% 38% at 46% 42%, var(--glow), transparent 70%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }

button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.theme-toggle {
  position: fixed;
  top: max(1.1rem, env(safe-area-inset-top, 0px));
  right: max(1.2rem, env(safe-area-inset-right, 0px));
  z-index: 30;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 0.72rem/1 "IBM Plex Mono", Consolas, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--hover);
}

.music {
  position: fixed;
  top: max(1.1rem, env(safe-area-inset-top, 0px));
  left: max(1.2rem, env(safe-area-inset-left, 0px));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.music button {
  color: var(--muted);
  font: 500 0.72rem/1 "IBM Plex Mono", Consolas, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.music button:hover,
.music button:focus-visible {
  color: var(--hover);
}

.music input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 5.6rem;
  height: 2px;
  margin: 0;
  background: color-mix(in srgb, var(--muted) 55%, transparent);
  outline: none;
  cursor: pointer;
  accent-color: var(--accent);
}

.music input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
}

.music input[type="range"]::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 50%;
  background: var(--text);
}

.music.is-muted input[type="range"] {
  opacity: 0.45;
}

[data-music-audio] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.hero {
  width: min(840px, 100%);
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 0 2rem;
}

.logo {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1536 / 1024;
  overflow: hidden;
}

.logo-base,
.logo-dust {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.logo-base { object-fit: contain; }

.logo-eye {
  position: absolute;
  display: block;
  pointer-events: none;
  backface-visibility: hidden;
  transform: translateZ(0) scaleY(1);
  transform-origin: 50% 50%;
  will-change: transform, opacity;
}

.logo-eye-l {
  left: 25.390625%;
  top: 31.25%;
  width: 12.044271%;
  height: 18.066406%;
  animation: leftBlink 8s infinite cubic-bezier(.42, 0, .18, 1);
}

.logo-eye-r {
  left: 39.713542%;
  top: 30.761719%;
  width: 11.067708%;
  height: 17.089844%;
  animation: rightBlink 8s infinite cubic-bezier(.42, 0, .18, 1);
}

@keyframes leftBlink {
  0%, 14% { transform: scaleY(1); opacity: 1; }
  17% { transform: scaleY(.06); opacity: 0; }
  20% { transform: scaleY(1); opacity: 1; }
  60%, 62% { transform: scaleY(1); opacity: 1; }
  64.5% { transform: scaleY(.06); opacity: 0; }
  67%, 100% { transform: scaleY(1); opacity: 1; }
}

@keyframes rightBlink {
  0%, 27% { transform: scaleY(1); opacity: 1; }
  30% { transform: scaleY(.06); opacity: 0; }
  33% { transform: scaleY(1); opacity: 1; }
  60%, 62% { transform: scaleY(1); opacity: 1; }
  64.5% { transform: scaleY(.06); opacity: 0; }
  67%, 100% { transform: scaleY(1); opacity: 1; }
}

.logo-dust {
  z-index: 5;
  mix-blend-mode: screen;
}

h1 {
  margin: -0.35rem 0 0;
  line-height: 0;
}

.wordmark {
  width: min(420px, 100%);
  height: auto;
  margin: 0 auto;
  mix-blend-mode: screen;
}

html[data-theme="light"] .wordmark {
  mix-blend-mode: multiply;
  filter: invert(1);
}

.blurb {
  width: min(28rem, 100%);
  margin: 1.15rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.7;
  text-align: center;
}

.blurb a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease;
}

.blurb a:hover,
.blurb a:focus-visible {
  color: var(--hover);
}

.hello {
  width: min(420px, 100%);
  min-width: 0;
  margin-top: 1.35rem;
  text-align: center;
}

.hello-title {
  margin: 0 0 0.65rem;
  min-height: 1.15em;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.15;
}

.hello-cursor {
  display: inline-block;
  width: 0.55ch;
  height: 0.92em;
  margin-left: 0.12em;
  vertical-align: -0.08em;
  background: currentColor;
  animation: helloBlink 1.05s steps(1) infinite;
}

.hello-cursor[hidden] {
  display: none;
}

@keyframes helloBlink {
  50% { opacity: 0; }
}

.hello-stage {
  position: relative;
  height: 8.6rem;
  overflow: hidden;
  cursor: default;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
  transition: opacity 0.55s ease;
}

.hello-stage.is-wait {
  opacity: 0;
}

.hello-track {
  will-change: transform;
}

.hello-copy {
  padding-bottom: 2.6rem;
}

.hello-block h3 {
  margin: 0.9rem 0 0.28rem;
  color: var(--text);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hello-copy > .hello-block:first-child h3 {
  margin-top: 0;
}

.hello-block ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hello-block li {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.hello-friends {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.1rem;
  justify-items: center;
}

.hello-word {
  padding: 0 0.35rem;
}

.hello-word h3 {
  letter-spacing: 0.14em;
  line-height: 1.45;
}

.hello-word p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 400;
  line-height: 1.65;
}

.links {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 1.7rem;
  padding: 1.25rem 0.25rem 0.35rem;
  overflow: hidden;
  border-top: 1px solid color-mix(in srgb, var(--muted) 28%, transparent);
}

.nav-dust {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

html[data-theme="light"] .nav-dust {
  mix-blend-mode: multiply;
}

.links a {
  position: relative;
  z-index: 2;
  overflow: visible;
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.55rem 0.95rem;
  border: 1px solid color-mix(in srgb, var(--text) 32%, transparent);
  transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.links a:hover,
.links a:focus-visible {
  color: var(--hover);
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent),
    0 0 16px color-mix(in srgb, var(--accent) 28%, transparent);
}

.links a[data-verify-open] {
  color: var(--verify);
  border-color: color-mix(in srgb, var(--verify) 62%, transparent);
}

.links a[data-verify-open]:hover,
.links a[data-verify-open]:focus-visible {
  color: var(--verify);
  border-color: var(--verify);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--verify) 45%, transparent),
    0 0 16px color-mix(in srgb, var(--verify) 32%, transparent);
}

@media (max-width: 520px) {
  .hero { width: 100%; }
  .wordmark { width: min(300px, 100%); }
  .links { gap: 0.45rem; }
  .links a { padding: 0.5rem 0.75rem; }
  .hello-stage { height: 7.6rem; }
  .hello-friends { column-gap: 0.7rem; }
  .music { left: max(0.85rem, env(safe-area-inset-left, 0px)); gap: 0.5rem; }
  .music input[type="range"] { width: 4.2rem; }
  .theme-toggle { right: max(0.85rem, env(safe-area-inset-right, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-eye { animation: none; }
  .logo-dust { display: none; }
  .hello-cursor { animation: none; }
  .hello-stage { opacity: 1; }
  .nav-dust { display: none; }
}
