/* ============================================================
   Password Gate — Confidential Access Portal
   ============================================================ */

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

:root {
  --color-bg: #0b1320;
  --color-bg-2: #11192a;
  --color-ink: #f4f1ea;
  --color-ink-mute: rgba(244,241,234,0.62);
  --color-gold: #d4a85a;
  --color-gold-deep: #b8893a;
  --color-line: rgba(255,255,255,0.10);
  --grad-gold: linear-gradient(135deg, #d4a85a 0%, #b8893a 50%, #8a6422 100%);
  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  background: radial-gradient(ellipse at 70% 20%, #1a2438 0%, #0b1320 60%, #06090f 100%);
  color: var(--color-ink);
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  pointer-events: none;
}

body::after {
  content: "";
  position: absolute;
  width: 60vmax; height: 60vmax;
  top: -20vmax; right: -20vmax;
  background: radial-gradient(circle, rgba(212,168,90,0.18), transparent 60%);
  filter: blur(20px);
  pointer-events: none;
  animation: orb-pulse 9s ease-in-out infinite alternate;
}

@keyframes orb-pulse {
  from { transform: scale(0.95); opacity: 0.7; }
  to   { transform: scale(1.05); opacity: 1;  }
}

.gate-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  text-align: center;
  animation: fade-up 0.9s var(--ease) both;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.gate-emblem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--color-line);
  position: relative;
}
.gate-emblem::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--grad-gold);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.5;
}
.gate-emblem svg {
  width: 24px; height: 24px;
  stroke: var(--color-gold);
}

.gate-card {
  background: rgba(20,28,46,0.6);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--color-line);
  border-radius: 22px;
  padding: 44px 38px 36px;
  box-shadow:
    0 30px 80px -30px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.06);
  position: relative;
}

.gate-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, rgba(212,168,90,0.4), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
          mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

.gate-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 14px;
  font-weight: 600;
}

.gate-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 1.95rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.18;
}

.gate-sub {
  font-size: 0.92rem;
  color: var(--color-ink-mute);
  line-height: 1.6;
  margin-bottom: 30px;
}

.gate-form {
  display: grid;
  gap: 14px;
  text-align: left;
}

.gate-input-wrap {
  position: relative;
}

.gate-input-wrap input {
  width: 100%;
  padding: 16px 50px 16px 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0.04em;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.gate-input-wrap input::placeholder {
  color: rgba(244,241,234,0.4);
  letter-spacing: 0.02em;
}

.gate-input-wrap input:focus {
  outline: none;
  border-color: var(--color-gold);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 4px rgba(212,168,90,0.14);
}

.gate-input-wrap .toggle-vis {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-mute);
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
}
.gate-input-wrap .toggle-vis:hover { color: var(--color-gold); background: rgba(255,255,255,0.05); }
.gate-input-wrap .toggle-vis svg { width: 18px; height: 18px; }

.gate-btn {
  width: 100%;
  padding: 16px 24px;
  background: var(--grad-gold);
  color: #0b1320;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
  margin-top: 8px;
}
.gate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(212,168,90,0.55);
}
.gate-btn::after {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.6s var(--ease);
}
.gate-btn:hover::after { left: 100%; }

.gate-btn[disabled] { opacity: 0.6; cursor: progress; }

.gate-msg {
  font-size: 0.86rem;
  color: var(--color-ink-mute);
  margin-top: 6px;
  min-height: 22px;
  text-align: center;
  transition: color 0.25s var(--ease);
}
.gate-msg.error { color: #ff8a80; }
.gate-msg.success { color: var(--color-gold); }

.shake {
  animation: shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.gate-foot {
  margin-top: 28px;
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244,241,234,0.4);
}
.gate-foot strong {
  display: block;
  color: rgba(244,241,234,0.7);
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: none;
  margin-top: 6px;
  font-size: 0.92rem;
}

.fade-out {
  animation: fade-out 0.6s var(--ease) forwards;
}
@keyframes fade-out {
  to { opacity: 0; transform: translateY(-12px); filter: blur(4px); }
}
