/* ==========================================================================
   falgunbhaipatel.com — auth.css
   Styles the access gate only. CSS-only background treatment: no images,
   no external assets, no third-party requests.
   ========================================================================== */

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

:root {
  --g-900: #0E1116;
  --g-850: #12161D;
  --g-800: #171C25;
  --on-dark: #F3F6FB;
  --on-dark-2: #A9B3C3;
  --on-dark-3: #77828F;
  --volt: #6A5AF9;
  --volt-glow: #A79BFF;
  --rule: rgba(243, 246, 251, 0.14);
  --rule-2: rgba(243, 246, 251, 0.30);
  --danger: #FF8FA0;
  --ok: #7BE0B5;
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono",
          Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--g-900);
  color: var(--on-dark);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

/* CSS-only ground: a faint measured grid with two soft violet fields. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(243,246,251,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(243,246,251,.028) 1px, transparent 1px);
  background-size: 88px 88px;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(46% 44% at 22% 18%, rgba(106,90,249,.24), transparent 68%),
    radial-gradient(40% 40% at 84% 88%, rgba(106,90,249,.14), transparent 70%);
  pointer-events: none;
}

.gate {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
}

.gate__frame {
  border: 1px solid var(--rule);
  background: rgba(18, 22, 29, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  padding: clamp(1.6rem, 1rem + 2.6vw, 2.6rem);
  position: relative;
}
.gate__frame::before {
  content: "";
  position: absolute; top: -1px; left: -1px;
  width: 62px; height: 2px;
  background: var(--volt);
}

.gate__label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--on-dark-3);
  margin-bottom: 1.15rem;
}

.gate__field { position: relative; display: flex; align-items: center; }

.gate__input {
  width: 100%;
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-2);
  color: var(--on-dark);
  font-family: var(--font);
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0.65rem 3rem 0.7rem 0;
  border-radius: 0;
  transition: border-color 180ms var(--ease);
}
.gate__input:focus { outline: none; border-bottom-color: var(--volt-glow); }
.gate__input::placeholder { color: rgba(169,179,195,.42); letter-spacing: 0.06em; font-weight: 400; }

.gate__peek {
  position: absolute;
  right: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: none; border: 0; cursor: pointer;
  color: var(--on-dark-3);
  transition: color 180ms var(--ease);
}
.gate__peek:hover { color: var(--on-dark); }
.gate__peek svg { width: 18px; height: 18px; display: block; }
.gate__peek .icon-off { display: none; }
.gate__peek[aria-pressed="true"] .icon-on  { display: none; }
.gate__peek[aria-pressed="true"] .icon-off { display: block; }

.gate__submit {
  margin-top: 1.6rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--volt);
  color: #fff;
  border: 1px solid var(--volt);
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.95rem 1.25rem;
  transition: background 180ms var(--ease), opacity 180ms var(--ease);
}
.gate__submit:hover:not(:disabled) { background: #5847E8; }
.gate__submit:disabled { opacity: 0.55; cursor: progress; }
.gate__submit svg { width: 16px; height: 16px; flex: none; }

.gate__status {
  min-height: 1.35rem;
  margin-top: 0.95rem;
  font-size: 0.845rem;
  line-height: 1.45;
  color: var(--danger);
}
.gate__status[data-state="ok"] { color: var(--ok); }

.gate.is-invalid .gate__input { border-bottom-color: var(--danger); }
.gate.is-invalid .gate__frame { animation: nudge 340ms var(--ease); }

@keyframes nudge {
  0%, 100% { transform: translateX(0); }
  22%      { transform: translateX(-6px); }
  56%      { transform: translateX(5px); }
  80%      { transform: translateX(-2px); }
}

:focus-visible { outline: 2px solid var(--volt-glow); outline-offset: 3px; }

.gate__noscript {
  margin-top: 1.1rem;
  font-size: 0.85rem;
  color: var(--on-dark-2);
}

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

@media (max-width: 420px) {
  body { padding: 18px; }
  .gate__input { font-size: 1.12rem; }
}

@media (max-height: 460px) {
  body { align-items: start; padding-block: 28px; overflow-y: auto; }
}
