/* Sign-in gate — full-screen dark page for /signin/.
   Layout follows the reference gate: eyebrow + wordmark + form, centred, with a
   gold glow and a hairline grain. Scoped to `.lfo-gate` so it never leaks into
   the other templates. */

body.lfo-gate-body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: #0b0a08;
  color: #eae4d8;
  font-family: "Archivo", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.lfo-gate-body ::selection {
  background: #c6a96c;
  color: #14110b;
}

.lfo-gate {
  --gate-bg: #0b0a08;
  --gate-ivory: #eae4d8;
  --gate-ink: #14110b;
  --gate-gold: #c6a96c;
  --gate-gold-lift: #d8bd85;
  --gate-muted: rgba(234, 228, 216, .58);
  --gate-hairline: rgba(234, 228, 216, .36);
  --gate-ease: cubic-bezier(.16, 1, .3, 1);

  position: relative;
  display: grid;
  grid-template-rows: .9fr auto 1.1fr;
  justify-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px clamp(20px, 5vw, 48px) calc(24px + env(safe-area-inset-bottom));
  overflow: hidden;
  background: var(--gate-bg);
  color: var(--gate-ivory);
}

/* Soft gold light behind the wordmark. */
.lfo-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 85% at 50% -18%, rgba(198, 169, 108, .1), rgba(198, 169, 108, .03) 42%, transparent 64%);
  pointer-events: none;
}

.lfo-gate__grain {
  position: fixed;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

.lfo-gate__inner {
  position: relative;
  z-index: 1;
  grid-row: 2;
  display: flex;
  width: min(100%, 520px);
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.lfo-gate__eyebrow {
  margin: 0 -.4em 0 0;
  color: var(--gate-gold);
  font-size: clamp(16px, 9px + 2.9vw, 22px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .4em;
  text-transform: uppercase;
}

.lfo-gate__wordmark {
  margin: 26px -.26em 0 0;
  color: var(--gate-ivory);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3rem, 1.4rem + 7.6vw, 6.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: .26em;
  text-transform: uppercase;
}

/* The form sits under the wordmark, left-aligned inside the centred column. */
.lfo-gate__form {
  width: 100%;
  margin-top: clamp(32px, 5vh, 52px);
  text-align: left;
}

.lfo-gate__field {
  margin-bottom: 18px;
}

.lfo-gate__label {
  display: block;
  margin-bottom: 8px;
  color: var(--gate-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.lfo-gate__input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 1px solid var(--gate-hairline);
  border-radius: 0;
  outline: 0;
  background: rgba(234, 228, 216, .035);
  color: var(--gate-ivory);
  font: 400 16px/1 "Archivo", system-ui, sans-serif;
  transition: border-color .25s ease, background-color .25s ease;
}

.lfo-gate__input::placeholder {
  color: rgba(234, 228, 216, .35);
}

.lfo-gate__input:focus {
  border-color: var(--gate-gold);
  background: rgba(198, 169, 108, .06);
}

.lfo-gate__button {
  display: inline-flex;
  width: 100%;
  min-width: 216px;
  height: 52px;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 0 30px 0 calc(30px + .18em);
  border: 0;
  border-radius: 0;
  background: var(--gate-ivory);
  color: var(--gate-ink);
  font: 500 12px/1 "Archivo", system-ui, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .35s var(--gate-ease), background-color .35s var(--gate-ease), opacity .25s ease;
}

.lfo-gate__button:hover {
  background: #f5f0e5;
  transform: translateY(-1px);
}

.lfo-gate__button:active {
  transform: scale(.985);
}

.lfo-gate__button:focus-visible {
  outline: 1px solid var(--gate-gold);
  outline-offset: 4px;
}

.lfo-gate__button.is-loading {
  opacity: .7;
  cursor: progress;
  transform: none;
}

.lfo-gate__forgot {
  display: inline-block;
  margin-top: 20px;
  color: var(--gate-muted);
  font-size: 12px;
  letter-spacing: .04em;
  text-decoration: none;
}

.lfo-gate__forgot:hover {
  color: var(--gate-gold-lift);
}

.lfo-gate__alert {
  width: 100%;
  margin: 28px 0 -12px;
  padding: 13px 15px;
  border: 1px solid rgba(206, 93, 76, .55);
  color: #e9b0a6;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.lfo-gate__alert[hidden] {
  display: none;
}

.lfo-gate__alert--success {
  border-color: rgba(198, 169, 108, .55);
  color: var(--gate-gold-lift);
}

.lfo-gate__colophon {
  position: relative;
  z-index: 1;
  grid-row: 3;
  align-self: end;
  margin: 0;
  color: var(--gate-muted);
  font-size: 11px;
  letter-spacing: .08em;
  text-align: center;
}

/* Password recovery keeps the same shell but carries a heading, a lead and a
   single field on top of the wordmark, so the wordmark sets a step smaller and
   the gate is allowed to scroll if a phone is very short. */
.lfo-gate--compact {
  overflow-y: auto;
}

.lfo-gate--compact .lfo-gate__wordmark {
  margin-top: 18px;
  font-size: clamp(2.2rem, 1.2rem + 4.2vw, 4.25rem);
}

.lfo-gate__title {
  margin: clamp(22px, 3.4vh, 34px) 0 0;
  color: var(--gate-ivory);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 1.1rem + 2.4vw, 2.6rem);
  font-weight: 400;
  line-height: 1.25;
}

.lfo-gate__lead {
  max-width: 42ch;
  margin: 14px 0 0;
  color: var(--gate-muted);
  font-size: 14px;
  line-height: 1.6;
}

.lfo-gate__back {
  display: inline-block;
  margin-top: 24px;
  color: var(--gate-muted);
  font-size: 12px;
  letter-spacing: .04em;
  text-decoration: none;
}

.lfo-gate__back:hover {
  color: var(--gate-gold-lift);
}

@media (prefers-reduced-motion: no-preference) {
  .lfo-gate__eyebrow,
  .lfo-gate__wordmark,
  .lfo-gate__form,
  .lfo-gate__colophon {
    animation: 1.1s var(--gate-ease) both lfo-gate-rise;
  }

  .lfo-gate__eyebrow {
    animation-delay: .1s;
  }

  .lfo-gate__wordmark {
    animation-duration: 1.3s;
    animation-delay: .22s;
  }

  .lfo-gate__form {
    animation-delay: .62s;
  }

  .lfo-gate__colophon {
    animation-delay: .88s;
  }

  @keyframes lfo-gate-rise {
    from {
      opacity: 0;
      transform: translateY(18px);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }
}

@media (max-width: 560px) {
  /* Nine wide capitals plus tracking do not fit a phone at the desktop ratio,
     so the size and letter-spacing shrink together to stay inside the page. */
  .lfo-gate__wordmark {
    margin-right: -.1em;
    font-size: clamp(2rem, 10.2vw, 3.4rem);
    letter-spacing: .14em;
  }

  .lfo-gate__eyebrow {
    margin-right: -.28em;
    letter-spacing: .28em;
  }
}
