:root {
  --bg: #02000a;
  --purple: #c4a1ff;
  --dark-purple: #3a0066;
  --neon: #e0ccff;
  --accent: #b388ff;
  --text: #f0e6ff;
  --shadow: 0 0 40px rgba(179,136,255,0.5);
}

* { margin:0; padding:0; box-sizing:border-box; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Courier New', monospace;
  overflow-x: hidden;
  line-height: 1.7;
  min-height: 100vh;
  cursor: none;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(179,136,255,0.09) 0%, transparent 70%);
  z-index: -3;
  transition: background 1.5s ease;
}

canvas {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  transform: translateZ(0);
}

.crt::before {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(transparent 0px, transparent 4px, rgba(0,0,0,0.05) 4px, rgba(0,0,0,0.05) 8px);
  z-index: 9998;
  animation: scan 14s linear infinite;
  pointer-events: none;
}
@keyframes scan { 0% { transform: translateY(-100%); } 100% { transform: translateY(100%); } }

.loader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 2s ease;
}
.loader.hidden { opacity: 0; pointer-events: none; }

.console-text {
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  color: var(--purple);
  white-space: pre-wrap;
  max-width: 90%;
  text-align: center;
  position: relative;
}
.console-text::after { content: "█"; animation: blink 0.7s infinite; color: var(--neon); }

@keyframes blink { 50% { opacity: 0; } }

.container {
  padding: clamp(10vh, 18vh, 22vh) 5vw;
  position: relative;
  perspective: 1600px;
}

h1 {
  font-size: clamp(6rem, 14vw, 16rem);
  letter-spacing: 0.6em;
  text-align: center;
  background: linear-gradient(90deg, var(--neon), var(--accent), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: var(--shadow);
  margin: 4vh 0 2vh;
  animation: hologram 16s infinite alternate;
  will-change: opacity, filter;
}
@keyframes hologram { 0% { opacity: 0.88; filter: blur(0.8px); } 100% { opacity: 1; filter: blur(0); } }

.glitch {
  position: relative;
  animation: glitch-light 10s infinite;
}
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0.75;
}
.glitch::before { left: 5px; text-shadow: -5px 0 magenta; animation: glitch-rgb 1.4s infinite alternate-reverse; }
.glitch::after  { left: -5px; text-shadow: 5px 0 cyan; animation: glitch-rgb 2s infinite alternate-reverse; }

@keyframes glitch-light { 0%,100% { transform: translate(0); } 20% { transform: translate(-6px,6px); } 40% { transform: translate(6px,-6px); } }
@keyframes glitch-rgb { 0% { clip: rect(0,9999px,100px,0); } 50% { clip: rect(110px,9999px,170px,0); } 100% { clip: rect(0,9999px,60px,0); } }

.subtitle {
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  letter-spacing: 0.5em;
  text-align: center;
  color: var(--purple);
  margin: 3vh 0 10vh;
}

.section {
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 1.8s ease, transform 1.8s ease;
  margin: 25vh 0;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  will-change: opacity, transform;
}
.section.visible {
  opacity: 1;
  transform: translateY(0);
}

.section h2 {
  font-size: clamp(4.5rem, 10vw, 8rem);
  color: var(--neon);
  margin-bottom: 2.5vh;
  text-shadow: var(--shadow);
}

.section p {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  max-width: 80ch;
  margin: 0 auto 3vh;
}

.hold {
  display: inline-block;
  margin: 4vh 0;
  padding: clamp(1rem, 2.5vw, 1.6rem) clamp(2rem, 5vw, 4rem);
  background: rgba(179,136,255,0.1);
  border: 2px solid var(--accent);
  color: var(--neon);
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  cursor: none;
  transition: all 0.4s ease;
  transform: translateZ(0);
}
.hold:hover {
  background: rgba(179,136,255,0.28);
  box-shadow: 0 0 60px var(--accent);
  transform: scale(1.05);
}
.hold:active, .hold.revealed {
  transform: scale(1.1);
  background: rgba(179,136,255,0.45);
}

.fragment {
  font-size: clamp(1.1rem, 2.2vw, 1.4rem);
  color: var(--purple);
  margin-top: 3vh;
  opacity: 0;
  white-space: pre-wrap;
  transition: opacity 1s ease;
  max-width: 80ch;
  margin: 3vh auto 0;
}
.fragment.show { opacity: 1; }

footer {
  padding: 20vh 0 10vh;
  text-align: center;
  color: var(--purple);
  border-top: 1px solid var(--dark-purple);
  position: relative;
}

.ascension {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  transform: translateX(-50%);
  transition: all 6s ease;
  opacity: 0;
}
footer.visible .ascension {
  width: 2000px;
  height: 2000px;
  opacity: 0.28;
}

.custom-cursor {
  position: fixed;
  width: 22px;
  height: 22px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 35px var(--accent);
  mix-blend-mode: screen;
  transition: width 0.35s, height 0.35s;
  will-change: transform;
}
.custom-cursor.active {
  width: 70px;
  height: 70px;
  background: transparent;
  border: 2px solid var(--neon);
  box-shadow: 0 0 90px var(--neon);
}

@media (max-width: 1024px) {
  .container { padding: 12vh 6vw; }
  h1 { letter-spacing: 0.4em; }
  .section { margin: 20vh 0; }
}

@media (max-width: 768px) {
  body { cursor: default; }
  .custom-cursor { display: none; }
  .container { padding: 10vh 5vw; }
  .section p, .fragment { font-size: 1.1rem; }
}