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

:root {
  --bg:        #060a14;
  --dot-color: 74, 105, 255;
  --accent:    #4a69ff;
  --accent-2:  #7b9cff;
  --text:      #dde4ff;
  --text-dim:  rgba(180, 200, 255, 0.35);
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
}

canvas {
  position: fixed;
  inset: 0;
  display: block;
}

/* Main content */
#stage {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

#wordmark {
  font-family: 'Orbitron', sans-serif;
  font-weight: 400;
  font-size: clamp(1.8rem, 4.2vw, 3.8rem);
  letter-spacing: 0.12em;
  color: #fff;
  text-shadow: 0 0 2px rgba(255,255,255,0.9), 0 0 8px rgba(74,105,255,0.9), 0 0 24px rgba(74,105,255,0.35);
  position: relative;
  opacity: 0;
  animation: wordReveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
  will-change: transform;
}

#wordmark .tld {
  color: #7b9cff;
  font-weight: 500;
  text-shadow: 0 0 2px rgba(160,188,255,0.9), 0 0 8px rgba(123,156,255,0.9), 0 0 24px rgba(74,105,255,0.35);
}

/* Decorative lines flanking the wordmark */
#wordmark::before,
#wordmark::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 0;
  height: 0.5px;
  background: linear-gradient(90deg, transparent, rgba(var(--dot-color), 0.4));
  animation: lineExpand 1s cubic-bezier(0.16, 1, 0.3, 1) 1.6s forwards;
}
#wordmark::before {
  right: calc(100% + 24px);
  transform-origin: right center;
  background: linear-gradient(270deg, transparent, rgba(var(--dot-color), 0.4));
}
#wordmark::after {
  left: calc(100% + 24px);
  transform-origin: left center;
  background: linear-gradient(90deg, transparent, rgba(var(--dot-color), 0.4));
}

@keyframes lineExpand {
  to { width: clamp(40px, 8vw, 120px); }
}

/* Pulse ring beneath wordmark */
#pulse-ring {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  opacity: 0;
  animation: wordReveal 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}
#pulse-ring::before,
#pulse-ring::after {
  content: '';
  position: absolute;
  inset: -50px;
  border-radius: 50%;
  border: 0.5px solid rgba(var(--dot-color), 0.12);
  animation: pulseRing 3.5s ease-out 2.2s infinite;
}
#pulse-ring::after {
  animation-delay: 3.9s;
}

@keyframes pulseRing {
  0%   { transform: scale(0.6); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: scale(4.5); opacity: 0; }
}

/* Dot indicator row */
#indicators {
  display: flex;
  gap: 7px;
  margin-top: 28px;
  opacity: 0;
  animation: fadeUp 0.7s ease 2s forwards;
}
#indicators span {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotBreath 2.6s ease-in-out infinite;
}
#indicators span:nth-child(2) { animation-delay: 0.4s; background: var(--accent-2); opacity: 0.6; }
#indicators span:nth-child(3) { animation-delay: 0.8s; opacity: 0.25; }

@keyframes dotBreath {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50%       { transform: scale(1.8); opacity: 1; }
}

/* Corner labels */
.corner {
  position: fixed;
  font-family: 'Orbitron', sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  z-index: 20;
  opacity: 0;
  animation: fadeIn 1s ease 2.4s forwards;
}
.corner.tl { top: 24px; left: 28px; }
.corner.tr { top: 24px; right: 28px; text-align: right; }
.corner.bl { bottom: 24px; left: 28px; }
.corner.br { bottom: 24px; right: 28px; text-align: right; }

/* Thin border frame */
#frame {
  position: fixed;
  inset: 14px;
  border: 0.5px solid rgba(var(--dot-color), 0.07);
  border-radius: 4px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  animation: fadeIn 1s ease 2.2s forwards;
}

@keyframes wordReveal {
  from { opacity: 0; letter-spacing: 0.38em; transform: translateY(10px); }
  to   { opacity: 1; letter-spacing: 0.18em; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}
