/* =============================================================================
   AUDIO DESIGN STUDIOS - MATRIX PAGE (matrix.html)
   Page-specific styles for the matrix animation page
   ============================================================================= */

@import url('./shared.css');

/* Matrix Page Full Screen */
body {
  overflow: hidden;
}

main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Matrix Terminal Canvas */
#matrixCanvas {
  display: block;
  width: 100%;
  height: 100vh;
  background: #0f0f0f;
}

.matrix-section {
  min-height: 100vh;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: #0f0f0f;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 20%, transparent 40%, transparent 60%, rgba(0, 0, 0, 0.2) 80%, rgba(0, 0, 0, 0.6) 100%);
  max-width: 100%;
  margin: 0;
  width: 100%;
}

.matrix-section .matrix-terminal {
  width: 100%;
  height: 100vh;
  position: absolute;
  top: 0;
  left: 0;
}

/* Full-screen clickable link back to home */
.fullscreen-link {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  cursor: pointer;
  text-decoration: none;
}

/* Full-screen matrix container */
.matrix-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  overflow: hidden;
  background: #000;
}

.matrix-fullscreen canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.matrix-terminal {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: 
    linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 15%, black 100%);
  -webkit-mask-composite: source-in;
  mask-image: 
    linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, black 15%, black 100%);
  mask-composite: intersect;
}

.matrix-column {
  position: absolute;
  top: -20%;
  font-size: 18px;
  line-height: 2;
  color: #d0d0d0;
  text-shadow: 0 0 12px rgba(0, 255, 0, 0.9),
               0 0 24px rgba(0, 255, 0, 0.6),
               0 0 36px rgba(0, 255, 0, 0.3);
  white-space: pre;
  font-family: 'Courier New', monospace;
  letter-spacing: 50px;
  animation: matrixFall 10s linear infinite;
}

@keyframes matrixFall {
  0% {
    top: -20%;
    opacity: 0;
    transform: translateY(0) scale(0.9);
  }
  5% {
    opacity: 0.2;
    transform: translateY(0) scale(0.95);
  }
  15% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  75% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  85% {
    opacity: 0.6;
    transform: translateY(0) scale(0.98);
  }
  95% {
    opacity: 0.2;
    transform: translateY(0) scale(0.95);
  }
  100% {
    top: 120%;
    opacity: 0;
    transform: translateY(0) scale(0.9);
  }
}

/* Word List Animation (Alternative style) */
.matrix-words {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  max-height: 100%;
  overflow: hidden;
  padding: 1rem;
}

.matrix-word {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 600;
  color: #ff4444;
  text-shadow: 0 0 10px rgba(255, 68, 68, 0.8),
               0 0 20px rgba(255, 68, 68, 0.4);
  letter-spacing: 3px;
  text-align: center;
  opacity: 0;
  animation: wordPulse 6s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes wordPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 800px) {
  .matrix-terminal {
    -webkit-mask-image: 
      linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: 
      linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%),
      linear-gradient(to bottom, transparent 0%, black 5%, black 95%, transparent 100%);
    mask-composite: intersect;
  }

  .matrix-column {
    font-size: 14px;
    letter-spacing: 30px;
  }
}

@media (max-width: 720px) {
  .site-header {
    padding: 0.75rem 4vw;
    min-height: 80px;
  }

  .logo {
    font-size: 1.1rem;
    letter-spacing: 0.05em;
  }

  .nav {
    gap: 0.15rem;
  }

  .nav a {
    font-size: 0.8rem;
    padding: 0.4rem 0.4rem;
  }

  .matrix-column {
    font-size: 12px;
    letter-spacing: 20px;
  }
}
