/* ============================================
   Access Gate — H.E. Abdullah bin Muhair Al Ketbi
   Deep Obsidian / Sovereign Gold Futuristic
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #05080f 0%, #0a0f1a 25%, #0d1424 50%, #111a30 75%, #0c1322 100%);
  overflow: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(196, 169, 86, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(180, 150, 60, 0.05) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(140, 120, 60, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

body::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.012'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
}

/* Particle canvas */
#particleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Grid overlay */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(196, 169, 86, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 169, 86, 0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 1;
  animation: gridPulse 8s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Animated background orbs */
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.08;
  animation: floatOrb 22s ease-in-out infinite;
  z-index: 2;
}

.bg-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #c4a956, #0a0f1a);
  top: -20%;
  left: -15%;
  animation-delay: 0s;
}

.bg-orb-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #b8963c, #7a6530);
  bottom: -15%;
  right: -10%;
  animation-delay: -8s;
}

.bg-orb-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, #d4b96e, #8a7540);
  top: 50%;
  left: 60%;
  transform: translate(-50%, -50%);
  animation-delay: -15s;
}

.bg-orb-4 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, #e8d48b, #c4a956);
  top: 15%;
  right: 25%;
  animation-delay: -4s;
  opacity: 0.05;
}

@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(40px, -40px) scale(1.08); }
  50% { transform: translate(-30px, 30px) scale(0.92); }
  75% { transform: translate(30px, 20px) scale(1.04); }
}

/* Access card */
.access-card {
  position: relative;
  z-index: 10;
  width: min(480px, 92vw);
  padding: 3.4rem 3rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(40px) saturate(1.3);
  -webkit-backdrop-filter: blur(40px) saturate(1.3);
  border: 1px solid rgba(196, 169, 86, 0.15);
  border-radius: 28px;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.5),
    0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 60px rgba(196, 169, 86, 0.04);
  text-align: center;
  animation: cardEnter 1s cubic-bezier(0.4, 0, 0.2, 1) both;
  overflow: hidden;
}

.access-glow {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(196, 169, 86, 0.6), transparent);
  filter: blur(1px);
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(50px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Shield emblem */
.access-emblem {
  width: 72px;
  height: 72px;
  margin: 0 auto 2rem;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(196, 169, 86, 0.15), rgba(180, 150, 60, 0.1));
  border: 1px solid rgba(196, 169, 86, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cardEnter 1s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
  position: relative;
}

.access-emblem::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(196, 169, 86, 0.3), transparent, rgba(180, 150, 60, 0.2));
  z-index: -1;
  filter: blur(6px);
  opacity: 0.5;
}

.access-emblem svg {
  width: 30px;
  height: 30px;
  stroke: #c4a956;
  fill: none;
  stroke-width: 1.5;
}

.access-pretitle {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(196, 169, 86, 0.6);
  margin-bottom: 0.6rem;
  animation: cardEnter 1s cubic-bezier(0.4, 0, 0.2, 1) 0.25s both;
}

.access-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  animation: cardEnter 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.access-subtitle {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 2.8rem;
  line-height: 1.6;
  animation: cardEnter 1s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

.access-form {
  animation: cardEnter 1s cubic-bezier(0.4, 0, 0.2, 1) 0.5s both;
}

.input-wrapper {
  position: relative;
  margin-bottom: 1.4rem;
}

.input-wrapper svg {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: rgba(255, 255, 255, 0.25);
  fill: none;
  stroke-width: 1.5;
  pointer-events: none;
  transition: stroke 0.3s;
}

.access-input {
  width: 100%;
  padding: 1.05rem 1.2rem 1.05rem 3.2rem;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: #ffffff;
  transition: all 0.3s;
}

.access-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.access-input:focus {
  outline: none;
  border-color: rgba(196, 169, 86, 0.4);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 4px rgba(196, 169, 86, 0.06), 0 0 30px rgba(196, 169, 86, 0.06);
}

.access-input:focus + svg,
.access-input:focus ~ svg {
  stroke: #c4a956;
}

.access-btn {
  width: 100%;
  padding: 1.05rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  background: linear-gradient(135deg, #c4a956, #9a8040);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.35s;
  letter-spacing: 0.03em;
  position: relative;
  overflow: hidden;
}

.access-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.access-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(196, 169, 86, 0.25);
}

.access-btn:hover::before { opacity: 1; }

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

.btn-text { position: relative; z-index: 1; }
.btn-loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error message */
.access-error {
  margin-top: 1.2rem;
  padding: 0.8rem 1rem;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-radius: 14px;
  font-size: 0.82rem;
  color: #fca5a5;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.access-error.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Shake */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
  20%, 40%, 60%, 80% { transform: translateX(6px); }
}

.shake { animation: shake 0.5s ease-in-out; }

.access-footer {
  margin-top: 2.8rem;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: 0.04em;
  animation: cardEnter 1s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both;
}

/* Responsive */
@media (max-width: 480px) {
  .access-card {
    padding: 2.6rem 1.8rem;
    border-radius: 22px;
  }
  .access-title { font-size: 1.35rem; }
  .access-subtitle { font-size: 0.82rem; }
}
