/* ==========================================================================
   FOUND it · ERP — sign in
   Half the screen is the plant, half is the form. The artwork is a light
   watercolour, so the panel is cream and the type is navy — no dark scrim.
   ========================================================================== */

.fa {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--fi-surface);
}

/* ---------------------------------------------------------- brand panel */

.fa-brand {
  position: relative;
  overflow: hidden;
  background: #f4e7d2;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 60px 58px 44px;
  isolation: isolate;
}

/* The painting, anchored left so the silos and the sun stay in frame. */
.fa-photo {
  position: absolute;
  inset: -2%;
  background: url("/assets/images/auth-plant.jpg") left center / cover no-repeat;
  z-index: -3;
  animation: fa-pan 44s ease-in-out infinite alternate;
}

@keyframes fa-pan {
  to {
    transform: scale(1.045) translate(0.8%, -0.6%);
  }
}

/* A cream wash, not a navy one: lifts the top so dark type reads over the
   sky without flattening the watercolour underneath. */
.fa-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(
      180deg,
      rgba(248, 240, 226, 0.92) 0%,
      rgba(248, 240, 226, 0.62) 22%,
      rgba(248, 240, 226, 0.12) 44%,
      rgba(248, 240, 226, 0) 62%
    ),
    linear-gradient(
      270deg,
      rgba(250, 244, 233, 0.55) 0%,
      rgba(250, 244, 233, 0) 38%
    );
}

.fa-title {
  font-size: 35px !important;
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--fi-navy);
  margin: 0 0 16px;
  animation: fa-rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.08s both;
}

.fa-sub {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(37, 46, 60, 0.78);
  margin: 0;
  animation: fa-rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.16s both;
}

.fa-brand-foot {
  position: relative;
  margin-top: auto;
  z-index: 1;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.9);
  border: 1px solid rgba(11, 31, 58, 0.08);
  box-shadow: 0 2px 10px rgba(60, 40, 15, 0.1);
  backdrop-filter: blur(6px);
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(24, 33, 48, 0.82);
  animation: fa-rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) 0.28s both;
}

.fa-brand-foot img {
  height: 13px;
  width: auto;
  opacity: 1;
}

.fa-brand-inner {
  position: relative;
  max-width: 520px;
  padding-top: 6px;
}

@keyframes fa-pan {
  to {
    transform: scale(1.06) translate(-1%, -0.8%);
  }
}



/* ----------------------------------------------------------------- form */

.fa-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
}

.fa-form-wrap {
  width: 100%;
  max-width: 372px;
}

/* Everything in the form rises in sequence, one small beat apart. */
.fa-lockup,
.fa-h,
.fa-p,
.fa-field,
.fa-submit,
.fa-help {
  animation: fa-rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 60ms + 120ms);
}

@keyframes fa-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.fa-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 40px;
}

.fa-lockup img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.fa-lockup b {
  font-family: var(--fi-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.06em;
  color: var(--fi-navy);
}

.fa-h {
  font-size: 26px !important;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--fi-ink);
  margin: 0 0 7px;
}

.fa-p {
  font-size: 14.5px;
  color: var(--fi-muted);
  margin: 0 0 30px;
}

.fa-field {
  margin-bottom: 18px;
}

.fa-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #475467;
  margin-bottom: 7px;
}

.fa-input {
  position: relative;
  display: flex;
  align-items: center;
  background: #fbfcfd;
  border: 1.5px solid var(--fi-line);
  border-radius: 12px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease,
    background 0.16s ease;
}

.fa-input:focus-within {
  background: #fff;
  border-color: var(--fi-crimson);
  box-shadow: 0 0 0 4px rgba(168, 27, 35, 0.1);
}

.fa-input-icon {
  position: absolute;
  left: 14px;
  font-size: 19px;
  color: #98a2b3;
  pointer-events: none;
  transition: color 0.16s ease;
}

.fa-input:focus-within .fa-input-icon {
  color: var(--fi-crimson);
}

.fa-input input {
  flex: 1;
  height: 50px;
  padding: 0 14px 0 44px;
  border: 0;
  background: transparent;
  border-radius: 12px;
  font-family: var(--fi-ui);
  font-size: 14.5px;
  color: var(--fi-ink);
  outline: none;
}

.fa-input input::placeholder {
  color: #b6bece;
}

.fa-eye {
  border: 0;
  background: transparent;
  padding: 0 14px;
  height: 50px;
  color: #98a2b3;
  font-size: 19px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  border-radius: 0 12px 12px 0;
  transition: color 0.16s ease;
}

.fa-eye:hover {
  color: var(--fi-ink);
}

.fa-error {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 11px 13px;
  border-radius: 11px;
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: #b42318;
  font-size: 13.5px;
  animation: fa-shake 0.36s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.fa-error svg {
  flex-shrink: 0;
  font-size: 17px;
}

@keyframes fa-shake {
  10%,
  90% {
    transform: translateX(-2px);
  }
  20%,
  80% {
    transform: translateX(4px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-6px);
  }
  40%,
  60% {
    transform: translateX(6px);
  }
}

.fa-submit {
  width: 100%;
  height: 50px;
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 12px;
  background: var(--fi-navy);
  color: #fff;
  font-family: var(--fi-ui);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

.fa-submit svg {
  font-size: 18px;
  transition: transform 0.16s ease;
}

.fa-submit:hover:not(:disabled) {
  background: #12305a;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(11, 31, 58, 0.22);
}

.fa-submit:hover:not(:disabled) svg {
  transform: translateX(3px);
}

.fa-submit:active:not(:disabled) {
  transform: translateY(0);
}

.fa-submit:disabled {
  opacity: 0.72;
  cursor: default;
}

.fa-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: fa-spin 0.7s linear infinite;
}

@keyframes fa-spin {
  to {
    transform: rotate(360deg);
  }
}

.fa-help {
  margin: 26px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--fi-muted);
}

.fa-submit:focus-visible,
.fa-eye:focus-visible {
  outline: 2px solid var(--fi-crimson);
  outline-offset: 2px;
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .fa {
    grid-template-columns: 1fr;
  }

  .fa-brand {
    padding: 28px 24px 22px;
    min-height: 300px;
    justify-content: flex-end;
  }

  .fa-brand-inner {
    max-width: none;
    padding-top: 0;
  }

  .fa-title {
    font-size: 25px !important;
    margin-bottom: 14px;
  }

  /* The panel is short here; the strap-line would land on the busy paint. */
  .fa-sub {
    display: none;
  }

  .fa-photo {
    animation: none;
    inset: 0;
  }

  /* Stronger wash so the headline holds over the artwork. */
  .fa-shade {
    background: linear-gradient(
      180deg,
      rgba(248, 240, 226, 0.94) 0%,
      rgba(248, 240, 226, 0.7) 34%,
      rgba(248, 240, 226, 0.25) 62%,
      rgba(248, 240, 226, 0.08) 100%
    );
  }

  .fa-brand-foot {
    margin-top: 16px;
  }

  .fa-form-side {
    padding: 34px 24px 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fa-photo,
  .fa-lockup,
  .fa-h,
  .fa-p,
  .fa-field,
  .fa-submit,
  .fa-help,
  .fa-title,
  .fa-sub,
  .fa-brand-foot {
    animation: none !important;
  }
}
