/* ── Password Gate Overlay ───────────────────────────── */
#gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: opacity .5s ease, visibility .5s ease;
}

#gate-overlay.gate-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 2.5rem 2rem 2.75rem;
  max-width: 400px;
  width: min(400px, 100%);
  margin: 0 auto;
  text-align: center;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  animation: gate-float-in .6s cubic-bezier(.22, 1, .36, 1);
}

.gate-logo {
  display: block;
  width: min(220px, 70%);
  height: auto;
  margin: 0 auto 1.1rem;
  border-radius: 12px;
  background: #fff;
  padding: 0.55rem 0.75rem;
}

@keyframes gate-float-in {
  from { opacity: 0; transform: translateY(30px) scale(.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.gate-card h2 {
  font-family: 'Space Grotesk', 'Outfit', system-ui, sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 .5rem;
  letter-spacing: -.02em;
}

.gate-card p {
  font-family: 'Outfit', system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.55);
  font-size: .95rem;
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.gate-input-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.gate-input {
  width: 100%;
  padding: .9rem 1.2rem;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 1.15rem;
  font-family: 'Space Grotesk', monospace;
  letter-spacing: .25em;
  text-align: center;
  outline: none;
  transition: border-color .25s ease, box-shadow .25s ease;
  box-sizing: border-box;
}

.gate-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: .15em;
}

.gate-input:focus {
  border-color: #a78bfa;
  box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.15);
}

.gate-input.gate-shake {
  animation: gate-shake .5s ease;
  border-color: #f87171;
  box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.15);
}

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

.gate-btn {
  width: 100%;
  padding: .85rem 1.5rem;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  color: #fff;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
}

.gate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
}

.gate-btn:active {
  transform: translateY(0);
}

.gate-error {
  color: #f87171;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: .85rem;
  margin-top: .75rem;
  min-height: 1.2em;
  transition: opacity .2s;
}

/* Hide page content behind gate — avoid asymmetric blur pull */
body.gate-locked > :not(#gate-overlay) {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}
