:root {
  --ink: #eaf6ff;
  --ink-dim: #7f95a8;
  --accent: #8fe3ff;
  --accent-warm: #ffd9a0;
  --edge: rgba(143, 227, 255, 0.9);
}

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

html, body {
  height: 100%;
  background: #000;
  color: var(--ink);
  font-family: "Chakra Petch", system-ui, sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

/* WebGL canvas sits behind everything, full-bleed */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none; /* let JS own pointer gestures */
}

/* Subtle vignette so the wordmark reads against bright bloom */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%, transparent 40%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 1;
}

.hero {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4vh, 3rem);
  pointer-events: none; /* clicks fall through to canvas except on buttons */
  padding: 2rem;
}

.logo {
  text-align: center;
  /* Driven by JS for mouse parallax */
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.wordmark {
  font-weight: 700;
  font-size: clamp(0.9rem, 3.5vw, 2.75rem);
  letter-spacing: 0.3em;
  line-height: 0.9;
  /* nudge right to visually center despite the tracking on the last letter */
  padding-left: 0.3em;
  color: #000;
}

.wordmark span {
  display: inline-block;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
/* staggered entrance per letter */
.wordmark span:nth-child(1) { animation-delay: 0.05s; }
.wordmark span:nth-child(2) { animation-delay: 0.10s; }
.wordmark span:nth-child(3) { animation-delay: 0.15s; }
.wordmark span:nth-child(4) { animation-delay: 0.20s; }
.wordmark span:nth-child(5) { animation-delay: 0.25s; }
.wordmark span:nth-child(6) { animation-delay: 0.30s; }
.wordmark span:nth-child(7) { animation-delay: 0.35s; }
.wordmark span:nth-child(8) { animation-delay: 0.40s; }
.wordmark span:nth-child(9) { animation-delay: 0.45s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(0.4em); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);     filter: blur(0); }
}

.tagline {
  margin-top: clamp(0.6rem, 1.6vh, 1.1rem);
  font-weight: 500;
  font-size: clamp(0.62rem, 1.5vw, 0.95rem);
  letter-spacing: 0.62em;
  padding-left: 0.62em;
  color: var(--ink-dim);
  text-shadow: 0 0 12px #000, 0 0 22px #000;
  animation: fade 1.4s ease 0.6s backwards;
}

.cta {
  display: flex;
  gap: 0.9rem;
  pointer-events: auto;
  animation: fade 1.4s ease 0.9s backwards;
}

.btn {
  pointer-events: auto;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: 0.72rem 1.5rem;
  border: 1px solid rgba(143, 227, 255, 0.28);
  border-radius: 2px;
  background: rgba(143, 227, 255, 0.03);
  backdrop-filter: blur(3px);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
}
.btn:hover {
  border-color: rgba(143, 227, 255, 0.7);
  background: rgba(143, 227, 255, 0.08);
  box-shadow: 0 0 24px rgba(143, 227, 255, 0.18);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  color: #021017;
  background: var(--accent);
  border-color: var(--accent);
}
.btn--primary:hover {
  background: #b6ecff;
  box-shadow: 0 0 32px rgba(143, 227, 255, 0.45);
}

.hint {
  position: fixed;
  bottom: max(1.4rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.66rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-dim);
  opacity: 0.6;
  animation: fade 2s ease 1.4s backwards;
  transition: opacity 0.6s ease;
}
.hint.is-hidden { opacity: 0; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.fallback {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}
.fallback h1 { font-size: 3rem; letter-spacing: 0.3em; }
.fallback p { color: var(--ink-dim); letter-spacing: 0.2em; }

@media (prefers-reduced-motion: reduce) {
  .wordmark span, .tagline, .cta, .hint { animation: none; }
}
