/* ============================================
   VAULT / page stylesheet
   self-contained — does not load main.css
   pure black + vivid red. nothing else.
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --red: #c5001f;
  --red-dim: rgba(197, 0, 31, 0.4);
  --red-ghost: rgba(197, 0, 31, 0.18);
  --red-glow: rgba(197, 0, 31, 0.22);
  --bg: #000;
  --text: #fff;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow: hidden;
  opacity: 0;
  animation: page-load 0.5s ease forwards;
}
@keyframes page-load {
  from { opacity: 0; }
  to { opacity: 1; }
}

.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 32px;
}

/* =========================================
   PHASE 1 — TITLE
   pure opacity fade, no scale, no translate
   ========================================= */
.title {
  font-family: 'Inter', sans-serif;
  font-weight: 900;
  font-size: clamp(110px, 22vw, 340px);
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: var(--red);
  text-align: center;
  text-shadow: 0 0 90px var(--red-glow);
  opacity: 0;
  transition: opacity 0.04s linear;
  will-change: opacity, transform;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
}
.title.in {
  opacity: 1;
  animation: title-loom 3.4s linear forwards;
}
@keyframes title-loom {
  from { transform: translate(-50%, -50%) scale(1); }
  to   { transform: translate(-50%, -50%) scale(1.02); }
}
.title.out {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================
   PHASE 2 — GATE
   smaller. dimmer. mysterious.
   pure opacity fade, no translate.
   ========================================= */
.gate {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.0s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity;
}
.gate.in {
  opacity: 1;
  pointer-events: auto;
}
.gate-label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 10px;
  color: var(--red);
  text-transform: uppercase;
  text-shadow: 0 0 22px var(--red-glow);
  user-select: none;
}
.gate-form {
  width: clamp(200px, 26vw, 280px);
  text-align: center;
}
.gate-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--red-ghost);
  color: var(--text);
  caret-color: var(--red);
  padding: 8px 0;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 6px;
  text-align: center;
  text-transform: uppercase;
  transition: border-color 0.35s ease;
}
.gate-input::placeholder { color: rgba(197, 0, 31, 0.18); letter-spacing: 6px; }
.gate-input:focus {
  outline: none;
  border-bottom-color: var(--red);
}
.gate-hint {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.22);
  text-transform: uppercase;
  text-align: center;
  margin-top: -2px;
  user-select: none;
  transition: color 0.3s ease;
}
.gate-form:focus-within + .gate-hint {
  color: rgba(255, 255, 255, 0.35);
}
.gate.denied .gate-input {
  animation: shake 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97);
  border-bottom-color: var(--red);
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-5px); }
  30% { transform: translateX(5px); }
  45% { transform: translateX(-3px); }
  60% { transform: translateX(3px); }
  75% { transform: translateX(-2px); }
  90% { transform: translateX(1px); }
}

/* =========================================
   PHASE 3 — UNLOCKED CONTENT
   pure opacity fade
   ========================================= */
.content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  gap: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
  min-width: 360px;
}
.content.in {
  opacity: 1;
  pointer-events: auto;
}
.content-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  padding: 12px 0;
  border-bottom: 1px solid var(--red-ghost);
}
.content-row:last-child { border-bottom: none; }
.content-label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--red);
  text-transform: uppercase;
}
.content-value {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--text);
  text-transform: uppercase;
}

/* =========================================
   SPLASH — tap-to-enter overlay (audio gesture)
   ========================================= */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-tap-highlight-color: transparent;
}
.splash.fade {
  opacity: 0;
  pointer-events: none;
}
.splash-label {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 10px;
  color: var(--red);
  text-shadow: 0 0 18px var(--red-glow);
  text-transform: uppercase;
  user-select: none;
  animation: splash-pulse 2.6s ease-in-out infinite;
}
@keyframes splash-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

/* =========================================
   Audio toggle (corner)
   ========================================= */
.audio-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: transparent;
  border: none;
  color: var(--red-ghost);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 4px;
  text-transform: lowercase;
  cursor: pointer;
  padding: 8px;
  transition: color 0.3s ease;
  z-index: 10;
  user-select: none;
}
.audio-toggle:hover { color: var(--red); }
.audio-toggle.muted { color: rgba(197, 0, 31, 0.07); }

/* =========================================
   Reduced motion
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  body { opacity: 1 !important; }
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 720px) {
  .gate-label { letter-spacing: 8px; }
  .gate-input { letter-spacing: 5px; font-size: 13px; }
  .content { min-width: auto; width: 100%; max-width: 320px; }
  .content-row { grid-template-columns: 80px 1fr; gap: 16px; }
}
