/* THE VAULT — no plaque out front. you have to already know the word. */

:root {
  --void: #050206;
  --brass: #b8935a;
  --brass-dim: #6b5433;
  --parchment: #e8dcc4;
  --wrong: #7a1f1f;
  --right-a: #ff2fd6;
  --right-b: #ffe62f;
  --right-c: #2fe0ff;
}

body.vault {
  background: var(--void);
  color: var(--parchment);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.vault-room {
  text-align: center;
  max-width: 420px;
  width: 100%;
}

.vault-room h1 {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.6rem;
  color: var(--brass);
  margin-bottom: 0.5rem;
}

.vault-room h1 { cursor: pointer; }
.vault-room h1.h1-rattle {
  animation: h1-rattle-kf 0.35s ease-out;
}
@keyframes h1-rattle-kf {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px) rotate(-0.5deg); }
  40% { transform: translateX(4px) rotate(0.5deg); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.vault-room .sub {
  font-size: 0.75rem;
  opacity: 0.75;
  max-width: 36ch;
  margin: 0 auto 2.5rem;
}

/* the door itself: a plate with four blank slots */
.plate {
  border: 2px solid var(--brass-dim);
  border-radius: 6px;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(180deg, #0f0a12, #08050a);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.6);
  transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.plate.shake {
  animation: shake 0.4s ease;
  border-color: var(--wrong);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.plate.open {
  border-color: var(--right-c);
  box-shadow: 0 0 60px 10px rgba(47, 224, 255, 0.35), inset 0 0 40px rgba(0,0,0,0.4);
}

#code-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--brass-dim);
  color: var(--parchment);
  font-family: "Courier New", monospace;
  font-size: 1.6rem;
  letter-spacing: 0.6em;
  text-align: center;
  text-transform: uppercase;
  padding: 0.5rem 0;
  outline: none;
}
#code-input:focus { border-bottom-color: var(--brass); }
#code-input::placeholder { color: var(--brass-dim); letter-spacing: 0.6em; opacity: 0.5; }

.vault-status {
  margin-top: 1rem;
  min-height: 1.2rem;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}

button.turn {
  margin-top: 1.5rem;
  background: transparent;
  border: 1px solid var(--brass-dim);
  color: var(--brass);
  padding: 0.6rem 1.5rem;
  font-family: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  transition: border-color 0.3s ease, color 0.3s ease;
}
button.turn:hover { border-color: var(--brass); color: var(--parchment); }

/* the reveal — hidden until solved */
.reveal {
  margin-top: 2.5rem;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.8s ease;
}
.reveal.shown {
  opacity: 1;
  max-height: 600px;
}

.reveal .piece {
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--right-a), var(--right-b), var(--right-c), var(--right-a));
  filter: blur(0.5px);
  animation: turn-slow 6s linear infinite;
  box-shadow: 0 0 80px 20px rgba(255, 47, 214, 0.4);
}

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

.reveal p {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 0.95rem;
  max-width: 34ch;
  margin: 0 auto;
  color: var(--parchment);
}

.reveal .fine-print {
  margin-top: 1rem;
  font-family: "Courier New", monospace;
  font-style: normal;
  font-size: 0.65rem;
  opacity: 0.6;
  letter-spacing: 0.05em;
}
