/* ============================================
   Entry Gate — Secure Access Portal
   ============================================ */

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

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body {
  background: #0a0a14;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Ambient background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 25% 40%, rgba(201, 168, 76, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 60%, rgba(22, 33, 62, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(10, 10, 20, 0.9) 0%, #0a0a14 70%);
  pointer-events: none;
  z-index: 0;
}

/* Scan lines */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(201, 168, 76, 0.008) 2px,
    rgba(201, 168, 76, 0.008) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.gate-container {
  position: relative;
  z-index: 10;
  text-align: center;
  width: 100%;
  max-width: 420px;
  padding: 0 2rem;
}

/* Emblem */
.gate-emblem {
  width: 64px;
  height: 64px;
  border: 1.5px solid rgba(201, 168, 76, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2.5rem;
  position: relative;
}

.gate-emblem::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(201, 168, 76, 0.08);
  border-radius: 50%;
}

.gate-emblem svg {
  width: 24px;
  height: 24px;
  stroke: rgba(201, 168, 76, 0.6);
  fill: none;
  stroke-width: 1.5;
}

/* Title */
.gate-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: rgba(245, 240, 232, 0.85);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.gate-subtitle {
  font-size: 0.7rem;
  color: rgba(245, 240, 232, 0.25);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 3rem;
}

/* Input field */
.gate-input-wrapper {
  position: relative;
  margin-bottom: 1.5rem;
}

.gate-input {
  width: 100%;
  padding: 1rem 1.2rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-align: center;
  color: rgba(245, 240, 232, 0.8);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 4px;
  outline: none;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  -webkit-text-security: disc;
}

.gate-input::placeholder {
  color: rgba(245, 240, 232, 0.15);
  letter-spacing: 0.15em;
  font-family: 'Inter', sans-serif;
  -webkit-text-security: none;
}

.gate-input:focus {
  border-color: rgba(201, 168, 76, 0.4);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 0 4px rgba(201, 168, 76, 0.06);
}

/* Error state */
.gate-input.error {
  border-color: rgba(220, 80, 80, 0.5);
  animation: shake 0.4s ease;
}

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

/* Button */
.gate-btn {
  width: 100%;
  padding: 0.9rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(10, 10, 20, 0.9);
  background: rgba(201, 168, 76, 0.85);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gate-btn:hover {
  background: rgba(201, 168, 76, 1);
  box-shadow: 0 4px 24px rgba(201, 168, 76, 0.2);
  transform: translateY(-1px);
}

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

/* Error message */
.gate-error {
  font-size: 0.72rem;
  color: rgba(220, 100, 100, 0.7);
  margin-top: 1rem;
  letter-spacing: 0.1em;
  opacity: 0;
  transition: opacity 0.3s ease;
  height: 1.2em;
}

.gate-error.visible {
  opacity: 1;
}

/* Classification label */
.gate-classification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: rgba(201, 168, 76, 0.15);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  z-index: 10;
}

/* Success transition overlay */
.gate-success-overlay {
  position: fixed;
  inset: 0;
  background: #0a0a14;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.gate-success-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.gate-success-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  color: rgba(201, 168, 76, 0.6);
  letter-spacing: 0.15em;
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 480px) {
  .gate-container {
    padding: 0 1.5rem;
  }

  .gate-title {
    font-size: 1.3rem;
  }

  .gate-input {
    font-size: 0.8rem;
    padding: 0.85rem 1rem;
  }
}
