*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #060606;
  --white: #ede9e1;
  --dim: rgba(237,233,225,0.06);
}

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  overflow: hidden;
  cursor: none;
  font-family: 'Share Tech Mono', monospace;
}

#cursor {
  position: fixed;
  width: 6px; height: 6px;
  background: var(--white);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s, opacity 0.2s;
  mix-blend-mode: difference;
}

#grid-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

#scene {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

#title-wrap {
  position: relative;
  margin-bottom: 64px;
  text-align: center;
}

#title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.2rem, 3vw, 2rem);
  letter-spacing: 0.45em;
  color: rgba(237,233,225,0.22);
  user-select: none;
}

#title-line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, rgba(237,233,225,0.2), transparent);
  margin: 14px auto 0;
}

#nodes {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}

.connector {
  width: 60px;
  height: 1px;
  position: relative;
  flex-shrink: 0;
}

.connector::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, rgba(237,233,225,0.06), rgba(237,233,225,0.18), rgba(237,233,225,0.06));
}

.connector-dot {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(237,233,225,0.3);
  animation: dotpulse 3s ease-in-out infinite;
}

@keyframes dotpulse {
  0%, 100% { opacity: 0.2; transform: translate(-50%,-50%) scale(1); }
  50%       { opacity: 0.7; transform: translate(-50%,-50%) scale(1.4); }
}

.node {
  position: relative;
  width: 130px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  flex-shrink: 0;
}

.node-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(237,233,225,0.12);
  transition: border-color 0.3s, transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

.node-ring-outer {
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 1px solid rgba(237,233,225,0.04);
  transition: border-color 0.3s, transform 0.5s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
}

.node-bg {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(10,10,10,0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.node-canvas {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.node-label {
  position: relative;
  z-index: 2;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.22em;
  color: rgba(237,233,225,0.7);
  user-select: none;
  transition: color 0.25s, letter-spacing 0.25s;
}

.node-sub {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.46rem;
  letter-spacing: 0.28em;
  color: rgba(237,233,225,0.18);
  white-space: nowrap;
  transition: color 0.25s, opacity 0.25s;
  opacity: 0;
}

.node:hover .node-ring        { transform: scale(1.06); border-color: rgba(237,233,225,0.35); }
.node:hover .node-ring-outer  { transform: scale(1.1);  border-color: rgba(237,233,225,0.12); opacity: 1; }
.node:hover .node-label       { color: var(--white); letter-spacing: 0.28em; }
.node:hover .node-sub         { opacity: 1; color: rgba(237,233,225,0.4); }

#node-begs:hover .node-ring   { border-color: rgba(237,233,225,0.5); box-shadow: 0 0 28px rgba(237,233,225,0.08); }
#node-ache:hover .node-ring   { border-color: rgba(200,180,255,0.4); box-shadow: 0 0 28px rgba(160,120,255,0.12); }
#node-bleeds:hover .node-ring { border-color: rgba(255,40,60,0.5);   box-shadow: 0 0 28px rgba(200,0,26,0.14); }
#node-tools:hover .node-ring  { border-color: rgba(80,200,160,0.5);  box-shadow: 0 0 28px rgba(40,180,130,0.14); }

#node-ache .node-label   { opacity: 0.55; }
#node-bleeds .node-label { color: rgba(200,80,90,0.7); }
#node-bleeds:hover .node-label { color: #e8404c; }

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.05) 2px, rgba(0,0,0,0.05) 4px);
  pointer-events: none;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: radial-gradient(ellipse at center, transparent 25%, rgba(0,0,0,0.92) 100%);
  pointer-events: none;
}

#est {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.5rem;
  letter-spacing: 0.4em;
  color: rgba(237,233,225,0.1);
  z-index: 60;
  text-transform: uppercase;
  user-select: none;
}

.corner {
  position: fixed;
  z-index: 60;
  width: 14px; height: 14px;
  pointer-events: none;
}
.corner.tl { top: 16px; left: 16px;  border-top: 1px solid rgba(184,0,26,0.5);   border-left: 1px solid rgba(184,0,26,0.5); }
.corner.tr { top: 16px; right: 16px; border-top: 1px solid rgba(184,0,26,0.5);   border-right: 1px solid rgba(184,0,26,0.5); }
.corner.bl { bottom: 16px; left: 16px;  border-bottom: 1px solid rgba(184,0,26,0.5); border-left: 1px solid rgba(184,0,26,0.5); }
.corner.br { bottom: 16px; right: 16px; border-bottom: 1px solid rgba(184,0,26,0.5); border-right: 1px solid rgba(184,0,26,0.5); }

#tools-wrap {
  margin-top: 52px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

#tools-line {
  width: 1px;
  height: 28px;
  background: linear-gradient(to bottom, rgba(237,233,225,0.2), rgba(237,233,225,0.06));
}

#tools-label {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.2rem, 3vw, 2rem);
  letter-spacing: 0.45em;
  color: rgba(237,233,225,0.22);
  user-select: none;
}

#tools-btn {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px 32px;
  border: 1px solid rgba(237,233,225,0.1);
  background: transparent;
  cursor: none;
  transition: border-color 0.25s, background 0.25s;
  margin-top: 2px;
}

#tools-btn:hover {
  border-color: rgba(237,233,225,0.32);
  background: rgba(237,233,225,0.03);
}

#tools-btn:hover #tools-btn-text { color: rgba(237,233,225,0.75); }
#tools-btn:hover #tools-btn-arrow { color: rgba(237,233,225,0.6); transform: translateX(4px); }

#tools-btn-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(237,233,225,0.35);
  transition: color 0.25s;
  user-select: none;
}

#tools-btn-arrow {
  font-size: 0.7rem;
  color: rgba(237,233,225,0.2);
  transition: color 0.25s, transform 0.25s;
  display: inline-block;
}
