:root {
  color-scheme: dark;
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --font-display: ui-rounded, "SF Pro Display", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono",
    monospace;
  --void: #07070d;
  --plasma: #a855f7;
  --amber: #9333ea;
  --text-primary: #ededf0;
  --text-secondary: #9090a8;
  --text-muted: #7b7b94;
  --border: #1a1a2e;
  font-family: var(--font-sans);
  background: var(--void);
  color: var(--text-primary);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--void);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background: var(--void);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgb(168 85 247 / 25%);
}

header {
  position: fixed;
  z-index: 10;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 4rem;
  padding: 0 3rem;
  border-bottom: 1px solid rgb(26 26 46 / 50%);
  background: rgb(7 7 13 / 85%);
  backdrop-filter: blur(20px);
}

.nav-logo {
  display: flex;
  align-items: center;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.03125rem;
  text-decoration: none;
}

.cursor {
  display: inline-block;
  width: 0.125rem;
  height: 1.375rem;
  margin-left: 0.0625rem;
  background: var(--plasma);
  animation: blink 1.1s step-end infinite;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  padding:
    max(8rem, env(safe-area-inset-top))
    max(1.5rem, env(safe-area-inset-right))
    max(3.5rem, env(safe-area-inset-bottom))
    max(1.5rem, env(safe-area-inset-left));
  text-align: center;
}

.hero::before {
  position: absolute;
  top: 40%;
  left: 50%;
  width: min(56.25rem, 130vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    ellipse,
    rgb(168 85 247 / 8%) 0%,
    rgb(147 51 234 / 4%) 25%,
    rgb(139 92 246 / 2%) 45%,
    transparent 70%
  );
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: glow-pulse 8s ease-in-out infinite;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  padding-top: 2rem;
}

.hero-label {
  position: relative;
  margin: 0 0 2rem;
  color: var(--plasma);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.25rem;
  text-transform: uppercase;
  opacity: 0;
  animation: fade-up 700ms ease forwards 120ms;
}

h1 {
  position: relative;
  width: 100%;
  max-width: 51.25rem;
  margin: 0 0 1.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.5vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -0.1875rem;
  line-height: 1.05;
  text-wrap: balance;
  opacity: 0;
  animation: fade-up 700ms ease forwards 280ms;
}

.hero-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.7rem 2rem;
  border-radius: 0.5rem;
  color: var(--void);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, var(--plasma), var(--amber));
  box-shadow: 0 0 2.5rem rgb(168 85 247 / 20%);
  opacity: 0;
  transition:
    box-shadow 200ms ease,
    transform 200ms ease;
  animation: fade-up 700ms ease forwards 440ms;
}

.hero-cta:hover {
  box-shadow: 0 0 3.75rem rgb(168 85 247 / 35%);
  transform: translateY(-0.125rem);
}

.hero-cta:active {
  transform: translateY(0);
}

.hero-definition {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 40rem;
  margin: clamp(3rem, 9vh, 8rem) auto 0;
  color: var(--text-muted);
  font-size: clamp(0.82rem, 1.4vw, 1rem);
  font-style: italic;
  line-height: 1.8;
  text-wrap: balance;
  opacity: 0;
  animation: fade-up 700ms ease forwards 600ms;
}

.definition-word,
.definition-pronunciation {
  font-family: var(--font-mono);
  font-style: normal;
}

.definition-word {
  color: var(--text-secondary);
  font-weight: 600;
}

.definition-pronunciation {
  font-size: 0.9em;
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 5.5rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--void);
}

footer p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.03rem;
}

.hero a:not(.hero-cta) {
  width: fit-content;
  color: var(--text-secondary);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.25em;
}

a:focus-visible {
  border-radius: 0.2rem;
  outline: 0.2rem solid var(--plasma);
  outline-offset: 0.3rem;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

@keyframes glow-pulse {
  0%,
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1.05);
  }
}

@media (max-width: 768px) {
  header {
    padding: 0 1.25rem;
  }

  .hero {
    min-height: 100svh;
    padding-top: max(7rem, env(safe-area-inset-top));
    padding-right: max(1.25rem, env(safe-area-inset-right));
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
    padding-left: max(1.25rem, env(safe-area-inset-left));
  }

  .hero-copy {
    padding-top: 1rem;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2rem, 10vw, 3rem);
    letter-spacing: -0.09375rem;
  }

  .hero-definition {
    margin-top: clamp(3rem, 10vh, 6rem);
  }

  footer {
    min-height: 5rem;
  }
}

@media (max-height: 640px) {
  .hero {
    min-height: 40rem;
  }

  .hero-definition {
    margin-top: 3rem;
  }
}

@media (prefers-contrast: more) {
  :root {
    color: #fff;
  }

  .hero-label,
  .hero-definition,
  .hero a:not(.hero-cta) {
    color: #d8a7ff;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor,
  .hero::before,
  .hero-label,
  h1,
  .hero-cta,
  .hero-definition {
    animation: none;
  }

  .hero-label,
  h1,
  .hero-cta,
  .hero-definition {
    opacity: 1;
  }

  .hero-cta {
    transition: none;
  }
}
