:root {
  --ink: #08080a;
  --paper: #f3efe6;
  --paper-dim: #b9b4ab;
  --paper-mute: #8b877f;
  --gold: #e6c66a;
  --gold-deep: #c9a227;
  --violet: #a884f0;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.gate {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  overflow: hidden;
}

.gate-field { position: absolute; inset: 0; pointer-events: none; }
.gate-field svg { width: 100%; height: 100%; }
.gate::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 50% 20%, transparent 25%, var(--ink) 88%);
  pointer-events: none;
}

.gate-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 468px;
  padding: clamp(30px, 5vw, 44px);
  border: 1px solid rgba(230, 198, 106, 0.16);
  border-radius: 18px;
  background: rgba(11, 11, 15, 0.82);
  backdrop-filter: blur(16px);
  box-shadow: 0 50px 110px -60px rgba(230, 198, 106, 0.4);
}

.gate-brand {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 26px;
  font-family: var(--serif);
  font-size: 27px;
  letter-spacing: 0.08em;
}
.gate-mark {
  width: 15px; height: 15px;
  background: conic-gradient(from 210deg, var(--gold), var(--violet), var(--gold-deep));
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.gate-eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.gate-card h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 5vw, 2.3rem);
  line-height: 1.1;
  margin: 0 0 14px;
  color: #fbf7ee;
}

.gate-copy { margin: 0 0 28px; color: var(--paper-dim); font-size: 14.8px; }

.gate-label {
  display: block;
  font-size: 10.8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper-mute);
  margin-bottom: 9px;
}

#gate-email,
#gate-password {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.42);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  transition: border-color 0.18s var(--ease);
}
#gate-email { margin-bottom: 18px; }
#gate-password { letter-spacing: 0.14em; }
#gate-email:focus,
#gate-password:focus { border-color: var(--gold); }

.gate-btn {
  width: 100%;
  margin-top: 14px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--gold), var(--gold-deep));
  color: #150f02;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.16s var(--ease), box-shadow 0.2s var(--ease), opacity 0.16s var(--ease);
  box-shadow: 0 12px 32px -16px rgba(230, 198, 106, 0.7);
}
.gate-btn:hover:not(:disabled) { transform: translateY(-1px); }
.gate-btn:disabled { opacity: 0.55; cursor: progress; }

.gate-status {
  min-height: 22px;
  margin: 16px 0 0;
  font-size: 13.6px;
  color: var(--paper-dim);
}
.gate-status[data-kind="error"] { color: #f0a6a6; }
.gate-status[data-kind="ok"] { color: #9fdcb0; }

.gate-fine {
  margin: 24px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 11.8px;
  color: var(--paper-mute);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
