/* =============================================================
   auth.css — private access gateway (index.html)
   A deliberately separate visual world: no imagery, no branding,
   no chrome. One field, one action.
   ============================================================= */

:root {
  --gate-ink:    #0D0C0A;
  --gate-ink-2:  #17150F;
  --gate-paper:  #EFEBE1;
  --gate-dim:    #7C776B;
  --gate-line:   rgba(239, 235, 225, 0.16);
  --gate-accent: #E0603C;
  --gate-sans:   "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gate-serif:  "Newsreader", "Iowan Old Style", Palatino, Georgia, serif;
  --gate-ease:   cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--gate-ink);
  background-image:
    radial-gradient(120% 90% at 50% 0%, #201D16 0%, var(--gate-ink) 62%);
  color: var(--gate-paper);
  font-family: var(--gate-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 22px;
  overflow-x: hidden;
}

/* Hairline frame — the only ornament on the page */
.gate-frame {
  position: fixed;
  inset: clamp(12px, 2.2vw, 26px);
  border: 1px solid var(--gate-line);
  pointer-events: none;
}

.gate {
  position: relative;
  width: 100%;
  max-width: 360px;
  animation: gate-in 0.7s var(--gate-ease) both;
}

@keyframes gate-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.gate__title {
  margin: 0 0 6px;
  font-family: var(--gate-serif);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.gate__rule {
  width: 34px;
  height: 2px;
  background: var(--gate-accent);
  margin: 20px 0 34px;
}

.gate__field { display: block; }

.gate__label {
  display: block;
  margin-bottom: 12px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gate-dim);
}

.gate__input {
  width: 100%;
  height: 52px;
  padding: 0 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--gate-line);
  color: var(--gate-paper);
  font-family: var(--gate-sans);
  font-size: 17px;               /* >=16px prevents iOS zoom on focus */
  font-weight: 500;
  letter-spacing: 0.4em;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.3s var(--gate-ease);
}
.gate__input::placeholder { color: rgba(124, 119, 107, 0.55); letter-spacing: 0.18em; }
.gate__input:hover { border-bottom-color: rgba(239, 235, 225, 0.32); }
.gate__input:focus {
  outline: none;
  border-bottom-color: var(--gate-accent);
  box-shadow: 0 1px 0 0 var(--gate-accent);
}
.gate__field:focus-within .gate__label { color: var(--gate-accent); }

.gate.is-error .gate__input { border-bottom-color: var(--gate-accent); }

.gate__error {
  min-height: 20px;
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--gate-accent);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.28s var(--gate-ease), transform 0.28s var(--gate-ease);
}
.gate.is-error .gate__error { opacity: 1; transform: none; }

.gate__submit {
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  padding: 0 22px;
  background: var(--gate-paper);
  color: var(--gate-ink);
  border: 1px solid var(--gate-paper);
  border-radius: 0;
  font-family: var(--gate-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--gate-ease), color 0.3s var(--gate-ease), border-color 0.3s var(--gate-ease);
}
.gate__submit:hover {
  background: transparent;
  color: var(--gate-paper);
  border-color: var(--gate-paper);
}
.gate__submit:focus-visible { outline: 2px solid var(--gate-accent); outline-offset: 4px; }
.gate__submit:active { transform: translateY(1px); }

/* Autofill in WebKit/Blink */
.gate__input:-webkit-autofill,
.gate__input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--gate-paper);
  -webkit-box-shadow: 0 0 0 1000px var(--gate-ink-2) inset;
  caret-color: var(--gate-paper);
}

.gate-noscript {
  max-width: 360px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--gate-dim);
}

@media (max-width: 380px) {
  .gate__input { letter-spacing: 0.28em; }
  .gate__title { font-size: 1.42rem; }
}

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