/* Enagic Japan - Confidential Prototype Authentication Screen (Gatekeeper) */

.gatekeeper-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: var(--space-4, 1rem);
  background: radial-gradient(circle at 50% 25%, rgba(0, 78, 162, 0.12), transparent 75%), var(--bg, #f8fafd);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 1;
  visibility: visible;
  transition: opacity 350ms cubic-bezier(0.16, 1, 0.3, 1), visibility 350ms cubic-bezier(0.16, 1, 0.3, 1);
}

.gatekeeper-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gatekeeper-card {
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2rem 2rem;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--r-lg, 16px);
  box-shadow: 0 20px 40px -15px rgba(12, 5, 69, 0.12), 0 0 0 1px rgba(0, 78, 162, 0.04);
  text-align: center;
  animation: gatekeeperIn 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gatekeeperIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.gatekeeper-brand {
  display: inline-block;
  margin-bottom: 1.25rem;
}

.gatekeeper-brand img {
  height: 42px;
  width: auto;
  margin-inline: auto;
}

.gatekeeper-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-tint, rgba(0, 78, 162, 0.08));
  color: var(--brand, #004ea2);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.875rem;
}

.gatekeeper-badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand, #004ea2);
}

.gatekeeper-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink, #0c0545);
  margin-bottom: 0.5rem;
}

.gatekeeper-desc {
  font-size: 0.8125rem;
  color: var(--ink-2, #555f6e);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.gatekeeper-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gatekeeper-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.gatekeeper-input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 16px;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--r-md, 10px);
  background: var(--surface, #ffffff);
  color: var(--ink, #0c0545);
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  transition: all 180ms ease-out;
}

.gatekeeper-input:focus {
  outline: none;
  border-color: var(--brand, #004ea2);
  box-shadow: 0 0 0 3px rgba(0, 78, 162, 0.15);
}

.gatekeeper-input.is-error {
  border-color: #dc2626;
  background-color: #fef2f2;
}

.gatekeeper-toggle-pwd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--ink-3, #8a94a6);
  cursor: pointer;
  border-radius: 6px;
  transition: color 150ms ease;
}

.gatekeeper-toggle-pwd:hover {
  color: var(--brand, #004ea2);
}

.gatekeeper-error-msg {
  display: none;
  font-size: 0.75rem;
  color: #dc2626;
  font-weight: 500;
  text-align: left;
  margin-top: -0.5rem;
}

.gatekeeper-error-msg.is-visible {
  display: block;
}

.gatekeeper-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--r-md, 10px);
  background: var(--brand, #004ea2);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 180ms ease-out;
  box-shadow: 0 4px 14px rgba(0, 78, 162, 0.25);
}

.gatekeeper-btn:hover {
  background: var(--brand-dark, #003a7a);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 78, 162, 0.32);
}

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

.gatekeeper-note {
  margin-top: 1.5rem;
  font-size: 0.6875rem;
  color: var(--ink-3, #8a94a6);
  line-height: 1.5;
  border-top: 1px solid var(--line, #e2e8f0);
  padding-top: 1rem;
}

@media (prefers-color-scheme: dark) {
  .gatekeeper-overlay {
    background: radial-gradient(circle at 50% 25%, rgba(0, 150, 214, 0.12), transparent 75%), #0c0545;
  }
  .gatekeeper-card {
    background: #140d58;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.4);
  }
  .gatekeeper-title {
    color: #ffffff;
  }
  .gatekeeper-desc {
    color: #b0b8c8;
  }
  .gatekeeper-input {
    background: #1c146a;
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
  }
  .gatekeeper-note {
    border-top-color: rgba(255, 255, 255, 0.08);
    color: #7b8599;
  }
}
