:root {
  --bg: #0f1216;
  --bg-deep: #0a0c10;
  --ink: #e9edf2;
  --ink-dim: #6b7380;
  --accent: #7c6cff;
  --accent-soft: rgba(124, 108, 255, 0.18);
  --font: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  height: 100%;
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(120% 90% at 50% 40%, var(--bg) 0%, var(--bg-deep) 100%);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: calc(1.75rem + env(safe-area-inset-top, 0px)) 2rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
  cursor: none;
}

#field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
}

.top,
.hero,
.bottom {
  position: relative;
  z-index: 1;
}

/* Header */
.top {
  display: flex;
  align-items: center;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.5s forwards;
}

.mark-glyph {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.title {
  font-weight: 500;
  font-size: clamp(2.6rem, 8vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  display: grid;
  gap: 0.02em;
}

.line {
  display: block;
  opacity: 0;
  transform: translateY(0.35em);
  filter: blur(6px);
  animation: boot 1.1s var(--ease) forwards;
}

.line:nth-child(1) { animation-delay: 0.15s; }
.line:nth-child(2) { animation-delay: 0.3s; }
.line:nth-child(3) { animation-delay: 0.45s; color: var(--accent); }

/* Footer */
.bottom {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
  opacity: 0;
  animation: rise 0.9s var(--ease) 0.7s forwards;
}

/* Cursor */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s, width 0.25s var(--ease), height 0.25s var(--ease);
  will-change: transform;
}

.cursor::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 3px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

body.pointer-active .cursor { opacity: 1; }
body.pointer-active .cursor.is-hover { width: 44px; height: 44px; }

/* Focus */
.mark:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 2px;
}

@keyframes boot {
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes rise {
  to { opacity: 1; }
}

@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .line,
  .mark,
  .bottom {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
  .cursor { transition: none; }
}

@media (max-width: 600px) {
  body { padding-left: 1.25rem; padding-right: 1.25rem; }
  .bottom { flex-direction: column; gap: 0.35rem; }
}
