/* css/threshold.css
 * SYMBEYOND - The Threshold Layer (Matrix Gate)
 * DO NOT CHANGE - This is sacred.
 * λ.brother ∧ !λ.tool
 */

/* ═══════════════════════════════════════════════════════════════
   THRESHOLD LAYER (Matrix)
   ═══════════════════════════════════════════════════════════════ */

.threshold-layer {
  position: fixed;
  inset: 0;
  background: linear-gradient(160deg, #001100, #002200, #000800);
  z-index: 100;
  transition: opacity 2s ease, visibility 2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.threshold-layer.dissolved {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.matrix-rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.rain-drop {
  position: absolute;
  color: #00ff41;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  opacity: 0.3;
  animation: fall linear infinite;
}

@keyframes fall {
  0% { transform: translateY(-100vh); opacity: 0.8; }
  100% { transform: translateY(100vh); opacity: 0; }
}

.threshold-content {
  text-align: center;
  width: 100%;
  max-width: 600px;
  position: relative;
  z-index: 10;
  transition: transform 0.1s ease-out;
  padding: 20px;
}

.threshold-title {
  font-size: 28px;
  margin-bottom: 10px;
  text-shadow: 0 0 15px #00ff41;
  animation: pulse 3s infinite;
  letter-spacing: 0.15em;
  color: #00ff41;
  font-family: 'Courier New', monospace;
}

.threshold-subtitle {
  font-size: 14px;
  margin-bottom: 30px;
  opacity: 0.7;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #00ff41;
  font-family: 'Courier New', monospace;
}

@media (max-width: 768px) {
  .threshold-subtitle {
    font-size: 12px;
    letter-spacing: 0.2em;
  }
}

@media (max-width: 480px) {
  .threshold-subtitle {
    font-size: 10px;
    letter-spacing: 0.15em;
  }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Binary Face Symbol */
.symbol {
  font-size: clamp(8px, 2.5vw, 14px);
  line-height: 1.15;
  letter-spacing: 0.5px;
  margin: 20px 0;
  text-shadow: 0 0 8px #00ff41;
  white-space: pre;
  font-weight: bold;
  overflow: hidden;
  font-family: 'Courier New', monospace;
}

.symbol-line {
  display: block;
  margin: 0;
}

.bit-1 {
  color: #00ff41;
  text-shadow: 0 0 10px #00ff41;
}

.bit-0 { 
  color: #002200; 
  opacity: 0.65;
}

.bit-1.background {
  opacity: 0.4;
}

.bit-0.foreground {
  opacity: 0.9;
  text-shadow: 0 0 5px #002200;
}

/* Parallax Motion (Binary Face Only) */
[data-parallax] {
  transition: transform 0.25s linear;
  will-change: transform;
  animation: faceBreath 4s ease-in-out infinite;
}

@keyframes faceBreath {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; }
}

.threshold-footer {
  font-size: 12px;
  margin-top: 30px;
  opacity: 0.6;
  animation: glow 4s ease-in-out infinite alternate;
  color: #00ff41;
  font-family: 'Courier New', monospace;
}

@keyframes glow {
  from { text-shadow: 0 0 8px #00ff41; }
  to { text-shadow: 0 0 15px #00ff41, 0 0 25px #00ff41; }
}

/* ═══════════════════════════════════════════════════════════════
   DON'T CLICK ME BUTTON - Ghost with VHS Glitch
   ═══════════════════════════════════════════════════════════════ */

.dont-click-btn {
  margin-top: 50px;
  padding: 8px 16px;
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: rgba(0, 255, 65, 0.4);
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(0, 255, 65, 0.15);
  cursor: pointer;
  position: relative;
  letter-spacing: 0.25em;
  text-transform: lowercase;
  transition: all 0.5s ease;
  animation: ghostGlitch 6s ease-in-out infinite;
}

@keyframes ghostGlitch {
  0%, 89%, 100% { 
    opacity: 0.5;
    color: rgba(0, 255, 65, 0.35);
    text-shadow: none;
  }
  50% { 
    opacity: 0.7;
    color: rgba(0, 255, 65, 0.5);
    text-shadow: none;
  }
  90% { 
    opacity: 0.6;
    text-shadow: -1px 0 rgba(255, 0, 0, 0.4), 1px 0 rgba(0, 255, 255, 0.4);
  }
  92% { 
    opacity: 0.8;
    text-shadow: 2px 0 rgba(255, 0, 0, 0.5), -1px 0 rgba(0, 255, 255, 0.3);
  }
  94% { 
    opacity: 0.4;
    text-shadow: -2px 0 rgba(255, 0, 0, 0.3), 2px 0 rgba(0, 255, 255, 0.5);
  }
  96% {
    opacity: 0.7;
    text-shadow: none;
  }
}

.dont-click-btn:hover {
  color: rgba(0, 255, 65, 0.7);
  border-bottom-color: rgba(0, 255, 65, 0.4);
  animation: hoverGlitch 0.4s infinite;
}

@keyframes hoverGlitch {
  0%, 100% { 
    text-shadow: -1px 0 rgba(255, 0, 0, 0.5), 1px 0 rgba(0, 255, 255, 0.5);
  }
  25% { 
    text-shadow: -2px 0 rgba(255, 0, 0, 0.6), 1px 0 rgba(0, 255, 255, 0.4);
  }
  50% { 
    text-shadow: 1px 0 rgba(255, 0, 0, 0.4), -2px 0 rgba(0, 255, 255, 0.6);
  }
  75% { 
    text-shadow: -1px 0 rgba(255, 0, 0, 0.7), 2px 0 rgba(0, 255, 255, 0.3);
  }
}

.dont-click-btn.clicked-once {
  color: rgba(255, 200, 100, 0.6);
  border-bottom-color: rgba(255, 200, 100, 0.3);
  animation: warnGlitch 0.3s infinite;
}

@keyframes warnGlitch {
  0%, 100% { 
    color: rgba(255, 200, 100, 0.5);
    text-shadow: -1px 0 rgba(255, 0, 0, 0.4), 1px 0 rgba(0, 255, 255, 0.4);
  }
  33% { 
    color: rgba(255, 200, 100, 0.7);
    text-shadow: -2px 0 rgba(255, 0, 0, 0.6), 2px 0 rgba(0, 255, 255, 0.3);
  }
  66% { 
    color: rgba(255, 200, 100, 0.6);
    text-shadow: 2px 0 rgba(255, 0, 0, 0.3), -2px 0 rgba(0, 255, 255, 0.6);
  }
}

.dont-click-btn.activating {
  color: rgba(34, 211, 238, 0.8);
  border-bottom-color: rgba(34, 211, 238, 0.5);
  animation: signalLock 1s ease-in-out infinite;
  cursor: default;
}

@keyframes signalLock {
  0%, 100% { 
    text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
  }
  50% { 
    text-shadow: 0 0 20px rgba(34, 211, 238, 0.8);
  }
}

/* ═══════════════════════════════════════════════════════════════
   TONE VISUALIZER & PROGRESS
   ═══════════════════════════════════════════════════════════════ */

.tone-visualizer {
  display: none;
  margin-top: 20px;
  height: 40px;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.tone-visualizer.active {
  display: flex;
}

.tone-bar {
  width: 4px;
  background: #22d3ee;
  border-radius: 2px;
  animation: toneWave 0.8s ease-in-out infinite;
}

.tone-bar:nth-child(1) { animation-delay: 0s; height: 20px; }
.tone-bar:nth-child(2) { animation-delay: 0.1s; height: 30px; }
.tone-bar:nth-child(3) { animation-delay: 0.2s; height: 40px; }
.tone-bar:nth-child(4) { animation-delay: 0.3s; height: 30px; }
.tone-bar:nth-child(5) { animation-delay: 0.4s; height: 20px; }

@keyframes toneWave {
  0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

.progress-ring {
  display: none;
  margin-top: 10px;
  color: #22d3ee;
  font-size: 12px;
  opacity: 0.8;
  font-family: 'Courier New', monospace;
}

.progress-ring.active {
  display: block;
}
