/* === Reset & Base === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: #f0f0f0;
  background: #0a0a0a;
  line-height: 1.6;
}

/* === Epilepsy Warning Overlay === */
#epilepsy-warning {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s;
}

.warning-content {
  text-align: center;
  max-width: 600px;
  padding: 3rem 2rem;
  border: 3px solid #ff2222;
  border-radius: 16px;
  background: #111;
  animation: warning-pulse 1.5s ease-in-out infinite;
}

@keyframes warning-pulse {
  0%, 100% { border-color: #ff2222; box-shadow: 0 0 20px rgba(255, 34, 34, 0.3); }
  50% { border-color: #ff6600; box-shadow: 0 0 40px rgba(255, 102, 0, 0.5); }
}

.warning-icon {
  font-size: 5rem;
  color: #ff2222;
  margin-bottom: 1rem;
  animation: warning-shake 0.5s ease-in-out infinite;
}

@keyframes warning-shake {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-5deg); }
  75% { transform: rotate(5deg); }
}

.warning-content h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: #ff2222;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.warning-content p {
  color: #ccc;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.warning-dramatic {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem !important;
  color: #ff4444 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  animation: warning-blink 0.8s step-end infinite;
}

@keyframes warning-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.warning-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

#warning-enter {
  padding: 0.85rem 2rem;
  background: linear-gradient(to right, #ff4444, #ff6600);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

#warning-enter:hover {
  opacity: 0.85;
}

.warning-leave {
  padding: 0.85rem 2rem;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.warning-leave:hover {
  background: #444;
}

/* === Hero === */
.hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #ff0000, #ff8800, #ffff00, #00ff00, #0000ff, #8800ff, #ff0088, #ff0000);
  background-size: 600% 600%;
  animation: psychedelic-bg 3s ease-in-out infinite;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 0, 255, 0.6) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(0, 255, 255, 0.6) 0%, transparent 50%),
    radial-gradient(circle at 50% 80%, rgba(255, 255, 0, 0.6) 0%, transparent 50%);
  animation: psychedelic-blobs 4s ease-in-out infinite alternate;
  mix-blend-mode: overlay;
}

.hero::after {
  content: '';
  position: absolute;
  inset: -50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 0, 0, 0.15) 0deg 10deg,
    rgba(0, 255, 0, 0.15) 10deg 20deg,
    rgba(0, 0, 255, 0.15) 20deg 30deg,
    rgba(255, 255, 0, 0.15) 30deg 40deg
  );
  animation: psychedelic-spin 6s linear infinite;
}

@keyframes psychedelic-bg {
  0% { background-position: 0% 50%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
  100% { background-position: 0% 50%; }
}

@keyframes psychedelic-blobs {
  0% {
    background:
      radial-gradient(circle at 20% 50%, rgba(255, 0, 255, 0.6) 0%, transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(0, 255, 255, 0.6) 0%, transparent 50%),
      radial-gradient(circle at 50% 80%, rgba(255, 255, 0, 0.6) 0%, transparent 50%);
  }
  100% {
    background:
      radial-gradient(circle at 80% 30%, rgba(0, 255, 128, 0.6) 0%, transparent 50%),
      radial-gradient(circle at 20% 80%, rgba(255, 128, 0, 0.6) 0%, transparent 50%),
      radial-gradient(circle at 60% 20%, rgba(128, 0, 255, 0.6) 0%, transparent 50%);
  }
}

@keyframes psychedelic-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-content h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(4rem, 12vw, 10rem);
  letter-spacing: 0.05em;
  line-height: 1;
}

/* === Psychedelic Title Letters === */
.psychedelic-title {
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 500px;
}

.psychedelic-title span {
  display: inline-block;
  animation:
    letter-bulge 1.2s ease-in-out infinite,
    letter-color 2s linear infinite,
    letter-wobble 2.5s ease-in-out infinite;
  animation-delay:
    calc(var(--i) * 0.12s),
    calc(var(--i) * 0.25s),
    calc(var(--i) * 0.18s);
  text-shadow:
    0 0 10px currentColor,
    0 0 30px currentColor,
    0 0 60px currentColor;
  -webkit-text-fill-color: unset;
}

.psychedelic-title span.space {
  width: 0.3em;
}

@keyframes letter-bulge {
  0%, 100% {
    transform: scale(1) translateY(0) rotateY(0deg);
  }
  25% {
    transform: scale(1.4, 0.7) translateY(8px) rotateY(15deg);
  }
  50% {
    transform: scale(0.7, 1.5) translateY(-12px) rotateY(-10deg);
  }
  75% {
    transform: scale(1.3, 0.8) translateY(5px) rotateY(8deg);
  }
}

@keyframes letter-color {
  0%   { color: #ff0000; }
  14%  { color: #ff8800; }
  28%  { color: #ffff00; }
  42%  { color: #00ff00; }
  57%  { color: #00ffff; }
  71%  { color: #0044ff; }
  85%  { color: #ff00ff; }
  100% { color: #ff0000; }
}

@keyframes letter-wobble {
  0%, 100% { transform: rotate(0deg) skewX(0deg); }
  20% { transform: rotate(-8deg) skewX(5deg); }
  40% { transform: rotate(6deg) skewX(-8deg); }
  60% { transform: rotate(-4deg) skewX(10deg); }
  80% { transform: rotate(7deg) skewX(-5deg); }
}

.tagline {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  margin-top: 0.5rem;
  color: #aaa;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* === Nav === */
nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 1.25rem 1rem;
  background: #111;
  border-bottom: 1px solid #222;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: color 0.2s;
}

nav a:hover {
  color: #f7b733;
}

/* === Sections === */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  color: #f7b733;
}

.section p {
  font-size: 1.1rem;
  color: #bbb;
  max-width: 600px;
}

/* === Members === */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.member-card {
  background: #151515;
  border: 1px solid #222;
  border-radius: 12px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
}

.member-card:hover {
  transform: translateY(-4px);
  border-color: #f7b733;
}

.member-photo {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f7b733;
}

.member-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

.member-bio {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: #999;
  max-width: none;
}

/* === Member Cards — Clickable === */
.member-card {
  cursor: pointer;
}

/* === Member Modal === */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 2rem;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #151515;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 3rem 2.5rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #666;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #f7b733;
}

.modal-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #f7b733;
  margin-bottom: 1.5rem;
}

.modal-content h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.05em;
  color: #f0f0f0;
  margin-bottom: 0.25rem;
}

.modal-role {
  font-size: 0.95rem;
  color: #f7b733;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.modal-bio {
  font-size: 1rem;
  color: #aaa;
  line-height: 1.7;
}

/* === Photo Carousel === */
.member-photo-carousel,
.modal-photo-container {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 1.25rem;
}

.modal-photo-container {
  width: 160px;
  height: 160px;
  margin-bottom: 1.5rem;
}

.member-photo-carousel .carousel-photo,
.modal-photo-container .carousel-photo {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.member-photo-carousel .carousel-photo.active,
.modal-photo-container .carousel-photo.active {
  opacity: 1;
}

/* === CTA Button === */
.cta-button {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(to right, #f7b733, #fc4a1a);
  color: #0a0a0a;
  text-decoration: none;
  font-weight: 600;
  border-radius: 6px;
  transition: opacity 0.2s;
}

.cta-button:hover {
  opacity: 0.85;
}

/* === Psychedelic Keyboard === */
.keyboard-section {
  max-width: 1000px;
  text-align: center;
  position: relative;
  overflow: visible;
}

#viz-canvas {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  background: #0a0a0a;
  border: 1px solid #222;
}

.keyboard-wrapper {
  overflow-x: auto;
  padding: 1rem 0;
}

.keyboard {
  display: flex;
  justify-content: center;
  position: relative;
  height: 220px;
  max-width: 750px;
  margin: 0 auto;
  user-select: none;
  -webkit-user-select: none;
}

.key {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 14px;
  cursor: pointer;
  border-radius: 0 0 8px 8px;
  transition: box-shadow 0.1s, filter 0.1s;
}

.key span {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  pointer-events: none;
  opacity: 0.5;
}

.key.white {
  width: 50px;
  height: 100%;
  background: linear-gradient(to bottom, #e8e8e8, #ffffff);
  border: 1px solid #999;
  color: #333;
  z-index: 1;
}

.key.white:hover {
  background: linear-gradient(to bottom, #fff, #f8f8f8);
}

.key.white.active {
  background: linear-gradient(to bottom, #ff00ff, #00ffff);
  box-shadow: 0 0 30px rgba(255, 0, 255, 0.8), 0 0 60px rgba(0, 255, 255, 0.4);
  border-color: #ff00ff;
  animation: key-glow 0.3s ease-out;
}

.key.black {
  width: 34px;
  height: 62%;
  background: linear-gradient(to bottom, #222, #111);
  border: 1px solid #000;
  color: #888;
  z-index: 2;
  margin-left: -17px;
  margin-right: -17px;
}

.key.black:hover {
  background: linear-gradient(to bottom, #333, #1a1a1a);
}

.key.black.active {
  background: linear-gradient(to bottom, #ff4400, #ff00ff);
  box-shadow: 0 0 25px rgba(255, 68, 0, 0.8), 0 0 50px rgba(255, 0, 255, 0.4);
  border-color: #ff4400;
  animation: key-glow 0.3s ease-out;
}

@keyframes key-glow {
  0% { filter: brightness(2.5); }
  100% { filter: brightness(1); }
}

/* Synth Controls */
.synth-controls {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding: 1rem;
  background: #111;
  border: 1px solid #222;
  border-radius: 12px;
}

.synth-controls label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.synth-controls select {
  background: #1a1a1a;
  border: 1px solid #333;
  color: #f0f0f0;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

.synth-controls input[type="range"] {
  width: 100px;
  accent-color: #ff00ff;
  cursor: pointer;
}

/* ripple effect on key press */
.keyboard-section .ripple {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  animation: ripple-expand 1s ease-out forwards;
}

@keyframes ripple-expand {
  0% {
    width: 0;
    height: 0;
    opacity: 0.8;
  }
  100% {
    width: 400px;
    height: 400px;
    opacity: 0;
    margin-left: -200px;
    margin-top: -200px;
  }
}

/* === Footer === */
footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid #1a1a1a;
  color: #555;
  font-size: 0.85rem;
}
